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 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1591 // invalidation container (*not* the graphics layer that paints | 1591 // invalidation container (*not* the graphics layer that paints |
1592 // this object). | 1592 // this object). |
1593 LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling( | 1593 LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling( |
1594 const LayoutBoxModelObject& paintInvalidationContainer) const; | 1594 const LayoutBoxModelObject& paintInvalidationContainer) const; |
1595 | 1595 |
1596 // The returned rect does *not* account for composited scrolling. | 1596 // The returned rect does *not* account for composited scrolling. |
1597 const LayoutRect& previousPaintInvalidationRect() const { | 1597 const LayoutRect& previousPaintInvalidationRect() const { |
1598 return m_previousPaintInvalidationRect; | 1598 return m_previousPaintInvalidationRect; |
1599 } | 1599 } |
1600 | 1600 |
1601 // The previous paint invalidation rect may have been expanded to whole pixels | |
1602 // or be rotated, skewed, etc., so covers more pixels than the object covers. | |
1603 bool previousPaintInvalidationRectCoversExtraPixels() const { | |
pdr.
2016/10/26 05:25:12
I wonder if "*ExpandedForSnapping" would be more d
Xianzhu
2016/10/26 18:32:31
In next steps, the field will be also used for tra
| |
1604 return m_bitfields.previousPaintInvalidationRectCoversExtraPixels(); | |
1605 } | |
1606 | |
1601 // Called when the previous paint invalidation rect(s) is no longer valid. | 1607 // Called when the previous paint invalidation rect(s) is no longer valid. |
1602 virtual void clearPreviousPaintInvalidationRects(); | 1608 virtual void clearPreviousPaintInvalidationRects(); |
1603 | 1609 |
1604 // Only adjusts if the paint invalidation container is not a composited | 1610 // Only adjusts if the paint invalidation container is not a composited |
1605 // scroller. | 1611 // scroller. |
1606 void adjustPreviousPaintInvalidationForScrollIfNeeded( | 1612 void adjustPreviousPaintInvalidationForScrollIfNeeded( |
1607 const DoubleSize& scrollDelta); | 1613 const DoubleSize& scrollDelta); |
1608 | 1614 |
1609 // The previous position of the top-left corner of the object in its previous | 1615 // The previous position of the top-left corner of the object in its previous |
1610 // paint backing. | 1616 // paint backing. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1697 void clearPaintInvalidationFlags() { | 1703 void clearPaintInvalidationFlags() { |
1698 m_layoutObject.clearPaintInvalidationFlags(); | 1704 m_layoutObject.clearPaintInvalidationFlags(); |
1699 } | 1705 } |
1700 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { | 1706 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { |
1701 m_layoutObject.setShouldDoFullPaintInvalidation(reason); | 1707 m_layoutObject.setShouldDoFullPaintInvalidation(reason); |
1702 } | 1708 } |
1703 void ensureIsReadyForPaintInvalidation() { | 1709 void ensureIsReadyForPaintInvalidation() { |
1704 m_layoutObject.ensureIsReadyForPaintInvalidation(); | 1710 m_layoutObject.ensureIsReadyForPaintInvalidation(); |
1705 } | 1711 } |
1706 | 1712 |
1707 void setPreviousPaintInvalidationRect(const LayoutRect& r) { | 1713 void setPreviousPaintInvalidationRect(const LayoutRect& r, |
1714 bool coversExtraPixels) { | |
1708 m_layoutObject.setPreviousPaintInvalidationRect(r); | 1715 m_layoutObject.setPreviousPaintInvalidationRect(r); |
1716 m_layoutObject.m_bitfields | |
1717 .setPreviousPaintInvalidationRectCoversExtraPixels(coversExtraPixels); | |
1709 } | 1718 } |
1710 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& p) { | 1719 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& p) { |
1711 m_layoutObject.setPreviousPositionFromPaintInvalidationBacking(p); | 1720 m_layoutObject.setPreviousPositionFromPaintInvalidationBacking(p); |
1712 } | 1721 } |
1713 void setPreviousBackgroundObscured(bool b) { | 1722 void setPreviousBackgroundObscured(bool b) { |
1714 m_layoutObject.setPreviousBackgroundObscured(b); | 1723 m_layoutObject.setPreviousBackgroundObscured(b); |
1715 } | 1724 } |
1716 void clearPreviousPaintInvalidationRects() { | 1725 void clearPreviousPaintInvalidationRects() { |
1717 m_layoutObject.clearPreviousPaintInvalidationRects(); | 1726 m_layoutObject.clearPreviousPaintInvalidationRects(); |
1718 } | 1727 } |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2085 m_posChildNeedsLayout(false), | 2094 m_posChildNeedsLayout(false), |
2086 m_needsSimplifiedNormalFlowLayout(false), | 2095 m_needsSimplifiedNormalFlowLayout(false), |
2087 m_selfNeedsOverflowRecalcAfterStyleChange(false), | 2096 m_selfNeedsOverflowRecalcAfterStyleChange(false), |
2088 m_childNeedsOverflowRecalcAfterStyleChange(false), | 2097 m_childNeedsOverflowRecalcAfterStyleChange(false), |
2089 m_preferredLogicalWidthsDirty(false), | 2098 m_preferredLogicalWidthsDirty(false), |
2090 m_childShouldCheckForPaintInvalidation(false), | 2099 m_childShouldCheckForPaintInvalidation(false), |
2091 m_mayNeedPaintInvalidation(false), | 2100 m_mayNeedPaintInvalidation(false), |
2092 m_mayNeedPaintInvalidationSubtree(false), | 2101 m_mayNeedPaintInvalidationSubtree(false), |
2093 m_mayNeedPaintInvalidationAnimatedBackgroundImage(false), | 2102 m_mayNeedPaintInvalidationAnimatedBackgroundImage(false), |
2094 m_shouldInvalidateSelection(false), | 2103 m_shouldInvalidateSelection(false), |
2104 m_previousPaintInvalidationRectCoversExtraPixels(false), | |
2095 m_floating(false), | 2105 m_floating(false), |
2096 m_isAnonymous(!node), | 2106 m_isAnonymous(!node), |
2097 m_isText(false), | 2107 m_isText(false), |
2098 m_isBox(false), | 2108 m_isBox(false), |
2099 m_isInline(true), | 2109 m_isInline(true), |
2100 m_isAtomicInlineLevel(false), | 2110 m_isAtomicInlineLevel(false), |
2101 m_horizontalWritingMode(true), | 2111 m_horizontalWritingMode(true), |
2102 m_hasLayer(false), | 2112 m_hasLayer(false), |
2103 m_hasOverflowClip(false), | 2113 m_hasOverflowClip(false), |
2104 m_hasTransformRelatedProperty(false), | 2114 m_hasTransformRelatedProperty(false), |
(...skipping 11 matching lines...) Expand all Loading... | |
2116 m_previousBackgroundObscured(false), | 2126 m_previousBackgroundObscured(false), |
2117 m_isBackgroundAttachmentFixedObject(false), | 2127 m_isBackgroundAttachmentFixedObject(false), |
2118 m_isScrollAnchorObject(false), | 2128 m_isScrollAnchorObject(false), |
2119 m_scrollAnchorDisablingStyleChanged(false), | 2129 m_scrollAnchorDisablingStyleChanged(false), |
2120 m_hasBoxDecorationBackground(false), | 2130 m_hasBoxDecorationBackground(false), |
2121 m_positionedState(IsStaticallyPositioned), | 2131 m_positionedState(IsStaticallyPositioned), |
2122 m_selectionState(SelectionNone), | 2132 m_selectionState(SelectionNone), |
2123 m_backgroundObscurationState(BackgroundObscurationStatusInvalid), | 2133 m_backgroundObscurationState(BackgroundObscurationStatusInvalid), |
2124 m_fullPaintInvalidationReason(PaintInvalidationNone) {} | 2134 m_fullPaintInvalidationReason(PaintInvalidationNone) {} |
2125 | 2135 |
2126 // 32 bits have been used in the first word, and 19 in the second. | 2136 // 32 bits have been used in the first word, and 20 in the second. |
2127 | 2137 |
2128 // Self needs layout means that this layout object is marked for a full | 2138 // Self needs layout means that this layout object is marked for a full |
2129 // layout. This is the default layout but it is expensive as it recomputes | 2139 // layout. This is the default layout but it is expensive as it recomputes |
2130 // everything. For CSS boxes, this includes the width (laying out the line | 2140 // everything. For CSS boxes, this includes the width (laying out the line |
2131 // boxes again), the margins (due to block collapsing margins), the | 2141 // boxes again), the margins (due to block collapsing margins), the |
2132 // positions, the height and the potential overflow. | 2142 // positions, the height and the potential overflow. |
2133 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); | 2143 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); |
2134 | 2144 |
2135 // A positioned movement layout is a specialized type of layout used on | 2145 // A positioned movement layout is a specialized type of layout used on |
2136 // positioned objects that only visually moved. This layout is used when | 2146 // positioned objects that only visually moved. This layout is used when |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2184 | 2194 |
2185 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, | 2195 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, |
2186 ChildShouldCheckForPaintInvalidation); | 2196 ChildShouldCheckForPaintInvalidation); |
2187 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation); | 2197 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation); |
2188 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationSubtree, | 2198 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationSubtree, |
2189 MayNeedPaintInvalidationSubtree); | 2199 MayNeedPaintInvalidationSubtree); |
2190 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationAnimatedBackgroundImage, | 2200 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationAnimatedBackgroundImage, |
2191 MayNeedPaintInvalidationAnimatedBackgroundImage); | 2201 MayNeedPaintInvalidationAnimatedBackgroundImage); |
2192 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelection); | 2202 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelection); |
2193 | 2203 |
2204 ADD_BOOLEAN_BITFIELD(previousPaintInvalidationRectCoversExtraPixels, | |
2205 PreviousPaintInvalidationRectCoversExtraPixels); | |
2206 | |
2194 // This boolean is the cached value of 'float' | 2207 // This boolean is the cached value of 'float' |
2195 // (see ComputedStyle::isFloating). | 2208 // (see ComputedStyle::isFloating). |
2196 ADD_BOOLEAN_BITFIELD(floating, Floating); | 2209 ADD_BOOLEAN_BITFIELD(floating, Floating); |
2197 | 2210 |
2198 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); | 2211 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); |
2199 ADD_BOOLEAN_BITFIELD(isText, IsText); | 2212 ADD_BOOLEAN_BITFIELD(isText, IsText); |
2200 ADD_BOOLEAN_BITFIELD(isBox, IsBox); | 2213 ADD_BOOLEAN_BITFIELD(isBox, IsBox); |
2201 | 2214 |
2202 // This boolean represents whether the LayoutObject is 'inline-level' | 2215 // This boolean represents whether the LayoutObject is 'inline-level' |
2203 // (a CSS concept). Inline-level boxes are laid out inside a line. If | 2216 // (a CSS concept). Inline-level boxes are laid out inside a line. If |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2593 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2606 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
2594 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2607 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
2595 // We don't make object2 an optional parameter so that showLayoutTree | 2608 // We don't make object2 an optional parameter so that showLayoutTree |
2596 // can be called from gdb easily. | 2609 // can be called from gdb easily. |
2597 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2610 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
2598 const blink::LayoutObject* object2); | 2611 const blink::LayoutObject* object2); |
2599 | 2612 |
2600 #endif | 2613 #endif |
2601 | 2614 |
2602 #endif // LayoutObject_h | 2615 #endif // LayoutObject_h |
OLD | NEW |