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

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

Issue 10458025: Merge 118249 (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/runin/runin-continuations-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) 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 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 1827
1828 // See if we have inline children. If the children aren't inline, 1828 // See if we have inline children. If the children aren't inline,
1829 // then just treat the run-in as a normal block. 1829 // then just treat the run-in as a normal block.
1830 if (!runIn->childrenInline()) 1830 if (!runIn->childrenInline())
1831 return; 1831 return;
1832 1832
1833 // FIXME: We don't handle non-block elements with run-in for now. 1833 // FIXME: We don't handle non-block elements with run-in for now.
1834 if (!runIn->isRenderBlock()) 1834 if (!runIn->isRenderBlock())
1835 return; 1835 return;
1836 1836
1837 // We shouldn't run in into the sibling block if we are part of a 1837 // FIXME: We don't support run-ins with or as part of a continuation
1838 // continuation chain. In that case, treat it as a normal block. 1838 // as it makes the back-and-forth placing complex.
1839 if (runIn->isElementContinuation() || runIn->virtualContinuation()) 1839 if (runIn->isElementContinuation() || runIn->virtualContinuation())
1840 return; 1840 return;
1841 1841
1842 // Check if this node is allowed to run-in. E.g. <select> expects its render er to 1842 // Check if this node is allowed to run-in. E.g. <select> expects its render er to
1843 // be a RenderListBox or RenderMenuList, and hence cannot be a RenderInline run-in. 1843 // be a RenderListBox or RenderMenuList, and hence cannot be a RenderInline run-in.
1844 Node* runInNode = runIn->node(); 1844 Node* runInNode = runIn->node();
1845 if (runInNode && runInNode->hasTagName(selectTag)) 1845 if (runInNode && runInNode->hasTagName(selectTag))
1846 return; 1846 return;
1847 1847
1848 RenderObject* curr = runIn->nextSibling(); 1848 RenderObject* curr = runIn->nextSibling();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 return true; 1885 return true;
1886 } 1886 }
1887 1887
1888 void RenderBlock::moveRunInToOriginalPosition(RenderObject* runIn) 1888 void RenderBlock::moveRunInToOriginalPosition(RenderObject* runIn)
1889 { 1889 {
1890 ASSERT(runIn->isRunIn()); 1890 ASSERT(runIn->isRunIn());
1891 1891
1892 if (!runInIsPlacedIntoSiblingBlock(runIn)) 1892 if (!runInIsPlacedIntoSiblingBlock(runIn))
1893 return; 1893 return;
1894 1894
1895 // FIXME: Run-in that are now placed in sibling block can break up into cont inuation
1896 // chains when new children are added to it. We cannot easily send them back to their
1897 // original place since that requires writing integration logic with RenderI nline::addChild
1898 // and all other places that might cause continuations to be created (withou t blowing away
1899 // |this|). Disabling this feature for now to prevent crashes.
1900 if (runIn->isElementContinuation() || runIn->virtualContinuation())
1901 return;
1902
1895 RenderBoxModelObject* oldRunIn = toRenderBoxModelObject(runIn); 1903 RenderBoxModelObject* oldRunIn = toRenderBoxModelObject(runIn);
1896 RenderBoxModelObject* newRunIn = createReplacementRunIn(oldRunIn); 1904 RenderBoxModelObject* newRunIn = createReplacementRunIn(oldRunIn);
1897 destroyRunIn(oldRunIn); 1905 destroyRunIn(oldRunIn);
1898 1906
1899 // Add the run-in block as our previous sibling. 1907 // Add the run-in block as our previous sibling.
1900 parent()->addChild(newRunIn, this); 1908 parent()->addChild(newRunIn, this);
1901 1909
1902 // Make sure that the parent holding the new run-in gets layout. 1910 // Make sure that the parent holding the new run-in gets layout.
1903 parent()->setNeedsLayoutAndPrefWidthsRecalc(); 1911 parent()->setNeedsLayoutAndPrefWidthsRecalc();
1904 } 1912 }
(...skipping 5476 matching lines...) Expand 10 before | Expand all | Expand 10 after
7381 } 7389 }
7382 7390
7383 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7391 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7384 { 7392 {
7385 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->pi xelSnappedX(), floatingObject->pixelSnappedY(), floatingObject->pixelSnappedMaxX (), floatingObject->pixelSnappedMaxY()); 7393 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->pi xelSnappedX(), floatingObject->pixelSnappedY(), floatingObject->pixelSnappedMaxX (), floatingObject->pixelSnappedMaxY());
7386 } 7394 }
7387 7395
7388 #endif 7396 #endif
7389 7397
7390 } // namespace WebCore 7398 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/runin/runin-continuations-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698