diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderLayer.h')
-rw-r--r-- | Source/WebCore/rendering/RenderLayer.h | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h index e4f790e05..32d41e3ba 100644 --- a/Source/WebCore/rendering/RenderLayer.h +++ b/Source/WebCore/rendering/RenderLayer.h @@ -115,7 +115,7 @@ public: bool isEmpty() const { return m_rect.isEmpty(); } bool intersects(const LayoutRect& rect) { return m_rect.intersects(rect); } - bool intersects(const HitTestPoint&); + bool intersects(const HitTestLocation&); private: LayoutRect m_rect; @@ -230,14 +230,17 @@ struct ClipRectsCache { ClipRectsCache() { #ifndef NDEBUG - for (int i = 0; i < NumCachedClipRectsTypes; ++i) + for (int i = 0; i < NumCachedClipRectsTypes; ++i) { m_clipRectsRoot[i] = 0; + m_respectingOverflowClip[i] = false; + } #endif } RefPtr<ClipRects> m_clipRects[NumCachedClipRectsTypes]; #ifndef NDEBUG const RenderLayer* m_clipRectsRoot[NumCachedClipRectsTypes]; + bool m_respectingOverflowClip[NumCachedClipRectsTypes]; #endif }; @@ -504,6 +507,7 @@ public: PaintLayerPaintingCompositingBackgroundPhase = 1 << 5, PaintLayerPaintingCompositingForegroundPhase = 1 << 6, PaintLayerPaintingCompositingMaskPhase = 1 << 7, + PaintLayerPaintingOverflowContents = 1 << 8, PaintLayerPaintingCompositingAllPhases = (PaintLayerPaintingCompositingBackgroundPhase | PaintLayerPaintingCompositingForegroundPhase | PaintLayerPaintingCompositingMaskPhase) }; @@ -516,21 +520,23 @@ public: void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = PaintBehaviorNormal, RenderObject* paintingRoot = 0, RenderRegion* = 0, PaintLayerFlags = 0); bool hitTest(const HitTestRequest&, HitTestResult&); - bool hitTest(const HitTestRequest&, const HitTestPoint&, HitTestResult&); + bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior, RenderObject* paintingRoot); + enum ShouldRespectOverflowClip { IgnoreOverflowClip, RespectOverflowClip }; + // This method figures out our layerBounds in coordinates relative to // |rootLayer}. It also computes our background and foreground clip rects // for painting/event handling. void calculateRects(const RenderLayer* rootLayer, RenderRegion*, ClipRectsType, const LayoutRect& paintDirtyRect, LayoutRect& layerBounds, ClipRect& backgroundRect, ClipRect& foregroundRect, ClipRect& outlineRect, - OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const; + OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize, ShouldRespectOverflowClip = RespectOverflowClip) const; // Compute and cache clip rects computed with the given layer as the root - void updateClipRects(const RenderLayer* rootLayer, RenderRegion*, ClipRectsType, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize); + void updateClipRects(const RenderLayer* rootLayer, RenderRegion*, ClipRectsType, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize, ShouldRespectOverflowClip = RespectOverflowClip); // Compute and return the clip rects. If useCached is true, will used previously computed clip rects on ancestors // (rather than computing them all from scratch up the parent chain). - void calculateClipRects(const RenderLayer* rootLayer, RenderRegion*, ClipRectsType, ClipRects&, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const; + void calculateClipRects(const RenderLayer* rootLayer, RenderRegion*, ClipRectsType, ClipRects&, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize, ShouldRespectOverflowClip = RespectOverflowClip) const; ClipRects* clipRects(ClipRectsType type) const { ASSERT(type < NumCachedClipRectsTypes); return m_clipRectsCache ? m_clipRectsCache->m_clipRects[type].get() : 0; } @@ -568,7 +574,7 @@ public: enum UpdateLayerPositionsAfterScrollFlag { NoFlag = 0, - HasSeenFixedPositionedAncestor = 1 << 0, + HasSeenViewportConstrainedAncestor = 1 << 0, HasSeenAncestorWithOverflowClip = 1 << 1 }; @@ -606,6 +612,12 @@ public: bool hasFilter() const { return false; } #endif +#if ENABLE(CSS_COMPOSITING) + bool hasBlendMode() const { return renderer()->hasBlendMode(); } +#else + bool hasBlendMode() const { return false; } +#endif + // Overloaded new operator. Derived classes must override operator new // in order to allocate out of the RenderArena. void* operator new(size_t, RenderArena*); @@ -622,9 +634,11 @@ public: virtual GraphicsLayer* layerForHorizontalScrollbar() const; virtual GraphicsLayer* layerForVerticalScrollbar() const; virtual GraphicsLayer* layerForScrollCorner() const; + virtual bool usesCompositedScrolling() const OVERRIDE; #else bool isComposited() const { return false; } bool hasCompositedMask() const { return false; } + bool usesCompositedScrolling() const { return false; } #endif bool paintsWithTransparency(PaintBehavior paintBehavior) const @@ -663,6 +677,8 @@ public: void setLayerListMutationAllowed(bool flag) { m_layerListMutationAllowed = flag; } #endif + Node* enclosingElement() const; + private: void updateZOrderLists(); void rebuildZOrderLists(); @@ -737,25 +753,25 @@ private: PaintLayerFlags, const Vector<RenderLayer*>& columnLayers, size_t columnIndex); RenderLayer* hitTestLayer(RenderLayer* rootLayer, RenderLayer* containerLayer, const HitTestRequest& request, HitTestResult& result, - const LayoutRect& hitTestRect, const HitTestPoint&, bool appliedTransform, + const LayoutRect& hitTestRect, const HitTestLocation&, bool appliedTransform, const HitTestingTransformState* transformState = 0, double* zOffset = 0); RenderLayer* hitTestList(Vector<RenderLayer*>*, RenderLayer* rootLayer, const HitTestRequest& request, HitTestResult& result, - const LayoutRect& hitTestRect, const HitTestPoint&, + const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingTransformState* transformState, double* zOffsetForDescendants, double* zOffset, const HitTestingTransformState* unflattenedTransformState, bool depthSortDescendants); RenderLayer* hitTestPaginatedChildLayer(RenderLayer* childLayer, RenderLayer* rootLayer, const HitTestRequest& request, HitTestResult& result, - const LayoutRect& hitTestRect, const HitTestPoint&, + const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingTransformState* transformState, double* zOffset); RenderLayer* hitTestChildLayerColumns(RenderLayer* childLayer, RenderLayer* rootLayer, const HitTestRequest& request, HitTestResult& result, - const LayoutRect& hitTestRect, const HitTestPoint&, + const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingTransformState* transformState, double* zOffset, const Vector<RenderLayer*>& columnLayers, size_t columnIndex); PassRefPtr<HitTestingTransformState> createLocalTransformState(RenderLayer* rootLayer, RenderLayer* containerLayer, - const LayoutRect& hitTestRect, const HitTestPoint&, + const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingTransformState* containerTransformState) const; - bool hitTestContents(const HitTestRequest&, HitTestResult&, const LayoutRect& layerBounds, const HitTestPoint&, HitTestFilter) const; + bool hitTestContents(const HitTestRequest&, HitTestResult&, const LayoutRect& layerBounds, const HitTestLocation&, HitTestFilter) const; void computeScrollDimensions(); bool hasHorizontalOverflow() const; @@ -816,8 +832,6 @@ private: // Both updates the status, and returns true if descendants of this have 3d. bool update3DTransformedDescendantStatus(); - Node* enclosingElement() const; - void createReflection(); void removeReflection(); @@ -829,8 +843,8 @@ private: void updateOrRemoveFilterEffect(); #endif - void parentClipRects(const RenderLayer* rootLayer, RenderRegion*, ClipRectsType, ClipRects&, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const; - ClipRect backgroundClipRect(const RenderLayer* rootLayer, RenderRegion*, ClipRectsType, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const; + void parentClipRects(const RenderLayer* rootLayer, RenderRegion*, ClipRectsType, ClipRects&, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize, ShouldRespectOverflowClip = RespectOverflowClip) const; + ClipRect backgroundClipRect(const RenderLayer* rootLayer, RenderRegion*, ClipRectsType, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize, ShouldRespectOverflowClip = RespectOverflowClip) const; LayoutRect paintingExtent(const RenderLayer* rootLayer, const LayoutRect& paintDirtyRect, PaintBehavior); RenderLayer* enclosingTransformedAncestor() const; |