| 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. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1577 // container (*not* the graphics layer that paints this object). | 1577 // container (*not* the graphics layer that paints this object). |
| 1578 LayoutRect previousVisualRectIncludingCompositedScrolling( | 1578 LayoutRect previousVisualRectIncludingCompositedScrolling( |
| 1579 const LayoutBoxModelObject& paintInvalidationContainer) const; | 1579 const LayoutBoxModelObject& paintInvalidationContainer) const; |
| 1580 | 1580 |
| 1581 // The returned rect does *not* account for composited scrolling. | 1581 // The returned rect does *not* account for composited scrolling. |
| 1582 const LayoutRect& previousVisualRect() const { return m_previousVisualRect; } | 1582 const LayoutRect& previousVisualRect() const { return m_previousVisualRect; } |
| 1583 | 1583 |
| 1584 // Called when the previous visual rect(s) is no longer valid. | 1584 // Called when the previous visual rect(s) is no longer valid. |
| 1585 virtual void clearPreviousVisualRects(); | 1585 virtual void clearPreviousVisualRects(); |
| 1586 | 1586 |
| 1587 const LayoutPoint& previousPaintOffset() const { |
| 1588 return m_previousPaintOffset; |
| 1589 } |
| 1590 |
| 1587 // Only adjusts if the paint invalidation container is not a composited | 1591 // Only adjusts if the paint invalidation container is not a composited |
| 1588 // scroller. | 1592 // scroller. |
| 1589 void adjustPreviousPaintInvalidationForScrollIfNeeded( | 1593 void adjustPreviousPaintInvalidationForScrollIfNeeded( |
| 1590 const DoubleSize& scrollDelta); | 1594 const DoubleSize& scrollDelta); |
| 1591 | 1595 |
| 1592 PaintInvalidationReason fullPaintInvalidationReason() const { | 1596 PaintInvalidationReason fullPaintInvalidationReason() const { |
| 1593 return m_bitfields.fullPaintInvalidationReason(); | 1597 return m_bitfields.fullPaintInvalidationReason(); |
| 1594 } | 1598 } |
| 1595 bool shouldDoFullPaintInvalidation() const { | 1599 bool shouldDoFullPaintInvalidation() const { |
| 1596 return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; | 1600 return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { | 1676 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { |
| 1673 m_layoutObject.setShouldDoFullPaintInvalidation(reason); | 1677 m_layoutObject.setShouldDoFullPaintInvalidation(reason); |
| 1674 } | 1678 } |
| 1675 void ensureIsReadyForPaintInvalidation() { | 1679 void ensureIsReadyForPaintInvalidation() { |
| 1676 m_layoutObject.ensureIsReadyForPaintInvalidation(); | 1680 m_layoutObject.ensureIsReadyForPaintInvalidation(); |
| 1677 } | 1681 } |
| 1678 | 1682 |
| 1679 void setPreviousVisualRect(const LayoutRect& r) { | 1683 void setPreviousVisualRect(const LayoutRect& r) { |
| 1680 m_layoutObject.setPreviousVisualRect(r); | 1684 m_layoutObject.setPreviousVisualRect(r); |
| 1681 } | 1685 } |
| 1686 void setPreviousPaintOffset(const LayoutPoint& p) { |
| 1687 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| 1688 m_layoutObject.m_previousPaintOffset = p; |
| 1689 } |
| 1682 void setHasPreviousLocationInBacking(bool b) { | 1690 void setHasPreviousLocationInBacking(bool b) { |
| 1683 m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); | 1691 m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); |
| 1684 } | 1692 } |
| 1685 void setPreviousBackgroundObscured(bool b) { | 1693 void setPreviousBackgroundObscured(bool b) { |
| 1686 m_layoutObject.setPreviousBackgroundObscured(b); | 1694 m_layoutObject.setPreviousBackgroundObscured(b); |
| 1687 } | 1695 } |
| 1688 void clearPreviousVisualRects() { | 1696 void clearPreviousVisualRects() { |
| 1689 m_layoutObject.clearPreviousVisualRects(); | 1697 m_layoutObject.clearPreviousVisualRects(); |
| 1690 } | 1698 } |
| 1691 protected: | 1699 protected: |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2336 m_bitfields.setSelfNeedsOverflowRecalcAfterStyleChange(true); | 2344 m_bitfields.setSelfNeedsOverflowRecalcAfterStyleChange(true); |
| 2337 } | 2345 } |
| 2338 void setChildNeedsOverflowRecalcAfterStyleChange() { | 2346 void setChildNeedsOverflowRecalcAfterStyleChange() { |
| 2339 m_bitfields.setChildNeedsOverflowRecalcAfterStyleChange(true); | 2347 m_bitfields.setChildNeedsOverflowRecalcAfterStyleChange(true); |
| 2340 } | 2348 } |
| 2341 | 2349 |
| 2342 private: | 2350 private: |
| 2343 // Store state between styleWillChange and styleDidChange | 2351 // Store state between styleWillChange and styleDidChange |
| 2344 static bool s_affectsParentBlock; | 2352 static bool s_affectsParentBlock; |
| 2345 | 2353 |
| 2346 // This stores the visual rect from the previous frame. This rect does *not* | 2354 // This stores the visual rect computed by the latest paint invalidation. |
| 2347 // account for composited scrolling. See | 2355 // This rect does *not* account for composited scrolling. See |
| 2348 // adjustVisualRectForCompositedScrolling(). | 2356 // adjustVisualRectForCompositedScrolling(). |
| 2349 LayoutRect m_previousVisualRect; | 2357 LayoutRect m_previousVisualRect; |
| 2358 |
| 2359 // This stores the paint offset computed by the latest paint property tree |
| 2360 // building. It is relative to the containing transform space. It is the same |
| 2361 // offset that will be used to paint the object on SPv2. It's used to detect |
| 2362 // paint offset change for paint invalidation on SPv2, and partial paint |
| 2363 // property tree update for SlimmingPaintInvalidation on SPv1 and SPv2. |
| 2364 LayoutPoint m_previousPaintOffset; |
| 2350 }; | 2365 }; |
| 2351 | 2366 |
| 2352 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer | 2367 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer |
| 2353 // hit. | 2368 // hit. |
| 2354 class DeprecatedDisableModifyLayoutTreeStructureAsserts { | 2369 class DeprecatedDisableModifyLayoutTreeStructureAsserts { |
| 2355 STACK_ALLOCATED(); | 2370 STACK_ALLOCATED(); |
| 2356 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyLayoutTreeStructureAsserts); | 2371 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyLayoutTreeStructureAsserts); |
| 2357 | 2372 |
| 2358 public: | 2373 public: |
| 2359 DeprecatedDisableModifyLayoutTreeStructureAsserts(); | 2374 DeprecatedDisableModifyLayoutTreeStructureAsserts(); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2561 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2576 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
| 2562 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2577 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
| 2563 // We don't make object2 an optional parameter so that showLayoutTree | 2578 // We don't make object2 an optional parameter so that showLayoutTree |
| 2564 // can be called from gdb easily. | 2579 // can be called from gdb easily. |
| 2565 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2580 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
| 2566 const blink::LayoutObject* object2); | 2581 const blink::LayoutObject* object2); |
| 2567 | 2582 |
| 2568 #endif | 2583 #endif |
| 2569 | 2584 |
| 2570 #endif // LayoutObject_h | 2585 #endif // LayoutObject_h |
| OLD | NEW |