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 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 DCHECK_EQ(m_layoutObject.document().lifecycle().state(), | 1736 DCHECK_EQ(m_layoutObject.document().lifecycle().state(), |
1737 DocumentLifecycle::InPrePaint); | 1737 DocumentLifecycle::InPrePaint); |
1738 m_layoutObject.m_paintOffset = p; | 1738 m_layoutObject.m_paintOffset = p; |
1739 } | 1739 } |
1740 void setHasPreviousLocationInBacking(bool b) { | 1740 void setHasPreviousLocationInBacking(bool b) { |
1741 m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); | 1741 m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); |
1742 } | 1742 } |
1743 void setHasPreviousSelectionVisualRect(bool b) { | 1743 void setHasPreviousSelectionVisualRect(bool b) { |
1744 m_layoutObject.m_bitfields.setHasPreviousSelectionVisualRect(b); | 1744 m_layoutObject.m_bitfields.setHasPreviousSelectionVisualRect(b); |
1745 } | 1745 } |
1746 void setHasPreviousBoxGeometries(bool b) { | |
1747 m_layoutObject.m_bitfields.setHasPreviousBoxGeometries(b); | |
1748 } | |
1749 void setPreviousBackgroundObscured(bool b) { | 1746 void setPreviousBackgroundObscured(bool b) { |
1750 m_layoutObject.setPreviousBackgroundObscured(b); | 1747 m_layoutObject.setPreviousBackgroundObscured(b); |
1751 } | 1748 } |
1752 void updatePreviousOutlineMayBeAffectedByDescendants() { | 1749 void updatePreviousOutlineMayBeAffectedByDescendants() { |
1753 m_layoutObject.setPreviousOutlineMayBeAffectedByDescendants( | 1750 m_layoutObject.setPreviousOutlineMayBeAffectedByDescendants( |
1754 m_layoutObject.outlineMayBeAffectedByDescendants()); | 1751 m_layoutObject.outlineMayBeAffectedByDescendants()); |
1755 } | 1752 } |
1756 | 1753 |
1757 void clearPreviousVisualRects() { | 1754 void clearPreviousVisualRects() { |
1758 m_layoutObject.clearPreviousVisualRects(); | 1755 m_layoutObject.clearPreviousVisualRects(); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 } | 1855 } |
1859 | 1856 |
1860 // Paint invalidators will access the internal global map storing the data | 1857 // Paint invalidators will access the internal global map storing the data |
1861 // only when the flag is set, to avoid unnecessary map lookups. | 1858 // only when the flag is set, to avoid unnecessary map lookups. |
1862 bool hasPreviousLocationInBacking() const { | 1859 bool hasPreviousLocationInBacking() const { |
1863 return m_bitfields.hasPreviousLocationInBacking(); | 1860 return m_bitfields.hasPreviousLocationInBacking(); |
1864 } | 1861 } |
1865 bool hasPreviousSelectionVisualRect() const { | 1862 bool hasPreviousSelectionVisualRect() const { |
1866 return m_bitfields.hasPreviousSelectionVisualRect(); | 1863 return m_bitfields.hasPreviousSelectionVisualRect(); |
1867 } | 1864 } |
1868 bool hasPreviousBoxGeometries() const { | |
1869 return m_bitfields.hasPreviousBoxGeometries(); | |
1870 } | |
1871 | 1865 |
1872 bool backgroundChangedSinceLastPaintInvalidation() const { | 1866 bool backgroundChangedSinceLastPaintInvalidation() const { |
1873 return m_bitfields.backgroundChangedSinceLastPaintInvalidation(); | 1867 return m_bitfields.backgroundChangedSinceLastPaintInvalidation(); |
1874 } | 1868 } |
1875 void setBackgroundChangedSinceLastPaintInvalidation() { | 1869 void setBackgroundChangedSinceLastPaintInvalidation() { |
1876 m_bitfields.setBackgroundChangedSinceLastPaintInvalidation(true); | 1870 m_bitfields.setBackgroundChangedSinceLastPaintInvalidation(true); |
1877 } | 1871 } |
1878 | 1872 |
1879 bool outlineMayBeAffectedByDescendants() const { | 1873 bool outlineMayBeAffectedByDescendants() const { |
1880 return m_bitfields.outlineMayBeAffectedByDescendants(); | 1874 return m_bitfields.outlineMayBeAffectedByDescendants(); |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2224 m_childrenInline(false), | 2218 m_childrenInline(false), |
2225 m_containsInlineWithOutlineAndContinuation(false), | 2219 m_containsInlineWithOutlineAndContinuation(false), |
2226 m_alwaysCreateLineBoxesForLayoutInline(false), | 2220 m_alwaysCreateLineBoxesForLayoutInline(false), |
2227 m_previousBackgroundObscured(false), | 2221 m_previousBackgroundObscured(false), |
2228 m_isBackgroundAttachmentFixedObject(false), | 2222 m_isBackgroundAttachmentFixedObject(false), |
2229 m_isScrollAnchorObject(false), | 2223 m_isScrollAnchorObject(false), |
2230 m_scrollAnchorDisablingStyleChanged(false), | 2224 m_scrollAnchorDisablingStyleChanged(false), |
2231 m_hasBoxDecorationBackground(false), | 2225 m_hasBoxDecorationBackground(false), |
2232 m_hasPreviousLocationInBacking(false), | 2226 m_hasPreviousLocationInBacking(false), |
2233 m_hasPreviousSelectionVisualRect(false), | 2227 m_hasPreviousSelectionVisualRect(false), |
2234 m_hasPreviousBoxGeometries(false), | |
2235 m_needsPaintPropertyUpdate(true), | 2228 m_needsPaintPropertyUpdate(true), |
2236 m_subtreeNeedsPaintPropertyUpdate(true), | 2229 m_subtreeNeedsPaintPropertyUpdate(true), |
2237 m_descendantNeedsPaintPropertyUpdate(true), | 2230 m_descendantNeedsPaintPropertyUpdate(true), |
2238 m_backgroundChangedSinceLastPaintInvalidation(false), | 2231 m_backgroundChangedSinceLastPaintInvalidation(false), |
2239 m_outlineMayBeAffectedByDescendants(false), | 2232 m_outlineMayBeAffectedByDescendants(false), |
2240 m_previousOutlineMayBeAffectedByDescendants(false), | 2233 m_previousOutlineMayBeAffectedByDescendants(false), |
2241 m_positionedState(IsStaticallyPositioned), | 2234 m_positionedState(IsStaticallyPositioned), |
2242 m_selectionState(SelectionNone), | 2235 m_selectionState(SelectionNone), |
2243 m_backgroundObscurationState(BackgroundObscurationStatusInvalid), | 2236 m_backgroundObscurationState(BackgroundObscurationStatusInvalid), |
2244 m_fullPaintInvalidationReason(PaintInvalidationNone) {} | 2237 m_fullPaintInvalidationReason(PaintInvalidationNone) {} |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2397 ADD_BOOLEAN_BITFIELD(scrollAnchorDisablingStyleChanged, | 2390 ADD_BOOLEAN_BITFIELD(scrollAnchorDisablingStyleChanged, |
2398 ScrollAnchorDisablingStyleChanged); | 2391 ScrollAnchorDisablingStyleChanged); |
2399 | 2392 |
2400 ADD_BOOLEAN_BITFIELD(hasBoxDecorationBackground, | 2393 ADD_BOOLEAN_BITFIELD(hasBoxDecorationBackground, |
2401 HasBoxDecorationBackground); | 2394 HasBoxDecorationBackground); |
2402 | 2395 |
2403 ADD_BOOLEAN_BITFIELD(hasPreviousLocationInBacking, | 2396 ADD_BOOLEAN_BITFIELD(hasPreviousLocationInBacking, |
2404 HasPreviousLocationInBacking); | 2397 HasPreviousLocationInBacking); |
2405 ADD_BOOLEAN_BITFIELD(hasPreviousSelectionVisualRect, | 2398 ADD_BOOLEAN_BITFIELD(hasPreviousSelectionVisualRect, |
2406 HasPreviousSelectionVisualRect); | 2399 HasPreviousSelectionVisualRect); |
2407 ADD_BOOLEAN_BITFIELD(hasPreviousBoxGeometries, HasPreviousBoxGeometries); | |
2408 | 2400 |
2409 // Whether the paint properties need to be updated. For more details, see | 2401 // Whether the paint properties need to be updated. For more details, see |
2410 // LayoutObject::needsPaintPropertyUpdate(). | 2402 // LayoutObject::needsPaintPropertyUpdate(). |
2411 ADD_BOOLEAN_BITFIELD(needsPaintPropertyUpdate, NeedsPaintPropertyUpdate); | 2403 ADD_BOOLEAN_BITFIELD(needsPaintPropertyUpdate, NeedsPaintPropertyUpdate); |
2412 // Whether paint properties of the whole subtree need to be updated. | 2404 // Whether paint properties of the whole subtree need to be updated. |
2413 ADD_BOOLEAN_BITFIELD(subtreeNeedsPaintPropertyUpdate, | 2405 ADD_BOOLEAN_BITFIELD(subtreeNeedsPaintPropertyUpdate, |
2414 SubtreeNeedsPaintPropertyUpdate) | 2406 SubtreeNeedsPaintPropertyUpdate) |
2415 // Whether the paint properties of a descendant need to be updated. For more | 2407 // Whether the paint properties of a descendant need to be updated. For more |
2416 // details, see LayoutObject::descendantNeedsPaintPropertyUpdate(). | 2408 // details, see LayoutObject::descendantNeedsPaintPropertyUpdate(). |
2417 ADD_BOOLEAN_BITFIELD(descendantNeedsPaintPropertyUpdate, | 2409 ADD_BOOLEAN_BITFIELD(descendantNeedsPaintPropertyUpdate, |
2418 DescendantNeedsPaintPropertyUpdate); | 2410 DescendantNeedsPaintPropertyUpdate); |
2419 | 2411 |
2420 ADD_BOOLEAN_BITFIELD(backgroundChangedSinceLastPaintInvalidation, | 2412 ADD_BOOLEAN_BITFIELD(backgroundChangedSinceLastPaintInvalidation, |
2421 BackgroundChangedSinceLastPaintInvalidation); | 2413 BackgroundChangedSinceLastPaintInvalidation); |
2422 | 2414 |
2423 // Whether shape of outline may be affected by any descendants. This is | 2415 // Whether shape of outline may be affected by any descendants. This is |
2424 // updated before paint invalidation, checked during paint invalidation. | 2416 // updated before paint invalidation, checked during paint invalidation. |
2425 ADD_BOOLEAN_BITFIELD(outlineMayBeAffectedByDescendants, | 2417 ADD_BOOLEAN_BITFIELD(outlineMayBeAffectedByDescendants, |
2426 OutlineMayBeAffectedByDescendants); | 2418 OutlineMayBeAffectedByDescendants); |
2427 // The outlineMayBeAffectedByDescendants status of the last paint | 2419 // The outlineMayBeAffectedByDescendants status of the last paint |
2428 // invalidation. | 2420 // invalidation. |
2429 ADD_BOOLEAN_BITFIELD(previousOutlineMayBeAffectedByDescendants, | 2421 ADD_BOOLEAN_BITFIELD(previousOutlineMayBeAffectedByDescendants, |
2430 PreviousOutlineMayBeAffectedByDescendants); | 2422 PreviousOutlineMayBeAffectedByDescendants); |
2431 | 2423 |
2432 protected: | 2424 protected: |
2433 // Use protected to avoid warning about unused variable. | 2425 // Use protected to avoid warning about unused variable. |
2434 unsigned m_unusedBits : 4; | 2426 unsigned m_unusedBits : 5; |
2435 | 2427 |
2436 private: | 2428 private: |
2437 // This is the cached 'position' value of this object | 2429 // This is the cached 'position' value of this object |
2438 // (see ComputedStyle::position). | 2430 // (see ComputedStyle::position). |
2439 unsigned m_positionedState : 2; // PositionedState | 2431 unsigned m_positionedState : 2; // PositionedState |
2440 unsigned m_selectionState : 3; // SelectionState | 2432 unsigned m_selectionState : 3; // SelectionState |
2441 // Mutable for getter which lazily update this field. | 2433 // Mutable for getter which lazily update this field. |
2442 mutable unsigned | 2434 mutable unsigned |
2443 m_backgroundObscurationState : 2; // BackgroundObscurationState | 2435 m_backgroundObscurationState : 2; // BackgroundObscurationState |
2444 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason | 2436 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2774 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2766 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
2775 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2767 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
2776 // We don't make object2 an optional parameter so that showLayoutTree | 2768 // We don't make object2 an optional parameter so that showLayoutTree |
2777 // can be called from gdb easily. | 2769 // can be called from gdb easily. |
2778 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2770 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
2779 const blink::LayoutObject* object2); | 2771 const blink::LayoutObject* object2); |
2780 | 2772 |
2781 #endif | 2773 #endif |
2782 | 2774 |
2783 #endif // LayoutObject_h | 2775 #endif // LayoutObject_h |
OLD | NEW |