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

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

Issue 12335038: Merge 142659 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 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
« no previous file with comments | « LayoutTests/fast/block/margin-collapse/self-collapsing-block-with-float-children-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 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(), lineInfo, LeadingWhitespace)) { 2274 while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(), lineInfo, LeadingWhitespace)) {
2275 RenderObject* object = resolver.position().m_obj; 2275 RenderObject* object = resolver.position().m_obj;
2276 if (object->isOutOfFlowPositioned()) { 2276 if (object->isOutOfFlowPositioned()) {
2277 setStaticPositions(m_block, toRenderBox(object)); 2277 setStaticPositions(m_block, toRenderBox(object));
2278 if (object->style()->isOriginalDisplayInlineType()) { 2278 if (object->style()->isOriginalDisplayInlineType()) {
2279 resolver.runs().addRun(createRun(0, 1, object, resolver)); 2279 resolver.runs().addRun(createRun(0, 1, object, resolver));
2280 lineInfo.incrementRunsFromLeadingWhitespace(); 2280 lineInfo.incrementRunsFromLeadingWhitespace();
2281 } 2281 }
2282 } else if (object->isFloating()) { 2282 } else if (object->isFloating()) {
2283 // The top margin edge of a self-collapsing block that clears a floa t intrudes up into it by the height of the margin, 2283 // The top margin edge of a self-collapsing block that clears a floa t intrudes up into it by the height of the margin,
2284 // so in order to place this child float at the top content edge of the self-collapsing block add the margin back in before placement. 2284 // so in order to place this first child float at the top content ed ge of the self-collapsing block add the margin back in before placement.
2285 LayoutUnit marginOffset = (m_block->isSelfCollapsingBlock() && m_blo ck->style()->clear() && m_block->getClearDelta(m_block, LayoutUnit())) ? m_block ->collapsedMarginBeforeForChild(m_block) : LayoutUnit(); 2285 LayoutUnit marginOffset = (!object->previousSibling() && m_block->is SelfCollapsingBlock() && m_block->style()->clear() && m_block->getClearDelta(m_b lock, LayoutUnit())) ? m_block->collapsedMarginBeforeForChild(m_block) : LayoutU nit();
2286 LayoutUnit oldLogicalHeight = m_block->logicalHeight(); 2286 LayoutUnit oldLogicalHeight = m_block->logicalHeight();
2287 m_block->setLogicalHeight(oldLogicalHeight + marginOffset); 2287 m_block->setLogicalHeight(oldLogicalHeight + marginOffset);
2288 m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRend erBox(object)), lastFloatFromPreviousLine, lineInfo, width); 2288 m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRend erBox(object)), lastFloatFromPreviousLine, lineInfo, width);
2289 m_block->setLogicalHeight(oldLogicalHeight); 2289 m_block->setLogicalHeight(oldLogicalHeight);
2290 } else if (object->isText() && object->style()->hasTextCombine() && obje ct->isCombineText() && !toRenderCombineText(object)->isCombined()) { 2290 } else if (object->isText() && object->style()->hasTextCombine() && obje ct->isCombineText() && !toRenderCombineText(object)->isCombined()) {
2291 toRenderCombineText(object)->combineText(); 2291 toRenderCombineText(object)->combineText();
2292 if (toRenderCombineText(object)->isCombined()) 2292 if (toRenderCombineText(object)->isCombined())
2293 continue; 2293 continue;
2294 } 2294 }
2295 resolver.increment(); 2295 resolver.increment();
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
3314 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache); 3314 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache);
3315 3315
3316 setLineGridBox(lineGridBox); 3316 setLineGridBox(lineGridBox);
3317 3317
3318 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying 3318 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying
3319 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping 3319 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping
3320 // to this grid. 3320 // to this grid.
3321 } 3321 }
3322 3322
3323 } 3323 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/block/margin-collapse/self-collapsing-block-with-float-children-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698