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

Side by Side Diff: Source/core/rendering/line/BreakingContextInlineHeaders.h

Issue 372023002: Abs-positioned objects should move with inline rel-positioned containers when the latter change wid… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 5 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 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * Copyright (C) 2013 Adobe Systems Incorporated. 5 * Copyright (C) 2013 Adobe Systems Incorporated.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // FIXME: The math here is actually not really right. It's a best-guess appr oximation that 203 // FIXME: The math here is actually not really right. It's a best-guess appr oximation that
204 // will work for the common cases 204 // will work for the common cases
205 RenderObject* containerBlock = child->container(); 205 RenderObject* containerBlock = child->container();
206 LayoutUnit blockHeight = block->logicalHeight(); 206 LayoutUnit blockHeight = block->logicalHeight();
207 if (containerBlock->isRenderInline()) { 207 if (containerBlock->isRenderInline()) {
208 // A relative positioned inline encloses us. In this case, we also have to determine our 208 // A relative positioned inline encloses us. In this case, we also have to determine our
209 // position as though we were an inline. Set |staticInlinePosition| and |staticBlockPosition| on the relative positioned 209 // position as though we were an inline. Set |staticInlinePosition| and |staticBlockPosition| on the relative positioned
210 // inline so that we can obtain the value later. 210 // inline so that we can obtain the value later.
211 toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block-> startAlignedOffsetForLine(blockHeight, false)); 211 toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block-> startAlignedOffsetForLine(blockHeight, false));
212 toRenderInline(containerBlock)->layer()->setStaticBlockPosition(blockHei ght); 212 toRenderInline(containerBlock)->layer()->setStaticBlockPosition(blockHei ght);
213
214 // If |child| is a leading or trailing positioned object this is its onl y opportunity to ensure it moves with an inline
215 // container changing width.
216 child->moveWithEdgeOfInlineContainerIfNecessary(child->isHorizontalWriti ngMode());
esprehn 2014/07/28 19:35:15 Why not isHorizontal() here?
213 } 217 }
214 block->updateStaticInlinePositionForChild(child, blockHeight); 218 block->updateStaticInlinePositionForChild(child, blockHeight);
215 child->layer()->setStaticBlockPosition(blockHeight); 219 child->layer()->setStaticBlockPosition(blockHeight);
216 } 220 }
217 221
218 // FIXME: The entire concept of the skipTrailingWhitespace function is flawed, s ince we really need to be building 222 // FIXME: The entire concept of the skipTrailingWhitespace function is flawed, s ince we really need to be building
219 // line boxes even for containers that may ultimately collapse away. Otherwise w e'll never get positioned 223 // line boxes even for containers that may ultimately collapse away. Otherwise w e'll never get positioned
220 // elements quite right. In other words, we need to build this function's work i nto the normal line 224 // elements quite right. In other words, we need to build this function's work i nto the normal line
221 // object iteration process. 225 // object iteration process.
222 // NB. this function will insert any floating elements that would otherwise 226 // NB. this function will insert any floating elements that would otherwise
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 906
903 if (style->textIndentType() == TextIndentHanging) 907 if (style->textIndentType() == TextIndentHanging)
904 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In dentText; 908 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In dentText;
905 909
906 return shouldIndentText; 910 return shouldIndentText;
907 } 911 }
908 912
909 } 913 }
910 914
911 #endif // BreakingContextInlineHeaders_h 915 #endif // BreakingContextInlineHeaders_h
OLDNEW
« Source/core/rendering/RenderBox.cpp ('K') | « Source/core/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698