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

Side by Side Diff: Source/core/rendering/RenderObject.h

Issue 235323005: Revert of Optimize repaint on FrameView resize (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 8 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/frame/FrameView.cpp ('k') | Source/web/tests/WebFrameTest.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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 BSRight, 97 BSRight,
98 BSBottom, 98 BSBottom,
99 BSLeft 99 BSLeft
100 }; 100 };
101 101
102 enum MarkingBehavior { 102 enum MarkingBehavior {
103 MarkOnlyThis, 103 MarkOnlyThis,
104 MarkContainingBlockChain, 104 MarkContainingBlockChain,
105 }; 105 };
106 106
107 enum RepaintLayerBehavior {
108 RepaintLayer,
109 DontRepaintLayer,
110 };
111
112 enum MapCoordinatesMode { 107 enum MapCoordinatesMode {
113 IsFixed = 1 << 0, 108 IsFixed = 1 << 0,
114 UseTransforms = 1 << 1, 109 UseTransforms = 1 << 1,
115 ApplyContainerFlip = 1 << 2, 110 ApplyContainerFlip = 1 << 2,
116 TraverseDocumentBoundaries = 1 << 3, 111 TraverseDocumentBoundaries = 1 << 3,
117 }; 112 };
118 typedef unsigned MapCoordinatesFlags; 113 typedef unsigned MapCoordinatesFlags;
119 114
120 enum InvalidationReason { 115 enum InvalidationReason {
121 InvalidationIncremental, 116 InvalidationIncremental,
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 // Returns the object containing this one. Can be different from parent for positioned elements. 617 // Returns the object containing this one. Can be different from parent for positioned elements.
623 // If repaintContainer and repaintContainerSkipped are not null, on return * repaintContainerSkipped 618 // If repaintContainer and repaintContainerSkipped are not null, on return * repaintContainerSkipped
624 // is true if the renderer returned is an ancestor of repaintContainer. 619 // is true if the renderer returned is an ancestor of repaintContainer.
625 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0, bool* repaintContainerSkipped = 0) const; 620 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0, bool* repaintContainerSkipped = 0) const;
626 621
627 virtual RenderObject* hoverAncestor() const { return parent(); } 622 virtual RenderObject* hoverAncestor() const { return parent(); }
628 623
629 Element* offsetParent() const; 624 Element* offsetParent() const;
630 625
631 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0); 626 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0);
632 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0, RepaintLayerBehavior = RepaintLayer); 627 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0);
633 void clearNeedsLayout(); 628 void clearNeedsLayout();
634 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0); 629 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0);
635 void setNeedsPositionedMovementLayout(); 630 void setNeedsPositionedMovementLayout();
636 void setNeedsSimplifiedNormalFlowLayout(); 631 void setNeedsSimplifiedNormalFlowLayout();
637 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha in); 632 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha in);
638 void clearPreferredLogicalWidthsDirty(); 633 void clearPreferredLogicalWidthsDirty();
639 void invalidateContainerPreferredLogicalWidths(); 634 void invalidateContainerPreferredLogicalWidths();
640 635
641 void setNeedsLayoutAndPrefWidthsRecalc() 636 void setNeedsLayoutAndPrefWidthsRecalc()
642 { 637 {
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 if (isText() && !isBR()) 1266 if (isText() && !isBR())
1272 return false; 1267 return false;
1273 return true; 1268 return true;
1274 } 1269 }
1275 1270
1276 inline bool RenderObject::isBeforeOrAfterContent() const 1271 inline bool RenderObject::isBeforeOrAfterContent() const
1277 { 1272 {
1278 return isBeforeContent() || isAfterContent(); 1273 return isBeforeContent() || isAfterContent();
1279 } 1274 }
1280 1275
1281 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay outScope* layouter, RepaintLayerBehavior repaintLayer) 1276 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay outScope* layouter)
1282 { 1277 {
1283 ASSERT(!isSetNeedsLayoutForbidden()); 1278 ASSERT(!isSetNeedsLayoutForbidden());
1284 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); 1279 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout();
1285 setSelfNeedsLayout(true); 1280 setSelfNeedsLayout(true);
1286 if (!alreadyNeededLayout) { 1281 if (!alreadyNeededLayout) {
1287 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r oot() != this)) 1282 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r oot() != this))
1288 markContainingBlocksForLayout(true, 0, layouter); 1283 markContainingBlocksForLayout(true, 0, layouter);
1289 // StyleDifferenceLayout is used for different cases currently, one of w hich is 1284 if (hasLayer())
1290 // that our content changed which mandates an invalidation.
1291 // FIXME: We should be able to skip this automatic invalidation (see crb ug.com/325569).
1292 if (repaintLayer == RepaintLayer && hasLayer())
1293 setLayerNeedsFullRepaint(); 1285 setLayerNeedsFullRepaint();
1294 } 1286 }
1295 } 1287 }
1296 1288
1297 inline void RenderObject::clearNeedsLayout() 1289 inline void RenderObject::clearNeedsLayout()
1298 { 1290 {
1299 if (!shouldDoFullRepaintAfterLayout()) 1291 if (!shouldDoFullRepaintAfterLayout())
1300 setShouldDoFullRepaintAfterLayout(selfNeedsLayout()); 1292 setShouldDoFullRepaintAfterLayout(selfNeedsLayout());
1301 if (needsPositionedMovementLayoutOnly()) 1293 if (needsPositionedMovementLayoutOnly())
1302 setOnlyNeededPositionedMovementLayout(true); 1294 setOnlyNeededPositionedMovementLayout(true);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 void showTree(const WebCore::RenderObject*); 1435 void showTree(const WebCore::RenderObject*);
1444 void showLineTree(const WebCore::RenderObject*); 1436 void showLineTree(const WebCore::RenderObject*);
1445 void showRenderTree(const WebCore::RenderObject* object1); 1437 void showRenderTree(const WebCore::RenderObject* object1);
1446 // We don't make object2 an optional parameter so that showRenderTree 1438 // We don't make object2 an optional parameter so that showRenderTree
1447 // can be called from gdb easily. 1439 // can be called from gdb easily.
1448 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); 1440 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2);
1449 1441
1450 #endif 1442 #endif
1451 1443
1452 #endif // RenderObject_h 1444 #endif // RenderObject_h
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698