diff options
Diffstat (limited to 'Source/WebKit/chromium/src')
30 files changed, 13 insertions, 2605 deletions
diff --git a/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp b/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp index 69718dcb6..4e2c69e9f 100644 --- a/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp +++ b/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp @@ -37,6 +37,7 @@ #include "ChromeClientImpl.h" #include "DateComponents.h" #include "DateTimeChooserClient.h" +#include "InputTypeNames.h" #include "Language.h" #include "LocalizedDate.h" #include "NotImplemented.h" @@ -87,6 +88,7 @@ void DateTimeChooserImpl::writeDocument(WebCore::DocumentWriter& writer) addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", writer); writer.addData(WebCore::pickerCommonCss, sizeof(WebCore::pickerCommonCss)); + writer.addData(WebCore::suggestionPickerCss, sizeof(WebCore::suggestionPickerCss)); writer.addData(WebCore::calendarPickerCss, sizeof(WebCore::calendarPickerCss)); CString extraStyle = WebCore::RenderTheme::defaultTheme()->extraCalendarPickerStyleSheet(); if (extraStyle.length()) @@ -106,9 +108,20 @@ void DateTimeChooserImpl::writeDocument(WebCore::DocumentWriter& writer) addProperty("dayLabels", WebCore::weekDayShortLabels(), writer); Direction dir = direction(WebCore::monthLabels()[0][0]); addProperty("isRTL", dir == RightToLeft || dir == RightToLeftArabic, writer); + if (m_parameters.suggestionValues.size()) { + addProperty("inputWidth", static_cast<unsigned>(m_parameters.anchorRectInRootView.width()), writer); + addProperty("suggestionValues", m_parameters.suggestionValues, writer); + addProperty("localizedSuggestionValues", m_parameters.localizedSuggestionValues, writer); + addProperty("suggestionLabels", m_parameters.suggestionLabels, writer); + addProperty("showOtherDateEntry", m_parameters.type == WebCore::InputTypeNames::date(), writer); + addProperty("otherDateLabel", Platform::current()->queryLocalizedString(WebLocalizedString::OtherDateLabel), writer); + addProperty("suggestionHighlightColor", WebCore::RenderTheme::defaultTheme()->activeListBoxSelectionBackgroundColor().serialized(), writer); + addProperty("suggestionHighlightTextColor", WebCore::RenderTheme::defaultTheme()->activeListBoxSelectionForegroundColor().serialized(), writer); + } addString("}\n", writer); writer.addData(WebCore::pickerCommonJs, sizeof(WebCore::pickerCommonJs)); + writer.addData(WebCore::suggestionPickerJs, sizeof(WebCore::suggestionPickerJs)); writer.addData(WebCore::calendarPickerJs, sizeof(WebCore::calendarPickerJs)); addString("</script></body>\n", writer); } diff --git a/Source/WebKit/chromium/src/PlatformSupport.cpp b/Source/WebKit/chromium/src/PlatformSupport.cpp index 2fb6f1059..8d0df4d44 100644 --- a/Source/WebKit/chromium/src/PlatformSupport.cpp +++ b/Source/WebKit/chromium/src/PlatformSupport.cpp @@ -233,26 +233,6 @@ bool PlatformSupport::loadFont(NSFont* srcFont, CGFontRef* out, uint32_t* fontID return false; } #elif OS(UNIX) -void PlatformSupport::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters, const char* preferredLocale, FontFamily* family) -{ -#if OS(ANDROID) - // FIXME: We do not use fontconfig on Android, so use simple logic for now. - // https://bugs.webkit.org/show_bug.cgi?id=67587 - family->name = "Arial"; - family->isBold = false; - family->isItalic = false; -#else - WebFontFamily 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()); - family->isBold = webFamily.isBold; - family->isItalic = webFamily.isItalic; -#endif -} - #endif // Indexed Database ----------------------------------------------------------- diff --git a/Source/WebKit/chromium/src/WebAnimationCurveCommon.cpp b/Source/WebKit/chromium/src/WebAnimationCurveCommon.cpp deleted file mode 100644 index 2b7be0361..000000000 --- a/Source/WebKit/chromium/src/WebAnimationCurveCommon.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "WebAnimationCurveCommon.h" - -#include "CCTimingFunction.h" - -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebKit { - -PassOwnPtr<WebCore::CCTimingFunction> createTimingFunction(WebAnimationCurve::TimingFunctionType type) -{ - switch (type) { - case WebAnimationCurve::TimingFunctionTypeEase: - return WebCore::CCEaseTimingFunction::create(); - case WebAnimationCurve::TimingFunctionTypeEaseIn: - return WebCore::CCEaseInTimingFunction::create(); - case WebAnimationCurve::TimingFunctionTypeEaseOut: - return WebCore::CCEaseOutTimingFunction::create(); - case WebAnimationCurve::TimingFunctionTypeEaseInOut: - return WebCore::CCEaseInOutTimingFunction::create(); - case WebAnimationCurve::TimingFunctionTypeLinear: - return nullptr; - } - return nullptr; -} - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebAnimationCurveCommon.h b/Source/WebKit/chromium/src/WebAnimationCurveCommon.h deleted file mode 100644 index 562b6eb8d..000000000 --- a/Source/WebKit/chromium/src/WebAnimationCurveCommon.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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. - */ - -#ifndef WebAnimationCurveCommon_h -#define WebAnimationCurveCommon_h - -#include <public/WebAnimationCurve.h> -#include <wtf/Forward.h> - -namespace WebCore { -class CCTimingFunction; -} - -namespace WebKit { -PassOwnPtr<WebCore::CCTimingFunction> createTimingFunction(WebAnimationCurve::TimingFunctionType); -} - -#endif // WebAnimationCurveCommon_h diff --git a/Source/WebKit/chromium/src/WebAnimationImpl.cpp b/Source/WebKit/chromium/src/WebAnimationImpl.cpp deleted file mode 100644 index b5a94d714..000000000 --- a/Source/WebKit/chromium/src/WebAnimationImpl.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "WebAnimationImpl.h" - -#include "CCActiveAnimation.h" -#include "CCAnimationCurve.h" -#include "WebFloatAnimationCurveImpl.h" -#include "WebTransformAnimationCurveImpl.h" -#include <public/WebAnimation.h> -#include <public/WebAnimationCurve.h> -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -using WebCore::CCActiveAnimation; - -namespace WebKit { - -WebAnimation* WebAnimation::create(const WebAnimationCurve& curve, TargetProperty targetProperty, int animationId) -{ - return new WebAnimationImpl(curve, targetProperty, animationId, 0); -} - -WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& webCurve, TargetProperty targetProperty, int animationId, int groupId) -{ - static int nextAnimationId = 1; - static int nextGroupId = 1; - if (!animationId) - animationId = nextAnimationId++; - if (!groupId) - groupId = nextGroupId++; - - WebAnimationCurve::AnimationCurveType curveType = webCurve.type(); - OwnPtr<WebCore::CCAnimationCurve> curve; - switch (curveType) { - case WebAnimationCurve::AnimationCurveTypeFloat: { - const WebFloatAnimationCurveImpl* floatCurveImpl = static_cast<const WebFloatAnimationCurveImpl*>(&webCurve); - curve = floatCurveImpl->cloneToCCAnimationCurve(); - break; - } - case WebAnimationCurve::AnimationCurveTypeTransform: { - const WebTransformAnimationCurveImpl* transformCurveImpl = static_cast<const WebTransformAnimationCurveImpl*>(&webCurve); - curve = transformCurveImpl->cloneToCCAnimationCurve(); - break; - } - } - m_animation = CCActiveAnimation::create(curve.release(), animationId, groupId, static_cast<WebCore::CCActiveAnimation::TargetProperty>(targetProperty)); -} - -WebAnimationImpl::~WebAnimationImpl() -{ -} - -int WebAnimationImpl::id() -{ - return m_animation->id(); -} - -WebAnimation::TargetProperty WebAnimationImpl::targetProperty() const -{ - return static_cast<WebAnimationImpl::TargetProperty>(m_animation->targetProperty()); -} - -int WebAnimationImpl::iterations() const -{ - return m_animation->iterations(); -} - -void WebAnimationImpl::setIterations(int n) -{ - m_animation->setIterations(n); -} - -double WebAnimationImpl::startTime() const -{ - return m_animation->startTime(); -} - -void WebAnimationImpl::setStartTime(double monotonicTime) -{ - m_animation->setStartTime(monotonicTime); -} - -double WebAnimationImpl::timeOffset() const -{ - return m_animation->timeOffset(); -} - -void WebAnimationImpl::setTimeOffset(double monotonicTime) -{ - m_animation->setTimeOffset(monotonicTime); -} - -bool WebAnimationImpl::alternatesDirection() const -{ - return m_animation->alternatesDirection(); -} - -void WebAnimationImpl::setAlternatesDirection(bool alternates) -{ - m_animation->setAlternatesDirection(alternates); -} - -PassOwnPtr<WebCore::CCActiveAnimation> WebAnimationImpl::cloneToCCAnimation() -{ - OwnPtr<WebCore::CCActiveAnimation> toReturn(m_animation->clone(WebCore::CCActiveAnimation::NonControllingInstance)); - toReturn->setNeedsSynchronizedStartTime(true); - return toReturn.release(); -} - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebAnimationImpl.h b/Source/WebKit/chromium/src/WebAnimationImpl.h deleted file mode 100644 index ccf451786..000000000 --- a/Source/WebKit/chromium/src/WebAnimationImpl.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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. - */ - -#ifndef WebAnimationImpl_h -#define WebAnimationImpl_h - -#include <public/WebAnimation.h> -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebCore { -class CCActiveAnimation; -} - -namespace WebKit { - -class WebAnimationImpl : public WebAnimation { -public: - WebAnimationImpl(const WebAnimationCurve&, TargetProperty, int animationId, int groupId = 0); - virtual ~WebAnimationImpl(); - - // WebAnimation implementation - virtual int id() OVERRIDE; - virtual TargetProperty targetProperty() const OVERRIDE; - virtual int iterations() const OVERRIDE; - virtual void setIterations(int) OVERRIDE; - virtual double startTime() const OVERRIDE; - virtual void setStartTime(double monotonicTime) OVERRIDE; - virtual double timeOffset() const OVERRIDE; - virtual void setTimeOffset(double monotonicTime) OVERRIDE; - virtual bool alternatesDirection() const OVERRIDE; - virtual void setAlternatesDirection(bool) OVERRIDE; - - PassOwnPtr<WebCore::CCActiveAnimation> cloneToCCAnimation(); -private: - OwnPtr<WebCore::CCActiveAnimation> m_animation; -}; - -} - -#endif // WebAnimationImpl_h - diff --git a/Source/WebKit/chromium/src/WebContentLayerImpl.cpp b/Source/WebKit/chromium/src/WebContentLayerImpl.cpp deleted file mode 100644 index 862b19be6..000000000 --- a/Source/WebKit/chromium/src/WebContentLayerImpl.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2011 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebContentLayerImpl.h" - -#include "ContentLayerChromium.h" -#include "SkMatrix44.h" -#include <public/WebContentLayerClient.h> -#include <public/WebFloatPoint.h> -#include <public/WebFloatRect.h> -#include <public/WebRect.h> -#include <public/WebSize.h> - -using namespace WebCore; - -namespace WebKit { - -WebContentLayer* WebContentLayer::create(WebContentLayerClient* client) -{ - return new WebContentLayerImpl(client); -} - -WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* client) - : m_layer(adoptPtr(new WebLayerImpl(ContentLayerChromium::create(this)))) - , m_client(client) -{ - m_layer->layer()->setIsDrawable(true); -} - -WebContentLayerImpl::~WebContentLayerImpl() -{ - static_cast<ContentLayerChromium*>(m_layer->layer())->clearClient(); -} - -WebLayer* WebContentLayerImpl::layer() -{ - return m_layer.get(); -} - -void WebContentLayerImpl::setDoubleSided(bool doubleSided) -{ - m_layer->layer()->setDoubleSided(doubleSided); -} - -void WebContentLayerImpl::setBoundsContainPageScale(bool boundsContainPageScale) -{ - return m_layer->layer()->setBoundsContainPageScale(boundsContainPageScale); -} - -bool WebContentLayerImpl::boundsContainPageScale() const -{ - return m_layer->layer()->boundsContainPageScale(); -} - -void WebContentLayerImpl::setUseLCDText(bool enable) -{ - m_layer->layer()->setUseLCDText(enable); -} - -void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) -{ - m_layer->layer()->setDrawCheckerboardForMissingTiles(enable); -} - - -void WebContentLayerImpl::paintContents(SkCanvas* canvas, const IntRect& clip, FloatRect& opaque) -{ - if (!m_client) - return; - WebFloatRect webOpaque; - m_client->paintContents(canvas, WebRect(clip), webOpaque); - opaque = webOpaque; -} - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebContentLayerImpl.h b/Source/WebKit/chromium/src/WebContentLayerImpl.h deleted file mode 100644 index 45fa79b0e..000000000 --- a/Source/WebKit/chromium/src/WebContentLayerImpl.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2011 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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. - */ - -#ifndef WebContentLayerImpl_h -#define WebContentLayerImpl_h - -#include "ContentLayerChromiumClient.h" -#include "WebLayerImpl.h" -#include <public/WebContentLayer.h> -#include <wtf/OwnPtr.h> - -namespace WebKit { -class WebContentLayerClient; - -class WebContentLayerImpl : public WebContentLayer, - public WebCore::ContentLayerChromiumClient { -public: - explicit WebContentLayerImpl(WebContentLayerClient*); - - // WebContentLayer implementation. - virtual WebLayer* layer() OVERRIDE; - virtual void setDoubleSided(bool) OVERRIDE; - virtual void setBoundsContainPageScale(bool) OVERRIDE; - virtual bool boundsContainPageScale() const OVERRIDE; - virtual void setUseLCDText(bool) OVERRIDE; - virtual void setDrawCheckerboardForMissingTiles(bool) OVERRIDE; - -protected: - virtual ~WebContentLayerImpl(); - - // ContentLayerChromiumClient implementation. - virtual void paintContents(SkCanvas*, const WebCore::IntRect& clip, WebCore::FloatRect& opaque) OVERRIDE; - - OwnPtr<WebLayerImpl> m_layer; - WebContentLayerClient* m_client; - bool m_drawsContent; -}; - -} // namespace WebKit - -#endif // WebContentLayerImpl_h diff --git a/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.cpp b/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.cpp deleted file mode 100644 index d62166f44..000000000 --- a/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (C) 2011 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebExternalTextureLayerImpl.h" - -#include "CCTextureUpdateQueue.h" -#include "TextureLayerChromium.h" -#include "WebLayerImpl.h" -#include <public/WebExternalTextureLayerClient.h> -#include <public/WebFloatRect.h> -#include <public/WebSize.h> - -using namespace WebCore; - -namespace WebKit { - -WebExternalTextureLayer* WebExternalTextureLayer::create(WebExternalTextureLayerClient* client) -{ - return new WebExternalTextureLayerImpl(client); -} - -WebExternalTextureLayerImpl::WebExternalTextureLayerImpl(WebExternalTextureLayerClient* client) - : m_client(client) -{ - RefPtr<TextureLayerChromium> layer; - if (m_client) - layer = TextureLayerChromium::create(this); - else - layer = TextureLayerChromium::create(0); - layer->setIsDrawable(true); - m_layer = adoptPtr(new WebLayerImpl(layer.release())); -} - -WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl() -{ - static_cast<TextureLayerChromium*>(m_layer->layer())->clearClient(); -} - -WebLayer* WebExternalTextureLayerImpl::layer() -{ - return m_layer.get(); -} - -void WebExternalTextureLayerImpl::setTextureId(unsigned id) -{ - static_cast<TextureLayerChromium*>(m_layer->layer())->setTextureId(id); -} - -void WebExternalTextureLayerImpl::setFlipped(bool flipped) -{ - static_cast<TextureLayerChromium*>(m_layer->layer())->setFlipped(flipped); -} - -void WebExternalTextureLayerImpl::setUVRect(const WebFloatRect& rect) -{ - static_cast<TextureLayerChromium*>(m_layer->layer())->setUVRect(rect); -} - -void WebExternalTextureLayerImpl::setOpaque(bool opaque) -{ - static_cast<TextureLayerChromium*>(m_layer->layer())->setOpaque(opaque); -} - -void WebExternalTextureLayerImpl::setPremultipliedAlpha(bool premultipliedAlpha) -{ - static_cast<TextureLayerChromium*>(m_layer->layer())->setPremultipliedAlpha(premultipliedAlpha); -} - -void WebExternalTextureLayerImpl::willModifyTexture() -{ - static_cast<TextureLayerChromium*>(m_layer->layer())->willModifyTexture(); -} - -void WebExternalTextureLayerImpl::setRateLimitContext(bool rateLimit) -{ - static_cast<TextureLayerChromium*>(m_layer->layer())->setRateLimitContext(rateLimit); -} - -class WebTextureUpdaterImpl : public WebTextureUpdater { -public: - explicit WebTextureUpdaterImpl(CCTextureUpdateQueue& queue) - : m_queue(queue) - { - } - - virtual void appendCopy(unsigned sourceTexture, unsigned destinationTexture, WebSize size) OVERRIDE - { - TextureCopier::Parameters copy = { sourceTexture, destinationTexture, size }; - m_queue.appendCopy(copy); - } - -private: - CCTextureUpdateQueue& m_queue; -}; - -unsigned WebExternalTextureLayerImpl::prepareTexture(CCTextureUpdateQueue& queue) -{ - ASSERT(m_client); - WebTextureUpdaterImpl updaterImpl(queue); - return m_client->prepareTexture(updaterImpl); -} - -WebGraphicsContext3D* WebExternalTextureLayerImpl::context() -{ - ASSERT(m_client); - return m_client->context(); -} - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.h b/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.h deleted file mode 100644 index 6c03c2342..000000000 --- a/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2011 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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. - */ - -#ifndef WebExternalTextureLayerImpl_h -#define WebExternalTextureLayerImpl_h - -#include "TextureLayerChromiumClient.h" -#include <public/WebExternalTextureLayer.h> - -namespace WebKit { - -class WebLayerImpl; - -class WebExternalTextureLayerImpl : public WebExternalTextureLayer, - public WebCore::TextureLayerChromiumClient { -public: - explicit WebExternalTextureLayerImpl(WebExternalTextureLayerClient*); - virtual ~WebExternalTextureLayerImpl(); - - // WebExternalTextureLayer implementation. - virtual WebLayer* layer() OVERRIDE; - virtual void setTextureId(unsigned) OVERRIDE; - virtual void setFlipped(bool) OVERRIDE; - virtual void setUVRect(const WebFloatRect&) OVERRIDE; - virtual void setOpaque(bool) OVERRIDE; - virtual void setPremultipliedAlpha(bool) OVERRIDE; - virtual void willModifyTexture() OVERRIDE; - virtual void setRateLimitContext(bool) OVERRIDE; - - // TextureLayerChromiumClient implementation. - virtual unsigned prepareTexture(WebCore::CCTextureUpdateQueue&) OVERRIDE; - virtual WebGraphicsContext3D* context() OVERRIDE; - -private: - WebExternalTextureLayerClient* m_client; - OwnPtr<WebLayerImpl> m_layer; -}; - -} - -#endif // WebExternalTextureLayerImpl_h - diff --git a/Source/WebKit/chromium/src/WebFloatAnimationCurveImpl.cpp b/Source/WebKit/chromium/src/WebFloatAnimationCurveImpl.cpp deleted file mode 100644 index 4349f84e2..000000000 --- a/Source/WebKit/chromium/src/WebFloatAnimationCurveImpl.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "WebFloatAnimationCurveImpl.h" - -#include "CCAnimationCurve.h" -#include "CCKeyframedAnimationCurve.h" -#include "CCTimingFunction.h" -#include "WebAnimationCurveCommon.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebKit { - -WebFloatAnimationCurve* WebFloatAnimationCurve::create() -{ - return new WebFloatAnimationCurveImpl(); -} - -WebFloatAnimationCurveImpl::WebFloatAnimationCurveImpl() - : m_curve(WebCore::CCKeyframedFloatAnimationCurve::create()) -{ -} - -WebFloatAnimationCurveImpl::~WebFloatAnimationCurveImpl() -{ -} - -WebAnimationCurve::AnimationCurveType WebFloatAnimationCurveImpl::type() const -{ - return WebAnimationCurve::AnimationCurveTypeFloat; -} - -void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe) -{ - add(keyframe, TimingFunctionTypeEase); -} - -void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe, TimingFunctionType type) -{ - m_curve->addKeyframe(WebCore::CCFloatKeyframe::create(keyframe.time, keyframe.value, createTimingFunction(type))); -} - -void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe, double x1, double y1, double x2, double y2) -{ - m_curve->addKeyframe(WebCore::CCFloatKeyframe::create(keyframe.time, keyframe.value, WebCore::CCCubicBezierTimingFunction::create(x1, y1, x2, y2))); -} - -float WebFloatAnimationCurveImpl::getValue(double time) const -{ - return m_curve->getValue(time); -} - -PassOwnPtr<WebCore::CCAnimationCurve> WebFloatAnimationCurveImpl::cloneToCCAnimationCurve() const -{ - return m_curve->clone(); -} - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebFloatAnimationCurveImpl.h b/Source/WebKit/chromium/src/WebFloatAnimationCurveImpl.h deleted file mode 100644 index 12ca3c66e..000000000 --- a/Source/WebKit/chromium/src/WebFloatAnimationCurveImpl.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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. - */ - -#ifndef WebFloatAnimationCurveImpl_h -#define WebFloatAnimationCurveImpl_h - -#include <public/WebFloatAnimationCurve.h> -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebCore { -class CCAnimationCurve; -class CCKeyframedFloatAnimationCurve; -} - -namespace WebKit { - -class WebFloatAnimationCurveImpl : public WebFloatAnimationCurve { -public: - WebFloatAnimationCurveImpl(); - virtual ~WebFloatAnimationCurveImpl(); - - // WebAnimationCurve implementation. - virtual AnimationCurveType type() const OVERRIDE; - - // WebFloatAnimationCurve implementation. - virtual void add(const WebFloatKeyframe&) OVERRIDE; - virtual void add(const WebFloatKeyframe&, TimingFunctionType) OVERRIDE; - virtual void add(const WebFloatKeyframe&, double x1, double y1, double x2, double y2) OVERRIDE; - - virtual float getValue(double time) const OVERRIDE; - - PassOwnPtr<WebCore::CCAnimationCurve> cloneToCCAnimationCurve() const; - -private: - OwnPtr<WebCore::CCKeyframedFloatAnimationCurve> m_curve; -}; - -} - -#endif // WebFloatAnimationCurveImpl_h diff --git a/Source/WebKit/chromium/src/WebIOSurfaceLayerImpl.cpp b/Source/WebKit/chromium/src/WebIOSurfaceLayerImpl.cpp deleted file mode 100644 index d2df09045..000000000 --- a/Source/WebKit/chromium/src/WebIOSurfaceLayerImpl.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebIOSurfaceLayerImpl.h" - -#include "IOSurfaceLayerChromium.h" -#include "WebLayerImpl.h" - -using WebCore::IOSurfaceLayerChromium; - -namespace WebKit { - -WebIOSurfaceLayer* WebIOSurfaceLayer::create() -{ - return new WebIOSurfaceLayerImpl(); -} - -WebIOSurfaceLayerImpl::WebIOSurfaceLayerImpl() - : m_layer(adoptPtr(new WebLayerImpl(IOSurfaceLayerChromium::create()))) -{ - m_layer->layer()->setIsDrawable(true); -} - -WebIOSurfaceLayerImpl::~WebIOSurfaceLayerImpl() -{ -} - -void WebIOSurfaceLayerImpl::setIOSurfaceProperties(unsigned ioSurfaceId, WebSize size) -{ - static_cast<IOSurfaceLayerChromium*>(m_layer->layer())->setIOSurfaceProperties(ioSurfaceId, size); -} - -WebLayer* WebIOSurfaceLayerImpl::layer() -{ - return m_layer.get(); -} - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebIOSurfaceLayerImpl.h b/Source/WebKit/chromium/src/WebIOSurfaceLayerImpl.h deleted file mode 100644 index 7aaeb02c1..000000000 --- a/Source/WebKit/chromium/src/WebIOSurfaceLayerImpl.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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. - */ - -#ifndef WebIOSurfaceLayerImpl_h -#define WebIOSurfaceLayerImpl_h - -#include <public/WebIOSurfaceLayer.h> -#include <wtf/OwnPtr.h> - -namespace WebKit { - -class WebIOSurfaceLayerImpl : public WebIOSurfaceLayer { -public: - WebIOSurfaceLayerImpl(); - virtual ~WebIOSurfaceLayerImpl(); - - // WebIOSurfaceLayer implementation. - virtual WebLayer* layer() OVERRIDE; - virtual void setIOSurfaceProperties(unsigned ioSurfaceId, WebSize) OVERRIDE; - -private: - OwnPtr<WebLayerImpl> m_layer; -}; - -} - -#endif // WebIOSurfaceLayerImpl_h - diff --git a/Source/WebKit/chromium/src/WebImageLayerImpl.cpp b/Source/WebKit/chromium/src/WebImageLayerImpl.cpp deleted file mode 100644 index 7038e3550..000000000 --- a/Source/WebKit/chromium/src/WebImageLayerImpl.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebImageLayerImpl.h" - -#include "ImageLayerChromium.h" -#include "WebLayerImpl.h" - -using WebCore::ImageLayerChromium; - -namespace WebKit { - -WebImageLayer* WebImageLayer::create() -{ - return new WebImageLayerImpl(); -} - -WebImageLayerImpl::WebImageLayerImpl() - : m_layer(adoptPtr(new WebLayerImpl(ImageLayerChromium::create()))) -{ -} - -WebImageLayerImpl::~WebImageLayerImpl() -{ -} - -WebLayer* WebImageLayerImpl::layer() -{ - return m_layer.get(); -} - -void WebImageLayerImpl::setBitmap(SkBitmap bitmap) -{ - static_cast<ImageLayerChromium*>(m_layer->layer())->setBitmap(bitmap); -} - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebImageLayerImpl.h b/Source/WebKit/chromium/src/WebImageLayerImpl.h deleted file mode 100644 index feea60b9c..000000000 --- a/Source/WebKit/chromium/src/WebImageLayerImpl.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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. - */ - -#ifndef WebImageLayerImpl_h -#define WebImageLayerImpl_h - -#include <public/WebImageLayer.h> -#include <wtf/OwnPtr.h> - -namespace WebCore { -class ImageLayerChromium; -} - -namespace WebKit { -class WebLayerImpl; - -class WebImageLayerImpl : public WebImageLayer { -public: - WebImageLayerImpl(); - virtual ~WebImageLayerImpl(); - - // WebImageLayer implementation. - WebLayer* layer() OVERRIDE; - virtual void setBitmap(SkBitmap) OVERRIDE; - -private: - OwnPtr<WebLayerImpl> m_layer; -}; - -} - -#endif // WebImageLayerImpl_h diff --git a/Source/WebKit/chromium/src/WebLayerImpl.cpp b/Source/WebKit/chromium/src/WebLayerImpl.cpp deleted file mode 100644 index 85f9b4db4..000000000 --- a/Source/WebKit/chromium/src/WebLayerImpl.cpp +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Copyright (C) 2011 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebLayerImpl.h" - -#include "CCActiveAnimation.h" -#include "LayerChromium.h" -#include "SkMatrix44.h" -#include "WebAnimationImpl.h" -#include <public/WebFloatPoint.h> -#include <public/WebFloatRect.h> -#include <public/WebSize.h> -#include <public/WebTransformationMatrix.h> - -using WebCore::CCActiveAnimation; -using WebCore::LayerChromium; - -namespace WebKit { - -namespace { - -WebTransformationMatrix transformationMatrixFromSkMatrix44(const SkMatrix44& matrix) -{ - double data[16]; - matrix.asColMajord(data); - return WebTransformationMatrix(data[0], data[1], data[2], data[3], - data[4], data[5], data[6], data[7], - data[8], data[9], data[10], data[11], - data[12], data[13], data[14], data[15]); -} - -SkMatrix44 skMatrix44FromTransformationMatrix(const WebTransformationMatrix& matrix) -{ - SkMatrix44 skMatrix; - skMatrix.set(0, 0, SkDoubleToMScalar(matrix.m11())); - skMatrix.set(1, 0, SkDoubleToMScalar(matrix.m12())); - skMatrix.set(2, 0, SkDoubleToMScalar(matrix.m13())); - skMatrix.set(3, 0, SkDoubleToMScalar(matrix.m14())); - skMatrix.set(0, 1, SkDoubleToMScalar(matrix.m21())); - skMatrix.set(1, 1, SkDoubleToMScalar(matrix.m22())); - skMatrix.set(2, 1, SkDoubleToMScalar(matrix.m23())); - skMatrix.set(3, 1, SkDoubleToMScalar(matrix.m24())); - skMatrix.set(0, 2, SkDoubleToMScalar(matrix.m31())); - skMatrix.set(1, 2, SkDoubleToMScalar(matrix.m32())); - skMatrix.set(2, 2, SkDoubleToMScalar(matrix.m33())); - skMatrix.set(3, 2, SkDoubleToMScalar(matrix.m34())); - skMatrix.set(0, 3, SkDoubleToMScalar(matrix.m41())); - skMatrix.set(1, 3, SkDoubleToMScalar(matrix.m42())); - skMatrix.set(2, 3, SkDoubleToMScalar(matrix.m43())); - skMatrix.set(3, 3, SkDoubleToMScalar(matrix.m44())); - return skMatrix; -} - -} // anonymous namespace - - -WebLayer* WebLayer::create() -{ - return new WebLayerImpl(); -} - -WebLayerImpl::WebLayerImpl() - : m_layer(LayerChromium::create()) -{ -} - -WebLayerImpl::WebLayerImpl(PassRefPtr<LayerChromium> layer) - : m_layer(layer) -{ -} - - -WebLayerImpl::~WebLayerImpl() -{ - m_layer->clearRenderSurface(); - m_layer->setLayerAnimationDelegate(0); -} - -int WebLayerImpl::id() const -{ - return m_layer->id(); -} - -void WebLayerImpl::invalidateRect(const WebFloatRect& rect) -{ - m_layer->setNeedsDisplayRect(rect); -} - -void WebLayerImpl::invalidate() -{ - m_layer->setNeedsDisplay(); -} - -void WebLayerImpl::addChild(WebLayer* child) -{ - m_layer->addChild(static_cast<WebLayerImpl*>(child)->layer()); -} - -void WebLayerImpl::insertChild(WebLayer* child, size_t index) -{ - m_layer->insertChild(static_cast<WebLayerImpl*>(child)->layer(), index); -} - -void WebLayerImpl::replaceChild(WebLayer* reference, WebLayer* newLayer) -{ - m_layer->replaceChild(static_cast<WebLayerImpl*>(reference)->layer(), static_cast<WebLayerImpl*>(newLayer)->layer()); -} - -void WebLayerImpl::removeFromParent() -{ - m_layer->removeFromParent(); -} - -void WebLayerImpl::removeAllChildren() -{ - m_layer->removeAllChildren(); -} - -void WebLayerImpl::setAnchorPoint(const WebFloatPoint& anchorPoint) -{ - m_layer->setAnchorPoint(anchorPoint); -} - -WebFloatPoint WebLayerImpl::anchorPoint() const -{ - return WebFloatPoint(m_layer->anchorPoint()); -} - -void WebLayerImpl::setAnchorPointZ(float anchorPointZ) -{ - m_layer->setAnchorPointZ(anchorPointZ); -} - -float WebLayerImpl::anchorPointZ() const -{ - return m_layer->anchorPointZ(); -} - -void WebLayerImpl::setBounds(const WebSize& size) -{ - m_layer->setBounds(size); -} - -WebSize WebLayerImpl::bounds() const -{ - return WebSize(m_layer->bounds()); -} - -void WebLayerImpl::setMasksToBounds(bool masksToBounds) -{ - m_layer->setMasksToBounds(masksToBounds); -} - -bool WebLayerImpl::masksToBounds() const -{ - return m_layer->masksToBounds(); -} - -void WebLayerImpl::setMaskLayer(WebLayer* maskLayer) -{ - m_layer->setMaskLayer(maskLayer ? static_cast<WebLayerImpl*>(maskLayer)->layer() : 0); -} - -void WebLayerImpl::setReplicaLayer(WebLayer* replicaLayer) -{ - m_layer->setReplicaLayer(replicaLayer ? static_cast<WebLayerImpl*>(replicaLayer)->layer() : 0); -} - -void WebLayerImpl::setOpacity(float opacity) -{ - m_layer->setOpacity(opacity); -} - -float WebLayerImpl::opacity() const -{ - return m_layer->opacity(); -} - -void WebLayerImpl::setOpaque(bool opaque) -{ - m_layer->setOpaque(opaque); -} - -bool WebLayerImpl::opaque() const -{ - return m_layer->opaque(); -} - -void WebLayerImpl::setPosition(const WebFloatPoint& position) -{ - m_layer->setPosition(position); -} - -WebFloatPoint WebLayerImpl::position() const -{ - return WebFloatPoint(m_layer->position()); -} - -void WebLayerImpl::setSublayerTransform(const SkMatrix44& matrix) -{ - m_layer->setSublayerTransform(transformationMatrixFromSkMatrix44(matrix)); -} - -void WebLayerImpl::setSublayerTransform(const WebTransformationMatrix& matrix) -{ - m_layer->setSublayerTransform(matrix); -} - -SkMatrix44 WebLayerImpl::sublayerTransform() const -{ - return skMatrix44FromTransformationMatrix(m_layer->sublayerTransform()); -} - -void WebLayerImpl::setTransform(const SkMatrix44& matrix) -{ - m_layer->setTransform(transformationMatrixFromSkMatrix44(matrix)); -} - -void WebLayerImpl::setTransform(const WebTransformationMatrix& matrix) -{ - m_layer->setTransform(matrix); -} - -SkMatrix44 WebLayerImpl::transform() const -{ - return skMatrix44FromTransformationMatrix(m_layer->transform()); -} - -void WebLayerImpl::setDrawsContent(bool drawsContent) -{ - m_layer->setIsDrawable(drawsContent); -} - -bool WebLayerImpl::drawsContent() const -{ - return m_layer->drawsContent(); -} - -void WebLayerImpl::setPreserves3D(bool preserve3D) -{ - m_layer->setPreserves3D(preserve3D); -} - -void WebLayerImpl::setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) -{ - m_layer->setUseParentBackfaceVisibility(useParentBackfaceVisibility); -} - -void WebLayerImpl::setBackgroundColor(WebColor color) -{ - m_layer->setBackgroundColor(color); -} - -void WebLayerImpl::setFilters(const WebFilterOperations& filters) -{ - m_layer->setFilters(filters); -} - -void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) -{ - m_layer->setBackgroundFilters(filters); -} - -void WebLayerImpl::setDebugBorderColor(const WebColor& color) -{ - m_layer->setDebugBorderColor(color); -} - -void WebLayerImpl::setDebugBorderWidth(float width) -{ - m_layer->setDebugBorderWidth(width); -} - -void WebLayerImpl::setDebugName(WebString name) -{ - m_layer->setDebugName(name); -} - -void WebLayerImpl::setAnimationDelegate(WebAnimationDelegate* delegate) -{ - m_layer->setLayerAnimationDelegate(delegate); -} - -bool WebLayerImpl::addAnimation(WebAnimation* animation) -{ - return m_layer->addAnimation(static_cast<WebAnimationImpl*>(animation)->cloneToCCAnimation()); -} - -void WebLayerImpl::removeAnimation(int animationId) -{ - m_layer->removeAnimation(animationId); -} - -void WebLayerImpl::removeAnimation(int animationId, WebAnimation::TargetProperty targetProperty) -{ - m_layer->layerAnimationController()->removeAnimation(animationId, static_cast<CCActiveAnimation::TargetProperty>(targetProperty)); -} - -void WebLayerImpl::pauseAnimation(int animationId, double timeOffset) -{ - m_layer->pauseAnimation(animationId, timeOffset); -} - -void WebLayerImpl::suspendAnimations(double monotonicTime) -{ - m_layer->suspendAnimations(monotonicTime); -} - -void WebLayerImpl::resumeAnimations(double monotonicTime) -{ - m_layer->resumeAnimations(monotonicTime); -} - -bool WebLayerImpl::hasActiveAnimation() -{ - return m_layer->hasActiveAnimation(); -} - -void WebLayerImpl::transferAnimationsTo(WebLayer* other) -{ - ASSERT(other); - static_cast<WebLayerImpl*>(other)->m_layer->setLayerAnimationController(m_layer->releaseLayerAnimationController()); -} - -void WebLayerImpl::setForceRenderSurface(bool forceRenderSurface) -{ - m_layer->setForceRenderSurface(forceRenderSurface); -} - -void WebLayerImpl::setScrollPosition(WebPoint position) -{ - m_layer->setScrollPosition(position); -} - -WebPoint WebLayerImpl::scrollPosition() const -{ - return m_layer->scrollPosition(); -} - -void WebLayerImpl::setMaxScrollPosition(WebSize maxScrollPosition) -{ - m_layer->setMaxScrollPosition(maxScrollPosition); -} - -void WebLayerImpl::setScrollable(bool scrollable) -{ - m_layer->setScrollable(scrollable); -} - -void WebLayerImpl::setHaveWheelEventHandlers(bool haveWheelEventHandlers) -{ - m_layer->setHaveWheelEventHandlers(haveWheelEventHandlers); -} - -void WebLayerImpl::setShouldScrollOnMainThread(bool shouldScrollOnMainThread) -{ - m_layer->setShouldScrollOnMainThread(shouldScrollOnMainThread); -} - -void WebLayerImpl::setNonFastScrollableRegion(const WebVector<WebRect>& rects) -{ - WebCore::Region region; - for (size_t i = 0; i < rects.size(); ++i) { - WebCore::IntRect rect = rects[i]; - region.unite(rect); - } - m_layer->setNonFastScrollableRegion(region); - -} - -void WebLayerImpl::setIsContainerForFixedPositionLayers(bool enable) -{ - m_layer->setIsContainerForFixedPositionLayers(enable); -} - -void WebLayerImpl::setFixedToContainerLayer(bool enable) -{ - m_layer->setFixedToContainerLayer(enable); -} - -void WebLayerImpl::setScrollClient(WebLayerScrollClient* scrollClient) -{ - m_layer->setLayerScrollClient(scrollClient); -} - -LayerChromium* WebLayerImpl::layer() const -{ - return m_layer.get(); -} - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebLayerImpl.h b/Source/WebKit/chromium/src/WebLayerImpl.h deleted file mode 100644 index 6739fd5ed..000000000 --- a/Source/WebKit/chromium/src/WebLayerImpl.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (C) 2011 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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. - */ - -#ifndef WebLayerImpl_h -#define WebLayerImpl_h - -#include <public/WebLayer.h> -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -namespace WebCore { -class LayerChromium; -} - -namespace WebKit { - -class WebLayerImpl : public WebLayer { -public: - WebLayerImpl(); - explicit WebLayerImpl(PassRefPtr<WebCore::LayerChromium>); - virtual ~WebLayerImpl(); - - // WebLayer implementation. - virtual int id() const OVERRIDE; - virtual void invalidateRect(const WebFloatRect&) OVERRIDE; - virtual void invalidate() OVERRIDE; - virtual void addChild(WebLayer*) OVERRIDE; - virtual void insertChild(WebLayer*, size_t index) OVERRIDE; - virtual void replaceChild(WebLayer* reference, WebLayer* newLayer) OVERRIDE; - virtual void removeFromParent() OVERRIDE; - virtual void removeAllChildren() OVERRIDE; - virtual void setAnchorPoint(const WebFloatPoint&) OVERRIDE; - virtual WebFloatPoint anchorPoint() const OVERRIDE; - virtual void setAnchorPointZ(float) OVERRIDE; - virtual float anchorPointZ() const OVERRIDE; - virtual void setBounds(const WebSize&) OVERRIDE; - virtual WebSize bounds() const OVERRIDE; - virtual void setMasksToBounds(bool) OVERRIDE; - virtual bool masksToBounds() const OVERRIDE; - virtual void setMaskLayer(WebLayer*) OVERRIDE; - virtual void setReplicaLayer(WebLayer*) OVERRIDE; - virtual void setOpacity(float) OVERRIDE; - virtual float opacity() const OVERRIDE; - virtual void setOpaque(bool) OVERRIDE; - virtual bool opaque() const OVERRIDE; - virtual void setPosition(const WebFloatPoint&) OVERRIDE; - virtual WebFloatPoint position() const OVERRIDE; - virtual void setSublayerTransform(const SkMatrix44&) OVERRIDE; - virtual void setSublayerTransform(const WebTransformationMatrix&) OVERRIDE; - virtual SkMatrix44 sublayerTransform() const OVERRIDE; - virtual void setTransform(const SkMatrix44&) OVERRIDE; - virtual void setTransform(const WebTransformationMatrix&) OVERRIDE; - virtual SkMatrix44 transform() const OVERRIDE; - virtual void setDrawsContent(bool) OVERRIDE; - virtual bool drawsContent() const OVERRIDE; - virtual void setPreserves3D(bool) OVERRIDE; - virtual void setUseParentBackfaceVisibility(bool) OVERRIDE; - virtual void setBackgroundColor(WebColor) OVERRIDE; - virtual void setFilters(const WebFilterOperations&) OVERRIDE; - virtual void setBackgroundFilters(const WebFilterOperations&) OVERRIDE; - virtual void setDebugBorderColor(const WebColor&) OVERRIDE; - virtual void setDebugBorderWidth(float) OVERRIDE; - virtual void setDebugName(WebString) OVERRIDE; - virtual void setAnimationDelegate(WebAnimationDelegate*) OVERRIDE; - virtual bool addAnimation(WebAnimation*) OVERRIDE; - virtual void removeAnimation(int animationId) OVERRIDE; - virtual void removeAnimation(int animationId, WebAnimation::TargetProperty) OVERRIDE; - virtual void pauseAnimation(int animationId, double timeOffset) OVERRIDE; - virtual void suspendAnimations(double monotonicTime) OVERRIDE; - virtual void resumeAnimations(double monotonicTime) OVERRIDE; - virtual bool hasActiveAnimation() OVERRIDE; - virtual void transferAnimationsTo(WebLayer*) OVERRIDE; - virtual void setForceRenderSurface(bool) OVERRIDE; - virtual void setScrollPosition(WebPoint) OVERRIDE; - virtual WebPoint scrollPosition() const OVERRIDE; - virtual void setMaxScrollPosition(WebSize) OVERRIDE; - virtual void setScrollable(bool) OVERRIDE; - virtual void setHaveWheelEventHandlers(bool) OVERRIDE; - virtual void setShouldScrollOnMainThread(bool) OVERRIDE; - virtual void setNonFastScrollableRegion(const WebVector<WebRect>&) OVERRIDE; - virtual void setIsContainerForFixedPositionLayers(bool) OVERRIDE; - virtual void setFixedToContainerLayer(bool) OVERRIDE; - virtual void setScrollClient(WebLayerScrollClient*) OVERRIDE; - - WebCore::LayerChromium* layer() const; - -protected: - RefPtr<WebCore::LayerChromium> m_layer; -}; - -} // namespace WebKit - -#endif // WebLayerImpl_h diff --git a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp deleted file mode 100644 index 760cc6835..000000000 --- a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright (C) 2011 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebLayerTreeViewImpl.h" - -#include "CCFontAtlas.h" -#include "CCInputHandler.h" -#include "CCLayerTreeHost.h" -#include "LayerChromium.h" -#include "WebLayerImpl.h" -#include "WebToCCInputHandlerAdapter.h" -#include <public/WebGraphicsContext3D.h> -#include <public/WebInputHandler.h> -#include <public/WebLayer.h> -#include <public/WebLayerTreeView.h> -#include <public/WebLayerTreeViewClient.h> -#include <public/WebRenderingStats.h> -#include <public/WebSize.h> - -using namespace WebCore; - -namespace WebKit { - -WebLayerTreeView* WebLayerTreeView::create(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings) -{ - OwnPtr<WebLayerTreeViewImpl> layerTreeViewImpl = adoptPtr(new WebLayerTreeViewImpl(client)); - if (!layerTreeViewImpl->initialize(settings)) - return 0; - layerTreeViewImpl->setRootLayer(root); - return layerTreeViewImpl.leakPtr(); -} - -WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client) - : m_client(client) -{ -} - -WebLayerTreeViewImpl::~WebLayerTreeViewImpl() -{ -} - -bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSettings) -{ - CCLayerTreeSettings settings; - settings.acceleratePainting = webSettings.acceleratePainting; - settings.showFPSCounter = webSettings.showFPSCounter; - settings.showPlatformLayerTree = webSettings.showPlatformLayerTree; - settings.showPaintRects = webSettings.showPaintRects; - settings.renderVSyncEnabled = webSettings.renderVSyncEnabled; - settings.refreshRate = webSettings.refreshRate; - settings.defaultTileSize = webSettings.defaultTileSize; - settings.maxUntiledLayerSize = webSettings.maxUntiledLayerSize; - m_layerTreeHost = CCLayerTreeHost::create(this, settings); - if (!m_layerTreeHost) - return false; - return true; -} - -void WebLayerTreeViewImpl::setSurfaceReady() -{ - m_layerTreeHost->setSurfaceReady(); -} - -void WebLayerTreeViewImpl::setRootLayer(const WebLayer& root) -{ - m_layerTreeHost->setRootLayer(static_cast<const WebLayerImpl*>(&root)->layer()); -} - -void WebLayerTreeViewImpl::clearRootLayer() -{ - m_layerTreeHost->setRootLayer(PassRefPtr<LayerChromium>()); -} - -void WebLayerTreeViewImpl::setViewportSize(const WebSize& layoutViewportSize, const WebSize& deviceViewportSize) -{ - if (!deviceViewportSize.isEmpty()) - m_layerTreeHost->setViewportSize(layoutViewportSize, deviceViewportSize); - else - m_layerTreeHost->setViewportSize(layoutViewportSize, layoutViewportSize); -} - -WebSize WebLayerTreeViewImpl::layoutViewportSize() const -{ - return WebSize(m_layerTreeHost->layoutViewportSize()); -} - -WebSize WebLayerTreeViewImpl::deviceViewportSize() const -{ - return WebSize(m_layerTreeHost->deviceViewportSize()); -} - -void WebLayerTreeViewImpl::setDeviceScaleFactor(const float deviceScaleFactor) -{ - m_layerTreeHost->setDeviceScaleFactor(deviceScaleFactor); -} - -float WebLayerTreeViewImpl::deviceScaleFactor() const -{ - return m_layerTreeHost->deviceScaleFactor(); -} - -void WebLayerTreeViewImpl::setBackgroundColor(WebColor color) -{ - m_layerTreeHost->setBackgroundColor(color); -} - -void WebLayerTreeViewImpl::setHasTransparentBackground(bool transparent) -{ - m_layerTreeHost->setHasTransparentBackground(transparent); -} - -void WebLayerTreeViewImpl::setVisible(bool visible) -{ - m_layerTreeHost->setVisible(visible); -} - -void WebLayerTreeViewImpl::setPageScaleFactorAndLimits(float pageScaleFactor, float minimum, float maximum) -{ - m_layerTreeHost->setPageScaleFactorAndLimits(pageScaleFactor, minimum, maximum); -} - -void WebLayerTreeViewImpl::startPageScaleAnimation(const WebPoint& scroll, bool useAnchor, float newPageScale, double durationSec) -{ - m_layerTreeHost->startPageScaleAnimation(IntSize(scroll.x, scroll.y), useAnchor, newPageScale, durationSec); -} - -void WebLayerTreeViewImpl::setNeedsAnimate() -{ - m_layerTreeHost->setNeedsAnimate(); -} - -void WebLayerTreeViewImpl::setNeedsRedraw() -{ - m_layerTreeHost->setNeedsRedraw(); -} - -bool WebLayerTreeViewImpl::commitRequested() const -{ - return m_layerTreeHost->commitRequested(); -} - -void WebLayerTreeViewImpl::composite() -{ - if (CCProxy::hasImplThread()) - m_layerTreeHost->setNeedsCommit(); - else - m_layerTreeHost->composite(); -} - -void WebLayerTreeViewImpl::updateAnimations(double frameBeginTime) -{ - m_layerTreeHost->updateAnimations(frameBeginTime); -} - -bool WebLayerTreeViewImpl::compositeAndReadback(void *pixels, const WebRect& rect) -{ - return m_layerTreeHost->compositeAndReadback(pixels, rect); -} - -void WebLayerTreeViewImpl::finishAllRendering() -{ - m_layerTreeHost->finishAllRendering(); -} - -void WebLayerTreeViewImpl::renderingStats(WebRenderingStats& stats) const -{ - CCRenderingStats ccStats; - m_layerTreeHost->renderingStats(ccStats); - - stats.numAnimationFrames = ccStats.numAnimationFrames; - stats.numFramesSentToScreen = ccStats.numFramesSentToScreen; - stats.droppedFrameCount = ccStats.droppedFrameCount; - stats.totalPaintTimeInSeconds = ccStats.totalPaintTimeInSeconds; - stats.totalRasterizeTimeInSeconds = ccStats.totalRasterizeTimeInSeconds; - stats.totalCommitTimeInSeconds = ccStats.totalCommitTimeInSeconds; - stats.totalCommitCount = ccStats.totalCommitCount; -} - -void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectTable[128], int fontHeight) -{ - IntRect asciiToRectTable[128]; - for (int i = 0; i < 128; ++i) - asciiToRectTable[i] = asciiToWebRectTable[i]; - OwnPtr<CCFontAtlas> fontAtlas = CCFontAtlas::create(bitmap, asciiToRectTable, fontHeight); - m_layerTreeHost->setFontAtlas(fontAtlas.release()); -} - -void WebLayerTreeViewImpl::loseCompositorContext(int numTimes) -{ - m_layerTreeHost->loseContext(numTimes); -} - -void WebLayerTreeViewImpl::willBeginFrame() -{ - m_client->willBeginFrame(); -} - -void WebLayerTreeViewImpl::didBeginFrame() -{ - m_client->didBeginFrame(); -} - -void WebLayerTreeViewImpl::animate(double monotonicFrameBeginTime) -{ - m_client->updateAnimations(monotonicFrameBeginTime); -} - -void WebLayerTreeViewImpl::layout() -{ - m_client->layout(); -} - -void WebLayerTreeViewImpl::applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) -{ - m_client->applyScrollAndScale(scrollDelta, pageScale); -} - -PassOwnPtr<WebCompositorOutputSurface> WebLayerTreeViewImpl::createOutputSurface() -{ - return adoptPtr(m_client->createOutputSurface()); -} - -void WebLayerTreeViewImpl::didRecreateOutputSurface(bool success) -{ - m_client->didRecreateOutputSurface(success); -} - -PassOwnPtr<CCInputHandler> WebLayerTreeViewImpl::createInputHandler() -{ - OwnPtr<WebInputHandler> handler = adoptPtr(m_client->createInputHandler()); - if (handler) - return WebToCCInputHandlerAdapter::create(handler.release()); - return nullptr; -} - -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 deleted file mode 100644 index a1dbd7404..000000000 --- a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2011 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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. - */ - -#ifndef WebLayerTreeViewImpl_h -#define WebLayerTreeViewImpl_h - -#include "CCLayerTreeHostClient.h" -#include <public/WebLayerTreeView.h> -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebCore { -class CCLayerTreeHost; -} - -namespace WebKit { -class WebLayer; -class WebLayerTreeViewClient; -class WebLayerTreeViewClientAdapter; - -class WebLayerTreeViewImpl : public WebLayerTreeView, public WebCore::CCLayerTreeHostClient { -public: - explicit WebLayerTreeViewImpl(WebLayerTreeViewClient*); - virtual ~WebLayerTreeViewImpl(); - - bool initialize(const Settings&); - - // WebLayerTreeView implementation. - virtual void setSurfaceReady() OVERRIDE; - virtual void setRootLayer(const WebLayer&) OVERRIDE; - virtual void clearRootLayer() OVERRIDE; - virtual void setViewportSize(const WebSize& layoutViewportSize, const WebSize& deviceViewportSize = WebSize()) OVERRIDE; - virtual WebSize layoutViewportSize() const OVERRIDE; - virtual WebSize deviceViewportSize() const OVERRIDE; - virtual void setDeviceScaleFactor(float) OVERRIDE; - virtual float deviceScaleFactor() const OVERRIDE; - virtual void setBackgroundColor(WebColor) OVERRIDE; - virtual void setHasTransparentBackground(bool) OVERRIDE; - virtual void setVisible(bool) OVERRIDE; - virtual void setPageScaleFactorAndLimits(float pageScaleFactor, float minimum, float maximum) OVERRIDE; - virtual void startPageScaleAnimation(const WebPoint& destination, bool useAnchor, float newPageScale, double durationSec) OVERRIDE; - virtual void setNeedsAnimate() OVERRIDE; - virtual void setNeedsRedraw() OVERRIDE; - virtual bool commitRequested() const OVERRIDE; - virtual void composite() OVERRIDE; - virtual void updateAnimations(double frameBeginTime) OVERRIDE; - virtual bool compositeAndReadback(void *pixels, const WebRect&) OVERRIDE; - virtual void finishAllRendering() OVERRIDE; - virtual void renderingStats(WebRenderingStats&) const OVERRIDE; - virtual void setFontAtlas(SkBitmap, WebRect asciiToRectTable[128], int fontHeight) OVERRIDE; - virtual void loseCompositorContext(int numTimes) OVERRIDE; - - // WebCore::CCLayerTreeHostClient implementation. - virtual void willBeginFrame() OVERRIDE; - virtual void didBeginFrame() OVERRIDE; - virtual void animate(double monotonicFrameBeginTime) OVERRIDE; - virtual void layout() OVERRIDE; - virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) OVERRIDE; - virtual PassOwnPtr<WebCompositorOutputSurface> createOutputSurface() OVERRIDE; - virtual void didRecreateOutputSurface(bool success) OVERRIDE; - virtual PassOwnPtr<WebCore::CCInputHandler> createInputHandler() OVERRIDE; - virtual void willCommit() OVERRIDE; - virtual void didCommit() OVERRIDE; - virtual void didCommitAndDrawFrame() OVERRIDE; - virtual void didCompleteSwapBuffers() OVERRIDE; - virtual void scheduleComposite() OVERRIDE; - -private: - WebLayerTreeViewClient* m_client; - OwnPtr<WebCore::CCLayerTreeHost> m_layerTreeHost; -}; - -} // namespace WebKit - -#endif // WebLayerTreeViewImpl_h diff --git a/Source/WebKit/chromium/src/WebScrollbarLayerImpl.cpp b/Source/WebKit/chromium/src/WebScrollbarLayerImpl.cpp deleted file mode 100644 index 44f6ea3c5..000000000 --- a/Source/WebKit/chromium/src/WebScrollbarLayerImpl.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebScrollbarLayerImpl.h" - -#include "ScrollbarLayerChromium.h" -#include "WebLayerImpl.h" - -using WebCore::ScrollbarLayerChromium; - -namespace WebKit { - -WebScrollbarLayer* WebScrollbarLayer::create(WebScrollbar* scrollbar, WebScrollbarThemePainter painter, WebScrollbarThemeGeometry* geometry) -{ - return new WebScrollbarLayerImpl(scrollbar, painter, geometry); -} - - -WebScrollbarLayerImpl::WebScrollbarLayerImpl(WebScrollbar* scrollbar, WebScrollbarThemePainter painter, WebScrollbarThemeGeometry* geometry) - : m_layer(adoptPtr(new WebLayerImpl(ScrollbarLayerChromium::create(adoptPtr(scrollbar), painter, adoptPtr(geometry), 0)))) -{ -} - -WebScrollbarLayerImpl::~WebScrollbarLayerImpl() -{ -} - -WebLayer* WebScrollbarLayerImpl::layer() -{ - return m_layer.get(); -} - -void WebScrollbarLayerImpl::setScrollLayer(WebLayer* layer) -{ - int id = layer ? static_cast<WebLayerImpl*>(layer)->layer()->id() : 0; - static_cast<ScrollbarLayerChromium*>(m_layer->layer())->setScrollLayerId(id); -} - - - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebScrollbarLayerImpl.h b/Source/WebKit/chromium/src/WebScrollbarLayerImpl.h deleted file mode 100644 index a85b28e67..000000000 --- a/Source/WebKit/chromium/src/WebScrollbarLayerImpl.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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. - */ - -#ifndef WebScrollbarLayerImpl_h -#define WebScrollbarLayerImpl_h - -#include <public/WebScrollbarLayer.h> -#include <wtf/OwnPtr.h> - -namespace WebKit { -class WebLayerImpl; - -class WebScrollbarLayerImpl : public WebScrollbarLayer { -public: - WebScrollbarLayerImpl(WebScrollbar*, WebScrollbarThemePainter, WebScrollbarThemeGeometry*); - virtual ~WebScrollbarLayerImpl(); - - // WebScrollbarLayer implementation. - virtual WebLayer* layer() OVERRIDE; - virtual void setScrollLayer(WebLayer*) OVERRIDE; - -private: - OwnPtr<WebLayerImpl> m_layer; -}; - -} - -#endif // WebScrollbarLayerImpl_h diff --git a/Source/WebKit/chromium/src/WebSolidColorLayerImpl.cpp b/Source/WebKit/chromium/src/WebSolidColorLayerImpl.cpp deleted file mode 100644 index 5a5231fce..000000000 --- a/Source/WebKit/chromium/src/WebSolidColorLayerImpl.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebSolidColorLayerImpl.h" - -#include "SolidColorLayerChromium.h" -#include "WebLayerImpl.h" - -using WebCore::SolidColorLayerChromium; - -namespace WebKit { - -WebSolidColorLayer* WebSolidColorLayer::create() -{ - return new WebSolidColorLayerImpl(); -} - -WebSolidColorLayerImpl::WebSolidColorLayerImpl() - : m_layer(adoptPtr(new WebLayerImpl(SolidColorLayerChromium::create()))) -{ - m_layer->layer()->setIsDrawable(true); -} - -WebSolidColorLayerImpl::~WebSolidColorLayerImpl() -{ -} - -WebLayer* WebSolidColorLayerImpl::layer() -{ - return m_layer.get(); -} - -void WebSolidColorLayerImpl::setBackgroundColor(WebColor color) -{ - m_layer->setBackgroundColor(color); -} - -} // namespace WebKit - diff --git a/Source/WebKit/chromium/src/WebSolidColorLayerImpl.h b/Source/WebKit/chromium/src/WebSolidColorLayerImpl.h deleted file mode 100644 index f6e46e3ec..000000000 --- a/Source/WebKit/chromium/src/WebSolidColorLayerImpl.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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. - */ - -#ifndef WebSolidColorLayerImpl_h -#define WebSolidColorLayerImpl_h - -#include <public/WebSolidColorLayer.h> -#include <wtf/OwnPtr.h> - -namespace WebKit { -class WebLayerImpl; - -class WebSolidColorLayerImpl : public WebSolidColorLayer { -public: - WebSolidColorLayerImpl(); - virtual ~WebSolidColorLayerImpl(); - - // WebSolidColorLayer implementation. - virtual WebLayer* layer() OVERRIDE; - virtual void setBackgroundColor(WebColor) OVERRIDE; - -private: - OwnPtr<WebLayerImpl> m_layer; -}; - -} // namespace WebKit - -#endif // WebSolidColorLayerImpl_h - diff --git a/Source/WebKit/chromium/src/WebToCCInputHandlerAdapter.cpp b/Source/WebKit/chromium/src/WebToCCInputHandlerAdapter.cpp deleted file mode 100644 index 79049c97a..000000000 --- a/Source/WebKit/chromium/src/WebToCCInputHandlerAdapter.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - * 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "WebToCCInputHandlerAdapter.h" - -#include <public/WebInputHandlerClient.h> - -#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \ - COMPILE_ASSERT(int(WebKit::webkit_name) == int(WebCore::webcore_name), mismatching_enums) - -COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusOnMainThread, CCInputHandlerClient::ScrollOnMainThread); -COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusStarted, CCInputHandlerClient::ScrollStarted); -COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusIgnored, CCInputHandlerClient::ScrollIgnored); -COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollInputTypeGesture, CCInputHandlerClient::Gesture); -COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollInputTypeWheel, CCInputHandlerClient::Wheel); - -namespace WebKit { - -PassOwnPtr<WebToCCInputHandlerAdapter> WebToCCInputHandlerAdapter::create(PassOwnPtr<WebInputHandler> handler) -{ - return adoptPtr(new WebToCCInputHandlerAdapter(handler)); -} - -WebToCCInputHandlerAdapter::WebToCCInputHandlerAdapter(PassOwnPtr<WebInputHandler> handler) - : m_handler(handler) -{ -} - -WebToCCInputHandlerAdapter::~WebToCCInputHandlerAdapter() -{ -} - -class WebToCCInputHandlerAdapter::ClientAdapter : public WebInputHandlerClient { -public: - ClientAdapter(WebCore::CCInputHandlerClient* client) - : m_client(client) - { - } - - virtual ~ClientAdapter() - { - } - - virtual ScrollStatus scrollBegin(WebPoint point, ScrollInputType type) OVERRIDE - { - return static_cast<WebInputHandlerClient::ScrollStatus>(m_client->scrollBegin(point, static_cast<WebCore::CCInputHandlerClient::ScrollInputType>(type))); - } - - virtual void scrollBy(WebPoint point, WebSize offset) OVERRIDE - { - m_client->scrollBy(point, offset); - } - - virtual void scrollEnd() OVERRIDE - { - m_client->scrollEnd(); - } - - virtual void pinchGestureBegin() OVERRIDE - { - m_client->pinchGestureBegin(); - } - - virtual void pinchGestureUpdate(float magnifyDelta, WebPoint anchor) OVERRIDE - { - m_client->pinchGestureUpdate(magnifyDelta, anchor); - } - - virtual void pinchGestureEnd() OVERRIDE - { - m_client->pinchGestureEnd(); - } - - virtual void startPageScaleAnimation(WebSize targetPosition, - bool anchorPoint, - float pageScale, - double startTime, - double duration) OVERRIDE - { - m_client->startPageScaleAnimation(targetPosition, anchorPoint, pageScale, startTime, duration); - } - - virtual void scheduleAnimation() OVERRIDE - { - m_client->scheduleAnimation(); - } - -private: - WebCore::CCInputHandlerClient* m_client; -}; - - -void WebToCCInputHandlerAdapter::bindToClient(WebCore::CCInputHandlerClient* client) -{ - m_clientAdapter = adoptPtr(new ClientAdapter(client)); - m_handler->bindToClient(m_clientAdapter.get()); -} - -void WebToCCInputHandlerAdapter::animate(double monotonicTime) -{ - m_handler->animate(monotonicTime); -} - -} - diff --git a/Source/WebKit/chromium/src/WebToCCInputHandlerAdapter.h b/Source/WebKit/chromium/src/WebToCCInputHandlerAdapter.h deleted file mode 100644 index 889553559..000000000 --- a/Source/WebKit/chromium/src/WebToCCInputHandlerAdapter.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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. - */ - -#ifndef WebToCCInputHandlerAdapter_h -#define WebToCCInputHandlerAdapter_h - -#include "CCInputHandler.h" -#include <public/WebInputHandler.h> -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebKit { - -class WebToCCInputHandlerAdapter : public WebCore::CCInputHandler { -public: - static PassOwnPtr<WebToCCInputHandlerAdapter> create(PassOwnPtr<WebInputHandler>); - virtual ~WebToCCInputHandlerAdapter(); - - // WebCore::CCInputHandler implementation. - virtual void bindToClient(WebCore::CCInputHandlerClient*) OVERRIDE; - virtual void animate(double monotonicTime) OVERRIDE; - -private: - explicit WebToCCInputHandlerAdapter(PassOwnPtr<WebInputHandler>); - - class ClientAdapter; - OwnPtr<ClientAdapter> m_clientAdapter; - OwnPtr<WebInputHandler> m_handler; -}; - -} - -#endif // WebToCCInputHandlerAdapter_h diff --git a/Source/WebKit/chromium/src/WebTransformAnimationCurveImpl.cpp b/Source/WebKit/chromium/src/WebTransformAnimationCurveImpl.cpp deleted file mode 100644 index 69a12e8a9..000000000 --- a/Source/WebKit/chromium/src/WebTransformAnimationCurveImpl.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "WebTransformAnimationCurveImpl.h" - -#include "CCKeyframedAnimationCurve.h" -#include "CCTimingFunction.h" -#include "WebAnimationCurveCommon.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebKit { - -WebTransformAnimationCurve* WebTransformAnimationCurve::create() -{ - return new WebTransformAnimationCurveImpl(); -} - -WebTransformAnimationCurveImpl::WebTransformAnimationCurveImpl() - : m_curve(WebCore::CCKeyframedTransformAnimationCurve::create()) -{ -} - -WebTransformAnimationCurveImpl::~WebTransformAnimationCurveImpl() -{ -} - -WebAnimationCurve::AnimationCurveType WebTransformAnimationCurveImpl::type() const -{ - return WebAnimationCurve::AnimationCurveTypeTransform; -} - -void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe) -{ - add(keyframe, TimingFunctionTypeEase); -} - -void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, TimingFunctionType type) -{ - m_curve->addKeyframe(WebCore::CCTransformKeyframe::create(keyframe.time, keyframe.value, createTimingFunction(type))); -} - -void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, double x1, double y1, double x2, double y2) -{ - m_curve->addKeyframe(WebCore::CCTransformKeyframe::create(keyframe.time, keyframe.value, WebCore::CCCubicBezierTimingFunction::create(x1, y1, x2, y2))); -} - -WebTransformationMatrix WebTransformAnimationCurveImpl::getValue(double time) const -{ - return m_curve->getValue(time); -} - -PassOwnPtr<WebCore::CCAnimationCurve> WebTransformAnimationCurveImpl::cloneToCCAnimationCurve() const -{ - return m_curve->clone(); -} - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebTransformAnimationCurveImpl.h b/Source/WebKit/chromium/src/WebTransformAnimationCurveImpl.h deleted file mode 100644 index bc9a9345a..000000000 --- a/Source/WebKit/chromium/src/WebTransformAnimationCurveImpl.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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. - */ - -#ifndef WebTransformAnimationCurveImpl_h -#define WebTransformAnimationCurveImpl_h - -#include <public/WebTransformAnimationCurve.h> -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebCore { -class CCAnimationCurve; -class CCKeyframedTransformAnimationCurve; -} - -namespace WebKit { - -class WebTransformAnimationCurveImpl : public WebTransformAnimationCurve { -public: - WebTransformAnimationCurveImpl(); - virtual ~WebTransformAnimationCurveImpl(); - - // WebAnimationCurve implementation. - virtual AnimationCurveType type() const OVERRIDE; - - // WebTransformAnimationCurve implementation. - virtual void add(const WebTransformKeyframe&) OVERRIDE; - virtual void add(const WebTransformKeyframe&, TimingFunctionType) OVERRIDE; - virtual void add(const WebTransformKeyframe&, double x1, double y1, double x2, double y2) OVERRIDE; - - virtual WebTransformationMatrix getValue(double time) const OVERRIDE; - - PassOwnPtr<WebCore::CCAnimationCurve> cloneToCCAnimationCurve() const; - -private: - OwnPtr<WebCore::CCKeyframedTransformAnimationCurve> m_curve; -}; - -} - -#endif // WebTransformAnimationCurveImpl_h diff --git a/Source/WebKit/chromium/src/WebVideoLayerImpl.cpp b/Source/WebKit/chromium/src/WebVideoLayerImpl.cpp deleted file mode 100644 index a8fdb4b4f..000000000 --- a/Source/WebKit/chromium/src/WebVideoLayerImpl.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2011 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebVideoLayerImpl.h" - -#include "VideoLayerChromium.h" -#include "WebLayerImpl.h" - -namespace WebKit { - -WebVideoLayer* WebVideoLayer::create(WebVideoFrameProvider* provider) -{ - return new WebVideoLayerImpl(provider); -} - -WebVideoLayerImpl::WebVideoLayerImpl(WebVideoFrameProvider* provider) - : m_layer(adoptPtr(new WebLayerImpl(WebCore::VideoLayerChromium::create(provider)))) -{ -} - -WebVideoLayerImpl::~WebVideoLayerImpl() -{ -} - -WebLayer* WebVideoLayerImpl::layer() -{ - return m_layer.get(); -} - -bool WebVideoLayerImpl::active() const -{ - return m_layer->layer()->layerTreeHost(); -} - -} // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebVideoLayerImpl.h b/Source/WebKit/chromium/src/WebVideoLayerImpl.h deleted file mode 100644 index 664935baf..000000000 --- a/Source/WebKit/chromium/src/WebVideoLayerImpl.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2011 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: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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. - */ - -#ifndef WebVideoLayerImpl_h -#define WebVideoLayerImpl_h - -#include <public/WebVideoLayer.h> - -namespace WebKit { -class WebLayerImpl; - -class WebVideoLayerImpl : public WebVideoLayer { -public: - explicit WebVideoLayerImpl(WebVideoFrameProvider*); - virtual ~WebVideoLayerImpl(); - - // WebVideoLayer implementation. - virtual WebLayer* layer() OVERRIDE; - virtual bool active() const OVERRIDE; - -private: - OwnPtr<WebLayerImpl> m_layer; -}; - -} - -#endif // WebVideoLayerImpl_h - |