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

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

Issue 877293003: Renderer.LineLayoutMs UMA histogram to measure line layout time. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: . Created 5 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 | « Source/core/frame/FrameView.cpp ('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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 if (!lastObject->isBR()) 760 if (!lastObject->isBR())
761 lastObject = &lastRootBox()->firstLeafChild()->renderer(); 761 lastObject = &lastRootBox()->firstLeafChild()->renderer();
762 if (lastObject->isBR()) { 762 if (lastObject->isBR()) {
763 EClear clear = lastObject->style()->clear(); 763 EClear clear = lastObject->style()->clear();
764 if (clear != CNONE) 764 if (clear != CNONE)
765 clearFloats(clear); 765 clearFloats(clear);
766 } 766 }
767 } 767 }
768 } 768 }
769 769
770 double start = WTF::currentTimeMS();
770 layoutRunsAndFloatsInRange(layoutState, resolver, cleanLineStart, cleanLineB idiStatus); 771 layoutRunsAndFloatsInRange(layoutState, resolver, cleanLineStart, cleanLineB idiStatus);
772 frameView()->lineLayoutTime(WTF::currentTimeMS() - start);
771 linkToEndLineIfNeeded(layoutState); 773 linkToEndLineIfNeeded(layoutState);
772 markDirtyFloatsForPaintInvalidation(layoutState.floats()); 774 markDirtyFloatsForPaintInvalidation(layoutState.floats());
773 } 775 }
774 776
775 // Before restarting the layout loop with a new logicalHeight, remove all floats that were added and reset the resolver. 777 // Before restarting the layout loop with a new logicalHeight, remove all floats that were added and reset the resolver.
776 inline const InlineIterator& RenderBlockFlow::restartLayoutRunsAndFloatsInRange( LayoutUnit oldLogicalHeight, LayoutUnit newLogicalHeight, FloatingObject* lastF loatFromPreviousLine, InlineBidiResolver& resolver, const InlineIterator& oldEn d) 778 inline const InlineIterator& RenderBlockFlow::restartLayoutRunsAndFloatsInRange( LayoutUnit oldLogicalHeight, LayoutUnit newLogicalHeight, FloatingObject* lastF loatFromPreviousLine, InlineBidiResolver& resolver, const InlineIterator& oldEn d)
777 { 779 {
778 removeFloatingObjectsBelow(lastFloatFromPreviousLine, oldLogicalHeight); 780 removeFloatingObjectsBelow(lastFloatFromPreviousLine, oldLogicalHeight);
779 setLogicalHeight(newLogicalHeight); 781 setLogicalHeight(newLogicalHeight);
780 resolver.setPositionIgnoringNestedIsolates(oldEnd); 782 resolver.setPositionIgnoringNestedIsolates(oldEnd);
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2048 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 2050 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
2049 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 2051 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
2050 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 2052 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
2051 2053
2052 if (!style()->isLeftToRightDirection()) 2054 if (!style()->isLeftToRightDirection())
2053 return logicalWidth() - logicalLeft; 2055 return logicalWidth() - logicalLeft;
2054 return logicalLeft; 2056 return logicalLeft;
2055 } 2057 }
2056 2058
2057 } 2059 }
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698