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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

Issue 2188043004: Collect metrics for hyphenation dictionary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add #if OS(ANDROID) Created 4 years, 4 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 | « no previous file | 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 * Copyright (C) 2013 Adobe Systems Incorporated. 5 * Copyright (C) 2013 Adobe Systems Incorporated.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 bool breakAll = m_currentStyle->wordBreak() == BreakAllWordBreak && m_autoWr ap; 736 bool breakAll = m_currentStyle->wordBreak() == BreakAllWordBreak && m_autoWr ap;
737 bool keepAll = m_currentStyle->wordBreak() == KeepAllWordBreak && m_autoWrap ; 737 bool keepAll = m_currentStyle->wordBreak() == KeepAllWordBreak && m_autoWrap ;
738 bool prohibitBreakInside = m_currentStyle->hasTextCombine() && layoutText.is CombineText() && LineLayoutTextCombine(layoutText).isCombined(); 738 bool prohibitBreakInside = m_currentStyle->hasTextCombine() && layoutText.is CombineText() && LineLayoutTextCombine(layoutText).isCombined();
739 739
740 // This is currently only used for word-break: break-all, specifically for t he case 740 // This is currently only used for word-break: break-all, specifically for t he case
741 // where we have a break opportunity within a word, then a string of non-bre akable 741 // where we have a break opportunity within a word, then a string of non-bre akable
742 // content that ends up making our word wider than the current line. 742 // content that ends up making our word wider than the current line.
743 // See: fast/css3-text/css3-word-break/word-break-all-wrap-with-floats.html 743 // See: fast/css3-text/css3-word-break/word-break-all-wrap-with-floats.html
744 float widthMeasurementAtLastBreakOpportunity = 0; 744 float widthMeasurementAtLastBreakOpportunity = 0;
745 745
746 #if OS(ANDROID)
747 // TODO(kojii): Temporary call getHyphenation() to measure the performance.
748 style.getFontDescription().localeOrDefault().getHyphenation();
749 #endif
746 Hyphenation* hyphenation = style.getHyphenation(); 750 Hyphenation* hyphenation = style.getHyphenation();
747 bool disableSoftHyphen = style.getHyphens() == HyphensNone; 751 bool disableSoftHyphen = style.getHyphens() == HyphensNone;
748 float hyphenWidth = 0; 752 float hyphenWidth = 0;
749 753
750 if (layoutText.isSVGInlineText()) { 754 if (layoutText.isSVGInlineText()) {
751 breakWords = false; 755 breakWords = false;
752 breakAll = false; 756 breakAll = false;
753 keepAll = false; 757 keepAll = false;
754 } 758 }
755 759
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 1194
1191 if (style.getTextIndentType() == TextIndentHanging) 1195 if (style.getTextIndentType() == TextIndentHanging)
1192 indentText = indentText == IndentText ? DoNotIndentText : IndentText; 1196 indentText = indentText == IndentText ? DoNotIndentText : IndentText;
1193 1197
1194 return indentText; 1198 return indentText;
1195 } 1199 }
1196 1200
1197 } // namespace blink 1201 } // namespace blink
1198 1202
1199 #endif // BreakingContextInlineHeaders_h 1203 #endif // BreakingContextInlineHeaders_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698