Title: [200020] releases/WebKitGTK/webkit-2.12
Revision
200020
Author
[email protected]
Date
2016-04-25 08:41:32 -0700 (Mon, 25 Apr 2016)

Log Message

Merge r199703 - [GTK] Possible off-by-one in hyphenation code
https://bugs.webkit.org/show_bug.cgi?id=156661

Patch by Martin Robinson <[email protected]> on 2016-04-18
Reviewed by Michael Catanzaro.

Source/WebCore:

No new tests. This is covered by older tests.

* platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::lastHyphenLocation): Fix an off by one error in hyphen location.

LayoutTests:

* platform/gtk/TestExpectations: Unskip a test that is now passing.
* platform/gtk/fast/text/hyphenate-character-expected.png:
* platform/gtk/fast/text/hyphenate-character-expected.txt:
* platform/gtk/fast/text/hyphenate-first-word-expected.png:
* platform/gtk/fast/text/hyphenate-first-word-expected.txt:
* platform/gtk/fast/text/hyphenate-limit-before-after-expected.png:
* platform/gtk/fast/text/hyphenate-limit-before-after-expected.txt:
* platform/gtk/fast/text/hyphenate-limit-lines-expected.png:
* platform/gtk/fast/text/hyphenate-limit-lines-expected.txt:
* platform/gtk/fast/text/hyphenate-locale-expected.png:
* platform/gtk/fast/text/hyphenate-locale-expected.txt:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (200019 => 200020)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-04-25 15:39:46 UTC (rev 200019)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-04-25 15:41:32 UTC (rev 200020)
@@ -1,3 +1,22 @@
+2016-04-18  Martin Robinson  <[email protected]>
+
+        [GTK] Possible off-by-one in hyphenation code
+        https://bugs.webkit.org/show_bug.cgi?id=156661
+
+        Reviewed by Michael Catanzaro.
+
+        * platform/gtk/TestExpectations: Unskip a test that is now passing.
+        * platform/gtk/fast/text/hyphenate-character-expected.png:
+        * platform/gtk/fast/text/hyphenate-character-expected.txt:
+        * platform/gtk/fast/text/hyphenate-first-word-expected.png:
+        * platform/gtk/fast/text/hyphenate-first-word-expected.txt:
+        * platform/gtk/fast/text/hyphenate-limit-before-after-expected.png:
+        * platform/gtk/fast/text/hyphenate-limit-before-after-expected.txt:
+        * platform/gtk/fast/text/hyphenate-limit-lines-expected.png:
+        * platform/gtk/fast/text/hyphenate-limit-lines-expected.txt:
+        * platform/gtk/fast/text/hyphenate-locale-expected.png:
+        * platform/gtk/fast/text/hyphenate-locale-expected.txt:
+
 2016-04-18  Brent Fulgham  <[email protected]>
 
         Remove support for X-Frame-Options in `<meta>`

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/TestExpectations (200019 => 200020)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/TestExpectations	2016-04-25 15:39:46 UTC (rev 200019)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/TestExpectations	2016-04-25 15:41:32 UTC (rev 200020)
@@ -2371,8 +2371,6 @@
 webkit.org/b/143471 canvas/philip/tests/2d.drawImage.animated.poster.html [ Failure ]
 webkit.org/b/143871 svg/W3C-SVG-1.1-SE/linking-uri-01-b.svg [ Failure ]
 
-webkit.org/b/143924 fast/text/hyphen-min-preferred-width.html [ Skip ]
-
 webkit.org/b/144575 http/tests/loading/promote-img-preload-priority.html [ Failure ]
 
 webkit.org/b/144673 fast/forms/button-line-height.html [ ImageOnlyFailure ]

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-character-expected.png


(Binary files differ)

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-character-expected.txt (200019 => 200020)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-character-expected.txt	2016-04-25 15:39:46 UTC (rev 200019)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-character-expected.txt	2016-04-25 15:41:32 UTC (rev 200020)
@@ -17,18 +17,18 @@
           RenderText {#text} at (7,7) size 330x200
             text run at (7,7) width 245: "The chief difficulty Alice found"
             text run at (7,27) width 245: "at first was in managing her"
-            text run at (7,47) width 245: "flamingo: she succeeded in ge" + hyphen string "\x{2010}"
-            text run at (7,67) width 222: "tting its body tucked away, "
-            text run at (229,67) width 23: "co" + hyphen string "\x{2010}"
-            text run at (7,87) width 245: "mfortably enough, under her"
-            text run at (7,107) width 248: "arm, with its legs hanging down, "
-            text run at (254,107) width 83: "but genera" + hyphen string "\x{2010}"
-            text run at (7,127) width 330: "lly, just as she had got its neck nicely"
-            text run at (7,147) width 96: "straightened "
-            text run at (102,147) width 235: "out, and was going to give the"
-            text run at (7,167) width 285: "hedgehog a blow with its head, it "
-            text run at (292,167) width 45: "would"
-            text run at (7,187) width 314: "twist itself round and look up in her face\x{2026}"
+            text run at (7,47) width 245: "flamingo: she succeeded in get" + hyphen string "\x{2010}"
+            text run at (7,67) width 208: "ting its body tucked away, "
+            text run at (215,67) width 37: "com" + hyphen string "\x{2010}"
+            text run at (7,87) width 245: "fortably enough, under her arm,"
+            text run at (7,107) width 226: "with its legs hanging down, "
+            text run at (233,107) width 104: "but generally,"
+            text run at (7,127) width 330: "just as she had got its neck nicely straight" + hyphen string "\x{2010}"
+            text run at (7,147) width 42: "ened "
+            text run at (48,147) width 289: "out, and was going to give the hedge" + hyphen string "\x{2010}"
+            text run at (7,167) width 204: "hog a blow with its head, it "
+            text run at (211,167) width 126: "would twist itself"
+            text run at (7,187) width 233: "round and look up in her face\x{2026}"
       RenderBlock (floating) {DIV} at (356,0) size 344x264
         RenderBlock {P} at (0,16) size 344x18
           RenderText {#text} at (0,0) size 81x17
@@ -43,18 +43,18 @@
           RenderText {#text} at (7,7) size 330x200
             text run at (7,7) width 245: "The chief difficulty Alice found"
             text run at (7,27) width 245: "at first was in managing her"
-            text run at (7,47) width 245: "flamingo: she succeeded in ge" + hyphen string "\x{2010}"
-            text run at (7,67) width 222: "tting its body tucked away, "
-            text run at (229,67) width 23: "co" + hyphen string "\x{2010}"
-            text run at (7,87) width 245: "mfortably enough, under her"
-            text run at (7,107) width 248: "arm, with its legs hanging down, "
-            text run at (254,107) width 83: "but genera" + hyphen string "\x{2010}"
-            text run at (7,127) width 330: "lly, just as she had got its neck nicely"
-            text run at (7,147) width 96: "straightened "
-            text run at (102,147) width 235: "out, and was going to give the"
-            text run at (7,167) width 285: "hedgehog a blow with its head, it "
-            text run at (292,167) width 45: "would"
-            text run at (7,187) width 314: "twist itself round and look up in her face\x{2026}"
+            text run at (7,47) width 245: "flamingo: she succeeded in get" + hyphen string "\x{2010}"
+            text run at (7,67) width 208: "ting its body tucked away, "
+            text run at (215,67) width 37: "com" + hyphen string "\x{2010}"
+            text run at (7,87) width 245: "fortably enough, under her arm,"
+            text run at (7,107) width 226: "with its legs hanging down, "
+            text run at (233,107) width 104: "but generally,"
+            text run at (7,127) width 330: "just as she had got its neck nicely straight" + hyphen string "\x{2010}"
+            text run at (7,147) width 42: "ened "
+            text run at (48,147) width 289: "out, and was going to give the hedge" + hyphen string "\x{2010}"
+            text run at (7,167) width 204: "hog a blow with its head, it "
+            text run at (211,167) width 126: "would twist itself"
+            text run at (7,187) width 233: "round and look up in her face\x{2026}"
       RenderBlock (floating) {DIV} at (4,264) size 344x264
         RenderBlock {P} at (0,16) size 344x18
           RenderText {#text} at (0,0) size 47x17
@@ -69,18 +69,18 @@
           RenderText {#text} at (7,7) size 330x200
             text run at (7,7) width 245: "The chief difficulty Alice found"
             text run at (7,27) width 245: "at first was in managing her"
-            text run at (7,47) width 245: "flamingo: she succeeded in ge" + hyphen string "\x{2022}"
-            text run at (7,67) width 222: "tting its body tucked away, "
-            text run at (229,67) width 23: "co" + hyphen string "\x{2022}"
-            text run at (7,87) width 245: "mfortably enough, under her"
-            text run at (7,107) width 248: "arm, with its legs hanging down, "
-            text run at (254,107) width 83: "but genera" + hyphen string "\x{2022}"
-            text run at (7,127) width 330: "lly, just as she had got its neck nicely"
-            text run at (7,147) width 96: "straightened "
-            text run at (102,147) width 235: "out, and was going to give the"
-            text run at (7,167) width 285: "hedgehog a blow with its head, it "
-            text run at (292,167) width 45: "would"
-            text run at (7,187) width 314: "twist itself round and look up in her face\x{2026}"
+            text run at (7,47) width 245: "flamingo: she succeeded in get" + hyphen string "\x{2022}"
+            text run at (7,67) width 208: "ting its body tucked away, "
+            text run at (215,67) width 37: "com" + hyphen string "\x{2022}"
+            text run at (7,87) width 245: "fortably enough, under her arm,"
+            text run at (7,107) width 226: "with its legs hanging down, "
+            text run at (233,107) width 104: "but generally,"
+            text run at (7,127) width 330: "just as she had got its neck nicely straight" + hyphen string "\x{2022}"
+            text run at (7,147) width 42: "ened "
+            text run at (48,147) width 289: "out, and was going to give the hedge" + hyphen string "\x{2022}"
+            text run at (7,167) width 204: "hog a blow with its head, it "
+            text run at (211,167) width 126: "would twist itself"
+            text run at (7,187) width 233: "round and look up in her face\x{2026}"
       RenderBlock (floating) {DIV} at (356,264) size 357x264
         RenderBlock {P} at (0,16) size 357x18
           RenderText {#text} at (0,0) size 136x17
@@ -95,15 +95,15 @@
           RenderText {#text} at (7,7) size 330x200
             text run at (7,7) width 245: "The chief difficulty Alice found"
             text run at (7,27) width 245: "at first was in managing her"
-            text run at (7,47) width 245: "flamingo: she succeeded in ge" + hyphen string "\x{B7}~"
-            text run at (7,67) width 213: "tting its body tucked away, "
-            text run at (220,67) width 32: "co" + hyphen string "\x{B7}~"
-            text run at (7,87) width 245: "mfortably enough, under her"
-            text run at (7,107) width 252: "arm, with its legs hanging down, "
-            text run at (258,107) width 79: "but gene" + hyphen string "\x{B7}~"
-            text run at (7,127) width 330: "rally, just as she had got its neck nicely"
-            text run at (7,147) width 96: "straightened "
-            text run at (102,147) width 235: "out, and was going to give the"
-            text run at (7,167) width 285: "hedgehog a blow with its head, it "
-            text run at (292,167) width 45: "would"
-            text run at (7,187) width 314: "twist itself round and look up in her face\x{2026}"
+            text run at (7,47) width 245: "flamingo: she succeeded in get" + hyphen string "\x{B7}~"
+            text run at (7,67) width 199: "ting its body tucked away, "
+            text run at (206,67) width 46: "com" + hyphen string "\x{B7}~"
+            text run at (7,87) width 245: "fortably enough, under her arm,"
+            text run at (7,107) width 226: "with its legs hanging down, "
+            text run at (233,107) width 104: "but generally,"
+            text run at (7,127) width 330: "just as she had got its neck nicely straight" + hyphen string "\x{B7}~"
+            text run at (7,147) width 40: "ened "
+            text run at (47,147) width 290: "out, and was going to give the hedge" + hyphen string "\x{B7}~"
+            text run at (7,167) width 204: "hog a blow with its head, it "
+            text run at (211,167) width 126: "would twist itself"
+            text run at (7,187) width 233: "round and look up in her face\x{2026}"

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-first-word-expected.png


(Binary files differ)

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-first-word-expected.txt (200019 => 200020)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-first-word-expected.txt	2016-04-25 15:39:46 UTC (rev 200019)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-first-word-expected.txt	2016-04-25 15:41:32 UTC (rev 200020)
@@ -4,7 +4,7 @@
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
       RenderBlock {DIV} at (0,0) size 226x327 [border: (3px solid #000000)]
-        RenderText {#text} at (3,3) size 193x321
-          text run at (3,3) width 193: "decl" + hyphen string "\x{2010}"
-          text run at (3,110) width 107: "in" + hyphen string "\x{2010}"
-          text run at (3,217) width 193: "ation"
+        RenderText {#text} at (3,3) size 177x321
+          text run at (3,3) width 166: "dec" + hyphen string "\x{2010}"
+          text run at (3,110) width 177: "lina" + hyphen string "\x{2010}"
+          text run at (3,217) width 150: "tion"

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-limit-before-after-expected.png


(Binary files differ)

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-limit-before-after-expected.txt (200019 => 200020)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-limit-before-after-expected.txt	2016-04-25 15:39:46 UTC (rev 200019)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-limit-before-after-expected.txt	2016-04-25 15:41:32 UTC (rev 200020)
@@ -4,28 +4,27 @@
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
       RenderBlock {DIV} at (8,25) size 126x40 [border: (3px solid #000000)]
-        RenderText {#text} at (3,3) size 98x34
-          text run at (3,3) width 96: "There is remar" + hyphen string "\x{2010}"
-          text run at (3,20) width 98: "kable evidence."
+        RenderText {#text} at (3,3) size 104x34
+          text run at (3,3) width 104: "There is remark" + hyphen string "\x{2010}"
+          text run at (3,20) width 90: "able evidence."
       RenderText {#text} at (142,45) size 4x17
         text run at (142,45) width 4: " "
       RenderBlock {DIV} at (154,25) size 126x40 [border: (3px solid #000000)]
-        RenderText {#text} at (3,3) size 98x34
-          text run at (3,3) width 96: "There is remar" + hyphen string "\x{2010}"
-          text run at (3,20) width 98: "kable evidence."
+        RenderText {#text} at (3,3) size 104x34
+          text run at (3,3) width 104: "There is remark" + hyphen string "\x{2010}"
+          text run at (3,20) width 90: "able evidence."
       RenderText {#text} at (288,45) size 4x17
         text run at (288,45) width 4: " "
       RenderBlock {DIV} at (300,25) size 126x40 [border: (3px solid #000000)]
-        RenderText {#text} at (3,3) size 98x34
-          text run at (3,3) width 96: "There is remar" + hyphen string "\x{2010}"
-          text run at (3,20) width 98: "kable evidence."
+        RenderText {#text} at (3,3) size 104x34
+          text run at (3,3) width 104: "There is remark" + hyphen string "\x{2010}"
+          text run at (3,20) width 90: "able evidence."
       RenderText {#text} at (434,45) size 4x17
         text run at (434,45) width 4: " "
-      RenderBlock {DIV} at (446,8) size 126x57 [border: (3px solid #000000)]
-        RenderText {#text} at (3,3) size 70x51
-          text run at (3,3) width 51: "There is"
-          text run at (3,20) width 70: "remarkable"
-          text run at (3,37) width 60: "evidence."
+      RenderBlock {DIV} at (446,25) size 126x40 [border: (3px solid #000000)]
+        RenderText {#text} at (3,3) size 104x34
+          text run at (3,3) width 104: "There is remark" + hyphen string "\x{2010}"
+          text run at (3,20) width 90: "able evidence."
       RenderText {#text} at (580,45) size 4x17
         text run at (580,45) width 4: " "
       RenderBlock {DIV} at (592,8) size 126x57 [border: (3px solid #000000)]
@@ -35,32 +34,34 @@
           text run at (3,37) width 60: "evidence."
       RenderText {#text} at (726,45) size 4x17
         text run at (726,45) width 4: " "
-      RenderBlock {DIV} at (8,81) size 126x40 [border: (3px solid #000000)]
-        RenderText {#text} at (3,3) size 98x34
-          text run at (3,3) width 96: "There is remar" + hyphen string "\x{2010}"
-          text run at (3,20) width 98: "kable evidence."
-      RenderText {#text} at (142,101) size 4x17
-        text run at (142,101) width 4: " "
-      RenderBlock {DIV} at (154,81) size 126x40 [border: (3px solid #000000)]
-        RenderText {#text} at (3,3) size 98x34
-          text run at (3,3) width 96: "There is remar" + hyphen string "\x{2010}"
-          text run at (3,20) width 98: "kable evidence."
-      RenderText {#text} at (288,101) size 4x17
-        text run at (288,101) width 4: " "
-      RenderBlock {DIV} at (300,81) size 126x40 [border: (3px solid #000000)]
-        RenderText {#text} at (3,3) size 98x34
-          text run at (3,3) width 96: "There is remar" + hyphen string "\x{2010}"
-          text run at (3,20) width 98: "kable evidence."
-      RenderText {#text} at (434,101) size 4x17
-        text run at (434,101) width 4: " "
-      RenderBlock {DIV} at (446,81) size 126x40 [border: (3px solid #000000)]
-        RenderText {#text} at (3,3) size 98x34
-          text run at (3,3) width 96: "There is remar" + hyphen string "\x{2010}"
-          text run at (3,20) width 98: "kable evidence."
-      RenderText {#text} at (580,101) size 4x17
-        text run at (580,101) width 4: " "
-      RenderBlock {DIV} at (592,81) size 126x40 [border: (3px solid #000000)]
-        RenderText {#text} at (3,3) size 98x34
-          text run at (3,3) width 96: "There is remar" + hyphen string "\x{2010}"
-          text run at (3,20) width 98: "kable evidence."
+      RenderBlock {DIV} at (8,98) size 126x40 [border: (3px solid #000000)]
+        RenderText {#text} at (3,3) size 104x34
+          text run at (3,3) width 104: "There is remark" + hyphen string "\x{2010}"
+          text run at (3,20) width 90: "able evidence."
+      RenderText {#text} at (142,118) size 4x17
+        text run at (142,118) width 4: " "
+      RenderBlock {DIV} at (154,98) size 126x40 [border: (3px solid #000000)]
+        RenderText {#text} at (3,3) size 104x34
+          text run at (3,3) width 104: "There is remark" + hyphen string "\x{2010}"
+          text run at (3,20) width 90: "able evidence."
+      RenderText {#text} at (288,118) size 4x17
+        text run at (288,118) width 4: " "
+      RenderBlock {DIV} at (300,98) size 126x40 [border: (3px solid #000000)]
+        RenderText {#text} at (3,3) size 104x34
+          text run at (3,3) width 104: "There is remark" + hyphen string "\x{2010}"
+          text run at (3,20) width 90: "able evidence."
+      RenderText {#text} at (434,118) size 4x17
+        text run at (434,118) width 4: " "
+      RenderBlock {DIV} at (446,81) size 126x57 [border: (3px solid #000000)]
+        RenderText {#text} at (3,3) size 86x51
+          text run at (3,3) width 72: "There is re" + hyphen string "\x{2010}"
+          text run at (3,20) width 86: "markable evi" + hyphen string "\x{2010}"
+          text run at (3,37) width 41: "dence."
+      RenderText {#text} at (580,118) size 4x17
+        text run at (580,118) width 4: " "
+      RenderBlock {DIV} at (592,81) size 126x57 [border: (3px solid #000000)]
+        RenderText {#text} at (3,3) size 98x51
+          text run at (3,3) width 51: "There is"
+          text run at (3,20) width 98: "remarkable evi" + hyphen string "\x{2010}"
+          text run at (3,37) width 41: "dence."
       RenderText {#text} at (0,0) size 0x0

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-limit-lines-expected.png


(Binary files differ)

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-limit-lines-expected.txt (200019 => 200020)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-limit-lines-expected.txt	2016-04-25 15:39:46 UTC (rev 200019)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-limit-lines-expected.txt	2016-04-25 15:41:32 UTC (rev 200020)
@@ -1,84 +1,63 @@
-layer at (0,0) size 785x969
+layer at (0,0) size 785x998
   RenderView at (0,0) size 785x600
-layer at (0,0) size 785x969
-  RenderBlock {HTML} at (0,0) size 785x969
+layer at (0,0) size 785x998
+  RenderBlock {HTML} at (0,0) size 785x998
     RenderBody {BODY} at (8,8) size 769x584
-      RenderBlock (floating) {DIV} at (4,0) size 202x466 [border: (1px solid #ADD8E6)]
-        RenderText {#text} at (1,1) size 200x464
+      RenderBlock (floating) {DIV} at (4,0) size 202x495 [border: (1px solid #ADD8E6)]
+        RenderText {#text} at (1,1) size 200x493
           text run at (1,1) width 200: "also the division of"
           text run at (1,30) width 200: "the mind into the"
-          text run at (1,59) width 200: "rational, concupi" + hyphen string "\x{2010}"
-          text run at (1,88) width 141: "scent, and "
-          text run at (142,88) width 59: "irasc" + hyphen string "\x{2010}"
-          text run at (1,117) width 200: "ible elements, or"
-          text run at (1,146) width 200: "of pleasures and"
-          text run at (1,175) width 200: "desires into nece" + hyphen string "\x{2010}"
-          text run at (1,204) width 116: "ssary and "
-          text run at (117,204) width 84: "unnece" + hyphen string "\x{2010}"
-          text run at (1,233) width 200: "ssary\x{2014}these and"
+          text run at (1,59) width 200: "rational, concupis" + hyphen string "\x{2010}"
+          text run at (1,88) width 111: "cent, and "
+          text run at (112,88) width 89: "irascible"
+          text run at (1,117) width 200: "elements, or of"
+          text run at (1,146) width 200: "pleasures and de" + hyphen string "\x{2010}"
+          text run at (1,175) width 200: "sires into neces" + hyphen string "\x{2010}"
+          text run at (1,204) width 106: "sary and "
+          text run at (107,204) width 94: "unneces" + hyphen string "\x{2010}"
+          text run at (1,233) width 200: "sary\x{2014}these and"
           text run at (1,262) width 200: "other great forms"
           text run at (1,291) width 200: "of thought are all"
           text run at (1,320) width 128: "of them "
           text run at (129,320) width 72: "to be"
-          text run at (1,349) width 200: "found in the Repu" + hyphen string "\x{2010}"
-          text run at (1,378) width 200: "blic, and were"
-          text run at (1,407) width 200: "probably first"
-          text run at (1,436) width 130: "invented by "
-          text run at (131,436) width 60: "Plato."
-      RenderBlock (floating) {DIV} at (214,0) size 202x466 [border: (1px solid #ADD8E6)]
-        RenderText {#text} at (1,1) size 200x464
+          text run at (1,349) width 200: "found in the"
+          text run at (1,378) width 200: "Republic, and"
+          text run at (1,407) width 200: "were probably"
+          text run at (1,436) width 200: "first invented by"
+          text run at (1,465) width 60: "Plato."
+      RenderBlock (floating) {DIV} at (214,0) size 202x495 [border: (1px solid #ADD8E6)]
+        RenderText {#text} at (1,1) size 200x493
           text run at (1,1) width 200: "also the division of"
           text run at (1,30) width 200: "the mind into the"
-          text run at (1,59) width 200: "rational, concupi" + hyphen string "\x{2010}"
-          text run at (1,88) width 141: "scent, and "
-          text run at (142,88) width 59: "irasc" + hyphen string "\x{2010}"
-          text run at (1,117) width 200: "ible elements, or"
-          text run at (1,146) width 200: "of pleasures and"
-          text run at (1,175) width 200: "desires into nece" + hyphen string "\x{2010}"
-          text run at (1,204) width 116: "ssary and "
-          text run at (117,204) width 84: "unnece" + hyphen string "\x{2010}"
-          text run at (1,233) width 200: "ssary\x{2014}these and"
+          text run at (1,59) width 200: "rational, concupis" + hyphen string "\x{2010}"
+          text run at (1,88) width 111: "cent, and "
+          text run at (112,88) width 89: "irascible"
+          text run at (1,117) width 200: "elements, or of"
+          text run at (1,146) width 200: "pleasures and de" + hyphen string "\x{2010}"
+          text run at (1,175) width 200: "sires into neces" + hyphen string "\x{2010}"
+          text run at (1,204) width 106: "sary and "
+          text run at (107,204) width 94: "unneces" + hyphen string "\x{2010}"
+          text run at (1,233) width 200: "sary\x{2014}these and"
           text run at (1,262) width 200: "other great forms"
           text run at (1,291) width 200: "of thought are all"
           text run at (1,320) width 128: "of them "
           text run at (129,320) width 72: "to be"
-          text run at (1,349) width 200: "found in the Repu" + hyphen string "\x{2010}"
-          text run at (1,378) width 200: "blic, and were"
-          text run at (1,407) width 200: "probably first"
-          text run at (1,436) width 130: "invented by "
-          text run at (131,436) width 60: "Plato."
-      RenderBlock (floating) {DIV} at (424,0) size 202x466 [border: (1px solid #ADD8E6)]
-        RenderText {#text} at (1,1) size 200x464
-          text run at (1,1) width 200: "also the division of"
-          text run at (1,30) width 200: "the mind into the"
-          text run at (1,59) width 200: "rational, concupi" + hyphen string "\x{2010}"
-          text run at (1,88) width 141: "scent, and "
-          text run at (142,88) width 59: "irasc" + hyphen string "\x{2010}"
-          text run at (1,117) width 200: "ible elements, or"
-          text run at (1,146) width 200: "of pleasures and"
-          text run at (1,175) width 200: "desires into nece" + hyphen string "\x{2010}"
-          text run at (1,204) width 116: "ssary and "
-          text run at (117,204) width 84: "unnece" + hyphen string "\x{2010}"
-          text run at (1,233) width 200: "ssary\x{2014}these and"
-          text run at (1,262) width 200: "other great forms"
-          text run at (1,291) width 200: "of thought are all"
-          text run at (1,320) width 128: "of them "
-          text run at (129,320) width 72: "to be"
-          text run at (1,349) width 200: "found in the Repu" + hyphen string "\x{2010}"
-          text run at (1,378) width 200: "blic, and were"
-          text run at (1,407) width 200: "probably first"
-          text run at (1,436) width 130: "invented by "
-          text run at (131,436) width 60: "Plato."
-      RenderBlock (floating) {DIV} at (4,466) size 202x495 [border: (1px solid #ADD8E6)]
+          text run at (1,349) width 200: "found in the"
+          text run at (1,378) width 200: "Republic, and"
+          text run at (1,407) width 200: "were probably"
+          text run at (1,436) width 200: "first invented by"
+          text run at (1,465) width 60: "Plato."
+      RenderBlock (floating) {DIV} at (424,0) size 202x495 [border: (1px solid #ADD8E6)]
         RenderText {#text} at (1,1) size 200x493
           text run at (1,1) width 200: "also the division of"
           text run at (1,30) width 200: "the mind into the"
-          text run at (1,59) width 200: "rational, concupi" + hyphen string "\x{2010}"
-          text run at (1,88) width 200: "scent, and"
-          text run at (1,117) width 200: "irascible elements,"
-          text run at (1,146) width 200: "or of pleasures"
-          text run at (1,175) width 200: "and desires into"
-          text run at (1,204) width 200: "necessary and"
+          text run at (1,59) width 200: "rational, concupis" + hyphen string "\x{2010}"
+          text run at (1,88) width 111: "cent, and "
+          text run at (112,88) width 89: "irascible"
+          text run at (1,117) width 200: "elements, or of"
+          text run at (1,146) width 200: "pleasures and de" + hyphen string "\x{2010}"
+          text run at (1,175) width 200: "sires into neces" + hyphen string "\x{2010}"
+          text run at (1,204) width 200: "sary and"
           text run at (1,233) width 155: "unnecessary\x{2014}"
           text run at (1,262) width 200: "these and other"
           text run at (1,291) width 200: "great forms of"
@@ -89,10 +68,32 @@
           text run at (1,407) width 200: "and were probably"
           text run at (1,436) width 200: "first invented by"
           text run at (1,465) width 60: "Plato."
-      RenderBlock (floating) {DIV} at (214,466) size 202x495 [border: (1px solid #ADD8E6)]
+      RenderBlock (floating) {DIV} at (4,495) size 202x495 [border: (1px solid #ADD8E6)]
         RenderText {#text} at (1,1) size 200x493
           text run at (1,1) width 200: "also the division of"
           text run at (1,30) width 200: "the mind into the"
+          text run at (1,59) width 200: "rational, concupis" + hyphen string "\x{2010}"
+          text run at (1,88) width 111: "cent, and "
+          text run at (112,88) width 89: "irascible"
+          text run at (1,117) width 200: "elements, or of"
+          text run at (1,146) width 200: "pleasures and de" + hyphen string "\x{2010}"
+          text run at (1,175) width 200: "sires into"
+          text run at (1,204) width 165: "necessary and "
+          text run at (166,204) width 35: "un" + hyphen string "\x{2010}"
+          text run at (1,233) width 183: "necessary\x{2014}these"
+          text run at (1,262) width 200: "and other great"
+          text run at (1,291) width 200: "forms of thought"
+          text run at (1,320) width 180: "are all of them "
+          text run at (181,320) width 20: "to"
+          text run at (1,349) width 200: "be found in the"
+          text run at (1,378) width 200: "Republic, and"
+          text run at (1,407) width 200: "were probably"
+          text run at (1,436) width 200: "first invented by"
+          text run at (1,465) width 60: "Plato."
+      RenderBlock (floating) {DIV} at (214,495) size 202x495 [border: (1px solid #ADD8E6)]
+        RenderText {#text} at (1,1) size 200x493
+          text run at (1,1) width 200: "also the division of"
+          text run at (1,30) width 200: "the mind into the"
           text run at (1,59) width 87: "rational,"
           text run at (1,88) width 200: "concupiscent, and"
           text run at (1,117) width 200: "irascible elements,"

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-locale-expected.png


(Binary files differ)

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-locale-expected.txt (200019 => 200020)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-locale-expected.txt	2016-04-25 15:39:46 UTC (rev 200019)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/fast/text/hyphenate-locale-expected.txt	2016-04-25 15:41:32 UTC (rev 200020)
@@ -8,13 +8,13 @@
           RenderText {#text} at (0,0) size 158x40
             text run at (0,0) width 158: "throughout"
         RenderBlock {DIV} at (0,40) size 130x80
-          RenderText {#text} at (0,0) size 106x80
-            text run at (0,0) width 106: "throug" + hyphen string "\x{2010}"
-            text run at (0,40) width 64: "hout"
+          RenderText {#text} at (0,0) size 124x80
+            text run at (0,0) width 124: "through" + hyphen string "\x{2010}"
+            text run at (0,40) width 46: "out"
         RenderBlock {DIV} at (0,120) size 130x80
-          RenderText {#text} at (0,0) size 106x80
-            text run at (0,0) width 106: "throug" + hyphen string "\x{2010}"
-            text run at (0,40) width 64: "hout"
+          RenderText {#text} at (0,0) size 124x80
+            text run at (0,0) width 124: "through" + hyphen string "\x{2010}"
+            text run at (0,40) width 46: "out"
         RenderBlock {DIV} at (0,200) size 130x40
           RenderText {#text} at (0,0) size 158x40
             text run at (0,0) width 158: "throughout"
@@ -26,17 +26,17 @@
           RenderText {#text} at (0,0) size 156x40
             text run at (0,0) width 156: "reciprocity"
         RenderBlock {DIV} at (0,40) size 135x80
-          RenderText {#text} at (0,0) size 114x80
-            text run at (0,0) width 114: "recipro" + hyphen string "\x{2010}"
-            text run at (0,40) width 54: "city"
+          RenderText {#text} at (0,0) size 130x80
+            text run at (0,0) width 130: "reciproc" + hyphen string "\x{2010}"
+            text run at (0,40) width 38: "ity"
         RenderBlock {DIV} at (0,120) size 135x80
+          RenderText {#text} at (0,0) size 130x80
+            text run at (0,0) width 130: "reciproc" + hyphen string "\x{2010}"
+            text run at (0,40) width 38: "ity"
+        RenderBlock {DIV} at (0,200) size 135x80
           RenderText {#text} at (0,0) size 114x80
             text run at (0,0) width 114: "recipro" + hyphen string "\x{2010}"
             text run at (0,40) width 54: "city"
-        RenderBlock {DIV} at (0,200) size 135x80
-          RenderText {#text} at (0,0) size 96x80
-            text run at (0,0) width 96: "recipr" + hyphen string "\x{2010}"
-            text run at (0,40) width 72: "ocity"
         RenderBlock {DIV} at (0,280) size 135x40
           RenderText {#text} at (0,0) size 156x40
             text run at (0,0) width 156: "reciprocity"

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (200019 => 200020)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-04-25 15:39:46 UTC (rev 200019)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-04-25 15:41:32 UTC (rev 200020)
@@ -1,3 +1,15 @@
+2016-04-18  Martin Robinson  <[email protected]>
+
+        [GTK] Possible off-by-one in hyphenation code
+        https://bugs.webkit.org/show_bug.cgi?id=156661
+
+        Reviewed by Michael Catanzaro.
+
+        No new tests. This is covered by older tests.
+
+        * platform/text/hyphen/HyphenationLibHyphen.cpp:
+        (WebCore::lastHyphenLocation): Fix an off by one error in hyphen location.
+
 2016-04-18  Brent Fulgham  <[email protected]>
 
         Remove support for X-Frame-Options in `<meta>`

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp (200019 => 200020)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp	2016-04-25 15:39:46 UTC (rev 200019)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp	2016-04-25 15:41:32 UTC (rev 200020)
@@ -256,11 +256,11 @@
         free(positions);
         free(removedCharacterCounts);
 
-        for (int i = beforeIndex - leadingSpaceCharacters - 1; i >= 0; i--) {
+        for (int i = beforeIndex - leadingSpaceCharacters - 2; i >= 0; i--) {
             // libhyphen will put an odd number in hyphenArrayData at all
             // hyphenation points. A number & 1 will be true for odd numbers.
             if (hyphenArrayData[i] & 1)
-                return i + leadingSpaceCharacters;
+                return i + 1 + leadingSpaceCharacters;
         }
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to