Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 2707073002: Move PreviousBoxGeometries from BoxPaintInvalidator into LayoutBox::m_rareData (Closed)
Patch Set: uninline savePreviousOtherBoxGeometries() Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 m_childrenInline(false), 2216 m_childrenInline(false),
2223 m_containsInlineWithOutlineAndContinuation(false), 2217 m_containsInlineWithOutlineAndContinuation(false),
2224 m_alwaysCreateLineBoxesForLayoutInline(false), 2218 m_alwaysCreateLineBoxesForLayoutInline(false),
2225 m_previousBackgroundObscured(false), 2219 m_previousBackgroundObscured(false),
2226 m_isBackgroundAttachmentFixedObject(false), 2220 m_isBackgroundAttachmentFixedObject(false),
2227 m_isScrollAnchorObject(false), 2221 m_isScrollAnchorObject(false),
2228 m_scrollAnchorDisablingStyleChanged(false), 2222 m_scrollAnchorDisablingStyleChanged(false),
2229 m_hasBoxDecorationBackground(false), 2223 m_hasBoxDecorationBackground(false),
2230 m_hasPreviousLocationInBacking(false), 2224 m_hasPreviousLocationInBacking(false),
2231 m_hasPreviousSelectionVisualRect(false), 2225 m_hasPreviousSelectionVisualRect(false),
2232 m_hasPreviousBoxGeometries(false),
2233 m_needsPaintPropertyUpdate(true), 2226 m_needsPaintPropertyUpdate(true),
2234 m_subtreeNeedsPaintPropertyUpdate(true), 2227 m_subtreeNeedsPaintPropertyUpdate(true),
2235 m_descendantNeedsPaintPropertyUpdate(true), 2228 m_descendantNeedsPaintPropertyUpdate(true),
2236 m_backgroundChangedSinceLastPaintInvalidation(false), 2229 m_backgroundChangedSinceLastPaintInvalidation(false),
2237 m_outlineMayBeAffectedByDescendants(false), 2230 m_outlineMayBeAffectedByDescendants(false),
2238 m_previousOutlineMayBeAffectedByDescendants(false), 2231 m_previousOutlineMayBeAffectedByDescendants(false),
2239 m_positionedState(IsStaticallyPositioned), 2232 m_positionedState(IsStaticallyPositioned),
2240 m_selectionState(SelectionNone), 2233 m_selectionState(SelectionNone),
2241 m_backgroundObscurationState(BackgroundObscurationStatusInvalid), 2234 m_backgroundObscurationState(BackgroundObscurationStatusInvalid),
2242 m_fullPaintInvalidationReason(PaintInvalidationNone) {} 2235 m_fullPaintInvalidationReason(PaintInvalidationNone) {}
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 ADD_BOOLEAN_BITFIELD(scrollAnchorDisablingStyleChanged, 2388 ADD_BOOLEAN_BITFIELD(scrollAnchorDisablingStyleChanged,
2396 ScrollAnchorDisablingStyleChanged); 2389 ScrollAnchorDisablingStyleChanged);
2397 2390
2398 ADD_BOOLEAN_BITFIELD(hasBoxDecorationBackground, 2391 ADD_BOOLEAN_BITFIELD(hasBoxDecorationBackground,
2399 HasBoxDecorationBackground); 2392 HasBoxDecorationBackground);
2400 2393
2401 ADD_BOOLEAN_BITFIELD(hasPreviousLocationInBacking, 2394 ADD_BOOLEAN_BITFIELD(hasPreviousLocationInBacking,
2402 HasPreviousLocationInBacking); 2395 HasPreviousLocationInBacking);
2403 ADD_BOOLEAN_BITFIELD(hasPreviousSelectionVisualRect, 2396 ADD_BOOLEAN_BITFIELD(hasPreviousSelectionVisualRect,
2404 HasPreviousSelectionVisualRect); 2397 HasPreviousSelectionVisualRect);
2405 ADD_BOOLEAN_BITFIELD(hasPreviousBoxGeometries, HasPreviousBoxGeometries);
2406 2398
2407 // Whether the paint properties need to be updated. For more details, see 2399 // Whether the paint properties need to be updated. For more details, see
2408 // LayoutObject::needsPaintPropertyUpdate(). 2400 // LayoutObject::needsPaintPropertyUpdate().
2409 ADD_BOOLEAN_BITFIELD(needsPaintPropertyUpdate, NeedsPaintPropertyUpdate); 2401 ADD_BOOLEAN_BITFIELD(needsPaintPropertyUpdate, NeedsPaintPropertyUpdate);
2410 // Whether paint properties of the whole subtree need to be updated. 2402 // Whether paint properties of the whole subtree need to be updated.
2411 ADD_BOOLEAN_BITFIELD(subtreeNeedsPaintPropertyUpdate, 2403 ADD_BOOLEAN_BITFIELD(subtreeNeedsPaintPropertyUpdate,
2412 SubtreeNeedsPaintPropertyUpdate) 2404 SubtreeNeedsPaintPropertyUpdate)
2413 // Whether the paint properties of a descendant need to be updated. For more 2405 // Whether the paint properties of a descendant need to be updated. For more
2414 // details, see LayoutObject::descendantNeedsPaintPropertyUpdate(). 2406 // details, see LayoutObject::descendantNeedsPaintPropertyUpdate().
2415 ADD_BOOLEAN_BITFIELD(descendantNeedsPaintPropertyUpdate, 2407 ADD_BOOLEAN_BITFIELD(descendantNeedsPaintPropertyUpdate,
2416 DescendantNeedsPaintPropertyUpdate); 2408 DescendantNeedsPaintPropertyUpdate);
2417 2409
2418 ADD_BOOLEAN_BITFIELD(backgroundChangedSinceLastPaintInvalidation, 2410 ADD_BOOLEAN_BITFIELD(backgroundChangedSinceLastPaintInvalidation,
2419 BackgroundChangedSinceLastPaintInvalidation); 2411 BackgroundChangedSinceLastPaintInvalidation);
2420 2412
2421 // Whether shape of outline may be affected by any descendants. This is 2413 // Whether shape of outline may be affected by any descendants. This is
2422 // updated before paint invalidation, checked during paint invalidation. 2414 // updated before paint invalidation, checked during paint invalidation.
2423 ADD_BOOLEAN_BITFIELD(outlineMayBeAffectedByDescendants, 2415 ADD_BOOLEAN_BITFIELD(outlineMayBeAffectedByDescendants,
2424 OutlineMayBeAffectedByDescendants); 2416 OutlineMayBeAffectedByDescendants);
2425 // The outlineMayBeAffectedByDescendants status of the last paint 2417 // The outlineMayBeAffectedByDescendants status of the last paint
2426 // invalidation. 2418 // invalidation.
2427 ADD_BOOLEAN_BITFIELD(previousOutlineMayBeAffectedByDescendants, 2419 ADD_BOOLEAN_BITFIELD(previousOutlineMayBeAffectedByDescendants,
2428 PreviousOutlineMayBeAffectedByDescendants); 2420 PreviousOutlineMayBeAffectedByDescendants);
2429 2421
2430 protected: 2422 protected:
2431 // Use protected to avoid warning about unused variable. 2423 // Use protected to avoid warning about unused variable.
2432 unsigned m_unusedBits : 4; 2424 unsigned m_unusedBits : 5;
2433 2425
2434 private: 2426 private:
2435 // This is the cached 'position' value of this object 2427 // This is the cached 'position' value of this object
2436 // (see ComputedStyle::position). 2428 // (see ComputedStyle::position).
2437 unsigned m_positionedState : 2; // PositionedState 2429 unsigned m_positionedState : 2; // PositionedState
2438 unsigned m_selectionState : 3; // SelectionState 2430 unsigned m_selectionState : 3; // SelectionState
2439 // Mutable for getter which lazily update this field. 2431 // Mutable for getter which lazily update this field.
2440 mutable unsigned 2432 mutable unsigned
2441 m_backgroundObscurationState : 2; // BackgroundObscurationState 2433 m_backgroundObscurationState : 2; // BackgroundObscurationState
2442 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason 2434 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 CORE_EXPORT void showLineTree(const blink::LayoutObject*); 2764 CORE_EXPORT void showLineTree(const blink::LayoutObject*);
2773 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); 2765 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1);
2774 // We don't make object2 an optional parameter so that showLayoutTree 2766 // We don't make object2 an optional parameter so that showLayoutTree
2775 // can be called from gdb easily. 2767 // can be called from gdb easily.
2776 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, 2768 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1,
2777 const blink::LayoutObject* object2); 2769 const blink::LayoutObject* object2);
2778 2770
2779 #endif 2771 #endif
2780 2772
2781 #endif // LayoutObject_h 2773 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698