+2012-02-23 James Robinson <jamesr@chromium.org>
+
+ [chromium] Move Web*Layer* headers into Platform
+ https://bugs.webkit.org/show_bug.cgi?id=79425
+
+ Reviewed by Adam Barth.
+
+ This moves the Web*Layer* headers and their dependencies from WebKit/chromium/public/platform/ into
+ Platform/chromium/public.
+
+ * Platform.gypi:
+ * chromium/public/WebCanvas.h: Copied from Source/WebKit/chromium/public/platform/WebCanvas.h.
+ (WebKit):
+ * chromium/public/WebColor.h: Copied from Source/WebKit/chromium/public/platform/WebColor.h.
+ (WebKit):
+ * chromium/public/WebColorName.h: Copied from Source/WebKit/chromium/public/platform/WebColorName.h.
+ (WebKit):
+ * chromium/public/WebContentLayer.h: Copied from Source/WebKit/chromium/public/platform/WebContentLayer.h.
+ (WebKit):
+ (WebContentLayer):
+ (WebKit::WebContentLayer::WebContentLayer):
+ (WebKit::WebContentLayer::~WebContentLayer):
+ (WebKit::WebContentLayer::operator=):
+ * chromium/public/WebContentLayerClient.h: Copied from Source/WebKit/chromium/public/platform/WebContentLayerClient.h.
+ (WebKit):
+ (WebContentLayerClient):
+ (WebKit::WebContentLayerClient::~WebContentLayerClient):
+ * chromium/public/WebExternalTextureLayer.h: Copied from Source/WebKit/chromium/public/platform/WebExternalTextureLayer.h.
+ (WebKit):
+ (WebExternalTextureLayer):
+ (WebKit::WebExternalTextureLayer::WebExternalTextureLayer):
+ (WebKit::WebExternalTextureLayer::~WebExternalTextureLayer):
+ (WebKit::WebExternalTextureLayer::operator=):
+ * chromium/public/WebLayer.h: Copied from Source/WebKit/chromium/public/platform/WebLayer.h.
+ (WebKit):
+ (WebLayer):
+ (WebKit::WebLayer::WebLayer):
+ (WebKit::WebLayer::~WebLayer):
+ (WebKit::WebLayer::operator=):
+ (WebKit::WebLayer::isNull):
+ (WebKit::WebLayer::to):
+ (WebKit::WebLayer::toConst):
+ (WebKit::WebLayer::unwrap):
+ (WebKit::WebLayer::constUnwrap):
+ (WebKit::operator==):
+ (WebKit::operator!=):
+ * chromium/public/WebLayerTreeView.h: Copied from Source/WebKit/chromium/public/platform/WebLayerTreeView.h.
+ (WebCore):
+ (WebKit):
+ (WebLayerTreeView):
+ (WebKit::WebLayerTreeView::Settings::Settings):
+ (Settings):
+ (WebKit::WebLayerTreeView::WebLayerTreeView):
+ (WebKit::WebLayerTreeView::~WebLayerTreeView):
+ (WebKit::WebLayerTreeView::operator=):
+ (WebKit::operator==):
+ (WebKit::operator!=):
+ * chromium/public/WebLayerTreeViewClient.h: Copied from Source/WebKit/chromium/public/platform/WebLayerTreeViewClient.h.
+ (WebKit):
+ (WebLayerTreeViewClient):
+ (WebKit::WebLayerTreeViewClient::~WebLayerTreeViewClient):
+ * chromium/public/WebPrivatePtr.h: Copied from Source/WebKit/chromium/public/platform/WebPrivatePtr.h.
+ (WebKit):
+ (WebPrivatePtr):
+ (WebKit::WebPrivatePtr::WebPrivatePtr):
+ (WebKit::WebPrivatePtr::~WebPrivatePtr):
+ (WebKit::WebPrivatePtr::isNull):
+ (WebKit::WebPrivatePtr::reset):
+ (WebKit::WebPrivatePtr::operator=):
+ (WebKit::WebPrivatePtr::get):
+ (WebKit::WebPrivatePtr::operator->):
+ (WebKit::WebPrivatePtr::assign):
+ * chromium/public/WebSolidColorLayer.h: Copied from Source/WebKit/chromium/public/platform/WebSolidColorLayer.h.
+ (WebKit):
+ (WebSolidColorLayer):
+
2012-02-08 James Robinson <jamesr@chromium.org>
r107042 caused compile breakages on chromium try bots
'variables': {
'platform_files': [
'chromium/public/WebCString.h',
+ 'chromium/public/WebCanvas.h',
+ 'chromium/public/WebColor.h',
+ 'chromium/public/WebColorName.h',
'chromium/public/WebCommon.h',
+ 'chromium/public/WebContentLayer.h',
+ 'chromium/public/WebContentLayerClient.h',
+ 'chromium/public/WebExternalTextureLayer.h',
'chromium/public/WebFloatPoint.h',
'chromium/public/WebFloatQuad.h',
'chromium/public/WebFloatRect.h',
+ 'chromium/public/WebLayer.h',
+ 'chromium/public/WebLayerTreeView.h',
+ 'chromium/public/WebLayerTreeViewClient.h',
'chromium/public/WebMimeRegistry.h',
'chromium/public/WebPoint.h',
+ 'chromium/public/WebPrivatePtr.h',
'chromium/public/WebRect.h',
'chromium/public/WebSize.h',
+ 'chromium/public/WebSolidColorLayer.h',
'chromium/public/WebString.h',
'chromium/src/WebCString.cpp',
'chromium/src/WebFloatQuad.cpp',
--- /dev/null
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebCanvas_h
+#define WebCanvas_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_USING_SKIA
+class SkCanvas;
+#elif WEBKIT_USING_CG
+struct CGContext;
+#endif
+
+namespace WebKit {
+
+#if WEBKIT_USING_SKIA
+typedef SkCanvas WebCanvas;
+#elif WEBKIT_USING_CG
+typedef struct CGContext WebCanvas;
+#else
+#error "Need to define WebCanvas"
+#endif
+
+} // namespace WebKit
+
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebColor_h
+#define WebColor_h
+
+#include "WebColorName.h"
+#include "WebCommon.h"
+
+namespace WebKit {
+
+typedef unsigned WebColor; // RGBA quad. Equivalent to SkColor.
+
+// Sets the values of a set of named colors.
+WEBKIT_EXPORT void setNamedColors(const WebColorName*, const WebColor*, size_t length);
+
+} // namespace WebKit
+
+#endif
--- /dev/null
+/*
+* Copyright (C) 2009 Google Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are
+* met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above
+* copyright notice, this list of conditions and the following disclaimer
+* in the documentation and/or other materials provided with the
+* distribution.
+* * Neither the name of Google Inc. nor the names of its
+* contributors may be used to endorse or promote products derived from
+* this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef WebColorName_h
+#define WebColorName_h
+
+namespace WebKit {
+
+enum WebColorName {
+ WebColorActiveBorder,
+ WebColorActiveCaption,
+ WebColorAppworkspace,
+ WebColorBackground,
+ WebColorButtonFace,
+ WebColorButtonHighlight,
+ WebColorButtonShadow,
+ WebColorButtonText,
+ WebColorCaptionText,
+ WebColorGrayText,
+ WebColorHighlight,
+ WebColorHighlightText,
+ WebColorInactiveBorder,
+ WebColorInactiveCaption,
+ WebColorInactiveCaptionText,
+ WebColorInfoBackground,
+ WebColorInfoText,
+ WebColorMenu,
+ WebColorMenuText,
+ WebColorScrollbar,
+ WebColorText,
+ WebColorThreedDarkShadow,
+ WebColorThreedShadow,
+ WebColorThreedFace,
+ WebColorThreedHighlight,
+ WebColorThreedLightShadow,
+ WebColorWebkitFocusRingColor,
+ WebColorWindow,
+ WebColorWindowFrame,
+ WebColorWindowText
+};
+
+} // namespace WebKit
+
+#endif
--- /dev/null
+/*
+ * 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 WebContentLayer_h
+#define WebContentLayer_h
+
+#include "WebCommon.h"
+#include "WebLayer.h"
+
+namespace WebKit {
+class WebContentLayerClient;
+class WebContentLayerImpl;
+struct WebFloatRect;
+
+class WebContentLayer : public WebLayer {
+public:
+ WEBKIT_EXPORT static WebContentLayer create(WebContentLayerClient*);
+
+ WebContentLayer() { }
+ WebContentLayer(const WebContentLayer& layer) : WebLayer(layer) { }
+ virtual ~WebContentLayer() { }
+ WebContentLayer& operator=(const WebContentLayer& layer)
+ {
+ WebLayer::assign(layer);
+ return *this;
+ }
+
+ // Sets whether the layer draws its content when compositing.
+ WEBKIT_EXPORT void setDrawsContent(bool);
+ WEBKIT_EXPORT bool drawsContent() const;
+
+ // Sets a region of the layer as invalid, i.e. needs to update its content.
+ // The visible area of the dirty rect will be passed to one or more calls to
+ // WebContentLayerClient::paintContents before the compositing pass occurs.
+ WEBKIT_EXPORT void invalidateRect(const WebFloatRect&);
+
+ // Sets the entire layer as invalid, i.e. needs to update its content.
+ WEBKIT_EXPORT void invalidate();
+
+#if WEBKIT_IMPLEMENTATION
+ WebContentLayer(const WTF::PassRefPtr<WebContentLayerImpl>&);
+ WebContentLayer& operator=(const WTF::PassRefPtr<WebContentLayerImpl>&);
+ operator WTF::PassRefPtr<WebContentLayerImpl>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif // WebContentLayer_h
--- /dev/null
+/*
+ * 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 WebContentLayerClient_h
+#define WebContentLayerClient_h
+
+#include "WebCanvas.h"
+
+namespace WebKit {
+struct WebRect;
+
+class WebContentLayerClient {
+public:
+ // Paints the content area for the layer, typically dirty rects submitted
+ // through WebContentLayer::setNeedsDisplay, submitting drawing commands
+ // through the WebCanvas.
+ // The canvas is already clipped to the |clip| rect.
+ virtual void paintContents(WebCanvas*, const WebRect& clip) = 0;
+
+protected:
+ virtual ~WebContentLayerClient() { }
+};
+
+} // namespace WebKit
+
+#endif // WebContentLayerClient_h
--- /dev/null
+/*
+ * 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 WebExternalTextureLayer_h
+#define WebExternalTextureLayer_h
+
+#include "WebCommon.h"
+#include "WebFloatRect.h"
+#include "WebLayer.h"
+
+namespace WebKit {
+class WebExternalTextureLayerImpl;
+
+// This class represents a layer that renders a texture that is generated
+// externally (not managed by the WebLayerTreeView).
+// The texture will be used by the WebLayerTreeView during compositing passes.
+// When in single-thread mode, this means during WebLayerTreeView::composite().
+// When using the threaded compositor, this can mean at an arbitrary time until
+// the WebLayerTreeView is destroyed.
+class WebExternalTextureLayer : public WebLayer {
+public:
+ WEBKIT_EXPORT static WebExternalTextureLayer create();
+
+ WebExternalTextureLayer() { }
+ WebExternalTextureLayer(const WebExternalTextureLayer& layer) : WebLayer(layer) { }
+ virtual ~WebExternalTextureLayer() { }
+ WebExternalTextureLayer& operator=(const WebExternalTextureLayer& layer)
+ {
+ WebLayer::assign(layer);
+ return *this;
+ }
+
+ // Sets the texture id that represents the layer, in the namespace of the
+ // compositor context.
+ WEBKIT_EXPORT void setTextureId(unsigned);
+ WEBKIT_EXPORT unsigned textureId() const;
+
+ // Sets whether or not the texture should be flipped in the Y direction when
+ // rendered.
+ WEBKIT_EXPORT void setFlipped(bool);
+ WEBKIT_EXPORT bool flipped() const;
+
+ // Sets the rect in UV space of the texture that is mapped to the layer
+ // bounds.
+ WEBKIT_EXPORT void setUVRect(const WebFloatRect&);
+ WEBKIT_EXPORT WebFloatRect uvRect() const;
+
+ // Marks a region of the layer as needing a display. These regions are
+ // collected in a union until the display occurs.
+ WEBKIT_EXPORT void invalidateRect(const WebFloatRect&);
+
+#if WEBKIT_IMPLEMENTATION
+ WebExternalTextureLayer(const WTF::PassRefPtr<WebExternalTextureLayerImpl>&);
+ WebExternalTextureLayer& operator=(const WTF::PassRefPtr<WebExternalTextureLayerImpl>&);
+ operator WTF::PassRefPtr<WebExternalTextureLayerImpl>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif // WebExternalTextureLayer_h
--- /dev/null
+/*
+ * 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 WebLayer_h
+#define WebLayer_h
+
+#include "WebColor.h"
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+class SkMatrix44;
+namespace WebCore { class LayerChromium; }
+
+namespace WebKit {
+struct WebFloatPoint;
+struct WebSize;
+
+class WebLayer {
+public:
+ WEBKIT_EXPORT static WebLayer create();
+
+ WebLayer() { }
+ WebLayer(const WebLayer& layer) { assign(layer); }
+ virtual ~WebLayer() { reset(); }
+ WebLayer& operator=(const WebLayer& layer)
+ {
+ assign(layer);
+ return *this;
+ }
+ bool isNull() { return m_private.isNull(); }
+ WEBKIT_EXPORT void reset();
+ WEBKIT_EXPORT void assign(const WebLayer&);
+ WEBKIT_EXPORT bool equals(const WebLayer&) const;
+
+ WEBKIT_EXPORT WebLayer rootLayer() const;
+ WEBKIT_EXPORT WebLayer parent() const;
+ WEBKIT_EXPORT void addChild(const WebLayer&);
+ WEBKIT_EXPORT void insertChild(const WebLayer&, size_t index);
+ WEBKIT_EXPORT void replaceChild(const WebLayer& reference, const WebLayer& newLayer);
+ WEBKIT_EXPORT void removeFromParent();
+ WEBKIT_EXPORT void removeAllChildren();
+
+ WEBKIT_EXPORT void setAnchorPoint(const WebFloatPoint&);
+ WEBKIT_EXPORT WebFloatPoint anchorPoint() const;
+
+ WEBKIT_EXPORT void setAnchorPointZ(float);
+ WEBKIT_EXPORT float anchorPointZ() const;
+
+ WEBKIT_EXPORT void setBounds(const WebSize&);
+ WEBKIT_EXPORT WebSize bounds() const;
+
+ WEBKIT_EXPORT void setMasksToBounds(bool);
+ WEBKIT_EXPORT bool masksToBounds() const;
+
+ WEBKIT_EXPORT void setMaskLayer(const WebLayer&);
+ WEBKIT_EXPORT WebLayer maskLayer() const;
+
+ WEBKIT_EXPORT void setOpacity(float);
+ WEBKIT_EXPORT float opacity() const;
+
+ WEBKIT_EXPORT void setOpaque(bool);
+ WEBKIT_EXPORT bool opaque() const;
+
+ WEBKIT_EXPORT void setPosition(const WebFloatPoint&);
+ WEBKIT_EXPORT WebFloatPoint position() const;
+
+ WEBKIT_EXPORT void setSublayerTransform(const SkMatrix44&);
+ WEBKIT_EXPORT SkMatrix44 sublayerTransform() const;
+
+ WEBKIT_EXPORT void setTransform(const SkMatrix44&);
+ WEBKIT_EXPORT SkMatrix44 transform() const;
+
+ WEBKIT_EXPORT void setDebugBorderColor(const WebColor&);
+ WEBKIT_EXPORT void setDebugBorderWidth(float);
+
+ template<typename T> T to()
+ {
+ T res;
+ res.WebLayer::assign(*this);
+ return res;
+ }
+
+ template<typename T> const T toConst() const
+ {
+ T res;
+ res.WebLayer::assign(*this);
+ return res;
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebLayer(const WTF::PassRefPtr<WebCore::LayerChromium>&);
+ WebLayer& operator=(const WTF::PassRefPtr<WebCore::LayerChromium>&);
+ operator WTF::PassRefPtr<WebCore::LayerChromium>() const;
+ template<typename T> T* unwrap()
+ {
+ return static_cast<T*>(m_private.get());
+ }
+
+ template<typename T> const T* constUnwrap() const
+ {
+ return static_cast<const T*>(m_private.get());
+ }
+#endif
+
+protected:
+ WebPrivatePtr<WebCore::LayerChromium> m_private;
+};
+
+inline bool operator==(const WebLayer& a, const WebLayer& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const WebLayer& a, const WebLayer& b)
+{
+ return !(a == b);
+}
+
+} // namespace WebKit
+
+#endif // WebLayer_h
--- /dev/null
+/*
+ * 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 WebLayerTreeView_h
+#define WebLayerTreeView_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore {
+class CCLayerTreeHost;
+struct CCSettings;
+}
+
+namespace WebKit {
+class WebLayer;
+class WebLayerTreeViewClient;
+struct WebRect;
+struct WebSize;
+
+class WebLayerTreeView {
+public:
+ struct Settings {
+ Settings()
+ : acceleratePainting(false)
+ , compositeOffscreen(false)
+ , showFPSCounter(false)
+ , showPlatformLayerTree(false)
+ , refreshRate(0)
+ , perTilePainting(false)
+ , partialSwapEnabled(false)
+ , threadedAnimationEnabled(false) { }
+
+ bool acceleratePainting;
+ bool compositeOffscreen;
+ bool showFPSCounter;
+ bool showPlatformLayerTree;
+ double refreshRate;
+ bool perTilePainting;
+ bool partialSwapEnabled;
+ bool threadedAnimationEnabled;
+#if WEBKIT_IMPLEMENTATION
+ operator WebCore::CCSettings() const;
+#endif
+ };
+
+ WEBKIT_EXPORT static WebLayerTreeView create(WebLayerTreeViewClient*, const WebLayer& root, const Settings&);
+
+ WebLayerTreeView() { }
+ WebLayerTreeView(const WebLayerTreeView& layer) { assign(layer); }
+ ~WebLayerTreeView() { reset(); }
+ WebLayerTreeView& operator=(const WebLayerTreeView& layer)
+ {
+ assign(layer);
+ return *this;
+ }
+ WEBKIT_EXPORT void reset();
+ WEBKIT_EXPORT void assign(const WebLayerTreeView&);
+ WEBKIT_EXPORT bool equals(const WebLayerTreeView&) const;
+
+ // Triggers a compositing pass. If the compositor thread was not
+ // enabled via WebCompositor::initialize, the compositing pass happens
+ // immediately. If it is enabled, the compositing pass will happen at a
+ // later time. Before the compositing pass happens (i.e. before composite()
+ // returns when the compositor thread is disabled), WebContentLayers will be
+ // asked to paint their dirty region, through
+ // WebContentLayerClient::paintContents.
+ WEBKIT_EXPORT void composite();
+
+ WEBKIT_EXPORT void setViewportSize(const WebSize&);
+ WEBKIT_EXPORT WebSize viewportSize() const;
+
+ // Composites and attempts to read back the result into the provided
+ // buffer. If it wasn't possible, e.g. due to context lost, will return
+ // false. Pixel format is 32bit (RGBA), and the provided buffer must be
+ // large enough contain viewportSize().width() * viewportSize().height()
+ // pixels. The WebLayerTreeView does not assume ownership of the buffer.
+ // The buffer is not modified if the false is returned.
+ WEBKIT_EXPORT bool compositeAndReadback(void *pixels, const WebRect&);
+
+ // Sets the root of the tree. The root is set by way of the constructor.
+ // This is typically used to explicitly set the root to null to break
+ // cycles.
+ WEBKIT_EXPORT void setRootLayer(WebLayer*);
+
+#if WEBKIT_IMPLEMENTATION
+ WebLayerTreeView(const WTF::PassRefPtr<WebCore::CCLayerTreeHost>&);
+ WebLayerTreeView& operator=(const WTF::PassRefPtr<WebCore::CCLayerTreeHost>&);
+ operator WTF::PassRefPtr<WebCore::CCLayerTreeHost>() const;
+#endif
+
+ WEBKIT_EXPORT void setNeedsRedraw();
+
+protected:
+ WebPrivatePtr<WebCore::CCLayerTreeHost> m_private;
+};
+
+inline bool operator==(const WebLayerTreeView& a, const WebLayerTreeView& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const WebLayerTreeView& a, const WebLayerTreeView& b)
+{
+ return !(a == b);
+}
+
+} // namespace WebKit
+
+#endif // WebLayerTreeView_h
--- /dev/null
+/*
+ * 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 WebLayerTreeViewClient_h
+#define WebLayerTreeViewClient_h
+
+namespace WebKit {
+class WebGraphicsContext3D;
+struct WebSize;
+class WebThread;
+
+class WebLayerTreeViewClient {
+public:
+ // Updates animation and layout. These are called before the compositing
+ // pass so that layers can be updated at the given frame time.
+ virtual void updateAnimations(double frameBeginTime) = 0;
+ virtual void layout() = 0;
+
+ // Applies a scroll delta to the root layer, which is bundled with a page
+ // scale factor that may apply a CSS transform on the whole document (used
+ // for mobile-device pinch zooming). This is triggered by events sent to the
+ // compositor thread through the WebCompositor interface.
+ virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFactor) = 0;
+
+ // Creates a 3D context suitable for the compositing. This may be called
+ // more than once if the context gets lost.
+ virtual WebGraphicsContext3D* createContext3D() = 0;
+
+ // Signals a successful rebinding of the 3D context (e.g. after a lost
+ // context event).
+ virtual void didRebindGraphicsContext(bool success) = 0;
+
+ // Schedules a compositing pass, meaning the client should call
+ // WebLayerTreeView::composite at a later time. This is only called if the
+ // compositor thread is disabled; when enabled, the compositor will
+ // internally schedule a compositing pass when needed.
+ virtual void scheduleComposite() = 0;
+
+protected:
+ virtual ~WebLayerTreeViewClient() { }
+};
+
+} // namespace WebKit
+
+#endif // WebLayerTreeViewClient_h
--- /dev/null
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebPrivatePtr_h
+#define WebPrivatePtr_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/PassRefPtr.h>
+#endif
+
+namespace WebKit {
+
+// This class is an implementation detail of the WebKit API. It exists
+// to help simplify the implementation of WebKit interfaces that merely
+// wrap a reference counted WebCore class.
+template <typename T>
+class WebPrivatePtr {
+public:
+ WebPrivatePtr() : m_ptr(0) { }
+ ~WebPrivatePtr() { WEBKIT_ASSERT(!m_ptr); }
+
+ bool isNull() const { return !m_ptr; }
+
+#if WEBKIT_IMPLEMENTATION
+ WebPrivatePtr(const PassRefPtr<T>& prp)
+ : m_ptr(prp.leakRef())
+ {
+ }
+
+ void reset()
+ {
+ assign(0);
+ }
+
+ WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other)
+ {
+ T* p = other.m_ptr;
+ if (p)
+ p->ref();
+ assign(p);
+ return *this;
+ }
+
+ WebPrivatePtr<T>& operator=(const PassRefPtr<T>& prp)
+ {
+ assign(prp.leakRef());
+ return *this;
+ }
+
+ T* get() const
+ {
+ return m_ptr;
+ }
+
+ T* operator->() const
+ {
+ ASSERT(m_ptr);
+ return m_ptr;
+ }
+#endif
+
+private:
+#if WEBKIT_IMPLEMENTATION
+ void assign(T* p)
+ {
+ // p is already ref'd for us by the caller
+ if (m_ptr)
+ m_ptr->deref();
+ m_ptr = p;
+ }
+#endif
+
+ T* m_ptr;
+};
+
+} // namespace WebKit
+
+#endif
--- /dev/null
+/*
+ * 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 WebSolidColorLayer_h
+#define WebSolidColorLayer_h
+
+#include "WebCommon.h"
+#include "WebFloatRect.h"
+#include "WebLayer.h"
+
+namespace WebKit {
+class WebSolidColorLayerImpl;
+
+class WebSolidColorLayer : public WebLayer {
+public:
+ WEBKIT_EXPORT static WebSolidColorLayer create();
+ WEBKIT_EXPORT void setBackgroundColor(const WebColor&);
+
+#if WEBKIT_IMPLEMENTATION
+ WebSolidColorLayer(const WTF::PassRefPtr<WebSolidColorLayerImpl>&);
+#endif
+};
+
+} // namespace WebKit
+
+#endif // WebSolidColorLayer_h
+2012-02-23 James Robinson <jamesr@chromium.org>
+
+ [chromium] Move Web*Layer* headers into Platform
+ https://bugs.webkit.org/show_bug.cgi?id=79425
+
+ Reviewed by Adam Barth.
+
+ Adds forwarding headers for Web*Layer* APIs and their dependencies. The forwarding headers for the Web*Layer*
+ APIs are temporary since Web*Layer* is not exposed in the client interface. The other headers (such as
+ WebColor) are exposed in both the client and platform APIs, so the forwarding headers are permanent, although we
+ might move them back down to public/ at some point.
+
+ * public/platform/WebCanvas.h:
+ * public/platform/WebColor.h:
+ * public/platform/WebColorName.h:
+ * public/platform/WebContentLayer.h:
+ * public/platform/WebContentLayerClient.h:
+ * public/platform/WebExternalTextureLayer.h:
+ * public/platform/WebLayer.h:
+ * public/platform/WebLayerTreeView.h:
+ * public/platform/WebLayerTreeViewClient.h:
+ * public/platform/WebPrivatePtr.h:
+ * public/platform/WebSolidColorLayer.h:
+
2012-02-24 Peter Collingbourne <peter@pcc.me.uk>
[chromium] Have WebFrameImpl::selectionAsMarkup create interchange markup.
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * 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:
+ * modification, are permitted provided that the following conditions
+ * are met:
*
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
+ * 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 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 WebCanvas_h
-#define WebCanvas_h
-
-#include "WebCommon.h"
-
-#if WEBKIT_USING_SKIA
-class SkCanvas;
-#elif WEBKIT_USING_CG
-struct CGContext;
-#endif
-
-namespace WebKit {
-
-#if WEBKIT_USING_SKIA
-typedef SkCanvas WebCanvas;
-#elif WEBKIT_USING_CG
-typedef struct CGContext WebCanvas;
-#else
-#error "Need to define WebCanvas"
-#endif
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebCanvas.h"
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * 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:
+ * modification, are permitted provided that the following conditions
+ * are met:
*
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
+ * 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 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 WebColor_h
-#define WebColor_h
-
-#include "WebColorName.h"
-#include "WebCommon.h"
-
-namespace WebKit {
-
-typedef unsigned WebColor; // RGBA quad. Equivalent to SkColor.
-
-// Sets the values of a set of named colors.
-WEBKIT_EXPORT void setNamedColors(const WebColorName*, const WebColor*, size_t length);
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebColor.h"
/*
-* Copyright (C) 2009 Google Inc. All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following disclaimer
-* in the documentation and/or other materials provided with the
-* distribution.
-* * Neither the name of Google Inc. nor the names of its
-* contributors may be used to endorse or promote products derived from
-* this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
+ * 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 WebColorName_h
-#define WebColorName_h
-
-namespace WebKit {
-
-enum WebColorName {
- WebColorActiveBorder,
- WebColorActiveCaption,
- WebColorAppworkspace,
- WebColorBackground,
- WebColorButtonFace,
- WebColorButtonHighlight,
- WebColorButtonShadow,
- WebColorButtonText,
- WebColorCaptionText,
- WebColorGrayText,
- WebColorHighlight,
- WebColorHighlightText,
- WebColorInactiveBorder,
- WebColorInactiveCaption,
- WebColorInactiveCaptionText,
- WebColorInfoBackground,
- WebColorInfoText,
- WebColorMenu,
- WebColorMenuText,
- WebColorScrollbar,
- WebColorText,
- WebColorThreedDarkShadow,
- WebColorThreedShadow,
- WebColorThreedFace,
- WebColorThreedHighlight,
- WebColorThreedLightShadow,
- WebColorWebkitFocusRingColor,
- WebColorWindow,
- WebColorWindowFrame,
- WebColorWindowText
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebColorName.h"
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * 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
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebContentLayer_h
-#define WebContentLayer_h
-
-#include "WebCommon.h"
-#include "WebLayer.h"
-
-namespace WebKit {
-class WebContentLayerClient;
-class WebContentLayerImpl;
-struct WebFloatRect;
-
-class WebContentLayer : public WebLayer {
-public:
- WEBKIT_EXPORT static WebContentLayer create(WebContentLayerClient*);
-
- WebContentLayer() { }
- WebContentLayer(const WebContentLayer& layer) : WebLayer(layer) { }
- virtual ~WebContentLayer() { }
- WebContentLayer& operator=(const WebContentLayer& layer)
- {
- WebLayer::assign(layer);
- return *this;
- }
-
- // Sets whether the layer draws its content when compositing.
- WEBKIT_EXPORT void setDrawsContent(bool);
- WEBKIT_EXPORT bool drawsContent() const;
-
- // Sets a region of the layer as invalid, i.e. needs to update its content.
- // The visible area of the dirty rect will be passed to one or more calls to
- // WebContentLayerClient::paintContents before the compositing pass occurs.
- WEBKIT_EXPORT void invalidateRect(const WebFloatRect&);
-
- // Sets the entire layer as invalid, i.e. needs to update its content.
- WEBKIT_EXPORT void invalidate();
-
-#if WEBKIT_IMPLEMENTATION
- WebContentLayer(const WTF::PassRefPtr<WebContentLayerImpl>&);
- WebContentLayer& operator=(const WTF::PassRefPtr<WebContentLayerImpl>&);
- operator WTF::PassRefPtr<WebContentLayerImpl>() const;
-#endif
-};
-
-} // namespace WebKit
-
-#endif // WebContentLayer_h
+#include "../../../../Platform/chromium/public/WebContentLayer.h"
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * 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
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebContentLayerClient_h
-#define WebContentLayerClient_h
-
-#include "WebCanvas.h"
-
-namespace WebKit {
-struct WebRect;
-
-class WebContentLayerClient {
-public:
- // Paints the content area for the layer, typically dirty rects submitted
- // through WebContentLayer::setNeedsDisplay, submitting drawing commands
- // through the WebCanvas.
- // The canvas is already clipped to the |clip| rect.
- virtual void paintContents(WebCanvas*, const WebRect& clip) = 0;
-
-protected:
- virtual ~WebContentLayerClient() { }
-};
-
-} // namespace WebKit
-
-#endif // WebContentLayerClient_h
+#include "../../../../Platform/chromium/public/WebContentLayerClient.h"
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * 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
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebExternalTextureLayer_h
-#define WebExternalTextureLayer_h
-
-#include "WebCommon.h"
-#include "WebFloatRect.h"
-#include "WebLayer.h"
-
-namespace WebKit {
-class WebExternalTextureLayerImpl;
-
-// This class represents a layer that renders a texture that is generated
-// externally (not managed by the WebLayerTreeView).
-// The texture will be used by the WebLayerTreeView during compositing passes.
-// When in single-thread mode, this means during WebLayerTreeView::composite().
-// When using the threaded compositor, this can mean at an arbitrary time until
-// the WebLayerTreeView is destroyed.
-class WebExternalTextureLayer : public WebLayer {
-public:
- WEBKIT_EXPORT static WebExternalTextureLayer create();
-
- WebExternalTextureLayer() { }
- WebExternalTextureLayer(const WebExternalTextureLayer& layer) : WebLayer(layer) { }
- virtual ~WebExternalTextureLayer() { }
- WebExternalTextureLayer& operator=(const WebExternalTextureLayer& layer)
- {
- WebLayer::assign(layer);
- return *this;
- }
-
- // Sets the texture id that represents the layer, in the namespace of the
- // compositor context.
- WEBKIT_EXPORT void setTextureId(unsigned);
- WEBKIT_EXPORT unsigned textureId() const;
-
- // Sets whether or not the texture should be flipped in the Y direction when
- // rendered.
- WEBKIT_EXPORT void setFlipped(bool);
- WEBKIT_EXPORT bool flipped() const;
-
- // Sets the rect in UV space of the texture that is mapped to the layer
- // bounds.
- WEBKIT_EXPORT void setUVRect(const WebFloatRect&);
- WEBKIT_EXPORT WebFloatRect uvRect() const;
-
- // Marks a region of the layer as needing a display. These regions are
- // collected in a union until the display occurs.
- WEBKIT_EXPORT void invalidateRect(const WebFloatRect&);
-
-#if WEBKIT_IMPLEMENTATION
- WebExternalTextureLayer(const WTF::PassRefPtr<WebExternalTextureLayerImpl>&);
- WebExternalTextureLayer& operator=(const WTF::PassRefPtr<WebExternalTextureLayerImpl>&);
- operator WTF::PassRefPtr<WebExternalTextureLayerImpl>() const;
-#endif
-};
-
-} // namespace WebKit
-
-#endif // WebExternalTextureLayer_h
+#include "../../../../Platform/chromium/public/WebExternalTextureLayer.h"
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * 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
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebLayer_h
-#define WebLayer_h
-
-#include "WebColor.h"
-#include "WebCommon.h"
-#include "WebPrivatePtr.h"
-
-class SkMatrix44;
-namespace WebCore { class LayerChromium; }
-
-namespace WebKit {
-struct WebFloatPoint;
-struct WebSize;
-
-class WebLayer {
-public:
- WEBKIT_EXPORT static WebLayer create();
-
- WebLayer() { }
- WebLayer(const WebLayer& layer) { assign(layer); }
- virtual ~WebLayer() { reset(); }
- WebLayer& operator=(const WebLayer& layer)
- {
- assign(layer);
- return *this;
- }
- bool isNull() { return m_private.isNull(); }
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebLayer&);
- WEBKIT_EXPORT bool equals(const WebLayer&) const;
-
- WEBKIT_EXPORT WebLayer rootLayer() const;
- WEBKIT_EXPORT WebLayer parent() const;
- WEBKIT_EXPORT void addChild(const WebLayer&);
- WEBKIT_EXPORT void insertChild(const WebLayer&, size_t index);
- WEBKIT_EXPORT void replaceChild(const WebLayer& reference, const WebLayer& newLayer);
- WEBKIT_EXPORT void removeFromParent();
- WEBKIT_EXPORT void removeAllChildren();
-
- WEBKIT_EXPORT void setAnchorPoint(const WebFloatPoint&);
- WEBKIT_EXPORT WebFloatPoint anchorPoint() const;
-
- WEBKIT_EXPORT void setAnchorPointZ(float);
- WEBKIT_EXPORT float anchorPointZ() const;
-
- WEBKIT_EXPORT void setBounds(const WebSize&);
- WEBKIT_EXPORT WebSize bounds() const;
-
- WEBKIT_EXPORT void setMasksToBounds(bool);
- WEBKIT_EXPORT bool masksToBounds() const;
-
- WEBKIT_EXPORT void setMaskLayer(const WebLayer&);
- WEBKIT_EXPORT WebLayer maskLayer() const;
-
- WEBKIT_EXPORT void setOpacity(float);
- WEBKIT_EXPORT float opacity() const;
-
- WEBKIT_EXPORT void setOpaque(bool);
- WEBKIT_EXPORT bool opaque() const;
-
- WEBKIT_EXPORT void setPosition(const WebFloatPoint&);
- WEBKIT_EXPORT WebFloatPoint position() const;
-
- WEBKIT_EXPORT void setSublayerTransform(const SkMatrix44&);
- WEBKIT_EXPORT SkMatrix44 sublayerTransform() const;
-
- WEBKIT_EXPORT void setTransform(const SkMatrix44&);
- WEBKIT_EXPORT SkMatrix44 transform() const;
-
- WEBKIT_EXPORT void setDebugBorderColor(const WebColor&);
- WEBKIT_EXPORT void setDebugBorderWidth(float);
-
- template<typename T> T to()
- {
- T res;
- res.WebLayer::assign(*this);
- return res;
- }
-
- template<typename T> const T toConst() const
- {
- T res;
- res.WebLayer::assign(*this);
- return res;
- }
-
-#if WEBKIT_IMPLEMENTATION
- WebLayer(const WTF::PassRefPtr<WebCore::LayerChromium>&);
- WebLayer& operator=(const WTF::PassRefPtr<WebCore::LayerChromium>&);
- operator WTF::PassRefPtr<WebCore::LayerChromium>() const;
- template<typename T> T* unwrap()
- {
- return static_cast<T*>(m_private.get());
- }
-
- template<typename T> const T* constUnwrap() const
- {
- return static_cast<const T*>(m_private.get());
- }
-#endif
-
-protected:
- WebPrivatePtr<WebCore::LayerChromium> m_private;
-};
-
-inline bool operator==(const WebLayer& a, const WebLayer& b)
-{
- return a.equals(b);
-}
-
-inline bool operator!=(const WebLayer& a, const WebLayer& b)
-{
- return !(a == b);
-}
-
-} // namespace WebKit
-
-#endif // WebLayer_h
+#include "../../../../Platform/chromium/public/WebLayer.h"
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * 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
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebLayerTreeView_h
-#define WebLayerTreeView_h
-
-#include "WebCommon.h"
-#include "WebPrivatePtr.h"
-
-namespace WebCore {
-class CCLayerTreeHost;
-struct CCSettings;
-}
-
-namespace WebKit {
-class WebLayer;
-class WebLayerTreeViewClient;
-struct WebRect;
-struct WebSize;
-
-class WebLayerTreeView {
-public:
- struct Settings {
- Settings()
- : acceleratePainting(false)
- , compositeOffscreen(false)
- , showFPSCounter(false)
- , showPlatformLayerTree(false)
- , refreshRate(0)
- , perTilePainting(false)
- , partialSwapEnabled(false)
- , threadedAnimationEnabled(false) { }
-
- bool acceleratePainting;
- bool compositeOffscreen;
- bool showFPSCounter;
- bool showPlatformLayerTree;
- double refreshRate;
- bool perTilePainting;
- bool partialSwapEnabled;
- bool threadedAnimationEnabled;
-#if WEBKIT_IMPLEMENTATION
- operator WebCore::CCSettings() const;
-#endif
- };
-
- WEBKIT_EXPORT static WebLayerTreeView create(WebLayerTreeViewClient*, const WebLayer& root, const Settings&);
-
- WebLayerTreeView() { }
- WebLayerTreeView(const WebLayerTreeView& layer) { assign(layer); }
- ~WebLayerTreeView() { reset(); }
- WebLayerTreeView& operator=(const WebLayerTreeView& layer)
- {
- assign(layer);
- return *this;
- }
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebLayerTreeView&);
- WEBKIT_EXPORT bool equals(const WebLayerTreeView&) const;
-
- // Triggers a compositing pass. If the compositor thread was not
- // enabled via WebCompositor::initialize, the compositing pass happens
- // immediately. If it is enabled, the compositing pass will happen at a
- // later time. Before the compositing pass happens (i.e. before composite()
- // returns when the compositor thread is disabled), WebContentLayers will be
- // asked to paint their dirty region, through
- // WebContentLayerClient::paintContents.
- WEBKIT_EXPORT void composite();
-
- WEBKIT_EXPORT void setViewportSize(const WebSize&);
- WEBKIT_EXPORT WebSize viewportSize() const;
-
- // Composites and attempts to read back the result into the provided
- // buffer. If it wasn't possible, e.g. due to context lost, will return
- // false. Pixel format is 32bit (RGBA), and the provided buffer must be
- // large enough contain viewportSize().width() * viewportSize().height()
- // pixels. The WebLayerTreeView does not assume ownership of the buffer.
- // The buffer is not modified if the false is returned.
- WEBKIT_EXPORT bool compositeAndReadback(void *pixels, const WebRect&);
-
- // Sets the root of the tree. The root is set by way of the constructor.
- // This is typically used to explicitly set the root to null to break
- // cycles.
- WEBKIT_EXPORT void setRootLayer(WebLayer*);
-
-#if WEBKIT_IMPLEMENTATION
- WebLayerTreeView(const WTF::PassRefPtr<WebCore::CCLayerTreeHost>&);
- WebLayerTreeView& operator=(const WTF::PassRefPtr<WebCore::CCLayerTreeHost>&);
- operator WTF::PassRefPtr<WebCore::CCLayerTreeHost>() const;
-#endif
-
- WEBKIT_EXPORT void setNeedsRedraw();
-
-protected:
- WebPrivatePtr<WebCore::CCLayerTreeHost> m_private;
-};
-
-inline bool operator==(const WebLayerTreeView& a, const WebLayerTreeView& b)
-{
- return a.equals(b);
-}
-
-inline bool operator!=(const WebLayerTreeView& a, const WebLayerTreeView& b)
-{
- return !(a == b);
-}
-
-} // namespace WebKit
-
-#endif // WebLayerTreeView_h
+#include "../../../../Platform/chromium/public/WebLayerTreeView.h"
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * 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
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebLayerTreeViewClient_h
-#define WebLayerTreeViewClient_h
-
-namespace WebKit {
-class WebGraphicsContext3D;
-struct WebSize;
-class WebThread;
-
-class WebLayerTreeViewClient {
-public:
- // Updates animation and layout. These are called before the compositing
- // pass so that layers can be updated at the given frame time.
- virtual void updateAnimations(double frameBeginTime) = 0;
- virtual void layout() = 0;
-
- // Applies a scroll delta to the root layer, which is bundled with a page
- // scale factor that may apply a CSS transform on the whole document (used
- // for mobile-device pinch zooming). This is triggered by events sent to the
- // compositor thread through the WebCompositor interface.
- virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFactor) = 0;
-
- // Creates a 3D context suitable for the compositing. This may be called
- // more than once if the context gets lost.
- virtual WebGraphicsContext3D* createContext3D() = 0;
-
- // Signals a successful rebinding of the 3D context (e.g. after a lost
- // context event).
- virtual void didRebindGraphicsContext(bool success) = 0;
-
- // Schedules a compositing pass, meaning the client should call
- // WebLayerTreeView::composite at a later time. This is only called if the
- // compositor thread is disabled; when enabled, the compositor will
- // internally schedule a compositing pass when needed.
- virtual void scheduleComposite() = 0;
-
-protected:
- virtual ~WebLayerTreeViewClient() { }
-};
-
-} // namespace WebKit
-
-#endif // WebLayerTreeViewClient_h
+#include "../../../../Platform/chromium/public/WebLayerTreeViewClient.h"
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * 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:
+ * modification, are permitted provided that the following conditions
+ * are met:
*
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
+ * 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 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 WebPrivatePtr_h
-#define WebPrivatePtr_h
-
-#include "WebCommon.h"
-
-#if WEBKIT_IMPLEMENTATION
-#include <wtf/PassRefPtr.h>
-#endif
-
-namespace WebKit {
-
-// This class is an implementation detail of the WebKit API. It exists
-// to help simplify the implementation of WebKit interfaces that merely
-// wrap a reference counted WebCore class.
-template <typename T>
-class WebPrivatePtr {
-public:
- WebPrivatePtr() : m_ptr(0) { }
- ~WebPrivatePtr() { WEBKIT_ASSERT(!m_ptr); }
-
- bool isNull() const { return !m_ptr; }
-
-#if WEBKIT_IMPLEMENTATION
- WebPrivatePtr(const PassRefPtr<T>& prp)
- : m_ptr(prp.leakRef())
- {
- }
-
- void reset()
- {
- assign(0);
- }
-
- WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other)
- {
- T* p = other.m_ptr;
- if (p)
- p->ref();
- assign(p);
- return *this;
- }
-
- WebPrivatePtr<T>& operator=(const PassRefPtr<T>& prp)
- {
- assign(prp.leakRef());
- return *this;
- }
-
- T* get() const
- {
- return m_ptr;
- }
-
- T* operator->() const
- {
- ASSERT(m_ptr);
- return m_ptr;
- }
-#endif
-
-private:
-#if WEBKIT_IMPLEMENTATION
- void assign(T* p)
- {
- // p is already ref'd for us by the caller
- if (m_ptr)
- m_ptr->deref();
- m_ptr = p;
- }
-#endif
-
- T* m_ptr;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebPrivatePtr.h"
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebSolidColorLayer_h
-#define WebSolidColorLayer_h
-
-#include "WebCommon.h"
-#include "WebFloatRect.h"
-#include "WebLayer.h"
-
-namespace WebKit {
-class WebSolidColorLayerImpl;
-
-class WebSolidColorLayer : public WebLayer {
-public:
- WEBKIT_EXPORT static WebSolidColorLayer create();
- WEBKIT_EXPORT void setBackgroundColor(const WebColor&);
-
-#if WEBKIT_IMPLEMENTATION
- WebSolidColorLayer(const WTF::PassRefPtr<WebSolidColorLayerImpl>&);
-#endif
-};
-
-} // namespace WebKit
-
-#endif // WebSolidColorLayer_h
+#include "../../../../Platform/chromium/public/WebSolidColorLayer.h"