diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index a8a3ca18f9a8..c86e28df6895 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,23 @@ +2017-09-27 Fujii Hironori + + [REGRESSION] word-spacing property is incorrectly applied + https://bugs.webkit.org/show_bug.cgi?id=142086 + + + Reviewed by Zalan Bujtas. + + * platform/gtk/TestExpectations: Unmark + fast/text/word-space-between-inlines.html + * platform/mac/TestExpectations: Unmark + fast/css/word-spacing-between-blocks.html, + fast/css/word-spacing-between-inlines.html, + fast/css/word-spacing-characters.html and + fast/text/word-space-between-inlines.html. + * platform/gtk/fast/css/word-space-extra-expected.txt: + Rebaselined. + * platform/mac/fast/css/word-space-extra-expected.png: Ditto. + * platform/mac/fast/css/word-space-extra-expected.txt: Ditto. + 2017-09-27 Zalan Bujtas Deferred image size change makes image-load-on-delay.html flaky. diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations index 41c24d74263d..5f6bff61cff9 100644 --- a/LayoutTests/platform/mac/TestExpectations +++ b/LayoutTests/platform/mac/TestExpectations @@ -1052,12 +1052,6 @@ fast/canvas/canvas-fillRect-gradient-shadow.html [ Pass Failure ] # SVG gradients are not bit-for-bit equivalent through a scale. webkit.org/b/142192 svg/transforms/transformed-text-fill-gradient.html [ ImageOnlyFailure ] -# Word-spacing is incorrectly applied -webkit.org/b/142086 fast/css/word-spacing-between-blocks.html [ ImageOnlyFailure ] -webkit.org/b/142086 fast/css/word-spacing-between-inlines.html [ ImageOnlyFailure ] -webkit.org/b/142086 fast/css/word-spacing-characters.html [ ImageOnlyFailure ] -webkit.org/b/142086 fast/text/word-space-between-inlines.html [ ImageOnlyFailure ] - # Underlines' starting and ending positions need to be pixel-snapped webkit.org/b/142087 fast/css3-text/css3-text-decoration/no-gap-between-two-rounded-textboxes.html [ ImageOnlyFailure ] webkit.org/b/142087 fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-inherit.html [ ImageOnlyFailure ] diff --git a/LayoutTests/platform/mac/fast/css/word-space-extra-expected.png b/LayoutTests/platform/mac/fast/css/word-space-extra-expected.png index eb0dff80f4ae..90e4c18f3214 100644 Binary files a/LayoutTests/platform/mac/fast/css/word-space-extra-expected.png and b/LayoutTests/platform/mac/fast/css/word-space-extra-expected.png differ diff --git a/LayoutTests/platform/mac/fast/css/word-space-extra-expected.txt b/LayoutTests/platform/mac/fast/css/word-space-extra-expected.txt index b1a6b15c00be..18cd17b05457 100644 --- a/LayoutTests/platform/mac/fast/css/word-space-extra-expected.txt +++ b/LayoutTests/platform/mac/fast/css/word-space-extra-expected.txt @@ -441,7 +441,7 @@ layer at (0,0) size 785x2404 text run at (371,200) width 142: " elements too" RenderText {#text} at (512,198) size 776x36 text run at (512,198) width 264: ". (with monospace font from" - text run at (0,216) width 148: "elements to too) " + text run at (0,216) width 168: "elements to too) " RenderText {#text} at (0,0) size 0x0 RenderBR {BR} at (0,0) size 0x0 RenderBR {BR} at (0,234) size 0x18 diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index f4b24787d2f3..0c0bdf63dfde 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,23 @@ +2017-09-27 Fujii Hironori + + [REGRESSION] word-spacing property is incorrectly applied + https://bugs.webkit.org/show_bug.cgi?id=142086 + + + Reviewed by Zalan Bujtas. + + word-spacing property isn't applied to text nodes with starting + with '\n' if the kerning enabled. In Bug 165796, only ' ' and '\t' + are treated for word-spacing, but '\n'. It should be treated as + well. + + Test: fast/text/word-space-between-inlines.html + + * rendering/RenderBlockLineLayout.cpp: + (WebCore::setLogicalWidthForTextRun): Use + FontCascade::treatAsSpace() instead of checking explicitly by + comparing with ' ' and '\t'. + 2017-09-27 Zan Dobersek [Cairo] Remove unnecessary cairo.h includes diff --git a/Source/WebCore/rendering/RenderBlockLineLayout.cpp b/Source/WebCore/rendering/RenderBlockLineLayout.cpp index ac7cfbe05a34..81cbc248c12c 100644 --- a/Source/WebCore/rendering/RenderBlockLineLayout.cpp +++ b/Source/WebCore/rendering/RenderBlockLineLayout.cpp @@ -504,7 +504,7 @@ static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru &wordMeasurement.fallbackFonts, &overflow); UChar c = renderer.characterAt(wordMeasurement.startOffset); // renderer.width() omits word-spacing value for leading whitespace, so let's just add it back here. - if (!atFirstWordMeasurement && (c == ' ' || c == '\t')) + if (!atFirstWordMeasurement && FontCascade::treatAsSpace(c)) measuredWidth += renderer.style().fontCascade().wordSpacing(); } else measuredWidth += wordMeasurement.width;