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