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

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

Issue 9565013: Merge 107733 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 9 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/css/counters/asterisk-counter-update-after-layout-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) 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 2317 matching lines...) Expand 10 before | Expand all | Expand 10 after
2328 2328
2329 currentCharacterIsWS = currentCharacterIsSpace || (breakNBSP && c == noBreakSpace); 2329 currentCharacterIsWS = currentCharacterIsSpace || (breakNBSP && c == noBreakSpace);
2330 2330
2331 if ((breakAll || breakWords) && !midWordBreak) { 2331 if ((breakAll || breakWords) && !midWordBreak) {
2332 wrapW += charWidth; 2332 wrapW += charWidth;
2333 bool midWordBreakIsBeforeSurrogatePair = U16_IS_LEAD(c) && c urrent.m_pos + 1 < t->textLength() && U16_IS_TRAIL(t->characters()[current.m_pos + 1]); 2333 bool midWordBreakIsBeforeSurrogatePair = U16_IS_LEAD(c) && c urrent.m_pos + 1 < t->textLength() && U16_IS_TRAIL(t->characters()[current.m_pos + 1]);
2334 charWidth = textWidth(t, current.m_pos, midWordBreakIsBefore SurrogatePair ? 2 : 1, f, width.committedWidth() + wrapW, isFixedPitch, collapse WhiteSpace); 2334 charWidth = textWidth(t, current.m_pos, midWordBreakIsBefore SurrogatePair ? 2 : 1, f, width.committedWidth() + wrapW, isFixedPitch, collapse WhiteSpace);
2335 midWordBreak = width.committedWidth() + wrapW + charWidth > width.availableWidth(); 2335 midWordBreak = width.committedWidth() + wrapW + charWidth > width.availableWidth();
2336 } 2336 }
2337 2337
2338 if (lineBreakIteratorInfo.first != t) { 2338 if ((lineBreakIteratorInfo.first != t) || (lineBreakIteratorInfo .second.string() != t->characters())) {
2339 lineBreakIteratorInfo.first = t; 2339 lineBreakIteratorInfo.first = t;
2340 lineBreakIteratorInfo.second.reset(t->characters(), t->textL ength(), style->locale()); 2340 lineBreakIteratorInfo.second.reset(t->characters(), t->textL ength(), style->locale());
2341 } 2341 }
2342 2342
2343 bool betweenWords = c == '\n' || (currWS != PRE && !atStart && i sBreakable(lineBreakIteratorInfo.second, current.m_pos, current.m_nextBreakableP osition, breakNBSP) 2343 bool betweenWords = c == '\n' || (currWS != PRE && !atStart && i sBreakable(lineBreakIteratorInfo.second, current.m_pos, current.m_nextBreakableP osition, breakNBSP)
2344 && (style->hyphens() != HyphensNone || (current.previousInSa meNode() != softHyphen))); 2344 && (style->hyphens() != HyphensNone || (current.previousInSa meNode() != softHyphen)));
2345 2345
2346 if (betweenWords || midWordBreak) { 2346 if (betweenWords || midWordBreak) {
2347 bool stoppedIgnoringSpaces = false; 2347 bool stoppedIgnoringSpaces = false;
2348 if (ignoringSpaces) { 2348 if (ignoringSpaces) {
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
2747 availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), false) - logicalLeft; 2747 availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), false) - logicalLeft;
2748 float totalLogicalWidth = logicalWidthForChild(child); 2748 float totalLogicalWidth = logicalWidthForChild(child);
2749 updateLogicalWidthForAlignment(textAlign, 0l, logicalLeft, totalLogicalWidth , availableLogicalWidth, 0); 2749 updateLogicalWidthForAlignment(textAlign, 0l, logicalLeft, totalLogicalWidth , availableLogicalWidth, 0);
2750 2750
2751 if (!style()->isLeftToRightDirection()) 2751 if (!style()->isLeftToRightDirection())
2752 return logicalWidth() - (logicalLeft + totalLogicalWidth); 2752 return logicalWidth() - (logicalLeft + totalLogicalWidth);
2753 return logicalLeft; 2753 return logicalLeft;
2754 } 2754 }
2755 2755
2756 } 2756 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/counters/asterisk-counter-update-after-layout-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698