| 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 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1574 // container (*not* the graphics layer that paints this object). | 1574 // container (*not* the graphics layer that paints this object). |
| 1575 LayoutRect previousVisualRectIncludingCompositedScrolling( | 1575 LayoutRect previousVisualRectIncludingCompositedScrolling( |
| 1576 const LayoutBoxModelObject& paintInvalidationContainer) const; | 1576 const LayoutBoxModelObject& paintInvalidationContainer) const; |
| 1577 | 1577 |
| 1578 // The returned rect does *not* account for composited scrolling. | 1578 // The returned rect does *not* account for composited scrolling. |
| 1579 const LayoutRect& previousVisualRect() const { return m_previousVisualRect; } | 1579 const LayoutRect& previousVisualRect() const { return m_previousVisualRect; } |
| 1580 | 1580 |
| 1581 // Called when the previous visual rect(s) is no longer valid. | 1581 // Called when the previous visual rect(s) is no longer valid. |
| 1582 virtual void clearPreviousVisualRects(); | 1582 virtual void clearPreviousVisualRects(); |
| 1583 | 1583 |
| 1584 const LayoutPoint& previousPaintOffset() const { | 1584 const LayoutPoint& paintOffset() const { return m_paintOffset; } |
| 1585 return m_previousPaintOffset; | |
| 1586 } | |
| 1587 | 1585 |
| 1588 PaintInvalidationReason fullPaintInvalidationReason() const { | 1586 PaintInvalidationReason fullPaintInvalidationReason() const { |
| 1589 return m_bitfields.fullPaintInvalidationReason(); | 1587 return m_bitfields.fullPaintInvalidationReason(); |
| 1590 } | 1588 } |
| 1591 bool shouldDoFullPaintInvalidation() const { | 1589 bool shouldDoFullPaintInvalidation() const { |
| 1592 return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; | 1590 return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; |
| 1593 } | 1591 } |
| 1594 void setShouldDoFullPaintInvalidation( | 1592 void setShouldDoFullPaintInvalidation( |
| 1595 PaintInvalidationReason = PaintInvalidationFull); | 1593 PaintInvalidationReason = PaintInvalidationFull); |
| 1596 void clearShouldDoFullPaintInvalidation() { | 1594 void clearShouldDoFullPaintInvalidation() { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1675 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { | 1673 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { |
| 1676 m_layoutObject.setShouldDoFullPaintInvalidation(reason); | 1674 m_layoutObject.setShouldDoFullPaintInvalidation(reason); |
| 1677 } | 1675 } |
| 1678 void setBackgroundChangedSinceLastPaintInvalidation() { | 1676 void setBackgroundChangedSinceLastPaintInvalidation() { |
| 1679 m_layoutObject.setBackgroundChangedSinceLastPaintInvalidation(); | 1677 m_layoutObject.setBackgroundChangedSinceLastPaintInvalidation(); |
| 1680 } | 1678 } |
| 1681 void ensureIsReadyForPaintInvalidation() { | 1679 void ensureIsReadyForPaintInvalidation() { |
| 1682 m_layoutObject.ensureIsReadyForPaintInvalidation(); | 1680 m_layoutObject.ensureIsReadyForPaintInvalidation(); |
| 1683 } | 1681 } |
| 1684 | 1682 |
| 1683 // The following setters store the current values as calculated during the |
| 1684 // pre-paint tree walk. TODO(wangxianzhu): Add check of lifecycle states. |
| 1685 void setPreviousVisualRect(const LayoutRect& r) { | 1685 void setPreviousVisualRect(const LayoutRect& r) { |
| 1686 m_layoutObject.setPreviousVisualRect(r); | 1686 m_layoutObject.setPreviousVisualRect(r); |
| 1687 } | 1687 } |
| 1688 void setPreviousPaintOffset(const LayoutPoint& p) { | 1688 void setPaintOffset(const LayoutPoint& p) { |
| 1689 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | 1689 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| 1690 m_layoutObject.m_previousPaintOffset = p; | 1690 DCHECK_EQ(m_layoutObject.document().lifecycle().state(), |
| 1691 DocumentLifecycle::InPrePaint); |
| 1692 m_layoutObject.m_paintOffset = p; |
| 1691 } | 1693 } |
| 1692 void setHasPreviousLocationInBacking(bool b) { | 1694 void setHasPreviousLocationInBacking(bool b) { |
| 1693 m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); | 1695 m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); |
| 1694 } | 1696 } |
| 1695 void setHasPreviousSelectionVisualRect(bool b) { | 1697 void setHasPreviousSelectionVisualRect(bool b) { |
| 1696 m_layoutObject.m_bitfields.setHasPreviousSelectionVisualRect(b); | 1698 m_layoutObject.m_bitfields.setHasPreviousSelectionVisualRect(b); |
| 1697 } | 1699 } |
| 1698 void setHasPreviousBoxGeometries(bool b) { | 1700 void setHasPreviousBoxGeometries(bool b) { |
| 1699 m_layoutObject.m_bitfields.setHasPreviousBoxGeometries(b); | 1701 m_layoutObject.m_bitfields.setHasPreviousBoxGeometries(b); |
| 1700 } | 1702 } |
| 1701 void setPreviousBackgroundObscured(bool b) { | 1703 void setPreviousBackgroundObscured(bool b) { |
| 1702 m_layoutObject.setPreviousBackgroundObscured(b); | 1704 m_layoutObject.setPreviousBackgroundObscured(b); |
| 1703 } | 1705 } |
| 1706 |
| 1704 void clearPreviousVisualRects() { | 1707 void clearPreviousVisualRects() { |
| 1705 m_layoutObject.clearPreviousVisualRects(); | 1708 m_layoutObject.clearPreviousVisualRects(); |
| 1706 } | 1709 } |
| 1707 void setNeedsPaintPropertyUpdate() { | 1710 void setNeedsPaintPropertyUpdate() { |
| 1708 m_layoutObject.setNeedsPaintPropertyUpdate(); | 1711 m_layoutObject.setNeedsPaintPropertyUpdate(); |
| 1709 } | 1712 } |
| 1710 #if DCHECK_IS_ON() | 1713 #if DCHECK_IS_ON() |
| 1711 // Same as setNeedsPaintPropertyUpdate() but does not mark ancestors as | 1714 // Same as setNeedsPaintPropertyUpdate() but does not mark ancestors as |
| 1712 // having a descendant needing a paint property update. | 1715 // having a descendant needing a paint property update. |
| 1713 void setOnlyThisNeedsPaintPropertyUpdateForTesting() { | 1716 void setOnlyThisNeedsPaintPropertyUpdateForTesting() { |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 // This stores the visual rect computed by the latest paint invalidation. | 2447 // This stores the visual rect computed by the latest paint invalidation. |
| 2445 // This rect does *not* account for composited scrolling. See | 2448 // This rect does *not* account for composited scrolling. See |
| 2446 // adjustVisualRectForCompositedScrolling(). | 2449 // adjustVisualRectForCompositedScrolling(). |
| 2447 LayoutRect m_previousVisualRect; | 2450 LayoutRect m_previousVisualRect; |
| 2448 | 2451 |
| 2449 // This stores the paint offset computed by the latest paint property tree | 2452 // This stores the paint offset computed by the latest paint property tree |
| 2450 // building. It is relative to the containing transform space. It is the same | 2453 // building. It is relative to the containing transform space. It is the same |
| 2451 // offset that will be used to paint the object on SPv2. It's used to detect | 2454 // offset that will be used to paint the object on SPv2. It's used to detect |
| 2452 // paint offset change for paint invalidation on SPv2, and partial paint | 2455 // paint offset change for paint invalidation on SPv2, and partial paint |
| 2453 // property tree update for SlimmingPaintInvalidation on SPv1 and SPv2. | 2456 // property tree update for SlimmingPaintInvalidation on SPv1 and SPv2. |
| 2454 LayoutPoint m_previousPaintOffset; | 2457 LayoutPoint m_paintOffset; |
| 2455 | 2458 |
| 2456 // For SPv2 only. The ObjectPaintProperties structure holds references to the | 2459 // For SPv2 only. The ObjectPaintProperties structure holds references to the |
| 2457 // property tree nodes that are created by the layout object for painting. | 2460 // property tree nodes that are created by the layout object for painting. |
| 2458 std::unique_ptr<ObjectPaintProperties> m_paintProperties; | 2461 std::unique_ptr<ObjectPaintProperties> m_paintProperties; |
| 2459 }; | 2462 }; |
| 2460 | 2463 |
| 2461 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer | 2464 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer |
| 2462 // hit. | 2465 // hit. |
| 2463 class DeprecatedDisableModifyLayoutTreeStructureAsserts { | 2466 class DeprecatedDisableModifyLayoutTreeStructureAsserts { |
| 2464 STACK_ALLOCATED(); | 2467 STACK_ALLOCATED(); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2676 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2679 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
| 2677 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2680 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
| 2678 // We don't make object2 an optional parameter so that showLayoutTree | 2681 // We don't make object2 an optional parameter so that showLayoutTree |
| 2679 // can be called from gdb easily. | 2682 // can be called from gdb easily. |
| 2680 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2683 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
| 2681 const blink::LayoutObject* object2); | 2684 const blink::LayoutObject* object2); |
| 2682 | 2685 |
| 2683 #endif | 2686 #endif |
| 2684 | 2687 |
| 2685 #endif // LayoutObject_h | 2688 #endif // LayoutObject_h |
| OLD | NEW |