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 bool paintOffsetChanged(const LayoutPoint& newPaintOffset) const |
| 1142 { |
| 1143 ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); |
| 1144 return m_previousPositionFromPaintInvalidationBacking != uninitializedPa
intOffset() && m_previousPositionFromPaintInvalidationBacking != newPaintOffset; |
| 1145 } |
| 1146 void setPreviousPaintOffset(const LayoutPoint& paintOffset) const |
| 1147 { |
| 1148 ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); |
| 1149 m_previousPositionFromPaintInvalidationBacking = 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 #if ENABLE(ASSERT) | 1400 #if ENABLE(ASSERT) |
1390 void checkBlockPositionedObjectsNeedLayout(); | 1401 void checkBlockPositionedObjectsNeedLayout(); |
1391 #endif | 1402 #endif |
1392 | 1403 |
1393 bool isTextOrSVGChild() const { return isText() || (isSVG() && !isSVGRoot())
; } | 1404 bool isTextOrSVGChild() const { return isText() || (isSVG() && !isSVGRoot())
; } |
1394 | 1405 |
1395 static bool isAllowedToModifyLayoutTreeStructure(Document&); | 1406 static bool isAllowedToModifyLayoutTreeStructure(Document&); |
1396 | 1407 |
1397 const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRec
t&) const; | 1408 const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRec
t&) const; |
1398 | 1409 |
| 1410 static LayoutPoint uninitializedPaintOffset() { return LayoutPoint(LayoutUni
t::max(), LayoutUnit::max()); } |
| 1411 |
1399 RefPtr<ComputedStyle> m_style; | 1412 RefPtr<ComputedStyle> m_style; |
1400 | 1413 |
1401 // Oilpan: raw pointer back to the owning Node is considered safe. | 1414 // Oilpan: raw pointer back to the owning Node is considered safe. |
1402 GC_PLUGIN_IGNORE("http://crbug.com/509911") | 1415 GC_PLUGIN_IGNORE("http://crbug.com/509911") |
1403 Node* m_node; | 1416 Node* m_node; |
1404 | 1417 |
1405 LayoutObject* m_parent; | 1418 LayoutObject* m_parent; |
1406 LayoutObject* m_previous; | 1419 LayoutObject* m_previous; |
1407 LayoutObject* m_next; | 1420 LayoutObject* m_next; |
1408 | 1421 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1634 // Store state between styleWillChange and styleDidChange | 1647 // Store state between styleWillChange and styleDidChange |
1635 static bool s_affectsParentBlock; | 1648 static bool s_affectsParentBlock; |
1636 | 1649 |
1637 // This stores the paint invalidation rect from the previous frame. This rec
t does *not* account for composited scrolling. See | 1650 // This stores the paint invalidation rect from the previous frame. This rec
t does *not* account for composited scrolling. See |
1638 // adjustInvalidationRectForCompositedScrolling(). | 1651 // adjustInvalidationRectForCompositedScrolling(). |
1639 LayoutRect m_previousPaintInvalidationRect; | 1652 LayoutRect m_previousPaintInvalidationRect; |
1640 | 1653 |
1641 // This stores the position in the paint invalidation backing's coordinate. | 1654 // This stores the position in the paint invalidation backing's coordinate. |
1642 // It is used to detect layoutObject shifts that forces a full invalidation. | 1655 // It is used to detect layoutObject shifts that forces a full invalidation. |
1643 // This point does *not* account for composited scrolling. See adjustInvalid
ationRectForCompositedScrolling(). | 1656 // This point does *not* account for composited scrolling. See adjustInvalid
ationRectForCompositedScrolling(). |
1644 LayoutPoint m_previousPositionFromPaintInvalidationBacking; | 1657 // For slimmingPaintOffsetCaching, this stores the previous paint offset. |
| 1658 // TODO(wangxianzhu): Rename this to m_previousPaintOffset when we enable sl
immingPaintOffsetCaching. |
| 1659 // TODO(wangxianzhu): Better mutation control for painting. |
| 1660 mutable LayoutPoint m_previousPositionFromPaintInvalidationBacking; |
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 |