diff options
Diffstat (limited to 'Source/WebKit/chromium/src')
-rw-r--r-- | Source/WebKit/chromium/src/ChromeClientImpl.cpp | 2 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/PlatformSupport.cpp | 26 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp | 10 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/TextFieldDecoratorImpl.h | 3 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebInputElement.cpp | 17 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebLayerTreeView.cpp | 40 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp | 107 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebLayerTreeViewImpl.h | 27 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebSettingsImpl.cpp | 6 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebSettingsImpl.h | 1 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebTextFieldDecoratorClient.cpp | 46 |
11 files changed, 157 insertions, 128 deletions
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.cpp b/Source/WebKit/chromium/src/ChromeClientImpl.cpp index bc3061fb8..467d6389d 100644 --- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp +++ b/Source/WebKit/chromium/src/ChromeClientImpl.cpp @@ -1037,7 +1037,7 @@ void ChromeClientImpl::addTextFieldDecorationsTo(HTMLInputElement* input) if (!decorators[i]->willAddDecorationTo(input)) continue; RefPtr<TextFieldDecorationElement> decoration = TextFieldDecorationElement::create(input->document(), decorators[i].get()); - decoration->decorate(input); + decoration->decorate(input, decorators[i]->visibleByDefault()); } } diff --git a/Source/WebKit/chromium/src/PlatformSupport.cpp b/Source/WebKit/chromium/src/PlatformSupport.cpp index fb06ccdf4..7cc7f5a6e 100644 --- a/Source/WebKit/chromium/src/PlatformSupport.cpp +++ b/Source/WebKit/chromium/src/PlatformSupport.cpp @@ -317,20 +317,6 @@ bool PlatformSupport::deleteEmptyDirectory(const String& path) return WebKit::Platform::current()->fileUtilities()->deleteEmptyDirectory(path); } -bool PlatformSupport::getFileSize(const String& path, long long& result) -{ - return WebKit::Platform::current()->fileUtilities()->getFileSize(path, result); -} - -bool PlatformSupport::getFileModificationTime(const String& path, time_t& result) -{ - double modificationTime; - if (!WebKit::Platform::current()->fileUtilities()->getFileModificationTime(path, modificationTime)) - return false; - result = static_cast<time_t>(modificationTime); - return true; -} - bool PlatformSupport::getFileMetadata(const String& path, FileMetadata& result) { WebFileInfo webFileInfo; @@ -414,7 +400,7 @@ PassOwnPtr<AsyncFileSystem> PlatformSupport::createAsyncFileSystem() #if OS(WINDOWS) bool PlatformSupport::ensureFontLoaded(HFONT font) { - WebSandboxSupport* ss = webKitPlatformSupport()->sandboxSupport(); + WebSandboxSupport* ss = WebKit::Platform::current()->sandboxSupport(); // if there is no sandbox, then we can assume the font // was able to be loaded successfully already @@ -425,7 +411,7 @@ bool PlatformSupport::ensureFontLoaded(HFONT font) #if OS(DARWIN) bool PlatformSupport::loadFont(NSFont* srcFont, CGFontRef* out, uint32_t* fontID) { - WebSandboxSupport* ss = webKitPlatformSupport()->sandboxSupport(); + WebSandboxSupport* ss = WebKit::Platform::current()->sandboxSupport(); if (ss) return ss->loadFont(srcFont, out, fontID); @@ -448,8 +434,8 @@ void PlatformSupport::getFontFamilyForCharacters(const UChar* characters, size_t family->isItalic = false; #else WebFontFamily webFamily; - if (webKitPlatformSupport()->sandboxSupport()) - webKitPlatformSupport()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters, preferredLocale, &webFamily); + if (WebKit::Platform::current()->sandboxSupport()) + WebKit::Platform::current()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters, preferredLocale, &webFamily); else WebFontInfo::familyForChars(characters, numCharacters, preferredLocale, &webFamily); family->name = String::fromUTF8(webFamily.name.data(), webFamily.name.length()); @@ -463,8 +449,8 @@ void PlatformSupport::getRenderStyleForStrike(const char* font, int sizeAndStyle #if !OS(ANDROID) WebFontRenderStyle style; - if (webKitPlatformSupport()->sandboxSupport()) - webKitPlatformSupport()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style); + if (WebKit::Platform::current()->sandboxSupport()) + WebKit::Platform::current()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style); else WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style); diff --git a/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp index e58c022ee..a74aa825a 100644 --- a/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp +++ b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp @@ -56,12 +56,22 @@ TextFieldDecoratorImpl::~TextFieldDecoratorImpl() { } +WebTextFieldDecoratorClient* TextFieldDecoratorImpl::decoratorClient() +{ + return m_client; +} + bool TextFieldDecoratorImpl::willAddDecorationTo(HTMLInputElement* input) { ASSERT(input); return m_client->shouldAddDecorationTo(WebInputElement(input)); } +bool TextFieldDecoratorImpl::visibleByDefault() +{ + return m_client->visibleByDefault(); +} + CachedImage* TextFieldDecoratorImpl::imageForNormalState() { if (!m_cachedImageForNormalState) { diff --git a/Source/WebKit/chromium/src/TextFieldDecoratorImpl.h b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.h index 667475282..8f52069ba 100644 --- a/Source/WebKit/chromium/src/TextFieldDecoratorImpl.h +++ b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.h @@ -43,8 +43,11 @@ public: static PassOwnPtr<TextFieldDecoratorImpl> create(WebTextFieldDecoratorClient*); virtual ~TextFieldDecoratorImpl(); + WebTextFieldDecoratorClient* decoratorClient(); + private: virtual bool willAddDecorationTo(WebCore::HTMLInputElement*) OVERRIDE; + virtual bool visibleByDefault() OVERRIDE; virtual WebCore::CachedImage* imageForNormalState() OVERRIDE; virtual WebCore::CachedImage* imageForDisabledState() OVERRIDE; virtual WebCore::CachedImage* imageForReadonlyState() OVERRIDE; diff --git a/Source/WebKit/chromium/src/WebInputElement.cpp b/Source/WebKit/chromium/src/WebInputElement.cpp index adae9dac8..c58e90704 100644 --- a/Source/WebKit/chromium/src/WebInputElement.cpp +++ b/Source/WebKit/chromium/src/WebInputElement.cpp @@ -31,11 +31,16 @@ #include "config.h" #include "WebInputElement.h" +#include "ElementShadow.h" #include "HTMLDataListElement.h" #include "HTMLInputElement.h" #include "HTMLNames.h" +#include "ShadowRoot.h" #include "TextControlInnerElements.h" +#include "TextFieldDecorationElement.h" +#include "TextFieldDecoratorImpl.h" #include "WebNodeCollection.h" +#include "WebTextFieldDecoratorClient.h" #include "platform/WebString.h" #include <wtf/PassRefPtr.h> @@ -221,6 +226,18 @@ int WebInputElement::defaultMaxLength() return HTMLInputElement::maximumLength; } +WebElement WebInputElement::decorationElementFor(WebTextFieldDecoratorClient* decoratorClient) +{ + ShadowRoot* shadowRoot = unwrap<HTMLInputElement>()->youngestShadowRoot(); + while (shadowRoot) { + TextFieldDecorationElement* decoration = TextFieldDecorationElement::fromShadowRoot(shadowRoot); + if (decoration && decoratorClient->isClientFor(decoration->textFieldDecorator())) + return WebElement(decoration); + shadowRoot = shadowRoot->olderShadowRoot(); + } + return WebElement(); +} + WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem) : WebFormControlElement(elem) { diff --git a/Source/WebKit/chromium/src/WebLayerTreeView.cpp b/Source/WebKit/chromium/src/WebLayerTreeView.cpp index a4d7d918a..65a2a63b1 100644 --- a/Source/WebKit/chromium/src/WebLayerTreeView.cpp +++ b/Source/WebKit/chromium/src/WebLayerTreeView.cpp @@ -75,98 +75,98 @@ bool WebLayerTreeView::initialize(WebLayerTreeViewClient* client, const WebLayer void WebLayerTreeView::setSurfaceReady() { - m_private->setSurfaceReady(); + m_private->layerTreeHost()->setSurfaceReady(); } void WebLayerTreeView::setRootLayer(WebLayer *root) { if (root) - m_private->setRootLayer(*root); + m_private->layerTreeHost()->setRootLayer(*root); else - m_private->setRootLayer(PassRefPtr<LayerChromium>()); + m_private->layerTreeHost()->setRootLayer(PassRefPtr<LayerChromium>()); } int WebLayerTreeView::compositorIdentifier() { - return m_private->compositorIdentifier(); + return m_private->layerTreeHost()->compositorIdentifier(); } void WebLayerTreeView::setViewportSize(const WebSize& viewportSize) { - m_private->setViewportSize(viewportSize); + m_private->layerTreeHost()->setViewportSize(viewportSize); } WebSize WebLayerTreeView::viewportSize() const { - return WebSize(m_private->viewportSize()); + return WebSize(m_private->layerTreeHost()->viewportSize()); } void WebLayerTreeView::setBackgroundColor(WebColor color) { - m_private->setBackgroundColor(color); + m_private->layerTreeHost()->setBackgroundColor(color); } void WebLayerTreeView::setVisible(bool visible) { - m_private->setVisible(visible); + m_private->layerTreeHost()->setVisible(visible); } void WebLayerTreeView::setPageScaleFactorAndLimits(float pageScaleFactor, float minimum, float maximum) { - m_private->setPageScaleFactorAndLimits(pageScaleFactor, minimum, maximum); + m_private->layerTreeHost()->setPageScaleFactorAndLimits(pageScaleFactor, minimum, maximum); } void WebLayerTreeView::startPageScaleAnimation(const WebPoint& scroll, bool useAnchor, float newPageScale, double durationSec) { - m_private->startPageScaleAnimation(IntSize(scroll.x, scroll.y), useAnchor, newPageScale, durationSec); + m_private->layerTreeHost()->startPageScaleAnimation(IntSize(scroll.x, scroll.y), useAnchor, newPageScale, durationSec); } void WebLayerTreeView::setNeedsAnimate() { - m_private->setNeedsAnimate(); + m_private->layerTreeHost()->setNeedsAnimate(); } void WebLayerTreeView::setNeedsRedraw() { - m_private->setNeedsRedraw(); + m_private->layerTreeHost()->setNeedsRedraw(); } bool WebLayerTreeView::commitRequested() const { - return m_private->commitRequested(); + return m_private->layerTreeHost()->commitRequested(); } void WebLayerTreeView::composite() { if (CCProxy::hasImplThread()) - m_private->setNeedsCommit(); + m_private->layerTreeHost()->setNeedsCommit(); else - m_private->composite(); + m_private->layerTreeHost()->composite(); } void WebLayerTreeView::updateAnimations(double frameBeginTime) { - m_private->updateAnimations(frameBeginTime); + m_private->layerTreeHost()->updateAnimations(frameBeginTime); } bool WebLayerTreeView::compositeAndReadback(void *pixels, const WebRect& rect) { - return m_private->compositeAndReadback(pixels, rect); + return m_private->layerTreeHost()->compositeAndReadback(pixels, rect); } void WebLayerTreeView::finishAllRendering() { - m_private->finishAllRendering(); + m_private->layerTreeHost()->finishAllRendering(); } WebGraphicsContext3D* WebLayerTreeView::context() { - return GraphicsContext3DPrivate::extractWebGraphicsContext3D(m_private->context()); + return GraphicsContext3DPrivate::extractWebGraphicsContext3D(m_private->layerTreeHost()->context()); } void WebLayerTreeView::loseCompositorContext(int numTimes) { - m_private->loseContext(numTimes); + m_private->layerTreeHost()->loseContext(numTimes); } } // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp index 1c0a0e816..45a99603c 100644 --- a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp +++ b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp @@ -29,6 +29,7 @@ #include "CCThreadImpl.h" #include "GraphicsContext3DPrivate.h" #include "LayerChromium.h" +#include "cc/CCLayerTreeHost.h" #include "cc/CCThreadProxy.h" #include "platform/WebGraphicsContext3D.h" #include "platform/WebLayer.h" @@ -41,18 +42,48 @@ using namespace WebCore; namespace WebKit { +// Converts messages from CCLayerTreeHostClient to WebLayerTreeViewClient. +class WebLayerTreeViewClientAdapter : public WebCore::CCLayerTreeHostClient { +public: + WebLayerTreeViewClientAdapter(WebLayerTreeViewClient* client) : m_client(client) { } + virtual ~WebLayerTreeViewClientAdapter() { } + + // CCLayerTreeHostClient implementation + virtual void willBeginFrame() OVERRIDE { m_client->willBeginFrame(); } + virtual void didBeginFrame() OVERRIDE { m_client->didBeginFrame(); } + virtual void updateAnimations(double monotonicFrameBeginTime) OVERRIDE { m_client->updateAnimations(monotonicFrameBeginTime); } + virtual void layout() OVERRIDE { m_client->layout(); } + virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) OVERRIDE { m_client->applyScrollAndScale(scrollDelta, pageScale); } + virtual PassRefPtr<WebCore::GraphicsContext3D> createContext() OVERRIDE + { + OwnPtr<WebGraphicsContext3D> webContext = adoptPtr(m_client->createContext3D()); + if (!webContext) + return 0; + return GraphicsContext3DPrivate::createGraphicsContextFromWebContext(webContext.release(), GraphicsContext3D::RenderDirectlyToHostWindow, false /* preserveDrawingBuffer */ ); + } + virtual void didRecreateContext(bool success) OVERRIDE { m_client->didRebindGraphicsContext(success); } + virtual void willCommit() OVERRIDE { m_client->willCommit(); } + virtual void didCommit() OVERRIDE { m_client->didCommit(); } + virtual void didCommitAndDrawFrame() OVERRIDE { m_client->didCommitAndDrawFrame(); } + virtual void didCompleteSwapBuffers() OVERRIDE { m_client->didCompleteSwapBuffers(); } + virtual void scheduleComposite() OVERRIDE { m_client->scheduleComposite(); } + +private: + WebLayerTreeViewClient* m_client; +}; + PassOwnPtr<WebLayerTreeViewImpl> WebLayerTreeViewImpl::create(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings) { - OwnPtr<WebLayerTreeViewImpl> host = adoptPtr(new WebLayerTreeViewImpl(client, settings)); - if (!host->initialize()) + OwnPtr<WebLayerTreeViewImpl> impl = adoptPtr(new WebLayerTreeViewImpl(client, settings)); + if (!impl->layerTreeHost()) return nullptr; - host->setRootLayer(root); - return host.release(); + impl->layerTreeHost()->setRootLayer(root); + return impl.release(); } WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client, const WebLayerTreeView::Settings& settings) - : CCLayerTreeHost(this, settings) - , m_client(client) + : m_clientAdapter(adoptPtr(new WebLayerTreeViewClientAdapter(client))) + , m_layerTreeHost(CCLayerTreeHost::create(m_clientAdapter.get(), settings)) { } @@ -60,68 +91,4 @@ WebLayerTreeViewImpl::~WebLayerTreeViewImpl() { } -void WebLayerTreeViewImpl::willBeginFrame() -{ - m_client->willBeginFrame(); -} - -void WebLayerTreeViewImpl::didBeginFrame() -{ - m_client->didBeginFrame(); -} - -void WebLayerTreeViewImpl::updateAnimations(double monotonicFrameBeginTime) -{ - m_client->updateAnimations(monotonicFrameBeginTime); -} - -void WebLayerTreeViewImpl::layout() -{ - m_client->layout(); -} - -void WebLayerTreeViewImpl::applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) -{ - m_client->applyScrollAndScale(WebSize(scrollDelta), pageScale); -} - -PassRefPtr<GraphicsContext3D> WebLayerTreeViewImpl::createContext() -{ - OwnPtr<WebGraphicsContext3D> webContext = adoptPtr(m_client->createContext3D()); - if (!webContext) - return 0; - - return GraphicsContext3DPrivate::createGraphicsContextFromWebContext(webContext.release(), GraphicsContext3D::RenderDirectlyToHostWindow, false /* preserveDrawingBuffer */ ); -} - -void WebLayerTreeViewImpl::didRecreateContext(bool success) -{ - m_client->didRebindGraphicsContext(success); -} - -void WebLayerTreeViewImpl::willCommit() -{ - m_client->willCommit(); -} - -void WebLayerTreeViewImpl::didCommit() -{ - m_client->didCommit(); -} - -void WebLayerTreeViewImpl::didCommitAndDrawFrame() -{ - m_client->didCommitAndDrawFrame(); -} - -void WebLayerTreeViewImpl::didCompleteSwapBuffers() -{ - m_client->didCompleteSwapBuffers(); -} - -void WebLayerTreeViewImpl::scheduleComposite() -{ - m_client->scheduleComposite(); -} - } // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h index f854b7e60..1184342e8 100644 --- a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h +++ b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h @@ -27,37 +27,30 @@ #define WebLayerTreeViewImpl_h #include "platform/WebLayerTreeView.h" -#include "cc/CCLayerTreeHost.h" +#include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> +namespace WebCore { +class CCLayerTreeHost; +} + namespace WebKit { class WebLayer; class WebLayerTreeViewClient; +class WebLayerTreeViewClientAdapter; -class WebLayerTreeViewImpl : public WebCore::CCLayerTreeHost, public WebCore::CCLayerTreeHostClient { +class WebLayerTreeViewImpl { public: static PassOwnPtr<WebLayerTreeViewImpl> create(WebLayerTreeViewClient*, const WebLayer& root, const WebLayerTreeView::Settings&); virtual ~WebLayerTreeViewImpl(); - virtual void willBeginFrame() OVERRIDE; - virtual void didBeginFrame() OVERRIDE; - virtual void updateAnimations(double monotonicFrameBeginTime) OVERRIDE; - virtual void layout() OVERRIDE; - virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) OVERRIDE; - virtual PassRefPtr<WebCore::GraphicsContext3D> createContext() OVERRIDE; - virtual void didRecreateContext(bool success) OVERRIDE; - virtual void willCommit() OVERRIDE; - virtual void didCommit() OVERRIDE; - virtual void didCommitAndDrawFrame() OVERRIDE; - virtual void didCompleteSwapBuffers() OVERRIDE; - - // Only used in the single threaded path. - virtual void scheduleComposite() OVERRIDE; + WebCore::CCLayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); } private: WebLayerTreeViewImpl(WebLayerTreeViewClient*, const WebLayerTreeView::Settings&); - WebLayerTreeViewClient* m_client; + OwnPtr<WebLayerTreeViewClientAdapter> m_clientAdapter; + OwnPtr<WebCore::CCLayerTreeHost> m_layerTreeHost; }; } // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.cpp b/Source/WebKit/chromium/src/WebSettingsImpl.cpp index 78770a95c..ffb8c9bfe 100644 --- a/Source/WebKit/chromium/src/WebSettingsImpl.cpp +++ b/Source/WebKit/chromium/src/WebSettingsImpl.cpp @@ -611,4 +611,10 @@ void WebSettingsImpl::setMaxUntiledLayerSize(WebSize size) m_maxUntiledLayerSize = size; } +void WebSettingsImpl::setSyncXHRInDocumentsEnabled(bool enabled) +{ + m_settings->setSyncXHRInDocumentsEnabled(enabled); +} + + } // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.h b/Source/WebKit/chromium/src/WebSettingsImpl.h index 1c3b0e7e2..033784039 100644 --- a/Source/WebKit/chromium/src/WebSettingsImpl.h +++ b/Source/WebKit/chromium/src/WebSettingsImpl.h @@ -147,6 +147,7 @@ public: virtual void setViewportEnabled(bool); virtual void setMediaPlaybackRequiresUserGesture(bool); virtual bool viewportEnabled() const { return m_viewportEnabled; } + virtual void setSyncXHRInDocumentsEnabled(bool); bool showFPSCounter() const { return m_showFPSCounter; } bool showPlatformLayerTree() const { return m_showPlatformLayerTree; } diff --git a/Source/WebKit/chromium/src/WebTextFieldDecoratorClient.cpp b/Source/WebKit/chromium/src/WebTextFieldDecoratorClient.cpp new file mode 100644 index 000000000..4d5b16174 --- /dev/null +++ b/Source/WebKit/chromium/src/WebTextFieldDecoratorClient.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2012 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebTextFieldDecoratorClient.h" + +#include "TextFieldDecorationElement.h" +#include "TextFieldDecoratorImpl.h" + +using namespace WebCore; + +namespace WebKit { + +bool WebTextFieldDecoratorClient::isClientFor(TextFieldDecorator* decorator) +{ + return static_cast<TextFieldDecoratorImpl*>(decorator)->decoratorClient() == this; +} + +} // namespace WebKit |