Changeset 176527 in webkit
- Timestamp:
- Nov 24, 2014, 4:10:17 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/text/simple-line-layout-multiple-renderers-non-breaking-space-expected.html (added)
-
LayoutTests/fast/text/simple-line-layout-multiple-renderers-non-breaking-space.html (added)
-
LayoutTests/fast/text/simple-line-layout-multiple-renderers-with-float-expected.html (added)
-
LayoutTests/fast/text/simple-line-layout-multiple-renderers-with-float.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/SimpleLineLayout.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r176525 r176527 1 2014-11-24 Zalan Bujtas <zalan@apple.com> 2 3 SimpleLineLayout::canUseFor() should iterate through RenderTexts to check if their content is eligible for simple line layout. 4 https://bugs.webkit.org/show_bug.cgi?id=139007 5 6 Reviewed by Antti Koivisto. 7 8 * fast/text/simple-line-layout-multiple-renderers-non-breaking-space-expected.html: Added. 9 * fast/text/simple-line-layout-multiple-renderers-non-breaking-space.html: Added. 10 * fast/text/simple-line-layout-multiple-renderers-with-float-expected.html: Added. 11 * fast/text/simple-line-layout-multiple-renderers-with-float.html: Added. 12 1 13 2014-11-24 Zalan Bujtas <zalan@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r176524 r176527 1 2014-11-24 Zalan Bujtas <zalan@apple.com> 2 3 SimpleLineLayout::canUseFor() should iterate through RenderTexts to check if their content is eligible for simple line layout. 4 https://bugs.webkit.org/show_bug.cgi?id=139007 5 6 Reviewed by Antti Koivisto. 7 8 Tests: fast/text/simple-line-layout-multiple-renderers-non-breaking-space.html 9 fast/text/simple-line-layout-multiple-renderers-with-float.html 10 11 * rendering/SimpleLineLayout.cpp: 12 (WebCore::SimpleLineLayout::canUseFor): 13 1 14 2014-11-22 Sam Weinig <sam@webkit.org> 2 15 -
trunk/Source/WebCore/rendering/SimpleLineLayout.cpp
r176521 r176527 164 164 if (style.lineBreak() != LineBreakAuto) 165 165 return false; 166 const RenderText& textRenderer = downcast<RenderText>(*flow.firstChild()); 166 167 // We can't use the code path if any lines would need to be shifted below floats. This is because we don't keep per-line y coordinates. 167 168 if (flow.containsFloats()) { 168 // We can't use the code path if any lines would need to be shifted below floats. This is because we don't keep per-line y coordinates. 169 float minimumWidthNeeded = textRenderer.minLogicalWidth(); 169 float minimumWidthNeeded = std::numeric_limits<float>::max(); 170 for (const auto& textRenderer : childrenOfType<RenderText>(flow)) 171 minimumWidthNeeded = std::min(minimumWidthNeeded, textRenderer.minLogicalWidth()); 172 170 173 for (auto& floatRenderer : *flow.floatingObjectSet()) { 171 174 ASSERT(floatRenderer); … … 175 178 } 176 179 } 177 if (textRenderer.isCombineText() || textRenderer.isCounter() || textRenderer.isQuote() || textRenderer.isTextFragment()178 || textRenderer.isSVGInlineText())179 return false;180 if (style.font().codePath(TextRun(textRenderer.text())) != Font::Simple)181 return false;182 180 if (style.font().primaryFont()->isSVGFont()) 183 181 return false; 184 185 182 // We assume that all lines have metrics based purely on the primary font. 186 183 auto& primaryFontData = *style.font().primaryFont(); 187 184 if (primaryFontData.isLoading()) 188 185 return false; 189 if (!canUseForText(textRenderer, primaryFontData)) 190 return false; 191 186 for (const auto& textRenderer : childrenOfType<RenderText>(flow)) { 187 if (textRenderer.isCombineText() || textRenderer.isCounter() || textRenderer.isQuote() || textRenderer.isTextFragment() 188 || textRenderer.isSVGInlineText()) 189 return false; 190 if (style.font().codePath(TextRun(textRenderer.text())) != Font::Simple) 191 return false; 192 if (!canUseForText(textRenderer, primaryFontData)) 193 return false; 194 } 192 195 return true; 193 196 }
Note:
See TracChangeset
for help on using the changeset viewer.