| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 class LayoutFlowThread; | 61 class LayoutFlowThread; |
| 62 class LayoutGeometryMap; | 62 class LayoutGeometryMap; |
| 63 class LayoutMultiColumnSpannerPlaceholder; | 63 class LayoutMultiColumnSpannerPlaceholder; |
| 64 class LayoutView; | 64 class LayoutView; |
| 65 class ObjectPaintProperties; | 65 class ObjectPaintProperties; |
| 66 class PaintLayer; | 66 class PaintLayer; |
| 67 class PseudoStyleRequest; | 67 class PseudoStyleRequest; |
| 68 class TransformState; | 68 class TransformState; |
| 69 | 69 |
| 70 struct PaintInfo; | 70 struct PaintInfo; |
| 71 struct PaintInvalidatorContext; |
| 71 | 72 |
| 72 enum CursorDirective { | 73 enum CursorDirective { |
| 73 SetCursorBasedOnStyle, | 74 SetCursorBasedOnStyle, |
| 74 SetCursor, | 75 SetCursor, |
| 75 DoNotSetCursor | 76 DoNotSetCursor |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 enum HitTestFilter { | 79 enum HitTestFilter { |
| 79 HitTestAll, | 80 HitTestAll, |
| 80 HitTestSelf, | 81 HitTestSelf, |
| (...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1300 LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling(const L
ayoutBoxModelObject& paintInvalidationContainer) const; | 1301 LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling(const L
ayoutBoxModelObject& paintInvalidationContainer) const; |
| 1301 LayoutSize previousPaintInvalidationRectSize() const { return previousPaintI
nvalidationRect().size(); } | 1302 LayoutSize previousPaintInvalidationRectSize() const { return previousPaintI
nvalidationRect().size(); } |
| 1302 | 1303 |
| 1303 // Called when the previous paint invalidation rect(s) is no longer valid. | 1304 // Called when the previous paint invalidation rect(s) is no longer valid. |
| 1304 virtual void clearPreviousPaintInvalidationRects(); | 1305 virtual void clearPreviousPaintInvalidationRects(); |
| 1305 | 1306 |
| 1306 // Only adjusts if the paint invalidation container is not a composited scro
ller. | 1307 // Only adjusts if the paint invalidation container is not a composited scro
ller. |
| 1307 void adjustPreviousPaintInvalidationForScrollIfNeeded(const DoubleSize& scro
llDelta); | 1308 void adjustPreviousPaintInvalidationForScrollIfNeeded(const DoubleSize& scro
llDelta); |
| 1308 | 1309 |
| 1309 // The previous position of the top-left corner of the object in its previou
s paint backing. | 1310 // The previous position of the top-left corner of the object in its previou
s paint backing. |
| 1310 const LayoutPoint& previousPositionFromPaintInvalidationBacking() const | 1311 const LayoutPoint& previousPositionFromPaintInvalidationBacking() const { re
turn m_previousPositionFromPaintInvalidationBacking; } |
| 1311 { | 1312 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& posi
tionFromPaintInvalidationBacking) { m_previousPositionFromPaintInvalidationBacki
ng = positionFromPaintInvalidationBacking; } |
| 1312 ASSERT(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | |
| 1313 return m_previousPositionFromPaintInvalidationBacking; | |
| 1314 } | |
| 1315 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& posi
tionFromPaintInvalidationBacking) | |
| 1316 { | |
| 1317 ASSERT(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | |
| 1318 m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvali
dationBacking; | |
| 1319 } | |
| 1320 | 1313 |
| 1321 bool paintOffsetChanged(const LayoutPoint& newPaintOffset) const | 1314 bool paintOffsetChanged(const LayoutPoint& newPaintOffset) const |
| 1322 { | 1315 { |
| 1323 ASSERT(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | 1316 ASSERT(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| 1324 return m_previousPositionFromPaintInvalidationBacking != uninitializedPa
intOffset() && m_previousPositionFromPaintInvalidationBacking != newPaintOffset; | 1317 return m_previousPositionFromPaintInvalidationBacking != uninitializedPa
intOffset() && m_previousPositionFromPaintInvalidationBacking != newPaintOffset; |
| 1325 } | 1318 } |
| 1326 void setPreviousPaintOffset(const LayoutPoint& paintOffset) | 1319 void setPreviousPaintOffset(const LayoutPoint& paintOffset) |
| 1327 { | 1320 { |
| 1328 ASSERT(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | 1321 ASSERT(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| 1329 m_previousPositionFromPaintInvalidationBacking = paintOffset; | 1322 m_previousPositionFromPaintInvalidationBacking = paintOffset; |
| 1330 } | 1323 } |
| 1331 | 1324 |
| 1332 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi
elds.fullPaintInvalidationReason(); } | 1325 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi
elds.fullPaintInvalidationReason(); } |
| 1333 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv
alidationReason() != PaintInvalidationNone; } | 1326 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv
alidationReason() != PaintInvalidationNone; } |
| 1334 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid
ationFull); | 1327 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid
ationFull); |
| 1335 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida
tionReason(PaintInvalidationNone); } | 1328 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida
tionReason(PaintInvalidationNone); } |
| 1336 | 1329 |
| 1337 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&); | 1330 virtual void clearPaintInvalidationFlags(); |
| 1338 | 1331 |
| 1339 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval
idation(); } | 1332 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval
idation(); } |
| 1340 void setMayNeedPaintInvalidation(); | 1333 void setMayNeedPaintInvalidation(); |
| 1341 | 1334 |
| 1342 bool mayNeedPaintInvalidationSubtree() const { return m_bitfields.mayNeedPai
ntInvalidationSubtree(); } | 1335 bool mayNeedPaintInvalidationSubtree() const { return m_bitfields.mayNeedPai
ntInvalidationSubtree(); } |
| 1343 void setMayNeedPaintInvalidationSubtree(); | 1336 void setMayNeedPaintInvalidationSubtree(); |
| 1344 | 1337 |
| 1345 bool mayNeedPaintInvalidationAnimatedBackgroundImage() const { return m_bitf
ields.mayNeedPaintInvalidationAnimatedBackgroundImage(); } | 1338 bool mayNeedPaintInvalidationAnimatedBackgroundImage() const { return m_bitf
ields.mayNeedPaintInvalidationAnimatedBackgroundImage(); } |
| 1346 void setMayNeedPaintInvalidationAnimatgedBackgroundImage(); | 1339 void setMayNeedPaintInvalidationAnimatgedBackgroundImage(); |
| 1347 | 1340 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1374 | 1367 |
| 1375 // Sets painting layer needsRepaint, then calls invaldiateDisplayItemClient(
). | 1368 // Sets painting layer needsRepaint, then calls invaldiateDisplayItemClient(
). |
| 1376 // Should use this version when PaintInvalidationState is available. | 1369 // Should use this version when PaintInvalidationState is available. |
| 1377 void setPaintingLayerNeedsRepaintAndInvalidateDisplayItemClient(const PaintI
nvalidationState&, const DisplayItemClient&, PaintInvalidationReason) const; | 1370 void setPaintingLayerNeedsRepaintAndInvalidateDisplayItemClient(const PaintI
nvalidationState&, const DisplayItemClient&, PaintInvalidationReason) const; |
| 1378 | 1371 |
| 1379 // The caller should ensure the painting layer has been setNeedsRepaint befo
re calling this function. | 1372 // The caller should ensure the painting layer has been setNeedsRepaint befo
re calling this function. |
| 1380 void invalidateDisplayItemClient(const DisplayItemClient&, PaintInvalidation
Reason) const; | 1373 void invalidateDisplayItemClient(const DisplayItemClient&, PaintInvalidation
Reason) const; |
| 1381 | 1374 |
| 1382 void invalidateDisplayItemClientsIncludingNonCompositingDescendants(PaintInv
alidationReason) const; | 1375 void invalidateDisplayItemClientsIncludingNonCompositingDescendants(PaintInv
alidationReason) const; |
| 1383 | 1376 |
| 1377 // New version to replace the above old version. |
| 1378 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat
orContext&) const; |
| 1379 |
| 1380 // When this object is invalidated for paint, this method is called to inval
idate any DisplayItemClients |
| 1381 // owned by this object, including the object itself, LayoutText/LayoutInlin
e line boxes, etc., |
| 1382 // not including children which will be invalidated normally during invalida
teTreeIfNeeded() and |
| 1383 // parts which are invalidated separately (e.g. scrollbars). |
| 1384 // The caller should ensure the painting layer has been setNeedsRepaint befo
re calling this function. |
| 1385 virtual void invalidateDisplayItemClients(PaintInvalidationReason) const; |
| 1386 |
| 1387 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP
aintInvalidationRect; } |
| 1388 |
| 1389 virtual bool hasNonCompositedScrollbars() const { return false; } |
| 1390 |
| 1384 // Called before anonymousChild.setStyle(). Override to set custom styles fo
r the child. | 1391 // Called before anonymousChild.setStyle(). Override to set custom styles fo
r the child. |
| 1385 virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, C
omputedStyle& style) const { } | 1392 virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, C
omputedStyle& style) const { } |
| 1386 | 1393 |
| 1387 // Painters can use const methods only, except for these explicitly declared
methods. | 1394 // Painters can use const methods only, except for these explicitly declared
methods. |
| 1388 class MutableForPainting { | 1395 class MutableForPainting { |
| 1389 public: | 1396 public: |
| 1390 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb
ject.setPreviousPaintOffset(paintOffset); } | 1397 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb
ject.setPreviousPaintOffset(paintOffset); } |
| 1391 PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidationS
tate& paintInvalidationState) { return m_layoutObject.invalidatePaintIfNeeded(pa
intInvalidationState); } | 1398 void clearPaintInvalidationFlags() { m_layoutObject.clearPaintInvalidati
onFlags(); } |
| 1392 void clearPaintInvalidationFlags(const PaintInvalidationState& paintInva
lidationState) { m_layoutObject.clearPaintInvalidationFlags(paintInvalidationSta
te); } | 1399 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) {
m_layoutObject.setShouldDoFullPaintInvalidation(reason); } |
| 1393 void setShouldDoDelayedFullPaintInvalidation() { m_layoutObject.setShoul
dDoFullPaintInvalidation(PaintInvalidationDelayedFull); } | 1400 void ensureIsReadyForPaintInvalidation() { m_layoutObject.ensureIsReadyF
orPaintInvalidation(); } |
| 1394 | 1401 |
| 1395 private: | 1402 void setPreviousPaintInvalidationRect(const LayoutRect& r) { m_layoutObj
ect.setPreviousPaintInvalidationRect(r); } |
| 1403 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint&
p) { m_layoutObject.setPreviousPositionFromPaintInvalidationBacking(p); } |
| 1404 void setPreviousBackgroundObscured(bool b) { m_layoutObject.setPreviousB
ackgroundObscured(b); } |
| 1405 |
| 1406 protected: |
| 1396 friend class PaintPropertyTreeBuilder; | 1407 friend class PaintPropertyTreeBuilder; |
| 1397 // The following two functions can be called from PaintPropertyTreeBuild
er only. | 1408 // The following two functions can be called from PaintPropertyTreeBuild
er only. |
| 1398 ObjectPaintProperties& ensureObjectPaintProperties() { return m_layoutOb
ject.ensureObjectPaintProperties(); } | 1409 ObjectPaintProperties& ensureObjectPaintProperties() { return m_layoutOb
ject.ensureObjectPaintProperties(); } |
| 1399 ObjectPaintProperties* objectPaintProperties() { return const_cast<Objec
tPaintProperties*>(m_layoutObject.objectPaintProperties()); } | 1410 ObjectPaintProperties* objectPaintProperties() { return const_cast<Objec
tPaintProperties*>(m_layoutObject.objectPaintProperties()); } |
| 1400 | 1411 |
| 1401 friend class LayoutObject; | 1412 friend class LayoutObject; |
| 1402 MutableForPainting(const LayoutObject& layoutObject) : m_layoutObject(co
nst_cast<LayoutObject&>(layoutObject)) { } | 1413 MutableForPainting(const LayoutObject& layoutObject) : m_layoutObject(co
nst_cast<LayoutObject&>(layoutObject)) { } |
| 1403 | 1414 |
| 1404 LayoutObject& m_layoutObject; | 1415 LayoutObject& m_layoutObject; |
| 1405 }; | 1416 }; |
| 1406 MutableForPainting getMutableForPainting() const { return MutableForPainting
(*this); } | 1417 MutableForPainting getMutableForPainting() const { return MutableForPainting
(*this); } |
| 1407 | 1418 |
| 1408 void setIsScrollAnchorObject() { m_bitfields.setIsScrollAnchorObject(true);
} | 1419 void setIsScrollAnchorObject() { m_bitfields.setIsScrollAnchorObject(true);
} |
| 1409 // Clears the IsScrollAnchorObject bit, unless any ScrollAnchor still refers
to us. | 1420 // Clears the IsScrollAnchorObject bit, unless any ScrollAnchor still refers
to us. |
| 1410 void maybeClearIsScrollAnchorObject(); | 1421 void maybeClearIsScrollAnchorObject(); |
| 1411 | 1422 |
| 1412 void clearChildNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setChildN
eedsOverflowRecalcAfterStyleChange(false); } | 1423 void clearChildNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setChildN
eedsOverflowRecalcAfterStyleChange(false); } |
| 1413 | 1424 |
| 1414 bool compositedScrollsWithRespectTo(const LayoutBoxModelObject& paintInvalid
ationContainer) const; | 1425 bool compositedScrollsWithRespectTo(const LayoutBoxModelObject& paintInvalid
ationContainer) const; |
| 1415 IntSize scrollAdjustmentForPaintInvalidation(const LayoutBoxModelObject& pai
ntInvalidationContainer) const; | 1426 IntSize scrollAdjustmentForPaintInvalidation(const LayoutBoxModelObject& pai
ntInvalidationContainer) const; |
| 1416 | 1427 |
| 1428 bool previousBackgroundObscured() const { return m_bitfields.previousBackgro
undObscured(); } |
| 1429 void setPreviousBackgroundObscured(bool b) { m_bitfields.setPreviousBackgrou
ndObscured(b); } |
| 1430 |
| 1417 protected: | 1431 protected: |
| 1418 enum LayoutObjectType { | 1432 enum LayoutObjectType { |
| 1419 LayoutObjectBr, | 1433 LayoutObjectBr, |
| 1420 LayoutObjectCanvas, | 1434 LayoutObjectCanvas, |
| 1421 LayoutObjectFieldset, | 1435 LayoutObjectFieldset, |
| 1422 LayoutObjectCounter, | 1436 LayoutObjectCounter, |
| 1423 LayoutObjectDetailsMarker, | 1437 LayoutObjectDetailsMarker, |
| 1424 LayoutObjectEmbeddedObject, | 1438 LayoutObjectEmbeddedObject, |
| 1425 LayoutObjectFileUploadControl, | 1439 LayoutObjectFileUploadControl, |
| 1426 LayoutObjectFrame, | 1440 LayoutObjectFrame, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 // be a container for child elements. Any rect wholly contained by container
Rect can be | 1542 // be a container for child elements. Any rect wholly contained by container
Rect can be |
| 1529 // skipped. | 1543 // skipped. |
| 1530 virtual void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* curr
entLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
; | 1544 virtual void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* curr
entLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
; |
| 1531 | 1545 |
| 1532 // Add hit-test rects for this layoutObject only to the provided list. layer
Offset is the offset | 1546 // Add hit-test rects for this layoutObject only to the provided list. layer
Offset is the offset |
| 1533 // of this layoutObject within the current layer that should be used for eac
h result. | 1547 // of this layoutObject within the current layer that should be used for eac
h result. |
| 1534 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { } | 1548 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { } |
| 1535 | 1549 |
| 1536 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa
intInvalidationRect = rect; } | 1550 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa
intInvalidationRect = rect; } |
| 1537 | 1551 |
| 1538 virtual PaintInvalidationReason getPaintInvalidationReason(const PaintInvali
dationState&, | |
| 1539 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi
onFromPaintInvalidationBacking, | |
| 1540 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi
onFromPaintInvalidationBacking) const; | |
| 1541 | |
| 1542 // This function tries to minimize the amount of invalidation | |
| 1543 // generated by invalidating the "difference" between |oldBounds| | |
| 1544 // and |newBounds|. This means invalidating the union of the | |
| 1545 // previous rectangles but not their intersection. | |
| 1546 // | |
| 1547 // The use case is when an element only requires a paint | |
| 1548 // invalidation (which means that its content didn't change) | |
| 1549 // and its bounds changed but its location didn't. | |
| 1550 // | |
| 1551 // If we don't meet the criteria for an incremental paint, the | |
| 1552 // alternative is a full paint invalidation. | |
| 1553 virtual void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintI
nvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds,
const LayoutPoint& positionFromPaintInvalidationBacking); | |
| 1554 | |
| 1555 virtual bool hasNonCompositedScrollbars() const { return false; } | |
| 1556 | |
| 1557 #if ENABLE(ASSERT) | 1552 #if ENABLE(ASSERT) |
| 1558 virtual bool paintInvalidationStateIsDirty() const | 1553 virtual bool paintInvalidationStateIsDirty() const |
| 1559 { | 1554 { |
| 1560 return shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState
(); | 1555 return shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState
(); |
| 1561 } | 1556 } |
| 1562 #endif | 1557 #endif |
| 1563 | 1558 |
| 1559 // Called before paint invalidation. |
| 1560 virtual void ensureIsReadyForPaintInvalidation() |
| 1561 { |
| 1562 DCHECK(!needsLayout()); |
| 1563 } |
| 1564 |
| 1564 // This function walks the descendants of |this|, following a | 1565 // This function walks the descendants of |this|, following a |
| 1565 // layout ordering. | 1566 // layout ordering. |
| 1566 // | 1567 // |
| 1567 // The ordering is important for PaintInvalidationState, as | 1568 // The ordering is important for PaintInvalidationState, as |
| 1568 // it requires to be called following a descendant/container | 1569 // it requires to be called following a descendant/container |
| 1569 // relationship. | 1570 // relationship. |
| 1570 // | 1571 // |
| 1571 // The function is overridden to handle special children | 1572 // The function is overridden to handle special children |
| 1572 // (e.g. percentage height descendants or reflections). | 1573 // (e.g. percentage height descendants or reflections). |
| 1573 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState&
childPaintInvalidationState); | 1574 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState&
childPaintInvalidationState); |
| 1574 | 1575 |
| 1575 // This function generates the invalidation for this object only. | 1576 // This function generates the invalidation for this object only. |
| 1576 // It doesn't recurse into other object, as this is handled | 1577 // It doesn't recurse into other object, as this is handled |
| 1577 // by invalidatePaintOfSubtreesIfNeeded. | 1578 // by invalidatePaintOfSubtreesIfNeeded. |
| 1578 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat
ionState&); | 1579 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat
ionState&); |
| 1579 | 1580 |
| 1580 // When this object is invalidated for paint, this method is called to inval
idate any DisplayItemClients | |
| 1581 // owned by this object, including the object itself, LayoutText/LayoutInlin
e line boxes, etc., | |
| 1582 // not including children which will be invalidated normally during invalida
teTreeIfNeeded() and | |
| 1583 // parts which are invalidated separately (e.g. scrollbars). | |
| 1584 // The caller should ensure the painting layer has been setNeedsRepaint befo
re calling this function. | |
| 1585 virtual void invalidateDisplayItemClients(PaintInvalidationReason) const; | |
| 1586 | |
| 1587 // Sets painting layer needsRepaint, then calls invalidateDisplayItemClients
(). | |
| 1588 // Should use this version when PaintInvalidationState is available. | |
| 1589 void invalidateDisplayItemClientsWithPaintInvalidationState(const PaintInval
idationState&, PaintInvalidationReason) const; | |
| 1590 | |
| 1591 void setIsBackgroundAttachmentFixedObject(bool); | 1581 void setIsBackgroundAttachmentFixedObject(bool); |
| 1592 | 1582 |
| 1593 void clearSelfNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setSelfNee
dsOverflowRecalcAfterStyleChange(false); } | 1583 void clearSelfNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setSelfNee
dsOverflowRecalcAfterStyleChange(false); } |
| 1594 void setEverHadLayout() { m_bitfields.setEverHadLayout(true); } | 1584 void setEverHadLayout() { m_bitfields.setEverHadLayout(true); } |
| 1595 | 1585 |
| 1596 // Remove this object and all descendants from the containing LayoutFlowThre
ad. | 1586 // Remove this object and all descendants from the containing LayoutFlowThre
ad. |
| 1597 void removeFromLayoutFlowThread(); | 1587 void removeFromLayoutFlowThread(); |
| 1598 | 1588 |
| 1599 bool containsInlineWithOutlineAndContinuation() const { return m_bitfields.c
ontainsInlineWithOutlineAndContinuation(); } | 1589 bool containsInlineWithOutlineAndContinuation() const { return m_bitfields.c
ontainsInlineWithOutlineAndContinuation(); } |
| 1600 void setContainsInlineWithOutlineAndContinuation(bool b) { m_bitfields.setCo
ntainsInlineWithOutlineAndContinuation(b); } | 1590 void setContainsInlineWithOutlineAndContinuation(bool b) { m_bitfields.setCo
ntainsInlineWithOutlineAndContinuation(b); } |
| 1601 | 1591 |
| 1602 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP
aintInvalidationRect; } | |
| 1603 | |
| 1604 private: | 1592 private: |
| 1605 // This function generates a full invalidation, which | |
| 1606 // means invalidating both |oldBounds| and |newBounds|. | |
| 1607 // | |
| 1608 // This is the default choice when generating an invalidation, | |
| 1609 // as it is always correct, albeit it may force some extra painting. | |
| 1610 void fullyInvalidatePaint(const LayoutBoxModelObject& paintInvalidationConta
iner, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect& ne
wBounds); | |
| 1611 | |
| 1612 // Adjusts a paint invalidation rect in the space of |m_previousPaintInvalid
ationRect| and |m_previousPositionFromPaintInvalidationBacking| | 1593 // Adjusts a paint invalidation rect in the space of |m_previousPaintInvalid
ationRect| and |m_previousPositionFromPaintInvalidationBacking| |
| 1613 // to be in the space of the |paintInvalidationContainer|, | 1594 // to be in the space of the |paintInvalidationContainer|, |
| 1614 // if needed. They can be different only if |paintInvalidationContainer| is
a composited scroller. | 1595 // if needed. They can be different only if |paintInvalidationContainer| is
a composited scroller. |
| 1615 void adjustInvalidationRectForCompositedScrolling(LayoutRect&, const LayoutB
oxModelObject& paintInvalidationContainer) const; | 1596 void adjustInvalidationRectForCompositedScrolling(LayoutRect&, const LayoutB
oxModelObject& paintInvalidationContainer) const; |
| 1616 | 1597 |
| 1617 void clearLayoutRootIfNeeded() const; | 1598 void clearLayoutRootIfNeeded() const; |
| 1618 | 1599 |
| 1619 bool isInert() const; | 1600 bool isInert() const; |
| 1620 | 1601 |
| 1621 void updateImage(StyleImage*, StyleImage*); | 1602 void updateImage(StyleImage*, StyleImage*); |
| 1622 | 1603 |
| 1623 void scheduleRelayout(); | 1604 void scheduleRelayout(); |
| 1624 | 1605 |
| 1625 void updateShapeImage(const ShapeValue*, const ShapeValue*); | 1606 void updateShapeImage(const ShapeValue*, const ShapeValue*); |
| 1626 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers
); | 1607 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers
); |
| 1627 void updateCursorImages(const CursorList* oldCursors, const CursorList* newC
ursors); | 1608 void updateCursorImages(const CursorList* oldCursors, const CursorList* newC
ursors); |
| 1628 | 1609 |
| 1629 void setNeedsOverflowRecalcAfterStyleChange(); | 1610 void setNeedsOverflowRecalcAfterStyleChange(); |
| 1630 | 1611 |
| 1631 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make
LayoutBox | 1612 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make
LayoutBox |
| 1632 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. | 1613 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. |
| 1633 inline void markAncestorsForOverflowRecalcIfNeeded(); | 1614 inline void markAncestorsForOverflowRecalcIfNeeded(); |
| 1634 | 1615 |
| 1635 inline void markAncestorsForPaintInvalidation(); | 1616 inline void markAncestorsForPaintInvalidation(); |
| 1636 | 1617 |
| 1637 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInv
alidationContainer, const PaintInvalidationState&, PaintInvalidationReason); | |
| 1638 | |
| 1639 inline void invalidateContainerPreferredLogicalWidths(); | 1618 inline void invalidateContainerPreferredLogicalWidths(); |
| 1640 | 1619 |
| 1641 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L
ayoutBoxModelObject& paintInvalidationContainer); | 1620 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L
ayoutBoxModelObject& paintInvalidationContainer); |
| 1642 | 1621 |
| 1643 // The caller should ensure the painting layer has been setNeedsRepaint befo
re calling this function. | 1622 // The caller should ensure the painting layer has been setNeedsRepaint befo
re calling this function. |
| 1644 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje
ct& paintInvalidationContainer, PaintInvalidationReason); | 1623 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje
ct& paintInvalidationContainer, PaintInvalidationReason); |
| 1645 | 1624 |
| 1646 LayoutRect previousSelectionRectForPaintInvalidation() const; | |
| 1647 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); | |
| 1648 | |
| 1649 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* ances
tor = nullptr, bool* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped
= nullptr) const; | 1625 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* ances
tor = nullptr, bool* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped
= nullptr) const; |
| 1650 | 1626 |
| 1651 const LayoutBoxModelObject* enclosingCompositedContainer() const; | 1627 const LayoutBoxModelObject* enclosingCompositedContainer() const; |
| 1652 | 1628 |
| 1653 LayoutFlowThread* locateFlowThreadContainingBlock() const; | 1629 LayoutFlowThread* locateFlowThreadContainingBlock() const; |
| 1654 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); | 1630 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); |
| 1655 | 1631 |
| 1656 ComputedStyle* cachedFirstLineStyle() const; | 1632 ComputedStyle* cachedFirstLineStyle() const; |
| 1657 StyleDifference adjustStyleDifference(StyleDifference) const; | 1633 StyleDifference adjustStyleDifference(StyleDifference) const; |
| 1658 | 1634 |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2187 void showTree(const blink::LayoutObject*); | 2163 void showTree(const blink::LayoutObject*); |
| 2188 void showLineTree(const blink::LayoutObject*); | 2164 void showLineTree(const blink::LayoutObject*); |
| 2189 void showLayoutTree(const blink::LayoutObject* object1); | 2165 void showLayoutTree(const blink::LayoutObject* object1); |
| 2190 // We don't make object2 an optional parameter so that showLayoutTree | 2166 // We don't make object2 an optional parameter so that showLayoutTree |
| 2191 // can be called from gdb easily. | 2167 // can be called from gdb easily. |
| 2192 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2168 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
| 2193 | 2169 |
| 2194 #endif | 2170 #endif |
| 2195 | 2171 |
| 2196 #endif // LayoutObject_h | 2172 #endif // LayoutObject_h |
| OLD | NEW |