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

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

Issue 1647793002: Use ScrollAnchor in FrameView and PaintLayerScrollableArea. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@anchor-skeleton
Patch Set: move save/restore from LayoutBlockFlow into LayoutBlock Created 4 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. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb ject.setPreviousPaintOffset(paintOffset); } 1323 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb ject.setPreviousPaintOffset(paintOffset); }
1324 1324
1325 private: 1325 private:
1326 friend class LayoutObject; 1326 friend class LayoutObject;
1327 MutableForPainting(const LayoutObject& layoutObject) : m_layoutObject(co nst_cast<LayoutObject&>(layoutObject)) { } 1327 MutableForPainting(const LayoutObject& layoutObject) : m_layoutObject(co nst_cast<LayoutObject&>(layoutObject)) { }
1328 1328
1329 LayoutObject& m_layoutObject; 1329 LayoutObject& m_layoutObject;
1330 }; 1330 };
1331 MutableForPainting mutableForPainting() const { return MutableForPainting(*t his); } 1331 MutableForPainting mutableForPainting() const { return MutableForPainting(*t his); }
1332 1332
1333 void setIsScrollAnchorObject() { m_bitfields.setIsScrollAnchorObject(true); }
1334 // Clears the IsScrollAnchorObject bit, unless any ScrollAnchor still refers to us.
1335 void maybeClearIsScrollAnchorObject();
1336
1333 protected: 1337 protected:
1334 enum LayoutObjectType { 1338 enum LayoutObjectType {
1335 LayoutObjectBr, 1339 LayoutObjectBr,
1336 LayoutObjectCanvas, 1340 LayoutObjectCanvas,
1337 LayoutObjectFieldset, 1341 LayoutObjectFieldset,
1338 LayoutObjectCounter, 1342 LayoutObjectCounter,
1339 LayoutObjectDetailsMarker, 1343 LayoutObjectDetailsMarker,
1340 LayoutObjectEmbeddedObject, 1344 LayoutObjectEmbeddedObject,
1341 LayoutObjectFileUploadControl, 1345 LayoutObjectFileUploadControl,
1342 LayoutObjectFrame, 1346 LayoutObjectFrame,
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 , m_hasPendingResourceUpdate(false) 1671 , m_hasPendingResourceUpdate(false)
1668 , m_isInsideFlowThread(false) 1672 , m_isInsideFlowThread(false)
1669 , m_subtreeChangeListenerRegistered(false) 1673 , m_subtreeChangeListenerRegistered(false)
1670 , m_notifiedOfSubtreeChange(false) 1674 , m_notifiedOfSubtreeChange(false)
1671 , m_consumesSubtreeChangeNotification(false) 1675 , m_consumesSubtreeChangeNotification(false)
1672 , m_childrenInline(false) 1676 , m_childrenInline(false)
1673 , m_containsInlineWithOutlineAndContinuation(false) 1677 , m_containsInlineWithOutlineAndContinuation(false)
1674 , m_alwaysCreateLineBoxesForLayoutInline(false) 1678 , m_alwaysCreateLineBoxesForLayoutInline(false)
1675 , m_lastBoxDecorationBackgroundObscured(false) 1679 , m_lastBoxDecorationBackgroundObscured(false)
1676 , m_isBackgroundAttachmentFixedObject(false) 1680 , m_isBackgroundAttachmentFixedObject(false)
1681 , m_isScrollAnchorObject(false)
1677 , m_positionedState(IsStaticallyPositioned) 1682 , m_positionedState(IsStaticallyPositioned)
1678 , m_selectionState(SelectionNone) 1683 , m_selectionState(SelectionNone)
1679 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 1684 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
1680 , m_fullPaintInvalidationReason(PaintInvalidationNone) 1685 , m_fullPaintInvalidationReason(PaintInvalidationNone)
1681 { 1686 {
1682 } 1687 }
1683 1688
1684 // 32 bits have been used in the first word, and 17 in the second. 1689 // 32 bits have been used in the first word, and 17 in the second.
1685 1690
1686 // Self needs layout means that this layout object is marked for a full layout. 1691 // Self needs layout means that this layout object is marked for a full layout.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 // from LayoutBlockFlow 1808 // from LayoutBlockFlow
1804 ADD_BOOLEAN_BITFIELD(containsInlineWithOutlineAndContinuation, ContainsI nlineWithOutlineAndContinuation); 1809 ADD_BOOLEAN_BITFIELD(containsInlineWithOutlineAndContinuation, ContainsI nlineWithOutlineAndContinuation);
1805 1810
1806 // from LayoutInline 1811 // from LayoutInline
1807 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForLayoutInline, AlwaysCreateL ineBoxesForLayoutInline); 1812 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForLayoutInline, AlwaysCreateL ineBoxesForLayoutInline);
1808 1813
1809 // For slimming-paint. 1814 // For slimming-paint.
1810 ADD_BOOLEAN_BITFIELD(lastBoxDecorationBackgroundObscured, LastBoxDecorat ionBackgroundObscured); 1815 ADD_BOOLEAN_BITFIELD(lastBoxDecorationBackgroundObscured, LastBoxDecorat ionBackgroundObscured);
1811 1816
1812 ADD_BOOLEAN_BITFIELD(isBackgroundAttachmentFixedObject, IsBackgroundAtta chmentFixedObject); 1817 ADD_BOOLEAN_BITFIELD(isBackgroundAttachmentFixedObject, IsBackgroundAtta chmentFixedObject);
1818 ADD_BOOLEAN_BITFIELD(isScrollAnchorObject, IsScrollAnchorObject);
1813 1819
1814 private: 1820 private:
1815 // This is the cached 'position' value of this object 1821 // This is the cached 'position' value of this object
1816 // (see ComputedStyle::position). 1822 // (see ComputedStyle::position).
1817 unsigned m_positionedState : 2; // PositionedState 1823 unsigned m_positionedState : 2; // PositionedState
1818 unsigned m_selectionState : 3; // SelectionState 1824 unsigned m_selectionState : 3; // SelectionState
1819 // Mutable for getter which lazily update this field. 1825 // Mutable for getter which lazily update this field.
1820 mutable unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBac kgroundState 1826 mutable unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBac kgroundState
1821 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason 1827 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason
1822 1828
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2103 void showTree(const blink::LayoutObject*); 2109 void showTree(const blink::LayoutObject*);
2104 void showLineTree(const blink::LayoutObject*); 2110 void showLineTree(const blink::LayoutObject*);
2105 void showLayoutTree(const blink::LayoutObject* object1); 2111 void showLayoutTree(const blink::LayoutObject* object1);
2106 // We don't make object2 an optional parameter so that showLayoutTree 2112 // We don't make object2 an optional parameter so that showLayoutTree
2107 // can be called from gdb easily. 2113 // can be called from gdb easily.
2108 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2114 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2109 2115
2110 #endif 2116 #endif
2111 2117
2112 #endif // LayoutObject_h 2118 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698