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

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

Issue 2614743004: Fix 'hyphens: auto' to work only when wrapping is allowed (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/Source/core/layout/LayoutText.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. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All right reserved. 4 * All right reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * Copyright (C) 2013 Adobe Systems Incorporated. 6 * Copyright (C) 2013 Adobe Systems Incorporated.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 bool prohibitBreakInside = m_currentStyle->hasTextCombine() && 951 bool prohibitBreakInside = m_currentStyle->hasTextCombine() &&
952 layoutText.isCombineText() && 952 layoutText.isCombineText() &&
953 LineLayoutTextCombine(layoutText).isCombined(); 953 LineLayoutTextCombine(layoutText).isCombined();
954 954
955 // This is currently only used for word-break: break-all, specifically for the 955 // This is currently only used for word-break: break-all, specifically for the
956 // case where we have a break opportunity within a word, then a string of non- 956 // case where we have a break opportunity within a word, then a string of non-
957 // breakable content that ends up making our word wider than the current line. 957 // breakable content that ends up making our word wider than the current line.
958 // See: fast/css3-text/css3-word-break/word-break-all-wrap-with-floats.html 958 // See: fast/css3-text/css3-word-break/word-break-all-wrap-with-floats.html
959 float widthMeasurementAtLastBreakOpportunity = 0; 959 float widthMeasurementAtLastBreakOpportunity = 0;
960 960
961 Hyphenation* hyphenation = style.getHyphenation(); 961 Hyphenation* hyphenation = m_autoWrap ? style.getHyphenation() : nullptr;
962 bool disableSoftHyphen = style.getHyphens() == HyphensNone; 962 bool disableSoftHyphen = style.getHyphens() == HyphensNone;
963 float hyphenWidth = 0; 963 float hyphenWidth = 0;
964 bool isLineEmpty = m_lineInfo.isEmpty(); 964 bool isLineEmpty = m_lineInfo.isEmpty();
965 965
966 if (layoutText.isSVGInlineText()) { 966 if (layoutText.isSVGInlineText()) {
967 breakWords = false; 967 breakWords = false;
968 breakAll = false; 968 breakAll = false;
969 keepAll = false; 969 keepAll = false;
970 } 970 }
971 971
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 1542
1543 if (style.getTextIndentType() == TextIndentHanging) 1543 if (style.getTextIndentType() == TextIndentHanging)
1544 indentText = indentText == IndentText ? DoNotIndentText : IndentText; 1544 indentText = indentText == IndentText ? DoNotIndentText : IndentText;
1545 1545
1546 return indentText; 1546 return indentText;
1547 } 1547 }
1548 1548
1549 } // namespace blink 1549 } // namespace blink
1550 1550
1551 #endif // BreakingContextInlineHeaders_h 1551 #endif // BreakingContextInlineHeaders_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698