Commit 19548ad3 authored by jamesr@google.com's avatar jamesr@google.com
Browse files

2010-04-02 James Robinson <jamesr@chromium.org>

        Reviewed by Darin Adler.

        Splits RenderBlock::layoutInline into smaller functions
        https://bugs.webkit.org/show_bug.cgi?id=36921

        RenderBlock::layoutInlineChildren is 351 lines long and very difficult
        to comprehend or edit safely. This patch splits it up into a few
        slightly smaller functions.  Most of the code is now in the 241 line
        layoutRunsAndFloats() which is a slight improvement.

        Perf neutral on the page cyclers.  This doesn't introduce any function
        calls into the hottest layout paths inside layoutRunsAndFloats and
        findNextLineBreak.

        No change in behavior, no new tests.

        * rendering/RenderBlock.h:
        (WebCore::RenderBlock::FloatWithRect::FloatWithRect):
        * rendering/RenderBlockLineLayout.cpp:
        (WebCore::RenderBlock::layoutReplacedElements):
        (WebCore::RenderBlock::createLineBoxesForResolver):
        (WebCore::RenderBlock::layoutRunsAndFloats):
        (WebCore::RenderBlock::layoutInlineChildren):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0cadbf82
2010-04-02 James Robinson <jamesr@chromium.org>
Reviewed by Darin Adler.
Splits RenderBlock::layoutInline into smaller functions
https://bugs.webkit.org/show_bug.cgi?id=36921
RenderBlock::layoutInlineChildren is 351 lines long and very difficult
to comprehend or edit safely. This patch splits it up into a few
slightly smaller functions. Most of the code is now in the 241 line
layoutRunsAndFloats() which is a slight improvement.
Perf neutral on the page cyclers. This doesn't introduce any function
calls into the hottest layout paths inside layoutRunsAndFloats and
findNextLineBreak.
No change in behavior, no new tests.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatWithRect::FloatWithRect):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutReplacedElements):
(WebCore::RenderBlock::createLineBoxesForResolver):
(WebCore::RenderBlock::layoutRunsAndFloats):
(WebCore::RenderBlock::layoutInlineChildren):
2010-04-02 Evan Stade <estade@chromium.org>
 
Reviewed by Eric Seidel.
......@@ -483,6 +483,11 @@ private:
void setCollapsedBottomMargin(const MarginInfo&);
// End helper functions and structs used by layoutBlockChildren.
// Helper functions for layoutInlineChildren()
bool layoutReplacedElements(bool relayoutChildren, bool fullLayout, Vector<FloatWithRect>&);
RootInlineBox* createLineBoxesForResolver(const InlineBidiResolver&, const InlineIterator& position, bool firstLine, bool previousLineBrokeCleanly, BidiRun* trailingSpaceRun);
void layoutRunsAndFloats(bool fullLayout, Vector<FloatWithRect>&, int& repaintTop, int& repaintBottom);
typedef ListHashSet<RenderBox*>::const_iterator Iterator;
DeprecatedPtrList<FloatingObject>* m_floatingObjects;
ListHashSet<RenderBox*>* m_positionedObjects;
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment