| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #include "platform/graphics/CompositingReasons.h" | 59 #include "platform/graphics/CompositingReasons.h" |
| 60 #include "wtf/OwnPtr.h" | 60 #include "wtf/OwnPtr.h" |
| 61 | 61 |
| 62 namespace WebCore { | 62 namespace WebCore { |
| 63 | 63 |
| 64 class FilterEffectRenderer; | 64 class FilterEffectRenderer; |
| 65 class FilterOperations; | 65 class FilterOperations; |
| 66 class HitTestRequest; | 66 class HitTestRequest; |
| 67 class HitTestResult; | 67 class HitTestResult; |
| 68 class HitTestingTransformState; | 68 class HitTestingTransformState; |
| 69 class RenderFlowThread; | |
| 70 class RenderGeometryMap; | 69 class RenderGeometryMap; |
| 71 class CompositedLayerMapping; | 70 class CompositedLayerMapping; |
| 72 class RenderLayerCompositor; | 71 class RenderLayerCompositor; |
| 73 class RenderReplica; | 72 class RenderReplica; |
| 74 class RenderStyle; | 73 class RenderStyle; |
| 75 class TransformationMatrix; | 74 class TransformationMatrix; |
| 76 | 75 |
| 77 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelfForB
orderRadius }; | 76 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelfForB
orderRadius }; |
| 78 enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf }; | 77 enum IncludeSelfOrNot { IncludeSelf, ExcludeSelf }; |
| 79 | 78 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 251 |
| 253 void convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntP
oint& location) const; | 252 void convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntP
oint& location) const; |
| 254 void convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntR
ect&) const; | 253 void convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntR
ect&) const; |
| 255 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint& loc
ation) const; | 254 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint& loc
ation) const; |
| 256 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con
st; | 255 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con
st; |
| 257 | 256 |
| 258 // The two main functions that use the layer system. The paint method | 257 // The two main functions that use the layer system. The paint method |
| 259 // paints the layers that intersect the damage rect from back to | 258 // paints the layers that intersect the damage rect from back to |
| 260 // front. The hitTest method looks for mouse events by walking | 259 // front. The hitTest method looks for mouse events by walking |
| 261 // layers that intersect the point from front to back. | 260 // layers that intersect the point from front to back. |
| 262 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P
aintBehaviorNormal, RenderObject* paintingRoot = 0, | 261 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P
aintBehaviorNormal, RenderObject* paintingRoot = 0, PaintLayerFlags = 0); |
| 263 RenderRegion* = 0, PaintLayerFlags = 0); | |
| 264 bool hitTest(const HitTestRequest&, HitTestResult&); | 262 bool hitTest(const HitTestRequest&, HitTestResult&); |
| 265 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); | 263 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); |
| 266 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
PaintBehavior, RenderObject* paintingRoot = 0); | 264 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
PaintBehavior, RenderObject* paintingRoot = 0); |
| 267 | 265 |
| 268 // Pass offsetFromRoot if known. | 266 // Pass offsetFromRoot if known. |
| 269 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d
amageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromRoot = 0)
const; | 267 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d
amageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromRoot = 0)
const; |
| 270 | 268 |
| 271 enum CalculateLayerBoundsFlag { | 269 enum CalculateLayerBoundsFlag { |
| 272 IncludeSelfTransform = 1 << 0, | 270 IncludeSelfTransform = 1 << 0, |
| 273 UseLocalClipRectIfPossible = 1 << 1, | 271 UseLocalClipRectIfPossible = 1 << 1, |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 NoNotCompositedReason, | 404 NoNotCompositedReason, |
| 407 NotCompositedForBoundsOutOfView, | 405 NotCompositedForBoundsOutOfView, |
| 408 NotCompositedForNonViewContainer, | 406 NotCompositedForNonViewContainer, |
| 409 NotCompositedForNoVisibleContent, | 407 NotCompositedForNoVisibleContent, |
| 410 NotCompositedForUnscrollableAncestors, | 408 NotCompositedForUnscrollableAncestors, |
| 411 }; | 409 }; |
| 412 | 410 |
| 413 void setViewportConstrainedNotCompositedReason(ViewportConstrainedNotComposi
tedReason reason) { m_compositingProperties.viewportConstrainedNotCompositedReas
on = reason; } | 411 void setViewportConstrainedNotCompositedReason(ViewportConstrainedNotComposi
tedReason reason) { m_compositingProperties.viewportConstrainedNotCompositedReas
on = reason; } |
| 414 ViewportConstrainedNotCompositedReason viewportConstrainedNotCompositedReaso
n() const { return static_cast<ViewportConstrainedNotCompositedReason>(m_composi
tingProperties.viewportConstrainedNotCompositedReason); } | 412 ViewportConstrainedNotCompositedReason viewportConstrainedNotCompositedReaso
n() const { return static_cast<ViewportConstrainedNotCompositedReason>(m_composi
tingProperties.viewportConstrainedNotCompositedReason); } |
| 415 | 413 |
| 416 bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRen
derFlowThread(); } | |
| 417 | |
| 418 bool scrollsWithRespectTo(const RenderLayer*) const; | 414 bool scrollsWithRespectTo(const RenderLayer*) const; |
| 419 | 415 |
| 420 void addLayerHitTestRects(LayerHitTestRects&) const; | 416 void addLayerHitTestRects(LayerHitTestRects&) const; |
| 421 | 417 |
| 422 // FIXME: This should probably return a ScrollableArea but a lot of internal
methods are mistakenly exposed. | 418 // FIXME: This should probably return a ScrollableArea but a lot of internal
methods are mistakenly exposed. |
| 423 RenderLayerScrollableArea* scrollableArea() const { return m_scrollableArea.
get(); } | 419 RenderLayerScrollableArea* scrollableArea() const { return m_scrollableArea.
get(); } |
| 424 RenderLayerRepainter& repainter() { return m_repainter; } | 420 RenderLayerRepainter& repainter() { return m_repainter; } |
| 425 RenderLayerClipper& clipper() { return m_clipper; } | 421 RenderLayerClipper& clipper() { return m_clipper; } |
| 426 const RenderLayerClipper& clipper() const { return m_clipper; } | 422 const RenderLayerClipper& clipper() const { return m_clipper; } |
| 427 | 423 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 486 |
| 491 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende
rBox(renderer())->location() : LayoutPoint(); } | 487 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende
rBox(renderer())->location() : LayoutPoint(); } |
| 492 | 488 |
| 493 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn
fo&, PaintLayerFlags); | 489 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn
fo&, PaintLayerFlags); |
| 494 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo
&, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint()); | 490 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo
&, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint()); |
| 495 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay
erFlags); | 491 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay
erFlags); |
| 496 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa
intingInfo&, PaintLayerFlags); | 492 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa
intingInfo&, PaintLayerFlags); |
| 497 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con
st LayerPaintingInfo&, PaintLayerFlags); | 493 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con
st LayerPaintingInfo&, PaintLayerFlags); |
| 498 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c
onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye
rs, size_t columnIndex); | 494 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c
onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye
rs, size_t columnIndex); |
| 499 | 495 |
| 500 void collectFragments(LayerFragments&, const RenderLayer* rootLayer, RenderR
egion*, const LayoutRect& dirtyRect, | 496 void collectFragments(LayerFragments&, const RenderLayer* rootLayer, const L
ayoutRect& dirtyRect, |
| 501 ClipRectsType, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRelev
ancy = IgnoreOverlayScrollbarSize, | 497 ClipRectsType, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRelev
ancy = IgnoreOverlayScrollbarSize, |
| 502 ShouldRespectOverflowClip = RespectOverflowClip, const LayoutPoint* offs
etFromRoot = 0, | 498 ShouldRespectOverflowClip = RespectOverflowClip, const LayoutPoint* offs
etFromRoot = 0, |
| 503 const LayoutSize& subPixelAccumulation = LayoutSize(), const LayoutRect*
layerBoundingBox = 0); | 499 const LayoutSize& subPixelAccumulation = LayoutSize(), const LayoutRect*
layerBoundingBox = 0); |
| 504 void updatePaintingInfoForFragments(LayerFragments&, const LayerPaintingInfo
&, PaintLayerFlags, bool shouldPaintContent, const LayoutPoint* offsetFromRoot); | 500 void updatePaintingInfoForFragments(LayerFragments&, const LayerPaintingInfo
&, PaintLayerFlags, bool shouldPaintContent, const LayoutPoint* offsetFromRoot); |
| 505 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, Gr
aphicsContext* transparencyLayerContext, | 501 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, Gr
aphicsContext* transparencyLayerContext, |
| 506 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer); | 502 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer); |
| 507 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, Gr
aphicsContext* transparencyLayerContext, | 503 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, Gr
aphicsContext* transparencyLayerContext, |
| 508 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, | 504 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, |
| 509 bool selectionOnly, bool forceBlackText); | 505 bool selectionOnly, bool forceBlackText); |
| 510 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer); | 506 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 | 565 |
| 570 void updateOrRemoveFilterClients(); | 566 void updateOrRemoveFilterClients(); |
| 571 void updateOrRemoveFilterEffectRenderer(); | 567 void updateOrRemoveFilterEffectRenderer(); |
| 572 | 568 |
| 573 LayoutRect paintingExtent(const RenderLayer* rootLayer, const LayoutRect& pa
intDirtyRect, PaintBehavior); | 569 LayoutRect paintingExtent(const RenderLayer* rootLayer, const LayoutRect& pa
intDirtyRect, PaintBehavior); |
| 574 | 570 |
| 575 RenderLayer* enclosingTransformedAncestor() const; | 571 RenderLayer* enclosingTransformedAncestor() const; |
| 576 | 572 |
| 577 void updatePagination(); | 573 void updatePagination(); |
| 578 | 574 |
| 579 // FIXME: Temporary. Remove when new columns come online. | |
| 580 bool useRegionBasedColumns() const; | |
| 581 | |
| 582 bool hasCompositingDescendant() const { return m_compositingProperties.hasCo
mpositingDescendant; } | 575 bool hasCompositingDescendant() const { return m_compositingProperties.hasCo
mpositingDescendant; } |
| 583 void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompo
sitingDescendant = b; } | 576 void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompo
sitingDescendant = b; } |
| 584 | 577 |
| 585 bool hasNonCompositedChild() const { return m_compositingProperties.hasNonCo
mpositedChild; } | 578 bool hasNonCompositedChild() const { return m_compositingProperties.hasNonCo
mpositedChild; } |
| 586 void setHasNonCompositedChild(bool b) { m_compositingProperties.hasNonCompo
sitedChild = b; } | 579 void setHasNonCompositedChild(bool b) { m_compositingProperties.hasNonCompo
sitedChild = b; } |
| 587 | 580 |
| 588 bool shouldIsolateCompositedDescendants() const { return m_compositingProper
ties.shouldIsolateCompositedDescendants; } | 581 bool shouldIsolateCompositedDescendants() const { return m_compositingProper
ties.shouldIsolateCompositedDescendants; } |
| 589 void setShouldIsolateCompositedDescendants(bool b) { m_compositingPropertie
s.shouldIsolateCompositedDescendants = b; } | 582 void setShouldIsolateCompositedDescendants(bool b) { m_compositingPropertie
s.shouldIsolateCompositedDescendants = b; } |
| 590 | 583 |
| 591 bool shouldInvalidateNextBacking() const { return m_compositingProperties.sh
ouldInvalidateNextBacking; } | 584 bool shouldInvalidateNextBacking() const { return m_compositingProperties.sh
ouldInvalidateNextBacking; } |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 | 724 |
| 732 } // namespace WebCore | 725 } // namespace WebCore |
| 733 | 726 |
| 734 #ifndef NDEBUG | 727 #ifndef NDEBUG |
| 735 // Outside the WebCore namespace for ease of invocation from gdb. | 728 // Outside the WebCore namespace for ease of invocation from gdb. |
| 736 void showLayerTree(const WebCore::RenderLayer*); | 729 void showLayerTree(const WebCore::RenderLayer*); |
| 737 void showLayerTree(const WebCore::RenderObject*); | 730 void showLayerTree(const WebCore::RenderObject*); |
| 738 #endif | 731 #endif |
| 739 | 732 |
| 740 #endif // RenderLayer_h | 733 #endif // RenderLayer_h |
| OLD | NEW |