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

Side by Side Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 904613005: Remove position:relative. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 if (oldStyleIsContainer && !newStyleIsContainer) { 171 if (oldStyleIsContainer && !newStyleIsContainer) {
172 // Clear our positioned objects list. Our absolutely positioned desc endants will be 172 // Clear our positioned objects list. Our absolutely positioned desc endants will be
173 // inserted into our containing block's positioned objects list duri ng layout. 173 // inserted into our containing block's positioned objects list duri ng layout.
174 removePositionedObjects(0, NewContainingBlock); 174 removePositionedObjects(0, NewContainingBlock);
175 } else if (!oldStyleIsContainer && newStyleIsContainer) { 175 } else if (!oldStyleIsContainer && newStyleIsContainer) {
176 // Remove our absolutely positioned descendants from their current c ontaining block. 176 // Remove our absolutely positioned descendants from their current c ontaining block.
177 // They will be inserted into our positioned objects list during lay out. 177 // They will be inserted into our positioned objects list during lay out.
178 RenderObject* cb = parent(); 178 RenderObject* cb = parent();
179 while (cb && (cb->style()->position() == StaticPosition || (cb->isIn line() && !cb->isReplaced())) && !cb->isRenderView()) { 179 while (cb && (cb->style()->position() == StaticPosition || (cb->isIn line() && !cb->isReplaced())) && !cb->isRenderView()) {
180 if (cb->style()->position() == RelativePosition && cb->isInline( ) && !cb->isReplaced()) {
181 cb = cb->containingBlock();
182 break;
183 }
184 cb = cb->parent(); 180 cb = cb->parent();
185 } 181 }
186 182
187 if (cb->isRenderBlock()) 183 if (cb->isRenderBlock())
188 toRenderBlock(cb)->removePositionedObjects(this, NewContainingBl ock); 184 toRenderBlock(cb)->removePositionedObjects(this, NewContainingBl ock);
189 } 185 }
190 } 186 }
191 187
192 RenderBox::styleWillChange(diff, newStyle); 188 RenderBox::styleWillChange(diff, newStyle);
193 } 189 }
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 1767 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
1772 { 1768 {
1773 showRenderObject(); 1769 showRenderObject();
1774 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 1770 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
1775 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 1771 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
1776 } 1772 }
1777 1773
1778 #endif 1774 #endif
1779 1775
1780 } // namespace blink 1776 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/parser/BisonCSSParser-in.cpp ('k') | sky/engine/core/rendering/RenderLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698