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

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 246393009: Revert of [repaint-after-layout] Skip full repaint if the style difference is layout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 139
140 void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle* newStyl e) 140 void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle* newStyl e)
141 { 141 {
142 RenderStyle* oldStyle = style(); 142 RenderStyle* oldStyle = style();
143 if (oldStyle) { 143 if (oldStyle) {
144 // The background of the root element or the body element could propagat e up to 144 // The background of the root element or the body element could propagat e up to
145 // the canvas. Just dirty the entire canvas when our style changes subs tantially. 145 // the canvas. Just dirty the entire canvas when our style changes subs tantially.
146 if (diff >= StyleDifferenceRepaint && node() && 146 if (diff >= StyleDifferenceRepaint && node() &&
147 (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { 147 (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) {
148 148 view()->repaint();
149 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() || diff != StyleDifferenceLayout)
150 view()->repaint();
151 149
152 if (oldStyle->hasEntirelyFixedBackground() != newStyle->hasEntirelyF ixedBackground()) 150 if (oldStyle->hasEntirelyFixedBackground() != newStyle->hasEntirelyF ixedBackground())
153 view()->compositor()->rootFixedBackgroundsChanged(); 151 view()->compositor()->rootFixedBackgroundsChanged();
154 } 152 }
155 153
156 // When a layout hint happens and an object's position style changes, we have to do a layout 154 // When a layout hint happens and an object's position style changes, we have to do a layout
157 // to dirty the render tree using the old position value now. 155 // to dirty the render tree using the old position value now.
158 if (diff == StyleDifferenceLayout && parent() && oldStyle->position() != newStyle->position()) { 156 if (diff == StyleDifferenceLayout && parent() && oldStyle->position() != newStyle->position()) {
159 markContainingBlocksForLayout(); 157 markContainingBlocksForLayout();
160 if (oldStyle->position() == StaticPosition) 158 if (oldStyle->position() == StaticPosition)
(...skipping 4531 matching lines...) Expand 10 before | Expand all | Expand 10 after
4692 return 0; 4690 return 0;
4693 4691
4694 if (!layoutState && !flowThreadContainingBlock()) 4692 if (!layoutState && !flowThreadContainingBlock())
4695 return 0; 4693 return 0;
4696 4694
4697 RenderBlock* containerBlock = containingBlock(); 4695 RenderBlock* containerBlock = containingBlock();
4698 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4696 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4699 } 4697 }
4700 4698
4701 } // namespace WebCore 4699 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698