| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return curr; | 128 return curr; |
| 129 } | 129 } |
| 130 | 130 |
| 131 LayoutPoint location() const; | 131 LayoutPoint location() const; |
| 132 IntSize size() const; | 132 IntSize size() const; |
| 133 | 133 |
| 134 LayoutRect rect() const { return LayoutRect(location(), size()); } | 134 LayoutRect rect() const { return LayoutRect(location(), size()); } |
| 135 | 135 |
| 136 bool isRootLayer() const { return m_isRootLayer; } | 136 bool isRootLayer() const { return m_isRootLayer; } |
| 137 | 137 |
| 138 // Notification from the renderer that its content changed (e.g. current fra
me of image changed). | |
| 139 // Allows updates of layer content without invalidating paint. | |
| 140 void contentChanged(ContentChangeType); | |
| 141 | |
| 142 void updateLayerPositionsAfterLayout(); | 138 void updateLayerPositionsAfterLayout(); |
| 143 | 139 |
| 144 void updateTransformationMatrix(); | 140 void updateTransformationMatrix(); |
| 145 RenderLayer* renderingContextRoot(); | 141 RenderLayer* renderingContextRoot(); |
| 146 | 142 |
| 147 // Our current relative position offset. | 143 // Our current relative position offset. |
| 148 const LayoutSize offsetForInFlowPosition() const; | 144 const LayoutSize offsetForInFlowPosition() const; |
| 149 | 145 |
| 150 void blockSelectionGapsBoundsChanged(); | |
| 151 void addBlockSelectionGapsBounds(const LayoutRect&); | 146 void addBlockSelectionGapsBounds(const LayoutRect&); |
| 152 void clearBlockSelectionGapsBounds(); | 147 void clearBlockSelectionGapsBounds(); |
| 153 void invalidatePaintForBlockSelectionGaps(); | 148 void invalidatePaintForBlockSelectionGaps(); |
| 154 IntRect blockSelectionGapsBounds() const; | 149 IntRect blockSelectionGapsBounds() const; |
| 155 | 150 |
| 156 RenderLayerStackingNode* stackingNode() { return m_stackingNode.get(); } | 151 RenderLayerStackingNode* stackingNode() { return m_stackingNode.get(); } |
| 157 const RenderLayerStackingNode* stackingNode() const { return m_stackingNode.
get(); } | 152 const RenderLayerStackingNode* stackingNode() const { return m_stackingNode.
get(); } |
| 158 | 153 |
| 159 bool hasBoxDecorationsOrBackground() const; | 154 bool hasBoxDecorationsOrBackground() const; |
| 160 bool hasVisibleBoxDecorations() const; | 155 bool hasVisibleBoxDecorations() const; |
| 161 // Returns true if this layer has visible content (ignoring any child layers
). | 156 // Returns true if this layer has visible content (ignoring any child layers
). |
| 162 bool isVisuallyNonEmpty() const; | 157 bool isVisuallyNonEmpty() const; |
| 163 // True if this layer container renderers that paint. | 158 // True if this layer container renderers that paint. |
| 164 bool hasNonEmptyChildRenderers() const; | 159 bool hasNonEmptyChildRenderers() const; |
| 165 | 160 |
| 166 bool usedTransparency() const { return m_usedTransparency; } | 161 bool usedTransparency() const { return m_usedTransparency; } |
| 167 | 162 |
| 168 // Gets the nearest enclosing positioned ancestor layer (also includes | 163 // Gets the nearest enclosing positioned ancestor layer (also includes |
| 169 // the <html> layer and the root layer). | 164 // the <html> layer and the root layer). |
| 170 RenderLayer* enclosingPositionedAncestor() const; | 165 RenderLayer* enclosingPositionedAncestor() const; |
| 171 | 166 |
| 172 RenderLayer* enclosingOverflowClipLayer(IncludeSelfOrNot = IncludeSelf) cons
t; | 167 RenderLayer* enclosingOverflowClipLayer(IncludeSelfOrNot = IncludeSelf) cons
t; |
| 173 | 168 |
| 174 bool isPaintInvalidationContainer() const; | |
| 175 | |
| 176 // Do *not* call this method unless you know what you are dooing. You probab
ly want to call enclosingCompositingLayerForPaintInvalidation() instead. | |
| 177 // If includeSelf is true, may return this. | |
| 178 RenderLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) cons
t; | |
| 179 | |
| 180 // Returns the enclosing layer root into which this layer paints, inclusive
of this one. Note that the enclosing layer may or may not have its own | |
| 181 // GraphicsLayer backing, but is nevertheless the root for a call to the Ren
derLayer::paint*() methods. | |
| 182 RenderLayer* enclosingLayerForPaintInvalidation() const; | |
| 183 | |
| 184 RenderLayer* enclosingLayerForPaintInvalidationCrossingFrameBoundaries() con
st; | |
| 185 | |
| 186 RenderLayer* enclosingFilterLayer(IncludeSelfOrNot = IncludeSelf) const; | 169 RenderLayer* enclosingFilterLayer(IncludeSelfOrNot = IncludeSelf) const; |
| 187 bool hasAncestorWithFilterOutsets() const; | 170 bool hasAncestorWithFilterOutsets() const; |
| 188 | 171 |
| 189 bool canUseConvertToLayerCoords() const | 172 bool canUseConvertToLayerCoords() const |
| 190 { | 173 { |
| 191 return !renderer()->hasTransform(); | 174 return !renderer()->hasTransform(); |
| 192 } | 175 } |
| 193 | 176 |
| 194 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint&) co
nst; | 177 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint&) co
nst; |
| 195 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con
st; | 178 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con
st; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 // FIXME: reflections should force transform-style to be flat in the style:
https://bugs.webkit.org/show_bug.cgi?id=106959 | 236 // FIXME: reflections should force transform-style to be flat in the style:
https://bugs.webkit.org/show_bug.cgi?id=106959 |
| 254 bool shouldPreserve3D() const { return renderer()->style()->transformStyle3D
() == TransformStyle3DPreserve3D; } | 237 bool shouldPreserve3D() const { return renderer()->style()->transformStyle3D
() == TransformStyle3DPreserve3D; } |
| 255 | 238 |
| 256 void filterNeedsPaintInvalidation(); | 239 void filterNeedsPaintInvalidation(); |
| 257 bool hasFilter() const { return renderer()->hasFilter(); } | 240 bool hasFilter() const { return renderer()->hasFilter(); } |
| 258 | 241 |
| 259 void* operator new(size_t); | 242 void* operator new(size_t); |
| 260 // Only safe to call from RenderLayerModelObject::destroyLayer() | 243 // Only safe to call from RenderLayerModelObject::destroyLayer() |
| 261 void operator delete(void*); | 244 void operator delete(void*); |
| 262 | 245 |
| 263 bool hasCompositedMask() const; | |
| 264 bool hasCompositedClippingMask() const; | |
| 265 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla
bleArea->needsCompositedScrolling(); } | 246 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla
bleArea->needsCompositedScrolling(); } |
| 266 | 247 |
| 267 bool clipsCompositingDescendantsWithBorderRadius() const; | |
| 268 | |
| 269 // Computes the position of the given render object in the space of |paintIn
validationContainer|. | 248 // Computes the position of the given render object in the space of |paintIn
validationContainer|. |
| 270 // FIXME: invert the logic to have paint invalidation containers take care o
f painting objects into them, rather than the reverse. | 249 // FIXME: invert the logic to have paint invalidation containers take care o
f painting objects into them, rather than the reverse. |
| 271 // This will allow us to clean up this static method messiness. | 250 // This will allow us to clean up this static method messiness. |
| 272 static LayoutPoint positionFromPaintInvalidationContainer(const RenderObject
*, const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalida
tionState* = 0); | 251 static LayoutPoint positionFromPaintInvalidationContainer(const RenderObject
*, const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalida
tionState* = 0); |
| 273 | 252 |
| 274 static void mapRectToPaintBackingCoordinates(const RenderLayerModelObject* p
aintInvalidationContainer, LayoutRect&); | |
| 275 | |
| 276 // Adjusts the given rect (in the coordinate space of the RenderObject) to t
he coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. | 253 // Adjusts the given rect (in the coordinate space of the RenderObject) to t
he coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. |
| 277 static void mapRectToPaintInvalidationBacking(const RenderObject*, const Ren
derLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalid
ationState* = 0); | 254 static void mapRectToPaintInvalidationBacking(const RenderObject*, const Ren
derLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalid
ationState* = 0); |
| 278 | 255 |
| 279 // Computes the bounding paint invalidation rect for |renderObject|, in the
coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. | 256 // Computes the bounding paint invalidation rect for |renderObject|, in the
coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. |
| 280 static LayoutRect computePaintInvalidationRect(const RenderObject*, const Re
nderLayer* paintInvalidationContainer, const PaintInvalidationState* = 0); | 257 static LayoutRect computePaintInvalidationRect(const RenderObject*, const Re
nderLayer* paintInvalidationContainer, const PaintInvalidationState* = 0); |
| 281 | 258 |
| 282 bool paintsWithTransparency(PaintBehavior paintBehavior) const | 259 bool paintsWithTransparency(PaintBehavior paintBehavior) const |
| 283 { | 260 { |
| 284 // FIXME(sky): Remove | 261 // FIXME(sky): Remove |
| 285 return isTransparent(); | 262 return isTransparent(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 311 RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this); | 288 RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this); |
| 312 } | 289 } |
| 313 | 290 |
| 314 bool hasFilterInfo() const { return m_hasFilterInfo; } | 291 bool hasFilterInfo() const { return m_hasFilterInfo; } |
| 315 void setHasFilterInfo(bool hasFilterInfo) { m_hasFilterInfo = hasFilterInfo;
} | 292 void setHasFilterInfo(bool hasFilterInfo) { m_hasFilterInfo = hasFilterInfo;
} |
| 316 | 293 |
| 317 void updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle)
; | 294 void updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle)
; |
| 318 | 295 |
| 319 Node* enclosingElement() const; | 296 Node* enclosingElement() const; |
| 320 | 297 |
| 321 bool scrollsWithViewport() const; | |
| 322 bool scrollsWithRespectTo(const RenderLayer*) const; | 298 bool scrollsWithRespectTo(const RenderLayer*) const; |
| 323 | 299 |
| 324 // FIXME: This should probably return a ScrollableArea but a lot of internal
methods are mistakenly exposed. | 300 // FIXME: This should probably return a ScrollableArea but a lot of internal
methods are mistakenly exposed. |
| 325 RenderLayerScrollableArea* scrollableArea() const { return m_scrollableArea.
get(); } | 301 RenderLayerScrollableArea* scrollableArea() const { return m_scrollableArea.
get(); } |
| 326 RenderLayerRepainter& paintInvalidator() { return m_paintInvalidator; } | 302 RenderLayerRepainter& paintInvalidator() { return m_paintInvalidator; } |
| 327 RenderLayerClipper& clipper() { return m_clipper; } | 303 RenderLayerClipper& clipper() { return m_clipper; } |
| 328 const RenderLayerClipper& clipper() const { return m_clipper; } | 304 const RenderLayerClipper& clipper() const { return m_clipper; } |
| 329 | 305 |
| 330 inline bool isPositionedContainer() const | 306 inline bool isPositionedContainer() const |
| 331 { | 307 { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 class DescendantDependentCompositingInputs { | 374 class DescendantDependentCompositingInputs { |
| 399 public: | 375 public: |
| 400 DescendantDependentCompositingInputs() | 376 DescendantDependentCompositingInputs() |
| 401 : hasDescendantWithClipPath(false) | 377 : hasDescendantWithClipPath(false) |
| 402 | 378 |
| 403 { } | 379 { } |
| 404 | 380 |
| 405 unsigned hasDescendantWithClipPath : 1; | 381 unsigned hasDescendantWithClipPath : 1; |
| 406 }; | 382 }; |
| 407 | 383 |
| 408 void setNeedsCompositingInputsUpdate(); | |
| 409 bool childNeedsCompositingInputsUpdate() const { return m_childNeedsComposit
ingInputsUpdate; } | 384 bool childNeedsCompositingInputsUpdate() const { return m_childNeedsComposit
ingInputsUpdate; } |
| 410 bool needsCompositingInputsUpdate() const | 385 bool needsCompositingInputsUpdate() const |
| 411 { | 386 { |
| 412 // While we're updating the compositing inputs, these values may differ. | 387 // While we're updating the compositing inputs, these values may differ. |
| 413 // We should never be asking for this value when that is the case. | 388 // We should never be asking for this value when that is the case. |
| 414 ASSERT(m_needsDescendantDependentCompositingInputsUpdate == m_needsAnces
torDependentCompositingInputsUpdate); | 389 ASSERT(m_needsDescendantDependentCompositingInputsUpdate == m_needsAnces
torDependentCompositingInputsUpdate); |
| 415 return m_needsDescendantDependentCompositingInputsUpdate; | 390 return m_needsDescendantDependentCompositingInputsUpdate; |
| 416 } | 391 } |
| 417 | 392 |
| 418 void updateAncestorDependentCompositingInputs(const AncestorDependentComposi
tingInputs&); | 393 void updateAncestorDependentCompositingInputs(const AncestorDependentComposi
tingInputs&); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 | 596 |
| 622 } // namespace blink | 597 } // namespace blink |
| 623 | 598 |
| 624 #ifndef NDEBUG | 599 #ifndef NDEBUG |
| 625 // Outside the WebCore namespace for ease of invocation from gdb. | 600 // Outside the WebCore namespace for ease of invocation from gdb. |
| 626 void showLayerTree(const blink::RenderLayer*); | 601 void showLayerTree(const blink::RenderLayer*); |
| 627 void showLayerTree(const blink::RenderObject*); | 602 void showLayerTree(const blink::RenderObject*); |
| 628 #endif | 603 #endif |
| 629 | 604 |
| 630 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ | 605 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ |
| OLD | NEW |