| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 RenderLayer::~RenderLayer() | 123 RenderLayer::~RenderLayer() |
| 124 { | 124 { |
| 125 removeFilterInfoIfNeeded(); | 125 removeFilterInfoIfNeeded(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 String RenderLayer::debugName() const | 128 String RenderLayer::debugName() const |
| 129 { | 129 { |
| 130 return renderer()->debugName(); | 130 return renderer()->debugName(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void RenderLayer::contentChanged(ContentChangeType changeType) | |
| 134 { | |
| 135 // FIXME(sky): Remove | |
| 136 } | |
| 137 | |
| 138 bool RenderLayer::paintsWithFilters() const | 133 bool RenderLayer::paintsWithFilters() const |
| 139 { | 134 { |
| 140 // FIXME(sky): Remove | 135 // FIXME(sky): Remove |
| 141 return renderer()->hasFilter(); | 136 return renderer()->hasFilter(); |
| 142 } | 137 } |
| 143 | 138 |
| 144 bool RenderLayer::requiresFullLayerImageForFilters() const | 139 bool RenderLayer::requiresFullLayerImageForFilters() const |
| 145 { | 140 { |
| 146 if (!paintsWithFilters()) | 141 if (!paintsWithFilters()) |
| 147 return false; | 142 return false; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 layer->m_hasSelfPaintingLayerDescendantDirty = true; | 183 layer->m_hasSelfPaintingLayerDescendantDirty = true; |
| 189 // If we have reached a self-painting layer, we know our parent should h
ave a self-painting descendant | 184 // If we have reached a self-painting layer, we know our parent should h
ave a self-painting descendant |
| 190 // in this case, there is no need to dirty our ancestors further. | 185 // in this case, there is no need to dirty our ancestors further. |
| 191 if (layer->isSelfPaintingLayer()) { | 186 if (layer->isSelfPaintingLayer()) { |
| 192 ASSERT(!parent() || parent()->m_hasSelfPaintingLayerDescendantDirty
|| parent()->m_hasSelfPaintingLayerDescendant); | 187 ASSERT(!parent() || parent()->m_hasSelfPaintingLayerDescendantDirty
|| parent()->m_hasSelfPaintingLayerDescendant); |
| 193 break; | 188 break; |
| 194 } | 189 } |
| 195 } | 190 } |
| 196 } | 191 } |
| 197 | 192 |
| 198 bool RenderLayer::scrollsWithViewport() const | |
| 199 { | |
| 200 // FIXME(sky): Remove | |
| 201 return false; | |
| 202 } | |
| 203 | |
| 204 bool RenderLayer::scrollsWithRespectTo(const RenderLayer* other) const | 193 bool RenderLayer::scrollsWithRespectTo(const RenderLayer* other) const |
| 205 { | 194 { |
| 206 if (scrollsWithViewport() != other->scrollsWithViewport()) | |
| 207 return true; | |
| 208 return ancestorScrollingLayer() != other->ancestorScrollingLayer(); | 195 return ancestorScrollingLayer() != other->ancestorScrollingLayer(); |
| 209 } | 196 } |
| 210 | 197 |
| 211 void RenderLayer::updateTransformationMatrix() | 198 void RenderLayer::updateTransformationMatrix() |
| 212 { | 199 { |
| 213 if (m_transform) { | 200 if (m_transform) { |
| 214 RenderBox* box = renderBox(); | 201 RenderBox* box = renderBox(); |
| 215 ASSERT(box); | 202 ASSERT(box); |
| 216 m_transform->makeIdentity(); | 203 m_transform->makeIdentity(); |
| 217 box->style()->applyTransform(*m_transform, box->pixelSnappedBorderBoxRec
t().size(), RenderStyle::IncludeTransformOrigin); | 204 box->style()->applyTransform(*m_transform, box->pixelSnappedBorderBoxRec
t().size(), RenderStyle::IncludeTransformOrigin); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 } | 297 } |
| 311 return 0; | 298 return 0; |
| 312 } | 299 } |
| 313 | 300 |
| 314 LayoutPoint RenderLayer::positionFromPaintInvalidationContainer(const RenderObje
ct* renderObject, const RenderLayerModelObject* paintInvalidationContainer, cons
t PaintInvalidationState* paintInvalidationState) | 301 LayoutPoint RenderLayer::positionFromPaintInvalidationContainer(const RenderObje
ct* renderObject, const RenderLayerModelObject* paintInvalidationContainer, cons
t PaintInvalidationState* paintInvalidationState) |
| 315 { | 302 { |
| 316 // FIXME(sky): Remove | 303 // FIXME(sky): Remove |
| 317 return renderObject->positionFromPaintInvalidationContainer(paintInvalidatio
nContainer, paintInvalidationState); | 304 return renderObject->positionFromPaintInvalidationContainer(paintInvalidatio
nContainer, paintInvalidationState); |
| 318 } | 305 } |
| 319 | 306 |
| 320 void RenderLayer::mapRectToPaintBackingCoordinates(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect& rect) | |
| 321 { | |
| 322 // FIXME(sky): Remove | |
| 323 ASSERT_NOT_REACHED(); | |
| 324 } | |
| 325 | |
| 326 void RenderLayer::mapRectToPaintInvalidationBacking(const RenderObject* renderOb
ject, const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect
, const PaintInvalidationState* paintInvalidationState) | 307 void RenderLayer::mapRectToPaintInvalidationBacking(const RenderObject* renderOb
ject, const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect
, const PaintInvalidationState* paintInvalidationState) |
| 327 { | 308 { |
| 328 // FIXME(sky): Remove | 309 // FIXME(sky): Remove |
| 329 renderObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer,
rect, paintInvalidationState); | 310 renderObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer,
rect, paintInvalidationState); |
| 330 } | 311 } |
| 331 | 312 |
| 332 LayoutRect RenderLayer::computePaintInvalidationRect(const RenderObject* renderO
bject, const RenderLayer* paintInvalidationContainer, const PaintInvalidationSta
te* paintInvalidationState) | 313 LayoutRect RenderLayer::computePaintInvalidationRect(const RenderObject* renderO
bject, const RenderLayer* paintInvalidationContainer, const PaintInvalidationSta
te* paintInvalidationState) |
| 333 { | 314 { |
| 334 // FIXME(sky): Remove | 315 // FIXME(sky): Remove |
| 335 return renderObject->computePaintInvalidationRect(paintInvalidationContainer
->renderer(), paintInvalidationState); | 316 return renderObject->computePaintInvalidationRect(paintInvalidationContainer
->renderer(), paintInvalidationState); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 | 503 |
| 523 const RenderLayer* RenderLayer::compositingContainer() const | 504 const RenderLayer* RenderLayer::compositingContainer() const |
| 524 { | 505 { |
| 525 if (stackingNode()->isNormalFlowOnly()) | 506 if (stackingNode()->isNormalFlowOnly()) |
| 526 return parent(); | 507 return parent(); |
| 527 if (RenderLayerStackingNode* ancestorStackingNode = stackingNode()->ancestor
StackingContextNode()) | 508 if (RenderLayerStackingNode* ancestorStackingNode = stackingNode()->ancestor
StackingContextNode()) |
| 528 return ancestorStackingNode->layer(); | 509 return ancestorStackingNode->layer(); |
| 529 return 0; | 510 return 0; |
| 530 } | 511 } |
| 531 | 512 |
| 532 bool RenderLayer::isPaintInvalidationContainer() const | |
| 533 { | |
| 534 // FIXME(sky): Remove | |
| 535 return false; | |
| 536 } | |
| 537 | |
| 538 // Note: enclosingCompositingLayer does not include squashed layers. Compositing
stacking children of squashed layers | |
| 539 // receive graphics layers that are parented to the compositing ancestor of the
squashed layer. | |
| 540 RenderLayer* RenderLayer::enclosingLayerWithCompositedLayerMapping(IncludeSelfOr
Not includeSelf) const | |
| 541 { | |
| 542 // FIXME(sky): Remove | |
| 543 return 0; | |
| 544 } | |
| 545 | |
| 546 // Return the enclosingCompositedLayerForPaintInvalidation for the given RenderL
ayer | |
| 547 // including crossing frame boundaries. | |
| 548 RenderLayer* RenderLayer::enclosingLayerForPaintInvalidationCrossingFrameBoundar
ies() const | |
| 549 { | |
| 550 // FIXME(sky): remove | |
| 551 return enclosingLayerForPaintInvalidation(); | |
| 552 } | |
| 553 | |
| 554 RenderLayer* RenderLayer::enclosingLayerForPaintInvalidation() const | |
| 555 { | |
| 556 if (isPaintInvalidationContainer()) | |
| 557 return const_cast<RenderLayer*>(this); | |
| 558 | |
| 559 for (const RenderLayer* curr = parent(); curr; curr = curr->parent()) { | |
| 560 if (curr->isPaintInvalidationContainer()) | |
| 561 return const_cast<RenderLayer*>(curr); | |
| 562 } | |
| 563 | |
| 564 return 0; | |
| 565 } | |
| 566 | |
| 567 RenderLayer* RenderLayer::enclosingFilterLayer(IncludeSelfOrNot includeSelf) con
st | 513 RenderLayer* RenderLayer::enclosingFilterLayer(IncludeSelfOrNot includeSelf) con
st |
| 568 { | 514 { |
| 569 const RenderLayer* curr = (includeSelf == IncludeSelf) ? this : parent(); | 515 const RenderLayer* curr = (includeSelf == IncludeSelf) ? this : parent(); |
| 570 for (; curr; curr = curr->parent()) { | 516 for (; curr; curr = curr->parent()) { |
| 571 if (curr->requiresFullLayerImageForFilters()) | 517 if (curr->requiresFullLayerImageForFilters()) |
| 572 return const_cast<RenderLayer*>(curr); | 518 return const_cast<RenderLayer*>(curr); |
| 573 } | 519 } |
| 574 | 520 |
| 575 return 0; | 521 return 0; |
| 576 } | 522 } |
| 577 | 523 |
| 578 void RenderLayer::setNeedsCompositingInputsUpdate() | |
| 579 { | |
| 580 // FIXME(sky): Remove | |
| 581 } | |
| 582 | |
| 583 void RenderLayer::updateAncestorDependentCompositingInputs(const AncestorDepende
ntCompositingInputs& compositingInputs) | 524 void RenderLayer::updateAncestorDependentCompositingInputs(const AncestorDepende
ntCompositingInputs& compositingInputs) |
| 584 { | 525 { |
| 585 m_ancestorDependentCompositingInputs = compositingInputs; | 526 m_ancestorDependentCompositingInputs = compositingInputs; |
| 586 m_needsAncestorDependentCompositingInputsUpdate = false; | 527 m_needsAncestorDependentCompositingInputsUpdate = false; |
| 587 } | 528 } |
| 588 | 529 |
| 589 void RenderLayer::updateDescendantDependentCompositingInputs(const DescendantDep
endentCompositingInputs& compositingInputs) | 530 void RenderLayer::updateDescendantDependentCompositingInputs(const DescendantDep
endentCompositingInputs& compositingInputs) |
| 590 { | 531 { |
| 591 m_descendantDependentCompositingInputs = compositingInputs; | 532 m_descendantDependentCompositingInputs = compositingInputs; |
| 592 m_needsDescendantDependentCompositingInputsUpdate = false; | 533 m_needsDescendantDependentCompositingInputsUpdate = false; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 | 679 |
| 739 if (beforeChild) { | 680 if (beforeChild) { |
| 740 beforeChild->setPreviousSibling(child); | 681 beforeChild->setPreviousSibling(child); |
| 741 child->setNextSibling(beforeChild); | 682 child->setNextSibling(beforeChild); |
| 742 ASSERT(beforeChild != child); | 683 ASSERT(beforeChild != child); |
| 743 } else | 684 } else |
| 744 setLastChild(child); | 685 setLastChild(child); |
| 745 | 686 |
| 746 child->m_parent = this; | 687 child->m_parent = this; |
| 747 | 688 |
| 748 setNeedsCompositingInputsUpdate(); | |
| 749 | |
| 750 if (child->stackingNode()->isNormalFlowOnly()) | 689 if (child->stackingNode()->isNormalFlowOnly()) |
| 751 m_stackingNode->dirtyNormalFlowList(); | 690 m_stackingNode->dirtyNormalFlowList(); |
| 752 | 691 |
| 753 if (!child->stackingNode()->isNormalFlowOnly() || child->firstChild()) { | 692 if (!child->stackingNode()->isNormalFlowOnly() || child->firstChild()) { |
| 754 // Dirty the z-order list in which we are contained. The ancestorStackin
gContextNode() can be null in the | 693 // Dirty the z-order list in which we are contained. The ancestorStackin
gContextNode() can be null in the |
| 755 // case where we're building up generated content layers. This is ok, si
nce the lists will start | 694 // case where we're building up generated content layers. This is ok, si
nce the lists will start |
| 756 // off dirty in that case anyway. | 695 // off dirty in that case anyway. |
| 757 child->stackingNode()->dirtyStackingContextZOrderLists(); | 696 child->stackingNode()->dirtyStackingContextZOrderLists(); |
| 758 } | 697 } |
| 759 | 698 |
| (...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1897 if (!result.isRectBasedTest()) | 1836 if (!result.isRectBasedTest()) |
| 1898 result = tempResult; | 1837 result = tempResult; |
| 1899 if (!depthSortDescendants) | 1838 if (!depthSortDescendants) |
| 1900 break; | 1839 break; |
| 1901 } | 1840 } |
| 1902 } | 1841 } |
| 1903 | 1842 |
| 1904 return resultLayer; | 1843 return resultLayer; |
| 1905 } | 1844 } |
| 1906 | 1845 |
| 1907 void RenderLayer::blockSelectionGapsBoundsChanged() | |
| 1908 { | |
| 1909 setNeedsCompositingInputsUpdate(); | |
| 1910 } | |
| 1911 | |
| 1912 void RenderLayer::addBlockSelectionGapsBounds(const LayoutRect& bounds) | 1846 void RenderLayer::addBlockSelectionGapsBounds(const LayoutRect& bounds) |
| 1913 { | 1847 { |
| 1914 m_blockSelectionGapsBounds.unite(enclosingIntRect(bounds)); | 1848 m_blockSelectionGapsBounds.unite(enclosingIntRect(bounds)); |
| 1915 blockSelectionGapsBoundsChanged(); | |
| 1916 } | 1849 } |
| 1917 | 1850 |
| 1918 void RenderLayer::clearBlockSelectionGapsBounds() | 1851 void RenderLayer::clearBlockSelectionGapsBounds() |
| 1919 { | 1852 { |
| 1920 m_blockSelectionGapsBounds = IntRect(); | 1853 m_blockSelectionGapsBounds = IntRect(); |
| 1921 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) | 1854 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) |
| 1922 child->clearBlockSelectionGapsBounds(); | 1855 child->clearBlockSelectionGapsBounds(); |
| 1923 blockSelectionGapsBoundsChanged(); | |
| 1924 } | 1856 } |
| 1925 | 1857 |
| 1926 void RenderLayer::invalidatePaintForBlockSelectionGaps() | 1858 void RenderLayer::invalidatePaintForBlockSelectionGaps() |
| 1927 { | 1859 { |
| 1928 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) | 1860 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) |
| 1929 child->invalidatePaintForBlockSelectionGaps(); | 1861 child->invalidatePaintForBlockSelectionGaps(); |
| 1930 | 1862 |
| 1931 if (m_blockSelectionGapsBounds.isEmpty()) | 1863 if (m_blockSelectionGapsBounds.isEmpty()) |
| 1932 return; | 1864 return; |
| 1933 | 1865 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2080 | 2012 |
| 2081 if (shouldIncludeTransform) | 2013 if (shouldIncludeTransform) |
| 2082 result = transform()->mapRect(result); | 2014 result = transform()->mapRect(result); |
| 2083 | 2015 |
| 2084 LayoutPoint delta; | 2016 LayoutPoint delta; |
| 2085 convertToLayerCoords(ancestorLayer, delta); | 2017 convertToLayerCoords(ancestorLayer, delta); |
| 2086 result.moveBy(delta); | 2018 result.moveBy(delta); |
| 2087 return result; | 2019 return result; |
| 2088 } | 2020 } |
| 2089 | 2021 |
| 2090 bool RenderLayer::hasCompositedMask() const | |
| 2091 { | |
| 2092 // FIXME(sky): Remove | |
| 2093 return false; | |
| 2094 } | |
| 2095 | |
| 2096 bool RenderLayer::hasCompositedClippingMask() const | |
| 2097 { | |
| 2098 // FIXME(sky): Remove | |
| 2099 return false; | |
| 2100 } | |
| 2101 | |
| 2102 bool RenderLayer::clipsCompositingDescendantsWithBorderRadius() const | |
| 2103 { | |
| 2104 // FIXME(sky): Remove | |
| 2105 return false; | |
| 2106 } | |
| 2107 | |
| 2108 bool RenderLayer::paintsWithTransform(PaintBehavior paintBehavior) const | 2022 bool RenderLayer::paintsWithTransform(PaintBehavior paintBehavior) const |
| 2109 { | 2023 { |
| 2110 // FIXME(sky): Remove | 2024 // FIXME(sky): Remove |
| 2111 return transform(); | 2025 return transform(); |
| 2112 } | 2026 } |
| 2113 | 2027 |
| 2114 bool RenderLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const | 2028 bool RenderLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const |
| 2115 { | 2029 { |
| 2116 if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant()) | 2030 if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant()) |
| 2117 return false; | 2031 return false; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2143 return false; | 2057 return false; |
| 2144 | 2058 |
| 2145 return childBackgroundIsKnownToBeOpaqueInRect(localRect); | 2059 return childBackgroundIsKnownToBeOpaqueInRect(localRect); |
| 2146 } | 2060 } |
| 2147 | 2061 |
| 2148 bool RenderLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& local
Rect) const | 2062 bool RenderLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& local
Rect) const |
| 2149 { | 2063 { |
| 2150 RenderLayerStackingNodeReverseIterator revertseIterator(*m_stackingNode, Pos
itiveZOrderChildren | NormalFlowChildren | NegativeZOrderChildren); | 2064 RenderLayerStackingNodeReverseIterator revertseIterator(*m_stackingNode, Pos
itiveZOrderChildren | NormalFlowChildren | NegativeZOrderChildren); |
| 2151 while (RenderLayerStackingNode* child = revertseIterator.next()) { | 2065 while (RenderLayerStackingNode* child = revertseIterator.next()) { |
| 2152 const RenderLayer* childLayer = child->layer(); | 2066 const RenderLayer* childLayer = child->layer(); |
| 2153 // Stop at composited paint boundaries. | |
| 2154 if (childLayer->isPaintInvalidationContainer()) | |
| 2155 continue; | |
| 2156 | |
| 2157 if (!childLayer->canUseConvertToLayerCoords()) | 2067 if (!childLayer->canUseConvertToLayerCoords()) |
| 2158 continue; | 2068 continue; |
| 2159 | 2069 |
| 2160 LayoutPoint childOffset; | 2070 LayoutPoint childOffset; |
| 2161 LayoutRect childLocalRect(localRect); | 2071 LayoutRect childLocalRect(localRect); |
| 2162 childLayer->convertToLayerCoords(this, childOffset); | 2072 childLayer->convertToLayerCoords(this, childOffset); |
| 2163 childLocalRect.moveBy(-childOffset); | 2073 childLocalRect.moveBy(-childOffset); |
| 2164 | 2074 |
| 2165 if (childLayer->backgroundIsKnownToBeOpaqueInRect(childLocalRect)) | 2075 if (childLayer->backgroundIsKnownToBeOpaqueInRect(childLocalRect)) |
| 2166 return true; | 2076 return true; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2246 | 2156 |
| 2247 if (m_scrollableArea) | 2157 if (m_scrollableArea) |
| 2248 m_scrollableArea->updateAfterStyleChange(oldStyle); | 2158 m_scrollableArea->updateAfterStyleChange(oldStyle); |
| 2249 | 2159 |
| 2250 // Overlay scrollbars can make this layer self-painting so we need | 2160 // Overlay scrollbars can make this layer self-painting so we need |
| 2251 // to recompute the bit once scrollbars have been updated. | 2161 // to recompute the bit once scrollbars have been updated. |
| 2252 updateSelfPaintingLayer(); | 2162 updateSelfPaintingLayer(); |
| 2253 | 2163 |
| 2254 updateTransform(oldStyle, renderer()->style()); | 2164 updateTransform(oldStyle, renderer()->style()); |
| 2255 updateFilters(oldStyle, renderer()->style()); | 2165 updateFilters(oldStyle, renderer()->style()); |
| 2256 | |
| 2257 setNeedsCompositingInputsUpdate(); | |
| 2258 } | 2166 } |
| 2259 | 2167 |
| 2260 bool RenderLayer::scrollsOverflow() const | 2168 bool RenderLayer::scrollsOverflow() const |
| 2261 { | 2169 { |
| 2262 if (RenderLayerScrollableArea* scrollableArea = this->scrollableArea()) | 2170 if (RenderLayerScrollableArea* scrollableArea = this->scrollableArea()) |
| 2263 return scrollableArea->scrollsOverflow(); | 2171 return scrollableArea->scrollsOverflow(); |
| 2264 | 2172 |
| 2265 return false; | 2173 return false; |
| 2266 } | 2174 } |
| 2267 | 2175 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2314 | 2222 |
| 2315 void RenderLayer::filterNeedsPaintInvalidation() | 2223 void RenderLayer::filterNeedsPaintInvalidation() |
| 2316 { | 2224 { |
| 2317 } | 2225 } |
| 2318 | 2226 |
| 2319 void RenderLayer::setShouldDoFullPaintInvalidationIncludingNonCompositingDescend
ants() | 2227 void RenderLayer::setShouldDoFullPaintInvalidationIncludingNonCompositingDescend
ants() |
| 2320 { | 2228 { |
| 2321 renderer()->setShouldDoFullPaintInvalidation(true); | 2229 renderer()->setShouldDoFullPaintInvalidation(true); |
| 2322 | 2230 |
| 2323 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
{ | 2231 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
{ |
| 2324 if (!child->isPaintInvalidationContainer()) | 2232 child->setShouldDoFullPaintInvalidationIncludingNonCompositingDescendant
s(); |
| 2325 child->setShouldDoFullPaintInvalidationIncludingNonCompositingDescen
dants(); | |
| 2326 } | 2233 } |
| 2327 } | 2234 } |
| 2328 | 2235 |
| 2329 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() | 2236 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() |
| 2330 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } | 2237 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } |
| 2331 | 2238 |
| 2332 } // namespace blink | 2239 } // namespace blink |
| 2333 | 2240 |
| 2334 #ifndef NDEBUG | 2241 #ifndef NDEBUG |
| 2335 void showLayerTree(const blink::RenderLayer* layer) | 2242 void showLayerTree(const blink::RenderLayer* layer) |
| 2336 { | 2243 { |
| 2337 if (!layer) | 2244 if (!layer) |
| 2338 return; | 2245 return; |
| 2339 | 2246 |
| 2340 if (blink::LocalFrame* frame = layer->renderer()->frame()) { | 2247 if (blink::LocalFrame* frame = layer->renderer()->frame()) { |
| 2341 WTF::String output = externalRepresentation(frame, blink::RenderAsTextSh
owAllLayers | blink::RenderAsTextShowLayerNesting | blink::RenderAsTextShowCompo
sitedLayers | blink::RenderAsTextShowAddresses | blink::RenderAsTextShowIDAndCla
ss | blink::RenderAsTextDontUpdateLayout | blink::RenderAsTextShowLayoutState); | 2248 WTF::String output = externalRepresentation(frame, blink::RenderAsTextSh
owAllLayers | blink::RenderAsTextShowLayerNesting | blink::RenderAsTextShowCompo
sitedLayers | blink::RenderAsTextShowAddresses | blink::RenderAsTextShowIDAndCla
ss | blink::RenderAsTextDontUpdateLayout | blink::RenderAsTextShowLayoutState); |
| 2342 fprintf(stderr, "%s\n", output.utf8().data()); | 2249 fprintf(stderr, "%s\n", output.utf8().data()); |
| 2343 } | 2250 } |
| 2344 } | 2251 } |
| 2345 | 2252 |
| 2346 void showLayerTree(const blink::RenderObject* renderer) | 2253 void showLayerTree(const blink::RenderObject* renderer) |
| 2347 { | 2254 { |
| 2348 if (!renderer) | 2255 if (!renderer) |
| 2349 return; | 2256 return; |
| 2350 showLayerTree(renderer->enclosingLayer()); | 2257 showLayerTree(renderer->enclosingLayer()); |
| 2351 } | 2258 } |
| 2352 #endif | 2259 #endif |
| OLD | NEW |