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

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

Issue 875563003: Ensure that positioned objects' list is always in parent first order (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WIP (just idea): redesign positioned objects handling Created 5 years, 9 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
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 parentBlockFlow = currBlockFlow; 157 parentBlockFlow = currBlockFlow;
158 } 158 }
159 } 159 }
160 160
161 if (parentBlockFlow) { 161 if (parentBlockFlow) {
162 parentBlockFlow->markSiblingsWithFloatsForLayout(this); 162 parentBlockFlow->markSiblingsWithFloatsForLayout(this);
163 parentBlockFlow->markAllDescendantsWithFloatsForLayout(this, false); 163 parentBlockFlow->markAllDescendantsWithFloatsForLayout(this, false);
164 } 164 }
165 } 165 }
166 166
167 if (isOutOfFlowPositioned()) 167 if (isOutOfFlowPositioned()) {
168 RenderBlock::removePositionedObject(this); 168 RenderBlock* block = const_cast<RenderBlock*>(toRenderBlock(this));
169 ASSERT(block);
170 for (RenderObject* curr = parent(); curr; curr = curr->parent()) {
171 ASSERT(curr);
172 if (curr->isRenderBlock()) {
173 // toRenderBlock(curr)->removePositionedObject(this);
174 toRenderBlock(curr)->removePositionedObjects(block, NewContainin gBlock);
175 }
176 }
177 }
169 } 178 }
170 179
171 void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl e) 180 void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl e)
172 { 181 {
173 RenderStyle* oldStyle = style(); 182 RenderStyle* oldStyle = style();
174 if (oldStyle) { 183 if (oldStyle) {
175 // The background of the root element or the body element could propagat e up to 184 // The background of the root element or the body element could propagat e up to
176 // the canvas. Just dirty the entire canvas when our style changes subst antially. 185 // the canvas. Just dirty the entire canvas when our style changes subst antially.
177 if ((diff.needsPaintInvalidation() || diff.needsLayout()) && node() 186 if ((diff.needsPaintInvalidation() || diff.needsLayout()) && node()
178 && (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { 187 && (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) {
(...skipping 4373 matching lines...) Expand 10 before | Expand all | Expand 10 after
4552 computedValues.m_margins.m_end = marginEnd(); 4561 computedValues.m_margins.m_end = marginEnd();
4553 4562
4554 setLogicalTop(oldLogicalTop); 4563 setLogicalTop(oldLogicalTop);
4555 setLogicalWidth(oldLogicalWidth); 4564 setLogicalWidth(oldLogicalWidth);
4556 setLogicalLeft(oldLogicalLeft); 4565 setLogicalLeft(oldLogicalLeft);
4557 setMarginLeft(oldMarginLeft); 4566 setMarginLeft(oldMarginLeft);
4558 setMarginRight(oldMarginRight); 4567 setMarginRight(oldMarginRight);
4559 } 4568 }
4560 4569
4561 } // namespace blink 4570 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698