| 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 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1284 | 1284 |
| 1285 // Called when the previous paint invalidation rect(s) is no longer valid. | 1285 // Called when the previous paint invalidation rect(s) is no longer valid. |
| 1286 virtual void clearPreviousPaintInvalidationRects(); | 1286 virtual void clearPreviousPaintInvalidationRects(); |
| 1287 | 1287 |
| 1288 // Only adjusts if the paint invalidation container is not a composited scro
ller. | 1288 // Only adjusts if the paint invalidation container is not a composited scro
ller. |
| 1289 void adjustPreviousPaintInvalidationForScrollIfNeeded(const DoubleSize& scro
llDelta); | 1289 void adjustPreviousPaintInvalidationForScrollIfNeeded(const DoubleSize& scro
llDelta); |
| 1290 | 1290 |
| 1291 // The previous position of the top-left corner of the object in its previou
s paint backing. | 1291 // The previous position of the top-left corner of the object in its previou
s paint backing. |
| 1292 const LayoutPoint& previousPositionFromPaintInvalidationBacking() const | 1292 const LayoutPoint& previousPositionFromPaintInvalidationBacking() const |
| 1293 { | 1293 { |
| 1294 ASSERT(!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); | 1294 ASSERT(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| 1295 return m_previousPositionFromPaintInvalidationBacking; | 1295 return m_previousPositionFromPaintInvalidationBacking; |
| 1296 } | 1296 } |
| 1297 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& posi
tionFromPaintInvalidationBacking) | 1297 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& posi
tionFromPaintInvalidationBacking) |
| 1298 { | 1298 { |
| 1299 ASSERT(!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); | 1299 ASSERT(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| 1300 m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvali
dationBacking; | 1300 m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvali
dationBacking; |
| 1301 } | 1301 } |
| 1302 | 1302 |
| 1303 bool paintOffsetChanged(const LayoutPoint& newPaintOffset) const | 1303 bool paintOffsetChanged(const LayoutPoint& newPaintOffset) const |
| 1304 { | 1304 { |
| 1305 ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); | 1305 ASSERT(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| 1306 return m_previousPositionFromPaintInvalidationBacking != uninitializedPa
intOffset() && m_previousPositionFromPaintInvalidationBacking != newPaintOffset; | 1306 return m_previousPositionFromPaintInvalidationBacking != uninitializedPa
intOffset() && m_previousPositionFromPaintInvalidationBacking != newPaintOffset; |
| 1307 } | 1307 } |
| 1308 void setPreviousPaintOffset(const LayoutPoint& paintOffset) | 1308 void setPreviousPaintOffset(const LayoutPoint& paintOffset) |
| 1309 { | 1309 { |
| 1310 ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); | 1310 ASSERT(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| 1311 m_previousPositionFromPaintInvalidationBacking = paintOffset; | 1311 m_previousPositionFromPaintInvalidationBacking = paintOffset; |
| 1312 } | 1312 } |
| 1313 | 1313 |
| 1314 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi
elds.fullPaintInvalidationReason(); } | 1314 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi
elds.fullPaintInvalidationReason(); } |
| 1315 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv
alidationReason() != PaintInvalidationNone; } | 1315 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv
alidationReason() != PaintInvalidationNone; } |
| 1316 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid
ationFull); | 1316 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid
ationFull); |
| 1317 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida
tionReason(PaintInvalidationNone); } | 1317 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida
tionReason(PaintInvalidationNone); } |
| 1318 | 1318 |
| 1319 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv
alidateOverflowForPaint(); } | 1319 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv
alidateOverflowForPaint(); } |
| 1320 | 1320 |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1901 // Store state between styleWillChange and styleDidChange | 1901 // Store state between styleWillChange and styleDidChange |
| 1902 static bool s_affectsParentBlock; | 1902 static bool s_affectsParentBlock; |
| 1903 | 1903 |
| 1904 // This stores the paint invalidation rect from the previous frame. This rec
t does *not* account for composited scrolling. See | 1904 // This stores the paint invalidation rect from the previous frame. This rec
t does *not* account for composited scrolling. See |
| 1905 // adjustInvalidationRectForCompositedScrolling(). | 1905 // adjustInvalidationRectForCompositedScrolling(). |
| 1906 LayoutRect m_previousPaintInvalidationRect; | 1906 LayoutRect m_previousPaintInvalidationRect; |
| 1907 | 1907 |
| 1908 // This stores the position in the paint invalidation backing's coordinate. | 1908 // This stores the position in the paint invalidation backing's coordinate. |
| 1909 // It is used to detect layoutObject shifts that forces a full invalidation. | 1909 // It is used to detect layoutObject shifts that forces a full invalidation. |
| 1910 // This point does *not* account for composited scrolling. See adjustInvalid
ationRectForCompositedScrolling(). | 1910 // This point does *not* account for composited scrolling. See adjustInvalid
ationRectForCompositedScrolling(). |
| 1911 // For slimmingPaintOffsetCaching, this stores the previous paint offset. | 1911 // For slimmingPaintInvalidation, this stores the previous paint offset. |
| 1912 // TODO(wangxianzhu): Rename this to m_previousPaintOffset when we enable sl
immingPaintOffsetCaching. | 1912 // TODO(wangxianzhu): Rename this to m_previousPaintOffset when we enable sl
immingPaintInvalidation. |
| 1913 LayoutPoint m_previousPositionFromPaintInvalidationBacking; | 1913 LayoutPoint m_previousPositionFromPaintInvalidationBacking; |
| 1914 }; | 1914 }; |
| 1915 | 1915 |
| 1916 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer hit
. | 1916 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer hit
. |
| 1917 class DeprecatedDisableModifyLayoutTreeStructureAsserts { | 1917 class DeprecatedDisableModifyLayoutTreeStructureAsserts { |
| 1918 STACK_ALLOCATED(); | 1918 STACK_ALLOCATED(); |
| 1919 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyLayoutTreeStructureAsserts); | 1919 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyLayoutTreeStructureAsserts); |
| 1920 public: | 1920 public: |
| 1921 DeprecatedDisableModifyLayoutTreeStructureAsserts(); | 1921 DeprecatedDisableModifyLayoutTreeStructureAsserts(); |
| 1922 | 1922 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2142 void showTree(const blink::LayoutObject*); | 2142 void showTree(const blink::LayoutObject*); |
| 2143 void showLineTree(const blink::LayoutObject*); | 2143 void showLineTree(const blink::LayoutObject*); |
| 2144 void showLayoutTree(const blink::LayoutObject* object1); | 2144 void showLayoutTree(const blink::LayoutObject* object1); |
| 2145 // We don't make object2 an optional parameter so that showLayoutTree | 2145 // We don't make object2 an optional parameter so that showLayoutTree |
| 2146 // can be called from gdb easily. | 2146 // can be called from gdb easily. |
| 2147 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2147 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
| 2148 | 2148 |
| 2149 #endif | 2149 #endif |
| 2150 | 2150 |
| 2151 #endif // LayoutObject_h | 2151 #endif // LayoutObject_h |
| OLD | NEW |