Title: [222792] trunk
Revision
222792
Author
[email protected]
Date
2017-10-03 11:39:30 -0700 (Tue, 03 Oct 2017)

Log Message

REGRESSION(r221909): Failing fast/text/international/iso-8859-8.html
https://bugs.webkit.org/show_bug.cgi?id=177364

Patch by Fujii Hironori <[email protected]> on 2017-10-03
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Range.getClientRects returned an incorrect rect for a last
collapsed space of RenderText in HarfBuzz port.

HarfBuzzShaper::selectionRect needs to return a valid value even
if the arguments 'from' and 'to' point to the just after the end
of the text run.

Tests: fast/text/international/iso-8859-8.html

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::shape): Do not check the return value of
fillGlyphBuffer.
(WebCore::HarfBuzzShaper::fillGlyphBuffer): Change the return
value type from bool to void.
(WebCore::HarfBuzzShaper::selectionRect): Set the rightmost
position to fromX if foundFromX is false.
* platform/graphics/harfbuzz/HarfBuzzShaper.h: Change the return
value type of fillGlyphBuffer from bool to void.

LayoutTests:

* platform/gtk/TestExpectations: Unmark fast/text/international/iso-8859-8.html.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (222791 => 222792)


--- trunk/LayoutTests/ChangeLog	2017-10-03 18:33:14 UTC (rev 222791)
+++ trunk/LayoutTests/ChangeLog	2017-10-03 18:39:30 UTC (rev 222792)
@@ -1,3 +1,12 @@
+2017-10-03  Fujii Hironori  <[email protected]>
+
+        REGRESSION(r221909): Failing fast/text/international/iso-8859-8.html
+        https://bugs.webkit.org/show_bug.cgi?id=177364
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/gtk/TestExpectations: Unmark fast/text/international/iso-8859-8.html.
+
 2017-10-03  Zalan Bujtas  <[email protected]>
 
         [AX] Do not trigger redundant layout on tables.

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (222791 => 222792)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2017-10-03 18:33:14 UTC (rev 222791)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2017-10-03 18:39:30 UTC (rev 222792)
@@ -3446,8 +3446,6 @@
 
 webkit.org/b/177363 imported/w3c/web-platform-tests/css/css-ui-3/text-overflow-022.html [ ImageOnlyFailure ]
 
-webkit.org/b/177364 fast/text/international/iso-8859-8.html [ Failure ]
-
 webkit.org/b/175661 inspector/worker/resources-in-worker.html [ Failure ]
 
 webkit.org/b/175662 inspector/canvas/recording-2d.html [ Failure ]

Modified: trunk/Source/WebCore/ChangeLog (222791 => 222792)


--- trunk/Source/WebCore/ChangeLog	2017-10-03 18:33:14 UTC (rev 222791)
+++ trunk/Source/WebCore/ChangeLog	2017-10-03 18:39:30 UTC (rev 222792)
@@ -1,3 +1,29 @@
+2017-10-03  Fujii Hironori  <[email protected]>
+
+        REGRESSION(r221909): Failing fast/text/international/iso-8859-8.html
+        https://bugs.webkit.org/show_bug.cgi?id=177364
+
+        Reviewed by Carlos Garcia Campos.
+
+        Range.getClientRects returned an incorrect rect for a last
+        collapsed space of RenderText in HarfBuzz port.
+
+        HarfBuzzShaper::selectionRect needs to return a valid value even
+        if the arguments 'from' and 'to' point to the just after the end
+        of the text run.
+
+        Tests: fast/text/international/iso-8859-8.html
+
+        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
+        (WebCore::HarfBuzzShaper::shape): Do not check the return value of
+        fillGlyphBuffer.
+        (WebCore::HarfBuzzShaper::fillGlyphBuffer): Change the return
+        value type from bool to void.
+        (WebCore::HarfBuzzShaper::selectionRect): Set the rightmost
+        position to fromX if foundFromX is false.
+        * platform/graphics/harfbuzz/HarfBuzzShaper.h: Change the return
+        value type of fillGlyphBuffer from bool to void.
+
 2017-10-03  JF Bastien  <[email protected]>
 
         WebAssembly: no VM / JS version of everything but Instance

Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (222791 => 222792)


--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp	2017-10-03 18:33:14 UTC (rev 222791)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp	2017-10-03 18:39:30 UTC (rev 222792)
@@ -354,8 +354,8 @@
         return false;
     m_totalWidth = roundf(m_totalWidth);
 
-    if (glyphBuffer && !fillGlyphBuffer(glyphBuffer, from.value_or(0), to.value_or(m_run.length())))
-        return false;
+    if (glyphBuffer)
+        fillGlyphBuffer(glyphBuffer, from.value_or(0), to.value_or(m_run.length()));
 
     return true;
 }
@@ -606,7 +606,7 @@
     }
 }
 
-bool HarfBuzzShaper::fillGlyphBuffer(GlyphBuffer* glyphBuffer, unsigned from, unsigned to)
+void HarfBuzzShaper::fillGlyphBuffer(GlyphBuffer* glyphBuffer, unsigned from, unsigned to)
 {
     unsigned numRuns = m_harfBuzzRuns.size();
     if (m_run.rtl()) {
@@ -634,7 +634,6 @@
             }
         }
     }
-    return glyphBuffer->size();
 }
 
 int HarfBuzzShaper::offsetForPosition(float targetX, bool includePartialGlyphs)
@@ -716,7 +715,7 @@
 
     // The position in question might be just after the text.
     if (!foundFromX)
-        fromX = 0;
+        fromX = m_run.rtl() ? 0 : m_totalWidth;
     if (!foundToX)
         toX = m_run.rtl() ? 0 : m_totalWidth;
 

Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h (222791 => 222792)


--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h	2017-10-03 18:33:14 UTC (rev 222791)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h	2017-10-03 18:39:30 UTC (rev 222792)
@@ -113,7 +113,7 @@
 
     bool collectHarfBuzzRuns();
     bool shapeHarfBuzzRuns(bool shouldSetDirection);
-    bool fillGlyphBuffer(GlyphBuffer*, unsigned from, unsigned to);
+    void fillGlyphBuffer(GlyphBuffer*, unsigned from, unsigned to);
     void fillGlyphBufferFromHarfBuzzRun(GlyphBuffer*, unsigned from, unsigned to, HarfBuzzRun*, const FloatPoint& firstOffsetOfNextRun);
     void setGlyphPositionsForHarfBuzzRun(HarfBuzzRun*, hb_buffer_t*);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to