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

Side by Side Diff: sky/engine/core/rendering/RenderBlockLineLayout.cpp

Issue 697713002: Remove line breaking to avoid window. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/rendering/RenderBlockFlow.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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 setStaticPositions(this, lineBreaker.positionedObjects()[i]); 793 setStaticPositions(this, lineBreaker.positionedObjects()[i]);
794 794
795 if (!layoutState.lineInfo().isEmpty()) { 795 if (!layoutState.lineInfo().isEmpty()) {
796 layoutState.lineInfo().setFirstLine(false); 796 layoutState.lineInfo().setFirstLine(false);
797 clearFloats(lineBreaker.clear()); 797 clearFloats(lineBreaker.clear());
798 } 798 }
799 799
800 lineMidpointState.reset(); 800 lineMidpointState.reset();
801 resolver.setPosition(endOfLine, numberOfIsolateAncestors(endOfLine)); 801 resolver.setPosition(endOfLine, numberOfIsolateAncestors(endOfLine));
802 } 802 }
803
804 clearDidBreakAtLineToAvoidWidow();
805 } 803 }
806 804
807 void RenderBlockFlow::linkToEndLineIfNeeded(LineLayoutState& layoutState) 805 void RenderBlockFlow::linkToEndLineIfNeeded(LineLayoutState& layoutState)
808 { 806 {
809 if (layoutState.endLine()) { 807 if (layoutState.endLine()) {
810 if (layoutState.endLineMatched()) { 808 if (layoutState.endLineMatched()) {
811 // Attach all the remaining lines, and then adjust their y-positions as needed. 809 // Attach all the remaining lines, and then adjust their y-positions as needed.
812 LayoutUnit delta = logicalHeight() - layoutState.endLineLogicalTop() ; 810 LayoutUnit delta = logicalHeight() - layoutState.endLineLogicalTop() ;
813 for (RootInlineBox* line = layoutState.endLine(); line; line = line- >nextRootBox()) { 811 for (RootInlineBox* line = layoutState.endLine(); line; line = line- >nextRootBox()) {
814 line->attachLine(); 812 line->attachLine();
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 1630 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
1633 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 1631 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
1634 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 1632 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
1635 1633
1636 if (!style()->isLeftToRightDirection()) 1634 if (!style()->isLeftToRightDirection())
1637 return logicalWidth() - logicalLeft; 1635 return logicalWidth() - logicalLeft;
1638 return logicalLeft; 1636 return logicalLeft;
1639 } 1637 }
1640 1638
1641 } 1639 }
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBlockFlow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698