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

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

Issue 1278543002: Include the whole outline into visual overflow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 virtual void invalidatePaintForOverflow(); 867 virtual void invalidatePaintForOverflow();
868 void invalidatePaintForOverflowIfNeeded(); 868 void invalidatePaintForOverflowIfNeeded();
869 869
870 void invalidatePaintIncludingNonCompositingDescendants(); 870 void invalidatePaintIncludingNonCompositingDescendants();
871 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); 871 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
872 872
873 // Returns the rect that should have paint invalidated whenever this object changes. The rect is in the view's 873 // Returns the rect that should have paint invalidated whenever this object changes. The rect is in the view's
874 // coordinate space. This method deals with outlines and overflow. 874 // coordinate space. This method deals with outlines and overflow.
875 virtual LayoutRect absoluteClippedOverflowRect() const; 875 virtual LayoutRect absoluteClippedOverflowRect() const;
876 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo delObject* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const; 876 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo delObject* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const;
877 virtual LayoutRect rectWithOutlineForPaintInvalidation(const LayoutBoxModelO bject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalidat ionState* = nullptr) const;
878 877
879 // Given a rect in the object's coordinate space, compute a rect suitable fo r invalidating paints of 878 // Given a rect in the object's coordinate space, compute a rect suitable fo r invalidating paints of
880 // that rect in the coordinate space of paintInvalidationContainer. 879 // that rect in the coordinate space of paintInvalidationContainer.
881 virtual void mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* p aintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const; 880 virtual void mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* p aintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const;
882 881
883 // Return the offset to the column in which the specified point (in flow-thr ead coordinates) 882 // Return the offset to the column in which the specified point (in flow-thr ead coordinates)
884 // lives. This is used to convert a flow-thread point to a visual point. 883 // lives. This is used to convert a flow-thread point to a visual point.
885 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz e(); } 884 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz e(); }
886 885
887 virtual unsigned length() const { return 1; } 886 virtual unsigned length() const { return 1; }
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 void setIsSlowRepaintObject(bool); 1186 void setIsSlowRepaintObject(bool);
1188 1187
1189 void clearSelfNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setSelfNee dsOverflowRecalcAfterStyleChange(false); } 1188 void clearSelfNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setSelfNee dsOverflowRecalcAfterStyleChange(false); }
1190 void clearChildNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setChildN eedsOverflowRecalcAfterStyleChange(false); } 1189 void clearChildNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setChildN eedsOverflowRecalcAfterStyleChange(false); }
1191 void setShouldInvalidateOverflowForPaint() { m_bitfields.setShouldInvalidate OverflowForPaint(true); } 1190 void setShouldInvalidateOverflowForPaint() { m_bitfields.setShouldInvalidate OverflowForPaint(true); }
1192 void setEverHadLayout() { m_bitfields.setEverHadLayout(true); } 1191 void setEverHadLayout() { m_bitfields.setEverHadLayout(true); }
1193 1192
1194 // Remove this object and all descendants from the containing LayoutFlowThre ad. 1193 // Remove this object and all descendants from the containing LayoutFlowThre ad.
1195 void removeFromLayoutFlowThread(); 1194 void removeFromLayoutFlowThread();
1196 1195
1196 bool containsInlineWithOutlineAndContinuation() const { return m_bitfields.c ontainsInlineWithOutlineAndContinuation(); }
1197 void setContainsInlineWithOutlineAndContinuation(bool b) { m_bitfields.setCo ntainsInlineWithOutlineAndContinuation(b); }
1198
1197 private: 1199 private:
1198 void fullyInvalidatePaint(const LayoutBoxModelObject& paintInvalidationConta iner, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect& ne wBounds); 1200 void fullyInvalidatePaint(const LayoutBoxModelObject& paintInvalidationConta iner, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect& ne wBounds);
1199 1201
1200 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP aintInvalidationRect; } 1202 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP aintInvalidationRect; }
1201 1203
1202 // Adjusts a paint invalidation rect in the space of |m_previousPaintInvalid ationRect| and |m_previousPositionFromPaintInvalidationBacking| 1204 // Adjusts a paint invalidation rect in the space of |m_previousPaintInvalid ationRect| and |m_previousPositionFromPaintInvalidationBacking|
1203 // to be in the space of the |paintInvalidationContainer|, 1205 // to be in the space of the |paintInvalidationContainer|,
1204 // if needed. They can be different only if |paintInvalidationContainer| is a composited scroller. 1206 // if needed. They can be different only if |paintInvalidationContainer| is a composited scroller.
1205 void adjustInvalidationRectForCompositedScrolling(LayoutRect&, const LayoutB oxModelObject& paintInvalidationContainer) const; 1207 void adjustInvalidationRectForCompositedScrolling(LayoutRect&, const LayoutB oxModelObject& paintInvalidationContainer) const;
1206 1208
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 , m_hasReflection(false) 1315 , m_hasReflection(false)
1314 , m_hasCounterNodeMap(false) 1316 , m_hasCounterNodeMap(false)
1315 , m_everHadLayout(false) 1317 , m_everHadLayout(false)
1316 , m_ancestorLineBoxDirty(false) 1318 , m_ancestorLineBoxDirty(false)
1317 , m_hasPendingResourceUpdate(false) 1319 , m_hasPendingResourceUpdate(false)
1318 , m_isInsideFlowThread(false) 1320 , m_isInsideFlowThread(false)
1319 , m_subtreeChangeListenerRegistered(false) 1321 , m_subtreeChangeListenerRegistered(false)
1320 , m_notifiedOfSubtreeChange(false) 1322 , m_notifiedOfSubtreeChange(false)
1321 , m_consumesSubtreeChangeNotification(false) 1323 , m_consumesSubtreeChangeNotification(false)
1322 , m_childrenInline(false) 1324 , m_childrenInline(false)
1325 , m_containsInlineWithOutlineAndContinuation(false)
1323 , m_alwaysCreateLineBoxesForLayoutInline(false) 1326 , m_alwaysCreateLineBoxesForLayoutInline(false)
1324 , m_lastBoxDecorationBackgroundObscured(false) 1327 , m_lastBoxDecorationBackgroundObscured(false)
1325 , m_isSlowRepaintObject(false) 1328 , m_isSlowRepaintObject(false)
1326 , m_positionedState(IsStaticallyPositioned) 1329 , m_positionedState(IsStaticallyPositioned)
1327 , m_selectionState(SelectionNone) 1330 , m_selectionState(SelectionNone)
1328 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 1331 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
1329 , m_fullPaintInvalidationReason(PaintInvalidationNone) 1332 , m_fullPaintInvalidationReason(PaintInvalidationNone)
1330 { 1333 {
1331 } 1334 }
1332 1335
1333 // 32 bits have been used in the first word, and 16 in the second. 1336 // 32 bits have been used in the first word, and 17 in the second.
1334 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 1337 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
1335 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint); // TODO(wangxianzhu): Remove for slimming paint v2. 1338 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint); // TODO(wangxianzhu): Remove for slimming paint v2.
1336 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh eckForPaintInvalidation); 1339 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh eckForPaintInvalidation);
1337 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ; 1340 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ;
1338 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n); // TODO(wangxianzhu): Remove for slimming paint v2. 1341 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n); // TODO(wangxianzhu): Remove for slimming paint v2.
1339 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); // TODO(wangxianzhu): Remove for slimming paint v2. 1342 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); // TODO(wangxianzhu): Remove for slimming paint v2.
1340 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout); 1343 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout);
1341 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); 1344 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout);
1342 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); 1345 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout);
1343 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout); 1346 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout);
(...skipping 23 matching lines...) Expand all
1367 1370
1368 ADD_BOOLEAN_BITFIELD(isInsideFlowThread, IsInsideFlowThread); 1371 ADD_BOOLEAN_BITFIELD(isInsideFlowThread, IsInsideFlowThread);
1369 1372
1370 ADD_BOOLEAN_BITFIELD(subtreeChangeListenerRegistered, SubtreeChangeListe nerRegistered); 1373 ADD_BOOLEAN_BITFIELD(subtreeChangeListenerRegistered, SubtreeChangeListe nerRegistered);
1371 ADD_BOOLEAN_BITFIELD(notifiedOfSubtreeChange, NotifiedOfSubtreeChange); 1374 ADD_BOOLEAN_BITFIELD(notifiedOfSubtreeChange, NotifiedOfSubtreeChange);
1372 ADD_BOOLEAN_BITFIELD(consumesSubtreeChangeNotification, ConsumesSubtreeC hangeNotification); 1375 ADD_BOOLEAN_BITFIELD(consumesSubtreeChangeNotification, ConsumesSubtreeC hangeNotification);
1373 1376
1374 // from LayoutBlock 1377 // from LayoutBlock
1375 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); 1378 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline);
1376 1379
1380 // from LayoutBlockFlow
1381 ADD_BOOLEAN_BITFIELD(containsInlineWithOutlineAndContinuation, ContainsI nlineWithOutlineAndContinuation);
1382
1377 // from LayoutInline 1383 // from LayoutInline
1378 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForLayoutInline, AlwaysCreateL ineBoxesForLayoutInline); 1384 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForLayoutInline, AlwaysCreateL ineBoxesForLayoutInline);
1379 1385
1380 // For slimming-paint. 1386 // For slimming-paint.
1381 ADD_BOOLEAN_BITFIELD(lastBoxDecorationBackgroundObscured, LastBoxDecorat ionBackgroundObscured); 1387 ADD_BOOLEAN_BITFIELD(lastBoxDecorationBackgroundObscured, LastBoxDecorat ionBackgroundObscured);
1382 1388
1383 ADD_BOOLEAN_BITFIELD(isSlowRepaintObject, IsSlowRepaintObject); 1389 ADD_BOOLEAN_BITFIELD(isSlowRepaintObject, IsSlowRepaintObject);
1384 1390
1385 private: 1391 private:
1386 unsigned m_positionedState : 2; // PositionedState 1392 unsigned m_positionedState : 2; // PositionedState
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 void showTree(const blink::LayoutObject*); 1675 void showTree(const blink::LayoutObject*);
1670 void showLineTree(const blink::LayoutObject*); 1676 void showLineTree(const blink::LayoutObject*);
1671 void showLayoutTree(const blink::LayoutObject* object1); 1677 void showLayoutTree(const blink::LayoutObject* object1);
1672 // We don't make object2 an optional parameter so that showLayoutTree 1678 // We don't make object2 an optional parameter so that showLayoutTree
1673 // can be called from gdb easily. 1679 // can be called from gdb easily.
1674 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 1680 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
1675 1681
1676 #endif 1682 #endif
1677 1683
1678 #endif // LayoutObject_h 1684 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698