Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 2060053002: Set paintingLayerNeedsRepaint() in layout tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set paintingLayerNeedsRepaint() in layout tree Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 void assertSubtreeIsLaidOut() const 332 void assertSubtreeIsLaidOut() const
333 { 333 {
334 for (const LayoutObject* layoutObject = this; layoutObject; layoutObject = layoutObject->nextInPreOrder()) 334 for (const LayoutObject* layoutObject = this; layoutObject; layoutObject = layoutObject->nextInPreOrder())
335 layoutObject->assertLaidOut(); 335 layoutObject->assertLaidOut();
336 } 336 }
337 337
338 void assertClearedPaintInvalidationFlags() const 338 void assertClearedPaintInvalidationFlags() const
339 { 339 {
340 #ifndef NDEBUG 340 #ifndef NDEBUG
341 if (paintInvalidationStateIsDirty()) { 341 if (paintInvalidationFlagsAreDirty()) {
342 showLayoutTreeForThis(); 342 showLayoutTreeForThis();
343 ASSERT_NOT_REACHED(); 343 ASSERT_NOT_REACHED();
344 } 344 }
345 #endif 345 #endif
346 } 346 }
347 347
348 void assertSubtreeClearedPaintInvalidationFlags() const 348 void assertSubtreeClearedPaintInvalidationFlags() const
349 { 349 {
350 for (const LayoutObject* layoutObject = this; layoutObject; layoutObject = layoutObject->nextInPreOrder()) 350 for (const LayoutObject* layoutObject = this; layoutObject; layoutObject = layoutObject->nextInPreOrder())
351 layoutObject->assertClearedPaintInvalidationFlags(); 351 layoutObject->assertClearedPaintInvalidationFlags();
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 const LayoutBoxModelObject& containerForPaintInvalidation() const; 1120 const LayoutBoxModelObject& containerForPaintInvalidation() const;
1121 1121
1122 bool isPaintInvalidationContainer() const; 1122 bool isPaintInvalidationContainer() const;
1123 1123
1124 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space 1124 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space
1125 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same 1125 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same
1126 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing. 1126 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing.
1127 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida tionContainer, const LayoutRect&, PaintInvalidationReason) const; 1127 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida tionContainer, const LayoutRect&, PaintInvalidationReason) const;
1128 1128
1129 // Invalidate the paint of a specific subrectangle within a given object. Th e rect is in the object's coordinate space. 1129 // Invalidate the paint of a specific subrectangle within a given object. Th e rect is in the object's coordinate space.
1130 void invalidatePaintRectangle(const LayoutRect&) const; 1130 void invalidatePaintRectangle(const LayoutRect&);
1131 void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutR ect&) const;
1132 1131
1133 // Walk the tree after layout issuing paint invalidations for layoutObjects that have changed or moved, updating bounds that have changed, and clearing pain t invalidation state. 1132 // Walk the tree after layout issuing paint invalidations for layoutObjects that have changed or moved, updating bounds that have changed, and clearing pain t invalidation state.
1134 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); 1133 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&);
1135 1134
1136 // This function only invalidates the visual overflow. 1135 // This function only invalidates the visual overflow.
1137 // 1136 //
1138 // Note that overflow is a box concept but this function 1137 // Note that overflow is a box concept but this function
1139 // is only supported for block-flow. 1138 // is only supported for block-flow.
1140 virtual void invalidatePaintForOverflow(); 1139 virtual void invalidatePaintForOverflow();
1141 void invalidatePaintForOverflowIfNeeded(); 1140 void invalidatePaintForOverflowIfNeeded();
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 void setShouldInvalidateSelection(); 1363 void setShouldInvalidateSelection();
1365 1364
1366 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const 1365 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const
1367 { 1366 {
1368 return paintInvalidationState.hasForcedSubtreeInvalidationFlags() 1367 return paintInvalidationState.hasForcedSubtreeInvalidationFlags()
1369 || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState (); 1368 || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState ();
1370 } 1369 }
1371 1370
1372 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con st 1371 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con st
1373 { 1372 {
1374 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation( ); 1373 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation( ) || paintingLayerNeedsRepaint();
1375 } 1374 }
1376 1375
1376 // Set flag on this object indicating that its painting layer will need repa int during the next paint.
1377 // The painting layer will be set needs repaint after paint invalidation of this object.
1378 void setPaintingLayerNeedsRepaint();
1379 bool paintingLayerNeedsRepaint() const { return m_bitfields.paintingLayerNee dsRepaint(); }
1380
1377 virtual LayoutRect viewRect() const; 1381 virtual LayoutRect viewRect() const;
1378 1382
1379 void invalidateDisplayItemClient(const DisplayItemClient&) const; 1383 void invalidateDisplayItemClient(const DisplayItemClient&);
1380 void invalidateDisplayItemClientsIncludingNonCompositingDescendants(const La youtBoxModelObject* paintInvalidationContainer, PaintInvalidationReason) const; 1384
1385 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients
1386 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc.,
1387 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and
1388 // parts which are invalidated separately (e.g. scrollbars).
1389 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer, PaintInvalidationReason);
1390
1391 void invalidateDisplayItemClientsIncludingNonCompositingDescendants(const La youtBoxModelObject* paintInvalidationContainer, PaintInvalidationReason);
1381 1392
1382 // Called before anonymousChild.setStyle(). Override to set custom styles fo r the child. 1393 // Called before anonymousChild.setStyle(). Override to set custom styles fo r the child.
1383 virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, C omputedStyle& style) const { } 1394 virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, C omputedStyle& style) const { }
1384 1395
1385 // Painters can use const methods only, except for these explicitly declared methods. 1396 // Painters can use const methods only, except for these explicitly declared methods.
1386 class MutableForPainting { 1397 class MutableForPainting {
1387 public: 1398 public:
1388 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb ject.setPreviousPaintOffset(paintOffset); } 1399 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb ject.setPreviousPaintOffset(paintOffset); }
1389 ObjectPaintProperties& ensureObjectPaintProperties() { return m_layoutOb ject.ensureObjectPaintProperties(); } 1400 ObjectPaintProperties& ensureObjectPaintProperties() { return m_layoutOb ject.ensureObjectPaintProperties(); }
1390 void clearObjectPaintProperties() { m_layoutObject.clearObjectPaintPrope rties(); } 1401 void clearObjectPaintProperties() { m_layoutObject.clearObjectPaintPrope rties(); }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 // invalidation (which means that its content didn't change) 1552 // invalidation (which means that its content didn't change)
1542 // and its bounds changed but its location didn't. 1553 // and its bounds changed but its location didn't.
1543 // 1554 //
1544 // If we don't meet the criteria for an incremental paint, the 1555 // If we don't meet the criteria for an incremental paint, the
1545 // alternative is a full paint invalidation. 1556 // alternative is a full paint invalidation.
1546 virtual void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintI nvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const LayoutPoint& positionFromPaintInvalidationBacking); 1557 virtual void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintI nvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const LayoutPoint& positionFromPaintInvalidationBacking);
1547 1558
1548 virtual bool hasNonCompositedScrollbars() const { return false; } 1559 virtual bool hasNonCompositedScrollbars() const { return false; }
1549 1560
1550 #if ENABLE(ASSERT) 1561 #if ENABLE(ASSERT)
1551 virtual bool paintInvalidationStateIsDirty() const 1562 virtual bool paintInvalidationFlagsAreDirty() const
1552 { 1563 {
1553 return m_bitfields.neededLayoutBecauseOfChildren() || shouldCheckForPain tInvalidationRegardlessOfPaintInvalidationState(); 1564 return m_bitfields.neededLayoutBecauseOfChildren() || shouldCheckForPain tInvalidationRegardlessOfPaintInvalidationState();
1554 } 1565 }
1555 #endif 1566 #endif
1556 1567
1557 // This function walks the descendants of |this|, following a 1568 // This function walks the descendants of |this|, following a
1558 // layout ordering. 1569 // layout ordering.
1559 // 1570 //
1560 // The ordering is important for PaintInvalidationState, as 1571 // The ordering is important for PaintInvalidationState, as
1561 // it requires to be called following a descendant/container 1572 // it requires to be called following a descendant/container
1562 // relationship. 1573 // relationship.
1563 // 1574 //
1564 // The function is overridden to handle special children 1575 // The function is overridden to handle special children
1565 // (e.g. percentage height descendants or reflections). 1576 // (e.g. percentage height descendants or reflections).
1566 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState); 1577 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState);
1567 1578
1568 // This function generates the invalidation for this object only. 1579 // This function generates the invalidation for this object only.
1569 // It doesn't recurse into other object, as this is handled 1580 // It doesn't recurse into other object, as this is handled
1570 // by invalidatePaintOfSubtreesIfNeeded. 1581 // by invalidatePaintOfSubtreesIfNeeded.
1571 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat ionState&); 1582 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat ionState&);
1572 1583
1573 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients
1574 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc.,
1575 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and
1576 // parts which are invalidated separately (e.g. scrollbars).
1577 // The caller should ensure the painting layer has been setNeedsRepaint befo re calling this function.
1578 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer, PaintInvalidationReason) const;
1579
1580 // If possible, use the faster paintInvalidationState.paintingLayer().setNee dsRepaint().
1581 void setPaintingLayerNeedsRepaint() const;
1582
1583 // Sets enclosing layer needsRepaint, then calls invalidateDisplayItemClient s().
1584 // Should use this version when PaintInvalidationState is available.
1585 void invalidateDisplayItemClientsWithPaintInvalidationState(const LayoutBoxM odelObject& paintInvalidationContainer, const PaintInvalidationState&, PaintInva lidationReason) const;
1586
1587 void setIsBackgroundAttachmentFixedObject(bool); 1584 void setIsBackgroundAttachmentFixedObject(bool);
1588 1585
1589 void clearSelfNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setSelfNee dsOverflowRecalcAfterStyleChange(false); } 1586 void clearSelfNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setSelfNee dsOverflowRecalcAfterStyleChange(false); }
1590 void setShouldInvalidateOverflowForPaint() { m_bitfields.setShouldInvalidate OverflowForPaint(true); } 1587 void setShouldInvalidateOverflowForPaint() { m_bitfields.setShouldInvalidate OverflowForPaint(true); }
1591 void setEverHadLayout() { m_bitfields.setEverHadLayout(true); } 1588 void setEverHadLayout() { m_bitfields.setEverHadLayout(true); }
1592 1589
1593 // Remove this object and all descendants from the containing LayoutFlowThre ad. 1590 // Remove this object and all descendants from the containing LayoutFlowThre ad.
1594 void removeFromLayoutFlowThread(); 1591 void removeFromLayoutFlowThread();
1595 1592
1596 bool containsInlineWithOutlineAndContinuation() const { return m_bitfields.c ontainsInlineWithOutlineAndContinuation(); } 1593 bool containsInlineWithOutlineAndContinuation() const { return m_bitfields.c ontainsInlineWithOutlineAndContinuation(); }
(...skipping 30 matching lines...) Expand all
1627 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make LayoutBox 1624 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make LayoutBox
1628 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. 1625 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700.
1629 inline void markAncestorsForOverflowRecalcIfNeeded(); 1626 inline void markAncestorsForOverflowRecalcIfNeeded();
1630 1627
1631 inline void markAncestorsForPaintInvalidation(); 1628 inline void markAncestorsForPaintInvalidation();
1632 1629
1633 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInv alidationContainer, const PaintInvalidationState&, PaintInvalidationReason); 1630 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInv alidationContainer, const PaintInvalidationState&, PaintInvalidationReason);
1634 1631
1635 inline void invalidateContainerPreferredLogicalWidths(); 1632 inline void invalidateContainerPreferredLogicalWidths();
1636 1633
1637 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L ayoutBoxModelObject& paintInvalidationContainer);
1638
1639 // The caller should ensure the painting layer has been setNeedsRepaint befo re calling this function.
1640 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje ct& paintInvalidationContainer, PaintInvalidationReason); 1634 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje ct& paintInvalidationContainer, PaintInvalidationReason);
1641 1635
1642 LayoutRect previousSelectionRectForPaintInvalidation() const; 1636 LayoutRect previousSelectionRectForPaintInvalidation() const;
1643 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); 1637 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&);
1644 1638
1645 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* ances tor = nullptr, bool* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped = nullptr) const; 1639 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* ances tor = nullptr, bool* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped = nullptr) const;
1646 1640
1647 const LayoutBoxModelObject* enclosingCompositedContainer() const; 1641 const LayoutBoxModelObject* enclosingCompositedContainer() const;
1648 1642
1649 LayoutFlowThread* locateFlowThreadContainingBlock() const; 1643 LayoutFlowThread* locateFlowThreadContainingBlock() const;
1650 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); 1644 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*);
1651 1645
1652 ComputedStyle* cachedFirstLineStyle() const; 1646 ComputedStyle* cachedFirstLineStyle() const;
1653 StyleDifference adjustStyleDifference(StyleDifference) const; 1647 StyleDifference adjustStyleDifference(StyleDifference) const;
1654 1648
1655 Color selectionColor(int colorProperty, const GlobalPaintFlags) const; 1649 Color selectionColor(int colorProperty, const GlobalPaintFlags) const;
1656 1650
1657 void removeShapeImageClient(ShapeValue*); 1651 void removeShapeImageClient(ShapeValue*);
1658 1652
1659 #if ENABLE(ASSERT) 1653 #if ENABLE(ASSERT)
1660 void checkBlockPositionedObjectsNeedLayout(); 1654 void checkBlockPositionedObjectsNeedLayout();
1661 #endif 1655 #endif
1662 1656
1663 bool isTextOrSVGChild() const { return isText() || (isSVG() && !isSVGRoot()) ; } 1657 bool isTextOrSVGChild() const { return isText() || (isSVG() && !isSVGRoot()) ; }
1664 1658
1665 static bool isAllowedToModifyLayoutTreeStructure(Document&); 1659 static bool isAllowedToModifyLayoutTreeStructure(Document&);
1666 1660
1667 // The passed rect is mutated into the coordinate space of the paint invalid ation container.
1668 const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRec t&) const;
1669
1670 // Returns the parent for paint invalidation. 1661 // Returns the parent for paint invalidation.
1671 // - For LayoutView, returns the owner layout object in the containing frame if any or nullptr; 1662 // - For LayoutView, returns the owner layout object in the containing frame if any or nullptr;
1672 // - For multi-column spanner, returns the spanner placeholder; 1663 // - For multi-column spanner, returns the spanner placeholder;
1673 // - Otherwise returns parent(). 1664 // - Otherwise returns parent().
1674 LayoutObject* paintInvalidationParent() const; 1665 LayoutObject* paintInvalidationParent() const;
1675 1666
1676 static LayoutPoint uninitializedPaintOffset() { return LayoutPoint(LayoutUni t::max(), LayoutUnit::max()); } 1667 static LayoutPoint uninitializedPaintOffset() { return LayoutPoint(LayoutUni t::max(), LayoutUnit::max()); }
1677 1668
1678 RefPtr<ComputedStyle> m_style; 1669 RefPtr<ComputedStyle> m_style;
1679 1670
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 , m_needsSimplifiedNormalFlowLayout(false) 1723 , m_needsSimplifiedNormalFlowLayout(false)
1733 , m_selfNeedsOverflowRecalcAfterStyleChange(false) 1724 , m_selfNeedsOverflowRecalcAfterStyleChange(false)
1734 , m_childNeedsOverflowRecalcAfterStyleChange(false) 1725 , m_childNeedsOverflowRecalcAfterStyleChange(false)
1735 , m_preferredLogicalWidthsDirty(false) 1726 , m_preferredLogicalWidthsDirty(false)
1736 , m_shouldInvalidateOverflowForPaint(false) 1727 , m_shouldInvalidateOverflowForPaint(false)
1737 , m_childShouldCheckForPaintInvalidation(false) 1728 , m_childShouldCheckForPaintInvalidation(false)
1738 , m_mayNeedPaintInvalidation(false) 1729 , m_mayNeedPaintInvalidation(false)
1739 , m_mayNeedPaintInvalidationSubtree(false) 1730 , m_mayNeedPaintInvalidationSubtree(false)
1740 , m_shouldInvalidateSelection(false) 1731 , m_shouldInvalidateSelection(false)
1741 , m_neededLayoutBecauseOfChildren(false) 1732 , m_neededLayoutBecauseOfChildren(false)
1733 , m_paintingLayerNeedsRepaint(false)
1742 , m_floating(false) 1734 , m_floating(false)
1743 , m_isAnonymous(!node) 1735 , m_isAnonymous(!node)
1744 , m_isText(false) 1736 , m_isText(false)
1745 , m_isBox(false) 1737 , m_isBox(false)
1746 , m_isInline(true) 1738 , m_isInline(true)
1747 , m_isAtomicInlineLevel(false) 1739 , m_isAtomicInlineLevel(false)
1748 , m_horizontalWritingMode(true) 1740 , m_horizontalWritingMode(true)
1749 , m_isDragging(false) 1741 , m_isDragging(false)
1750 , m_hasLayer(false) 1742 , m_hasLayer(false)
1751 , m_hasOverflowClip(false) 1743 , m_hasOverflowClip(false)
(...skipping 13 matching lines...) Expand all
1765 , m_lastBoxDecorationBackgroundObscured(false) 1757 , m_lastBoxDecorationBackgroundObscured(false)
1766 , m_isBackgroundAttachmentFixedObject(false) 1758 , m_isBackgroundAttachmentFixedObject(false)
1767 , m_isScrollAnchorObject(false) 1759 , m_isScrollAnchorObject(false)
1768 , m_positionedState(IsStaticallyPositioned) 1760 , m_positionedState(IsStaticallyPositioned)
1769 , m_selectionState(SelectionNone) 1761 , m_selectionState(SelectionNone)
1770 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 1762 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
1771 , m_fullPaintInvalidationReason(PaintInvalidationNone) 1763 , m_fullPaintInvalidationReason(PaintInvalidationNone)
1772 { 1764 {
1773 } 1765 }
1774 1766
1775 // 32 bits have been used in the first word, and 18 in the second. 1767 // 32 bits have been used in the first word, and 19 in the second.
1776 1768
1777 // Self needs layout means that this layout object is marked for a full layout. 1769 // Self needs layout means that this layout object is marked for a full layout.
1778 // This is the default layout but it is expensive as it recomputes every thing. 1770 // This is the default layout but it is expensive as it recomputes every thing.
1779 // For CSS boxes, this includes the width (laying out the line boxes aga in), the margins 1771 // For CSS boxes, this includes the width (laying out the line boxes aga in), the margins
1780 // (due to block collapsing margins), the positions, the height and the potential overflow. 1772 // (due to block collapsing margins), the positions, the height and the potential overflow.
1781 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 1773 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
1782 1774
1783 // A positioned movement layout is a specialized type of layout used on positioned objects 1775 // A positioned movement layout is a specialized type of layout used on positioned objects
1784 // that only visually moved. This layout is used when changing 'top'/'le ft' on a positioned 1776 // that only visually moved. This layout is used when changing 'top'/'le ft' on a positioned
1785 // element or margins on an out-of-flow one. Because the following opera tions don't impact 1777 // element or margins on an out-of-flow one. Because the following opera tions don't impact
(...skipping 27 matching lines...) Expand all
1813 // selfNeedsOverflowRecalcAfterStyleChange. This is needed as a descenda nt overflow can 1805 // selfNeedsOverflowRecalcAfterStyleChange. This is needed as a descenda nt overflow can
1814 // bleed into its containing block's so we have to recompute it in some cases. 1806 // bleed into its containing block's so we have to recompute it in some cases.
1815 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeed sOverflowRecalcAfterStyleChange); 1807 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeed sOverflowRecalcAfterStyleChange);
1816 1808
1817 // This boolean marks preferred logical widths for lazy recomputation. 1809 // This boolean marks preferred logical widths for lazy recomputation.
1818 // 1810 //
1819 // See INTRINSIC SIZES / PREFERRED LOGICAL WIDTHS above about those 1811 // See INTRINSIC SIZES / PREFERRED LOGICAL WIDTHS above about those
1820 // widths. 1812 // widths.
1821 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty); 1813 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty);
1822 1814
1823 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint); // TODO(wangxianzhu): Remove for slimming paint v2. 1815 // The following bitfields are paint invalidation flags which are set be fore or during paint
1816 // invalidation and cleared after paint invalidation.
1817 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint);
1824 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh eckForPaintInvalidation); 1818 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh eckForPaintInvalidation);
1825 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ; 1819 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ;
1826 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationSubtree, MayNeedPaintInvali dationSubtree); 1820 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationSubtree, MayNeedPaintInvali dationSubtree);
1827 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n); // TODO(wangxianzhu): Remove for slimming paint v2. 1821 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n);
1828 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); // TODO(wangxianzhu): Remove for slimming paint v2. 1822 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren);
1823 ADD_BOOLEAN_BITFIELD(paintingLayerNeedsRepaint, PaintingLayerNeedsRepain t);
1829 1824
1830 // This boolean is the cached value of 'float' 1825 // This boolean is the cached value of 'float'
1831 // (see ComputedStyle::isFloating). 1826 // (see ComputedStyle::isFloating).
1832 ADD_BOOLEAN_BITFIELD(floating, Floating); 1827 ADD_BOOLEAN_BITFIELD(floating, Floating);
1833 1828
1834 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); 1829 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous);
1835 ADD_BOOLEAN_BITFIELD(isText, IsText); 1830 ADD_BOOLEAN_BITFIELD(isText, IsText);
1836 ADD_BOOLEAN_BITFIELD(isBox, IsBox); 1831 ADD_BOOLEAN_BITFIELD(isBox, IsBox);
1837 1832
1838 // This boolean represents whether the LayoutObject is 'inline-level' 1833 // This boolean represents whether the LayoutObject is 'inline-level'
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2192 void showTree(const blink::LayoutObject*); 2187 void showTree(const blink::LayoutObject*);
2193 void showLineTree(const blink::LayoutObject*); 2188 void showLineTree(const blink::LayoutObject*);
2194 void showLayoutTree(const blink::LayoutObject* object1); 2189 void showLayoutTree(const blink::LayoutObject* object1);
2195 // We don't make object2 an optional parameter so that showLayoutTree 2190 // We don't make object2 an optional parameter so that showLayoutTree
2196 // can be called from gdb easily. 2191 // can be called from gdb easily.
2197 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2192 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2198 2193
2199 #endif 2194 #endif
2200 2195
2201 #endif // LayoutObject_h 2196 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutInline.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698