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

Side by Side Diff: Source/WebCore/rendering/RenderBlockLineLayout.cpp

Issue 10442075: Merge 118248 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 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
« no previous file with comments | « LayoutTests/fast/block/inline-children-root-linebox-crash-expected.txt ('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) 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 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 if (relayoutChildren && box->needsPreferredWidthsRecalculation() ) 1492 if (relayoutChildren && box->needsPreferredWidthsRecalculation() )
1493 o->setPreferredLogicalWidthsDirty(true, MarkOnlyThis); 1493 o->setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
1494 1494
1495 if (o->isPositioned()) 1495 if (o->isPositioned())
1496 o->containingBlock()->insertPositionedObject(box); 1496 o->containingBlock()->insertPositionedObject(box);
1497 else if (o->isFloating()) 1497 else if (o->isFloating())
1498 layoutState.floats().append(FloatWithRect(box)); 1498 layoutState.floats().append(FloatWithRect(box));
1499 else if (layoutState.isFullLayout() || o->needsLayout()) { 1499 else if (layoutState.isFullLayout() || o->needsLayout()) {
1500 // Replaced elements 1500 // Replaced elements
1501 toRenderBox(o)->dirtyLineBoxes(layoutState.isFullLayout()); 1501 toRenderBox(o)->dirtyLineBoxes(layoutState.isFullLayout());
1502 o->layoutIfNeeded();
1503 } 1502 }
1504 } else if (o->isText() || (o->isRenderInline() && !walker.atEndOfInl ine())) { 1503 } else if (o->isText() || (o->isRenderInline() && !walker.atEndOfInl ine())) {
1505 if (!o->isText()) 1504 if (!o->isText())
1506 toRenderInline(o)->updateAlwaysCreateLineBoxes(layoutState.i sFullLayout()); 1505 toRenderInline(o)->updateAlwaysCreateLineBoxes(layoutState.i sFullLayout());
1507 if (layoutState.isFullLayout() || o->selfNeedsLayout()) 1506 if (layoutState.isFullLayout() || o->selfNeedsLayout())
1508 dirtyLineBoxesForRenderer(o, layoutState.isFullLayout()); 1507 dirtyLineBoxesForRenderer(o, layoutState.isFullLayout());
1509 o->setNeedsLayout(false); 1508 o->setNeedsLayout(false);
1510 } 1509 }
1511 } 1510 }
1512 1511
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 // additional spaces we see will be discarded. 2261 // additional spaces we see will be discarded.
2263 currentCharacterIsSpace = true; 2262 currentCharacterIsSpace = true;
2264 currentCharacterIsWS = true; 2263 currentCharacterIsWS = true;
2265 ignoringSpaces = true; 2264 ignoringSpaces = true;
2266 } 2265 }
2267 } 2266 }
2268 2267
2269 width.addUncommittedWidth(borderPaddingMarginStart(flowBox) + border PaddingMarginEnd(flowBox)); 2268 width.addUncommittedWidth(borderPaddingMarginStart(flowBox) + border PaddingMarginEnd(flowBox));
2270 } else if (current.m_obj->isReplaced()) { 2269 } else if (current.m_obj->isReplaced()) {
2271 RenderBox* replacedBox = toRenderBox(current.m_obj); 2270 RenderBox* replacedBox = toRenderBox(current.m_obj);
2271 replacedBox->layoutIfNeeded();
2272 2272
2273 // Break on replaced elements if either has normal white-space. 2273 // Break on replaced elements if either has normal white-space.
2274 if ((autoWrap || RenderStyle::autoWrap(lastWS)) && (!current.m_obj-> isImage() || allowImagesToBreak)) { 2274 if ((autoWrap || RenderStyle::autoWrap(lastWS)) && (!current.m_obj-> isImage() || allowImagesToBreak)) {
2275 width.commit(); 2275 width.commit();
2276 lBreak.moveToStartOf(current.m_obj); 2276 lBreak.moveToStartOf(current.m_obj);
2277 } 2277 }
2278 2278
2279 if (ignoringSpaces) 2279 if (ignoringSpaces)
2280 addMidpoint(lineMidpointState, InlineIterator(0, current.m_obj, 0)); 2280 addMidpoint(lineMidpointState, InlineIterator(0, current.m_obj, 0));
2281 2281
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2805 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache); 2805 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache);
2806 2806
2807 setLineGridBox(lineGridBox); 2807 setLineGridBox(lineGridBox);
2808 2808
2809 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying 2809 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying
2810 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping 2810 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping
2811 // to this grid. 2811 // to this grid.
2812 } 2812 }
2813 2813
2814 } 2814 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/block/inline-children-root-linebox-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698