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

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

Issue 1158183006: Remove the old multicol implementation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase master Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutInline.cpp ('k') | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 inline bool isAfterContent() const; 400 inline bool isAfterContent() const;
401 inline bool isBeforeOrAfterContent() const; 401 inline bool isBeforeOrAfterContent() const;
402 static inline bool isAfterContent(const LayoutObject* obj) { return obj && o bj->isAfterContent(); } 402 static inline bool isAfterContent(const LayoutObject* obj) { return obj && o bj->isAfterContent(); }
403 403
404 bool hasCounterNodeMap() const { return m_bitfields.hasCounterNodeMap(); } 404 bool hasCounterNodeMap() const { return m_bitfields.hasCounterNodeMap(); }
405 void setHasCounterNodeMap(bool hasCounterNodeMap) { m_bitfields.setHasCounte rNodeMap(hasCounterNodeMap); } 405 void setHasCounterNodeMap(bool hasCounterNodeMap) { m_bitfields.setHasCounte rNodeMap(hasCounterNodeMap); }
406 bool everHadLayout() const { return m_bitfields.everHadLayout(); } 406 bool everHadLayout() const { return m_bitfields.everHadLayout(); }
407 407
408 bool childrenInline() const { return m_bitfields.childrenInline(); } 408 bool childrenInline() const { return m_bitfields.childrenInline(); }
409 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); } 409 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); }
410 bool hasColumns() const { return m_bitfields.hasColumns(); }
411 void setHasColumns(bool b = true) { m_bitfields.setHasColumns(b); }
412 410
413 bool alwaysCreateLineBoxesForLayoutInline() const 411 bool alwaysCreateLineBoxesForLayoutInline() const
414 { 412 {
415 ASSERT(isLayoutInline()); 413 ASSERT(isLayoutInline());
416 return m_bitfields.alwaysCreateLineBoxesForLayoutInline(); 414 return m_bitfields.alwaysCreateLineBoxesForLayoutInline();
417 } 415 }
418 void setAlwaysCreateLineBoxesForLayoutInline(bool alwaysCreateLineBoxes) 416 void setAlwaysCreateLineBoxesForLayoutInline(bool alwaysCreateLineBoxes)
419 { 417 {
420 ASSERT(isLayoutInline()); 418 ASSERT(isLayoutInline());
421 m_bitfields.setAlwaysCreateLineBoxesForLayoutInline(alwaysCreateLineBoxe s); 419 m_bitfields.setAlwaysCreateLineBoxesForLayoutInline(alwaysCreateLineBoxe s);
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const 1045 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const
1048 { 1046 {
1049 return paintInvalidationState.forceCheckForPaintInvalidation() || should CheckForPaintInvalidationRegardlessOfPaintInvalidationState(); 1047 return paintInvalidationState.forceCheckForPaintInvalidation() || should CheckForPaintInvalidationRegardlessOfPaintInvalidationState();
1050 } 1048 }
1051 1049
1052 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con st 1050 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con st
1053 { 1051 {
1054 return layoutDidGetCalledSinceLastFrame() || mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection(); 1052 return layoutDidGetCalledSinceLastFrame() || mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection();
1055 } 1053 }
1056 1054
1057 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h asColumns() && !hasTransformRelatedProperty() && !hasReflection() && !style()->i sFlippedBlocksWritingMode(); } 1055 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri tingMode(); }
1058 1056
1059 virtual LayoutRect viewRect() const; 1057 virtual LayoutRect viewRect() const;
1060 1058
1061 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } 1059 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); }
1062 1060
1063 void invalidateDisplayItemClient(const DisplayItemClientWrapper&) const; 1061 void invalidateDisplayItemClient(const DisplayItemClientWrapper&) const;
1064 void invalidateDisplayItemClientForNonCompositingDescendants() const { inval idateDisplayItemClientForNonCompositingDescendantsOf(*this); } 1062 void invalidateDisplayItemClientForNonCompositingDescendants() const { inval idateDisplayItemClientForNonCompositingDescendantsOf(*this); }
1065 // A normal object should use invalidateDisplayItemClientForNonCompositingDe scendants() 1063 // A normal object should use invalidateDisplayItemClientForNonCompositingDe scendants()
1066 // to invalidate its descendants which are painted on the same backing. Howe ver, for 1064 // to invalidate its descendants which are painted on the same backing. Howe ver, for
1067 // an object (e.g. LayoutScrollbarPart, custom scroll corner, custom resizer ) which is 1065 // an object (e.g. LayoutScrollbarPart, custom scroll corner, custom resizer ) which is
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 , m_hasCounterNodeMap(false) 1315 , m_hasCounterNodeMap(false)
1318 , m_everHadLayout(false) 1316 , m_everHadLayout(false)
1319 , m_ancestorLineBoxDirty(false) 1317 , m_ancestorLineBoxDirty(false)
1320 , m_layoutDidGetCalledSinceLastFrame(false) 1318 , m_layoutDidGetCalledSinceLastFrame(false)
1321 , m_hasPendingResourceUpdate(false) 1319 , m_hasPendingResourceUpdate(false)
1322 , m_isInsideFlowThread(false) 1320 , m_isInsideFlowThread(false)
1323 , m_subtreeChangeListenerRegistered(false) 1321 , m_subtreeChangeListenerRegistered(false)
1324 , m_notifiedOfSubtreeChange(false) 1322 , m_notifiedOfSubtreeChange(false)
1325 , m_consumesSubtreeChangeNotification(false) 1323 , m_consumesSubtreeChangeNotification(false)
1326 , m_childrenInline(false) 1324 , m_childrenInline(false)
1327 , m_hasColumns(false)
1328 , m_alwaysCreateLineBoxesForLayoutInline(false) 1325 , m_alwaysCreateLineBoxesForLayoutInline(false)
1329 , m_lastBoxDecorationBackgroundObscured(false) 1326 , m_lastBoxDecorationBackgroundObscured(false)
1330 , m_positionedState(IsStaticallyPositioned) 1327 , m_positionedState(IsStaticallyPositioned)
1331 , m_selectionState(SelectionNone) 1328 , m_selectionState(SelectionNone)
1332 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 1329 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
1333 , m_fullPaintInvalidationReason(PaintInvalidationNone) 1330 , m_fullPaintInvalidationReason(PaintInvalidationNone)
1334 { 1331 {
1335 } 1332 }
1336 1333
1337 // 32 bits have been used in the first word, and 17 in the second. 1334 // 32 bits have been used in the first word, and 16 in the second.
1338 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 1335 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
1339 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint); 1336 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint);
1340 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ; 1337 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ;
1341 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n); 1338 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n);
1342 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); 1339 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren);
1343 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout); 1340 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout);
1344 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); 1341 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout);
1345 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); 1342 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout);
1346 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout); 1343 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout);
1347 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty); 1344 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty);
(...skipping 23 matching lines...) Expand all
1371 ADD_BOOLEAN_BITFIELD(hasPendingResourceUpdate, HasPendingResourceUpdate) ; 1368 ADD_BOOLEAN_BITFIELD(hasPendingResourceUpdate, HasPendingResourceUpdate) ;
1372 1369
1373 ADD_BOOLEAN_BITFIELD(isInsideFlowThread, IsInsideFlowThread); 1370 ADD_BOOLEAN_BITFIELD(isInsideFlowThread, IsInsideFlowThread);
1374 1371
1375 ADD_BOOLEAN_BITFIELD(subtreeChangeListenerRegistered, SubtreeChangeListe nerRegistered); 1372 ADD_BOOLEAN_BITFIELD(subtreeChangeListenerRegistered, SubtreeChangeListe nerRegistered);
1376 ADD_BOOLEAN_BITFIELD(notifiedOfSubtreeChange, NotifiedOfSubtreeChange); 1373 ADD_BOOLEAN_BITFIELD(notifiedOfSubtreeChange, NotifiedOfSubtreeChange);
1377 ADD_BOOLEAN_BITFIELD(consumesSubtreeChangeNotification, ConsumesSubtreeC hangeNotification); 1374 ADD_BOOLEAN_BITFIELD(consumesSubtreeChangeNotification, ConsumesSubtreeC hangeNotification);
1378 1375
1379 // from LayoutBlock 1376 // from LayoutBlock
1380 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); 1377 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline);
1381 ADD_BOOLEAN_BITFIELD(hasColumns, HasColumns);
1382 1378
1383 // from LayoutInline 1379 // from LayoutInline
1384 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForLayoutInline, AlwaysCreateL ineBoxesForLayoutInline); 1380 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForLayoutInline, AlwaysCreateL ineBoxesForLayoutInline);
1385 1381
1386 // For slimming-paint. 1382 // For slimming-paint.
1387 ADD_BOOLEAN_BITFIELD(lastBoxDecorationBackgroundObscured, LastBoxDecorat ionBackgroundObscured); 1383 ADD_BOOLEAN_BITFIELD(lastBoxDecorationBackgroundObscured, LastBoxDecorat ionBackgroundObscured);
1388 1384
1389 private: 1385 private:
1390 unsigned m_positionedState : 2; // PositionedState 1386 unsigned m_positionedState : 2; // PositionedState
1391 unsigned m_selectionState : 3; // SelectionState 1387 unsigned m_selectionState : 3; // SelectionState
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 void showTree(const blink::LayoutObject*); 1662 void showTree(const blink::LayoutObject*);
1667 void showLineTree(const blink::LayoutObject*); 1663 void showLineTree(const blink::LayoutObject*);
1668 void showLayoutTree(const blink::LayoutObject* object1); 1664 void showLayoutTree(const blink::LayoutObject* object1);
1669 // We don't make object2 an optional parameter so that showLayoutTree 1665 // We don't make object2 an optional parameter so that showLayoutTree
1670 // can be called from gdb easily. 1666 // can be called from gdb easily.
1671 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 1667 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
1672 1668
1673 #endif 1669 #endif
1674 1670
1675 #endif // LayoutObject_h 1671 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutInline.cpp ('k') | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698