Chromium Code Reviews| 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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1131 { | 1131 { |
| 1132 ASSERT(!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); | 1132 ASSERT(!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); |
| 1133 return m_previousPositionFromPaintInvalidationBacking; | 1133 return m_previousPositionFromPaintInvalidationBacking; |
| 1134 } | 1134 } |
| 1135 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& posi tionFromPaintInvalidationBacking) | 1135 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& posi tionFromPaintInvalidationBacking) |
| 1136 { | 1136 { |
| 1137 ASSERT(!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); | 1137 ASSERT(!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); |
| 1138 m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvali dationBacking; | 1138 m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvali dationBacking; |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 const LayoutPoint& previousPaintOffset() const | |
| 1142 { | |
| 1143 ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); | |
| 1144 return m_previousPaintOffset; | |
| 1145 } | |
| 1146 void setPreviousPaintOffset(const LayoutPoint& paintOffset) const | |
| 1147 { | |
| 1148 ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); | |
| 1149 m_previousPaintOffset = paintOffset; | |
| 1150 } | |
| 1151 | |
| 1141 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi elds.fullPaintInvalidationReason(); } | 1152 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi elds.fullPaintInvalidationReason(); } |
| 1142 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv alidationReason() != PaintInvalidationNone; } | 1153 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv alidationReason() != PaintInvalidationNone; } |
| 1143 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid ationFull); | 1154 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid ationFull); |
| 1144 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida tionReason(PaintInvalidationNone); } | 1155 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida tionReason(PaintInvalidationNone); } |
| 1145 | 1156 |
| 1146 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); } | 1157 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); } |
| 1147 | 1158 |
| 1148 virtual void clearPaintInvalidationState(const PaintInvalidationState&); | 1159 virtual void clearPaintInvalidationState(const PaintInvalidationState&); |
| 1149 | 1160 |
| 1150 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); } | 1161 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); } |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1631 void setChildNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setChildNee dsOverflowRecalcAfterStyleChange(true); } | 1642 void setChildNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setChildNee dsOverflowRecalcAfterStyleChange(true); } |
| 1632 | 1643 |
| 1633 private: | 1644 private: |
| 1634 // Store state between styleWillChange and styleDidChange | 1645 // Store state between styleWillChange and styleDidChange |
| 1635 static bool s_affectsParentBlock; | 1646 static bool s_affectsParentBlock; |
| 1636 | 1647 |
| 1637 // This stores the paint invalidation rect from the previous frame. This rec t does *not* account for composited scrolling. See | 1648 // This stores the paint invalidation rect from the previous frame. This rec t does *not* account for composited scrolling. See |
| 1638 // adjustInvalidationRectForCompositedScrolling(). | 1649 // adjustInvalidationRectForCompositedScrolling(). |
| 1639 LayoutRect m_previousPaintInvalidationRect; | 1650 LayoutRect m_previousPaintInvalidationRect; |
| 1640 | 1651 |
| 1641 // This stores the position in the paint invalidation backing's coordinate. | 1652 union { |
| 1642 // It is used to detect layoutObject shifts that forces a full invalidation. | 1653 // This stores the position in the paint invalidation backing's coordina te. |
| 1643 // This point does *not* account for composited scrolling. See adjustInvalid ationRectForCompositedScrolling(). | 1654 // It is used to detect layoutObject shifts that forces a full invalidat ion. |
| 1644 LayoutPoint m_previousPositionFromPaintInvalidationBacking; | 1655 // This point does *not* account for composited scrolling. See adjustInv alidationRectForCompositedScrolling(). |
| 1656 // TODO(wangxianzhu): Remove this when we enable slimmingPaintOffsetCach ing. | |
| 1657 LayoutPoint m_previousPositionFromPaintInvalidationBacking; | |
| 1658 // For slimmingPaintOffsetCaching. | |
| 1659 mutable LayoutPoint m_previousPaintOffset; | |
|
pdr.
2015/09/22 22:44:44
Do we need to track the initial state in order to
Xianzhu
2015/09/23 18:43:18
Done. Added uninitializedPaintOffset() for the ini
| |
| 1660 }; | |
| 1645 }; | 1661 }; |
| 1646 | 1662 |
| 1647 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer hit . | 1663 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer hit . |
| 1648 class DeprecatedDisableModifyLayoutTreeStructureAsserts { | 1664 class DeprecatedDisableModifyLayoutTreeStructureAsserts { |
| 1649 STACK_ALLOCATED(); | 1665 STACK_ALLOCATED(); |
| 1650 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyLayoutTreeStructureAsserts); | 1666 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyLayoutTreeStructureAsserts); |
| 1651 public: | 1667 public: |
| 1652 DeprecatedDisableModifyLayoutTreeStructureAsserts(); | 1668 DeprecatedDisableModifyLayoutTreeStructureAsserts(); |
| 1653 | 1669 |
| 1654 static bool canModifyLayoutTreeStateInAnyState(); | 1670 static bool canModifyLayoutTreeStateInAnyState(); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1873 void showTree(const blink::LayoutObject*); | 1889 void showTree(const blink::LayoutObject*); |
| 1874 void showLineTree(const blink::LayoutObject*); | 1890 void showLineTree(const blink::LayoutObject*); |
| 1875 void showLayoutTree(const blink::LayoutObject* object1); | 1891 void showLayoutTree(const blink::LayoutObject* object1); |
| 1876 // We don't make object2 an optional parameter so that showLayoutTree | 1892 // We don't make object2 an optional parameter so that showLayoutTree |
| 1877 // can be called from gdb easily. | 1893 // can be called from gdb easily. |
| 1878 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); | 1894 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); |
| 1879 | 1895 |
| 1880 #endif | 1896 #endif |
| 1881 | 1897 |
| 1882 #endif // LayoutObject_h | 1898 #endif // LayoutObject_h |
| OLD | NEW |