Changeset 211680 in webkit
- Timestamp:
- Feb 5, 2017, 6:41:10 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r211667 r211680 1 2017-02-05 Zalan Bujtas <zalan@apple.com> 2 3 Simple line layout: Bail out from Simple Line Layout on surrogate pairs. 4 https://bugs.webkit.org/show_bug.cgi?id=167840 5 <rdar://problem/30364784> 6 7 Reviewed by Myles C. Maxfield. 8 9 * fast/text/simple-line-layout-no-surrogate-pairs-expected.html: Added. 10 * fast/text/simple-line-layout-no-surrogate-pairs.html: Added. 11 1 12 2017-02-03 Myles C. Maxfield <mmaxfield@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r211677 r211680 1 2017-02-05 Zalan Bujtas <zalan@apple.com> 2 3 Simple line layout: Bail out from Simple Line Layout on surrogate pairs. 4 https://bugs.webkit.org/show_bug.cgi?id=167840 5 <rdar://problem/30364784> 6 7 Reviewed by Myles C. Maxfield. 8 9 Surrogate pairs require special line breaking logic. 10 11 Test: fast/text/simple-line-layout-no-surrogate-pairs.html 12 13 * rendering/SimpleLineLayout.cpp: 14 (WebCore::SimpleLineLayout::canUseForCharacter): 15 (WebCore::SimpleLineLayout::canUseForText): Checking against special characters is faster than 16 checking against glyphs. Reverse their order. 17 (WebCore::SimpleLineLayout::printReason): 18 1 19 2017-02-04 Joseph Pecoraro <pecoraro@apple.com> 2 20 -
trunk/Source/WebCore/rendering/SimpleLineLayout.cpp
r211671 r211680 114 114 FlowHasHangingPunctuation = 1LLU << 48, 115 115 FlowFontHasOverflowGlyph = 1LLU << 49, 116 EndOfReasons = 1LLU << 50 116 FlowTextHasSurrogatePair = 1LLU << 50, 117 EndOfReasons = 1LLU << 51 117 118 }; 118 119 const unsigned NoReason = 0; … … 151 152 } 152 153 154 if (U16_IS_SURROGATE(character)) 155 SET_REASON_AND_RETURN_IF_NEEDED(FlowTextHasSurrogatePair, reasons, includeReasons); 156 153 157 UCharDirection direction = u_charDirection(character); 154 158 if (direction == U_RIGHT_TO_LEFT || direction == U_RIGHT_TO_LEFT_ARABIC … … 180 184 SET_REASON_AND_RETURN_IF_NEEDED(FlowTextHasSoftHyphen, reasons, includeReasons); 181 185 186 auto characterReasons = canUseForCharacter(character, textIsJustified, includeReasons); 187 if (characterReasons != NoReason) 188 SET_REASON_AND_RETURN_IF_NEEDED(characterReasons, reasons, includeReasons); 189 182 190 auto glyphData = fontCascade.glyphDataForCharacter(character, false); 183 191 if (!glyphData.isValid() || glyphData.font != &primaryFont) … … 186 194 if (lineHeightConstraint && primaryFont.boundsForGlyph(glyphData.glyph).height() > *lineHeightConstraint) 187 195 SET_REASON_AND_RETURN_IF_NEEDED(FlowFontHasOverflowGlyph, reasons, includeReasons); 188 189 auto characterReasons = canUseForCharacter(character, textIsJustified, includeReasons);190 if (characterReasons != NoReason)191 SET_REASON_AND_RETURN_IF_NEEDED(characterReasons, reasons, includeReasons);192 196 } 193 197 return reasons; … … 1081 1085 stream << "-webkit-line-box-contain: glyphs with overflowing text."; 1082 1086 break; 1087 case FlowTextHasSurrogatePair: 1088 stream << "surrogate pair"; 1089 break; 1083 1090 case FlowTextIsEmpty: 1084 1091 case FlowHasNoChild:
Note:
See TracChangeset
for help on using the changeset viewer.