From 2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Thu, 2 Jun 2011 12:07:03 +0100 Subject: Merge WebKit at r84325: Initial merge by git. Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b --- Source/WebCore/rendering/RenderLayerCompositor.h | 44 ++++++++++++++++-------- 1 file changed, 30 insertions(+), 14 deletions(-) (limited to 'Source/WebCore/rendering/RenderLayerCompositor.h') diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h index c3deb3f..0315050 100644 --- a/Source/WebCore/rendering/RenderLayerCompositor.h +++ b/Source/WebCore/rendering/RenderLayerCompositor.h @@ -36,7 +36,7 @@ namespace WebCore { class GraphicsLayer; class RenderEmbeddedObject; -class RenderIFrame; +class RenderPart; #if ENABLE(VIDEO) class RenderVideo; #endif @@ -138,7 +138,7 @@ public: enum RootLayerAttachment { RootLayerUnattached, RootLayerAttachedViaChromeClient, - RootLayerAttachedViaEnclosingIframe + RootLayerAttachedViaEnclosingFrame }; RootLayerAttachment rootLayerAttachment() const { return m_rootLayerAttachment; } @@ -161,18 +161,18 @@ public: // Most platforms connect compositing layer trees between iframes and their parent document. // Some (currently just Mac) allow iframes to do their own compositing. - static bool allowsIndependentlyCompositedIFrames(const FrameView*); - bool shouldPropagateCompositingToEnclosingIFrame() const; + static bool allowsIndependentlyCompositedFrames(const FrameView*); + bool shouldPropagateCompositingToEnclosingFrame() const; - // FIXME: This should be a RenderIFrame* - HTMLFrameOwnerElement* enclosingIFrameElement() const; + HTMLFrameOwnerElement* enclosingFrameElement() const; - static RenderLayerCompositor* iframeContentsCompositor(RenderIFrame*); + static RenderLayerCompositor* frameContentsCompositor(RenderPart*); // Return true if the layers changed. - static bool parentIFrameContentLayers(RenderIFrame*); + static bool parentFrameContentLayers(RenderPart*); // Update the geometry of the layers used for clipping and scrolling in frames. - void frameViewDidChangeSize(const IntPoint& contentsOffset = IntPoint()); + void frameViewDidChangeLocation(const IntPoint& contentsOffset); + void frameViewDidChangeSize(); void frameViewDidScroll(const IntPoint& = IntPoint()); String layerTreeAsText(bool showDebugInfo = false); @@ -184,11 +184,15 @@ public: void updateContentsScale(float, RenderLayer* = 0); + GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizontalScrollbar.get(); } + GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVerticalScrollbar.get(); } + GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.get(); } + private: // GraphicsLayerClient Implementation virtual void notifyAnimationStarted(const GraphicsLayer*, double) { } virtual void notifySyncRequired(const GraphicsLayer*) { scheduleLayerFlush(); } - virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&) { } + virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&); // These calls return false always. They are saying that the layers associated with this client // (the clipLayer and scrollLayer) should never show debugging info. @@ -236,7 +240,9 @@ private: void detachRootPlatformLayer(); void rootLayerAttachmentChanged(); - + + void updateOverflowControlsLayers(); + void scheduleNeedsStyleRecalc(Element*); void notifyIFramesOfCompositingChange(); @@ -246,7 +252,7 @@ private: bool requiresCompositingForVideo(RenderObject*) const; bool requiresCompositingForCanvas(RenderObject*) const; bool requiresCompositingForPlugin(RenderObject*) const; - bool requiresCompositingForIFrame(RenderObject*) const; + bool requiresCompositingForFrame(RenderObject*) const; bool requiresCompositingWhenDescendantsAreCompositing(RenderObject*) const; bool requiresCompositingForFullScreen(RenderObject*) const; @@ -256,7 +262,10 @@ private: #endif bool requiresScrollLayer(RootLayerAttachment) const; - + bool requiresHorizontalScrollbarLayer() const; + bool requiresVerticalScrollbarLayer() const; + bool requiresScrollCornerLayer() const; + private: RenderView* m_renderView; OwnPtr m_rootPlatformLayer; @@ -284,7 +293,14 @@ private: // Enclosing clipping layer for iframe content OwnPtr m_clipLayer; OwnPtr m_scrollLayer; - + + // Enclosing layer for overflow controls and the clipping layer + OwnPtr m_overflowControlsHostLayer; + + // Layers for overflow controls + OwnPtr m_layerForHorizontalScrollbar; + OwnPtr m_layerForVerticalScrollbar; + OwnPtr m_layerForScrollCorner; #if PROFILE_LAYER_REBUILD int m_rootLayerUpdateCount; #endif -- cgit v1.1