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

Side by Side Diff: Source/core/layout/LayoutBlock.cpp

Issue 1178893003: Fix regression on positioned movement layout on a line from r195813 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 6 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 | « LayoutTests/fast/block/positioning/positioned-layout-in-line-expected.html ('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) 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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 // non-positioned block. In block flow we can detect these when we layout th e non-positioned block (by noticing the change 1197 // non-positioned block. In block flow we can detect these when we layout th e non-positioned block (by noticing the change
1198 // in the immediate parent's logical top in |adjustPositionedBlock|). In lin e layout we always need to mark the positioned 1198 // in the immediate parent's logical top in |adjustPositionedBlock|). In lin e layout we always need to mark the positioned
1199 // child for layout if its statically positioned in the direction in which t he object lays out. 1199 // child for layout if its statically positioned in the direction in which t he object lays out.
1200 // crbug.com/490322(rhogan): We probably need to move the block layout case in here too, as marking a positioned object for 1200 // crbug.com/490322(rhogan): We probably need to move the block layout case in here too, as marking a positioned object for
1201 // layout while laying out an object's children invalidly assumes that our p ositionedObjects list is in DOM order and that 1201 // layout while laying out an object's children invalidly assumes that our p ositionedObjects list is in DOM order and that
1202 // we could never mark a positioned object for layout *after* we've laid it out in layoutPositionedObjects. 1202 // we could never mark a positioned object for layout *after* we've laid it out in layoutPositionedObjects.
1203 if (!child->parent()->childrenInline()) 1203 if (!child->parent()->childrenInline())
1204 return false; 1204 return false;
1205 const ComputedStyle* style = child->style(); 1205 const ComputedStyle* style = child->style();
1206 bool isHorizontal = style->isHorizontalWritingMode(); 1206 bool isHorizontal = style->isHorizontalWritingMode();
1207 return style->isDisplayInlineType() ? style->hasStaticInlinePosition(isHoriz ontal) : style->hasStaticBlockPosition(isHorizontal); 1207 return style->hasStaticBlockPosition(isHorizontal) || (style->isOriginalDisp layInlineType() && style->hasStaticInlinePosition(isHorizontal));
1208 } 1208 }
1209 1209
1210 void LayoutBlock::layoutPositionedObjects(bool relayoutChildren, PositionedLayou tBehavior info) 1210 void LayoutBlock::layoutPositionedObjects(bool relayoutChildren, PositionedLayou tBehavior info)
1211 { 1211 {
1212 TrackedLayoutBoxListHashSet* positionedDescendants = positionedObjects(); 1212 TrackedLayoutBoxListHashSet* positionedDescendants = positionedObjects();
1213 if (!positionedDescendants) 1213 if (!positionedDescendants)
1214 return; 1214 return;
1215 1215
1216 for (auto* positionedObject : *positionedDescendants) { 1216 for (auto* positionedObject : *positionedDescendants) {
1217 positionedObject->setMayNeedPaintInvalidation(); 1217 positionedObject->setMayNeedPaintInvalidation();
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after
2907 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 2907 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
2908 { 2908 {
2909 showLayoutObject(); 2909 showLayoutObject();
2910 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 2910 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
2911 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 2911 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
2912 } 2912 }
2913 2913
2914 #endif 2914 #endif
2915 2915
2916 } // namespace blink 2916 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/block/positioning/positioned-layout-in-line-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698