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. | 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 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1568 // container (*not* the graphics layer that paints this object). | 1568 // container (*not* the graphics layer that paints this object). |
| 1569 LayoutRect previousVisualRectIncludingCompositedScrolling( | 1569 LayoutRect previousVisualRectIncludingCompositedScrolling( |
| 1570 const LayoutBoxModelObject& paintInvalidationContainer) const; | 1570 const LayoutBoxModelObject& paintInvalidationContainer) const; |
| 1571 | 1571 |
| 1572 // The returned rect does *not* account for composited scrolling. | 1572 // The returned rect does *not* account for composited scrolling. |
| 1573 const LayoutRect& previousVisualRect() const { return m_previousVisualRect; } | 1573 const LayoutRect& previousVisualRect() const { return m_previousVisualRect; } |
| 1574 | 1574 |
| 1575 // Called when the previous visual rect(s) is no longer valid. | 1575 // Called when the previous visual rect(s) is no longer valid. |
| 1576 virtual void clearPreviousVisualRects(); | 1576 virtual void clearPreviousVisualRects(); |
| 1577 | 1577 |
| 1578 const LayoutPoint& previousPaintOffset() const { | 1578 const LayoutPoint& paintOffset() const { return m_paintOffset; } |
| 1579 return m_previousPaintOffset; | |
| 1580 } | |
| 1581 | 1579 |
| 1582 PaintInvalidationReason fullPaintInvalidationReason() const { | 1580 PaintInvalidationReason fullPaintInvalidationReason() const { |
| 1583 return m_bitfields.fullPaintInvalidationReason(); | 1581 return m_bitfields.fullPaintInvalidationReason(); |
| 1584 } | 1582 } |
| 1585 bool shouldDoFullPaintInvalidation() const { | 1583 bool shouldDoFullPaintInvalidation() const { |
| 1586 return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; | 1584 return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; |
| 1587 } | 1585 } |
| 1588 void setShouldDoFullPaintInvalidation( | 1586 void setShouldDoFullPaintInvalidation( |
| 1589 PaintInvalidationReason = PaintInvalidationFull); | 1587 PaintInvalidationReason = PaintInvalidationFull); |
| 1590 void clearShouldDoFullPaintInvalidation() { | 1588 void clearShouldDoFullPaintInvalidation() { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1672 void setBackgroundChangedSinceLastPaintInvalidation() { | 1670 void setBackgroundChangedSinceLastPaintInvalidation() { |
| 1673 m_layoutObject.setBackgroundChangedSinceLastPaintInvalidation(); | 1671 m_layoutObject.setBackgroundChangedSinceLastPaintInvalidation(); |
| 1674 } | 1672 } |
| 1675 void ensureIsReadyForPaintInvalidation() { | 1673 void ensureIsReadyForPaintInvalidation() { |
| 1676 m_layoutObject.ensureIsReadyForPaintInvalidation(); | 1674 m_layoutObject.ensureIsReadyForPaintInvalidation(); |
| 1677 } | 1675 } |
| 1678 | 1676 |
| 1679 void setPreviousVisualRect(const LayoutRect& r) { | 1677 void setPreviousVisualRect(const LayoutRect& r) { |
| 1680 m_layoutObject.setPreviousVisualRect(r); | 1678 m_layoutObject.setPreviousVisualRect(r); |
| 1681 } | 1679 } |
| 1682 void setPreviousPaintOffset(const LayoutPoint& p) { | 1680 void setPaintOffset(const LayoutPoint& p) { |
|
Xianzhu
2017/01/06 17:24:39
Drop "Previous" because we also use paintOffset()
pdr.
2017/01/06 18:27:42
I like these renames.
Can you add a comment like
Xianzhu
2017/01/06 19:24:18
Done.
| |
| 1683 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | 1681 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| 1684 m_layoutObject.m_previousPaintOffset = p; | 1682 m_layoutObject.m_paintOffset = p; |
| 1685 } | 1683 } |
| 1686 void setHasPreviousLocationInBacking(bool b) { | 1684 void setHasPreviousLocationInBacking(bool b) { |
| 1687 m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); | 1685 m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); |
| 1688 } | 1686 } |
| 1689 void setHasPreviousSelectionVisualRect(bool b) { | 1687 void setHasPreviousSelectionVisualRect(bool b) { |
| 1690 m_layoutObject.m_bitfields.setHasPreviousSelectionVisualRect(b); | 1688 m_layoutObject.m_bitfields.setHasPreviousSelectionVisualRect(b); |
| 1691 } | 1689 } |
| 1692 void setHasPreviousBoxGeometries(bool b) { | 1690 void setHasPreviousBoxGeometries(bool b) { |
| 1693 m_layoutObject.m_bitfields.setHasPreviousBoxGeometries(b); | 1691 m_layoutObject.m_bitfields.setHasPreviousBoxGeometries(b); |
| 1694 } | 1692 } |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2435 // Store state between styleWillChange and styleDidChange | 2433 // Store state between styleWillChange and styleDidChange |
| 2436 static bool s_affectsParentBlock; | 2434 static bool s_affectsParentBlock; |
| 2437 | 2435 |
| 2438 // This stores the visual rect computed by the latest paint invalidation. | 2436 // This stores the visual rect computed by the latest paint invalidation. |
| 2439 // This rect does *not* account for composited scrolling. See | 2437 // This rect does *not* account for composited scrolling. See |
| 2440 // adjustVisualRectForCompositedScrolling(). | 2438 // adjustVisualRectForCompositedScrolling(). |
| 2441 LayoutRect m_previousVisualRect; | 2439 LayoutRect m_previousVisualRect; |
| 2442 | 2440 |
| 2443 // This stores the paint offset computed by the latest paint property tree | 2441 // This stores the paint offset computed by the latest paint property tree |
| 2444 // building. It is relative to the containing transform space. It is the same | 2442 // building. It is relative to the containing transform space. It is the same |
| 2445 // offset that will be used to paint the object on SPv2. It's used to detect | 2443 // offset that will be used to paint the object on SPv2. It's used to detect |
|
pdr.
2017/01/06 18:27:42
This comment is a little out of date. Can you upda
Xianzhu
2017/01/06 19:24:18
Can you point out the out of date part?
For paint
pdr.
2017/01/06 19:40:01
You're right, this is up to date.
| |
| 2446 // paint offset change for paint invalidation on SPv2, and partial paint | 2444 // paint offset change for paint invalidation on SPv2, and partial paint |
| 2447 // property tree update for SlimmingPaintInvalidation on SPv1 and SPv2. | 2445 // property tree update for SlimmingPaintInvalidation on SPv1 and SPv2. |
| 2448 LayoutPoint m_previousPaintOffset; | 2446 LayoutPoint m_paintOffset; |
| 2449 | 2447 |
| 2450 // For SPv2 only. The ObjectPaintProperties structure holds references to the | 2448 // For SPv2 only. The ObjectPaintProperties structure holds references to the |
| 2451 // property tree nodes that are created by the layout object for painting. | 2449 // property tree nodes that are created by the layout object for painting. |
| 2452 std::unique_ptr<ObjectPaintProperties> m_paintProperties; | 2450 std::unique_ptr<ObjectPaintProperties> m_paintProperties; |
| 2453 }; | 2451 }; |
| 2454 | 2452 |
| 2455 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer | 2453 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer |
| 2456 // hit. | 2454 // hit. |
| 2457 class DeprecatedDisableModifyLayoutTreeStructureAsserts { | 2455 class DeprecatedDisableModifyLayoutTreeStructureAsserts { |
| 2458 STACK_ALLOCATED(); | 2456 STACK_ALLOCATED(); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2670 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2668 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
| 2671 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2669 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
| 2672 // We don't make object2 an optional parameter so that showLayoutTree | 2670 // We don't make object2 an optional parameter so that showLayoutTree |
| 2673 // can be called from gdb easily. | 2671 // can be called from gdb easily. |
| 2674 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2672 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
| 2675 const blink::LayoutObject* object2); | 2673 const blink::LayoutObject* object2); |
| 2676 | 2674 |
| 2677 #endif | 2675 #endif |
| 2678 | 2676 |
| 2679 #endif // LayoutObject_h | 2677 #endif // LayoutObject_h |
| OLD | NEW |