Diff
Modified: trunk/LayoutTests/ChangeLog (221973 => 221974)
--- trunk/LayoutTests/ChangeLog 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/ChangeLog 2017-09-13 17:14:54 UTC (rev 221974)
@@ -1,3 +1,60 @@
+2017-09-13 Carlos Garcia Campos <[email protected]>
+
+ [HarfBuzz] Wrong offset returned by HarfBuzzShaper::offsetForPosition in some cases
+ https://bugs.webkit.org/show_bug.cgi?id=176848
+
+ Reviewed by Michael Catanzaro.
+
+ Rebaseline several tests where we are now getting results similar to the mac ones.
+
+ * platform/gtk/editing/execCommand/findString-2-expected.txt:
+ * platform/gtk/editing/selection/14971-expected.png:
+ * platform/gtk/editing/selection/14971-expected.txt:
+ * platform/gtk/editing/selection/4895428-2-expected.png:
+ * platform/gtk/editing/selection/4895428-2-expected.txt:
+ * platform/gtk/editing/selection/5232159-expected.png:
+ * platform/gtk/editing/selection/5232159-expected.txt:
+ * platform/gtk/editing/selection/collapse-selection-in-bidi-expected.txt:
+ * platform/gtk/editing/selection/drag-select-1-expected.png:
+ * platform/gtk/editing/selection/drag-select-1-expected.txt:
+ * platform/gtk/editing/selection/editable-links-expected.png:
+ * platform/gtk/editing/selection/editable-links-expected.txt:
+ * platform/gtk/editing/selection/fake-doubleclick-expected.txt:
+ * platform/gtk/editing/selection/fake-drag-expected.txt:
+ * platform/gtk/editing/selection/select-across-readonly-input-1-expected.png:
+ * platform/gtk/editing/selection/select-across-readonly-input-1-expected.txt:
+ * platform/gtk/editing/selection/select-across-readonly-input-2-expected.png:
+ * platform/gtk/editing/selection/select-across-readonly-input-2-expected.txt:
+ * platform/gtk/editing/selection/select-across-readonly-input-3-expected.png:
+ * platform/gtk/editing/selection/select-across-readonly-input-3-expected.txt:
+ * platform/gtk/editing/selection/select-across-readonly-input-4-expected.png:
+ * platform/gtk/editing/selection/select-across-readonly-input-4-expected.txt:
+ * platform/gtk/editing/selection/select-across-readonly-input-5-expected.png:
+ * platform/gtk/editing/selection/select-across-readonly-input-5-expected.txt:
+ * platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.png:
+ * platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt:
+ * platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.png:
+ * platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt:
+ * platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.png:
+ * platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.txt:
+ * platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.png:
+ * platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.txt:
+ * platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.png:
+ * platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.txt:
+ * platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.png:
+ * platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.txt:
+ * platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.png:
+ * platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.txt:
+ * platform/gtk/fast/repaint/selection-rl-expected.png:
+ * platform/gtk/fast/repaint/selection-rl-expected.txt:
+ * platform/gtk/fast/text/atsui-rtl-override-selection-expected.png:
+ * platform/gtk/fast/text/atsui-rtl-override-selection-expected.txt:
+ * platform/gtk/fast/text/in-rendered-text-rtl-expected.txt:
+ * platform/gtk/svg/custom/foreignObject-crash-on-hover-expected.txt:
+ * platform/gtk/svg/text/select-text-svgfont-expected.txt: Removed.
+ * platform/gtk/transitions/svg-text-shadow-transition-expected.png:
+ * platform/gtk/transitions/svg-text-shadow-transition-expected.txt:
+
2017-09-13 Matt Lewis <[email protected]>
Rebaseline of js/dom/global-constructors-attributes.html.
Modified: trunk/LayoutTests/platform/gtk/editing/execCommand/findString-2-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/execCommand/findString-2-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/execCommand/findString-2-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -1,6 +1,6 @@
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 2 of #text > SPAN > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > SPAN > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
Modified: trunk/LayoutTests/platform/gtk/editing/selection/14971-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/14971-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/14971-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/14971-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -18,4 +18,4 @@
RenderText {#text} at (39,0) size 39x17
text run at (39,0) width 39: "World"
selection start: position 0 of child 0 {#text} of child 0 {SPAN} of child 2 {DIV} of body
-selection end: position 3 of child 0 {#text} of child 2 {SPAN} of child 2 {DIV} of body
+selection end: position 2 of child 0 {#text} of child 2 {SPAN} of child 2 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/4895428-2-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/4895428-2-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/4895428-2-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/4895428-2-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -25,4 +25,4 @@
RenderListMarker at (-17,0) size 7x17: bullet
RenderText {#text} at (0,0) size 50x17
text run at (0,0) width 50: "Success"
-caret: position 5 of child 0 {#text} of child 1 {TD} of child 0 {TR} of child 0 {TBODY} of child 0 {TABLE} of child 2 {DIV} of body
+caret: position 4 of child 0 {#text} of child 1 {TD} of child 0 {TR} of child 0 {TBODY} of child 0 {TABLE} of child 2 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/5232159-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/5232159-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/5232159-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/5232159-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -24,4 +24,4 @@
text run at (0,54) width 753: "natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque dapibus ante et nulla. Cras nec velit."
text run at (0,72) width 643: "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer ut tortor."
selection start: position 3 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
-selection end: position 236 of child 2 {#text} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
+selection end: position 237 of child 2 {#text} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/collapse-selection-in-bidi-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/collapse-selection-in-bidi-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/collapse-selection-in-bidi-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -3,7 +3,7 @@
PASS Selection is [anchorNode: [object Text](אבגדה) anchorOffset: 3 focusNode: [object Text](אבגדה) focusOffset: 3 isCollapsed: true]
PASS Selection is [anchorNode: [object Text](אבגדה) anchorOffset: 1 focusNode: [object Text](אבגדה) focusOffset: 1 isCollapsed: true]
PASS Selection is [anchorNode: [object Text](hello) anchorOffset: 2 focusNode: [object Text](hello) focusOffset: 2 isCollapsed: true]
-PASS Selection is [anchorNode: [object Text](hello) anchorOffset: 5 focusNode: [object Text](hello) focusOffset: 5 isCollapsed: true]
+PASS Selection is [anchorNode: [object Text](hello) anchorOffset: 4 focusNode: [object Text](hello) focusOffset: 4 isCollapsed: true]
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/platform/gtk/editing/selection/drag-select-1-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/drag-select-1-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/drag-select-1-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/drag-select-1-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -17,5 +17,5 @@
RenderBlock {UL} at (0,78) size 784x0
layer at (81,47) size 185x18
RenderBlock {DIV} at (3,3) size 185x18
-selection start: position 5 of child 0 {#text} of child 0 {SPAN} of child 2 {DIV} of body
+selection start: position 4 of child 0 {#text} of child 0 {SPAN} of child 2 {DIV} of body
selection end: position 1 of child 1 {#text} of child 2 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/editable-links-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/editable-links-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/editable-links-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/editable-links-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -1,6 +1,6 @@
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 5 of BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 7 of #text > A > BODY > HTML > #document to 7 of #text > A > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 6 of #text > A > BODY > HTML > #document to 6 of #text > A > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
@@ -14,4 +14,4 @@
text run at (65,0) width 77: "editable link"
RenderText {#text} at (142,0) size 4x17
text run at (142,0) width 4: "."
-caret: position 7 of child 0 {#text} of child 3 {A} of body
+caret: position 6 of child 0 {#text} of child 3 {A} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/fake-doubleclick-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/fake-doubleclick-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/fake-doubleclick-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -1,8 +1,8 @@
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
Modified: trunk/LayoutTests/platform/gtk/editing/selection/fake-drag-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/fake-drag-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/fake-drag-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -2,10 +2,10 @@
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
Select me, select me, select me
Modified: trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-1-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-1-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-1-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-1-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -23,4 +23,5 @@
RenderBlock {DIV} at (3,3) size 57x18
RenderText {#text} at (0,0) size 35x17
text run at (0,0) width 35: "hello"
-caret: position 5 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 5 {DIV} of body
+selection start: position 4 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 5 {DIV} of body
+selection end: position 5 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 5 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-2-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-2-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-2-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-2-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -24,4 +24,4 @@
RenderText {#text} at (0,0) size 35x17
text run at (0,0) width 35: "hello"
selection start: position 0 of child 2 {#text} of child 5 {DIV} of body
-selection end: position 3 of child 0 {#text} of child 3 {SPAN} of child 5 {DIV} of body
+selection end: position 2 of child 0 {#text} of child 3 {SPAN} of child 5 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-3-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-3-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-3-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-3-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -23,5 +23,5 @@
RenderBlock {DIV} at (3,3) size 57x18
RenderText {#text} at (0,0) size 39x17
text run at (0,0) width 39: "world"
-selection start: position 3 of child 0 {#text} of child 1 {SPAN} of child 5 {DIV} of body
+selection start: position 2 of child 0 {#text} of child 1 {SPAN} of child 5 {DIV} of body
selection end: position 1 of child 2 {#text} of child 5 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-4-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-4-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-4-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-4-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -30,4 +30,5 @@
RenderBlock {DIV} at (3,3) size 57x18
RenderText {#text} at (0,0) size 52x17
text run at (0,0) width 52: "WebKit"
-caret: position 5 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 5 {DIV} of body
+selection start: position 4 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 5 {DIV} of body
+selection end: position 5 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 5 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-5-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-5-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-5-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-5-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -31,4 +31,4 @@
RenderText {#text} at (0,0) size 52x17
text run at (0,0) width 52: "WebKit"
selection start: position 0 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 5 {INPUT} of child 5 {DIV} of body
-selection end: position 3 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 5 {INPUT} of child 5 {DIV} of body
+selection end: position 2 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 5 {INPUT} of child 5 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -14,5 +14,5 @@
RenderText {#text} at (23,60) size 23x105
text run at (23,60) width 105 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
RenderBlock {PRE} at (0,212) size 784x0
-selection start: position 4 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
+selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
selection end: position 5 of child 2 {#text} of child 1 {P} of child 3 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -14,5 +14,5 @@
RenderText {#text} at (0,60) size 23x105
text run at (0,60) width 105 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
RenderBlock {PRE} at (0,212) size 784x0
-selection start: position 4 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
+selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
selection end: position 5 of child 0 {#text} of child 2 {P} of child 3 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -33,23 +33,23 @@
RenderBlock {H3} at (0,776) size 769x23
RenderText {#text} at (0,0) size 507x21
text run at (0,0) width 507: "Right-To-Left containing replaced content blocking the ellipsis"
-layer at (8,119) size 310x20 clip at (9,120) size 308x18 scrollWidth 718
+layer at (8,119) size 310x20 clip at (9,120) size 308x18 scrollWidth 721
RenderBlock {DIV} at (0,111) size 310x21 [border: (1px solid #000000)]
- RenderText {#text} at (1,1) size 718x17
- text run at (1,1) width 718: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
-layer at (8,200) size 310x74 clip at (9,201) size 308x72 scrollWidth 718
+ RenderText {#text} at (3,1) size 719x17
+ text run at (3,1) width 719: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+layer at (8,200) size 310x74 clip at (9,201) size 308x72 scrollWidth 721
RenderBlock {DIV} at (0,192) size 310x75 [border: (1px solid #000000)]
- RenderText {#text} at (1,1) size 718x17
- text run at (1,1) width 718: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (3,1) size 719x17
+ text run at (3,1) width 719: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
- RenderText {#text} at (1,19) size 708x17
- text run at (1,19) width 708: "orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (2,19) size 708x17
+ text run at (2,19) width 708: "orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
- RenderText {#text} at (1,37) size 700x17
- text run at (1,37) width 700: "rem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (4,37) size 700x17
+ text run at (4,37) width 700: "rem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
- RenderText {#text} at (1,55) size 695x17
- text run at (1,55) width 695: "em ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (2,55) size 696x17
+ text run at (2,55) width 696: "em ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
layer at (8,335) size 310x31 clip at (9,336) size 308x29 scrollWidth 747
RenderBlock {DIV} at (0,326) size 310x32 [border: (1px solid #000000)]
@@ -65,20 +65,20 @@
RenderImage {IMG} at (272,1) size 25x25
RenderText {#text} at (297,12) size 447x17
text run at (297,12) width 447: "ipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
-layer at (8,518) size 310x20 clip at (9,519) size 308x18 scrollX 412 scrollWidth 721
+layer at (8,518) size 310x20 clip at (9,519) size 308x18 scrollX 410 scrollWidth 718
RenderBlock {DIV} at (0,510) size 310x21 [border: (1px solid #000000)]
- RenderText {#text} at (-411,1) size 719x17
- text run at (-411,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
-layer at (8,599) size 310x74 clip at (9,600) size 308x72 scrollX 412 scrollWidth 721
+ RenderText {#text} at (-409,1) size 718x17
+ text run at (-409,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+layer at (8,599) size 310x74 clip at (9,600) size 308x72 scrollX 410 scrollWidth 718
RenderBlock {DIV} at (0,591) size 310x75 [border: (1px solid #000000)]
- RenderText {#text} at (-411,1) size 719x17
- text run at (-411,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (-409,1) size 718x17
+ text run at (-409,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
- RenderText {#text} at (-400,19) size 708x17
- text run at (-400,19) width 708 RTL override: "orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (-399,19) size 708x17
+ text run at (-399,19) width 708 RTL override: "orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
- RenderText {#text} at (-394,37) size 700x17
- text run at (-394,37) width 700 RTL override: "rem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (-391,37) size 700x17
+ text run at (-391,37) width 700 RTL override: "rem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
RenderText {#text} at (-386,55) size 695x17
text run at (-386,55) width 695 RTL override: "em ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
Modified: trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -65,20 +65,20 @@
RenderImage {IMG} at (272,1) size 25x25
RenderText {#text} at (297,12) size 447x17
text run at (297,12) width 447: "ipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
-layer at (8,518) size 310x20 clip at (9,519) size 308x18 scrollX 415 scrollWidth 723
+layer at (8,518) size 310x20 clip at (9,519) size 308x18 scrollX 410 scrollWidth 718
RenderBlock {DIV} at (0,510) size 310x21 [border: (1px solid #000000)]
- RenderText {#text} at (-414,1) size 718x17
- text run at (-414,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
-layer at (8,599) size 310x74 clip at (9,600) size 308x72 scrollX 415 scrollWidth 723
+ RenderText {#text} at (-409,1) size 718x17
+ text run at (-409,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+layer at (8,599) size 310x74 clip at (9,600) size 308x72 scrollX 410 scrollWidth 718
RenderBlock {DIV} at (0,591) size 310x75 [border: (1px solid #000000)]
- RenderText {#text} at (-414,1) size 718x17
- text run at (-414,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (-409,1) size 718x17
+ text run at (-409,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
- RenderText {#text} at (-401,19) size 708x17
- text run at (-401,19) width 708 RTL override: "orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (-399,19) size 708x17
+ text run at (-399,19) width 708 RTL override: "orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
- RenderText {#text} at (-397,37) size 700x17
- text run at (-397,37) width 700 RTL override: "rem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (-391,37) size 700x17
+ text run at (-391,37) width 700 RTL override: "rem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
RenderText {#text} at (-386,55) size 695x17
text run at (-386,55) width 695 RTL override: "em ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
Modified: trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -33,23 +33,23 @@
RenderBlock {H3} at (0,776) size 769x23
RenderText {#text} at (0,0) size 507x21
text run at (0,0) width 507: "Right-To-Left containing replaced content blocking the ellipsis"
-layer at (8,119) size 310x20 clip at (9,120) size 308x18 scrollWidth 718
+layer at (8,119) size 310x20 clip at (9,120) size 308x18 scrollWidth 723
RenderBlock {DIV} at (0,111) size 310x21 [border: (1px solid #000000)]
- RenderText {#text} at (1,1) size 718x17
- text run at (1,1) width 718: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
-layer at (8,200) size 310x74 clip at (9,201) size 308x72 scrollWidth 718
+ RenderText {#text} at (6,1) size 718x17
+ text run at (6,1) width 718: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+layer at (8,200) size 310x74 clip at (9,201) size 308x72 scrollWidth 723
RenderBlock {DIV} at (0,192) size 310x75 [border: (1px solid #000000)]
- RenderText {#text} at (1,1) size 718x17
- text run at (1,1) width 718: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (6,1) size 718x17
+ text run at (6,1) width 718: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
- RenderText {#text} at (1,19) size 708x17
- text run at (1,19) width 708: "orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (3,19) size 708x17
+ text run at (3,19) width 708: "orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
- RenderText {#text} at (1,37) size 700x17
- text run at (1,37) width 700: "rem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (7,37) size 700x17
+ text run at (7,37) width 700: "rem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
- RenderText {#text} at (1,55) size 695x17
- text run at (1,55) width 695: "em ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
+ RenderText {#text} at (4,55) size 695x17
+ text run at (4,55) width 695: "em ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."
RenderBR {BR} at (0,0) size 0x0
layer at (8,335) size 310x31 clip at (9,336) size 308x29 scrollWidth 747
RenderBlock {DIV} at (0,326) size 310x32 [border: (1px solid #000000)]
Modified: trunk/LayoutTests/platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -14,5 +14,5 @@
text run at (180,5) width 546: "\x{306E}\x{30B3}\x{30F3}\x{30C6}\x{30F3}\x{30C4}\x{304B}\x{3089}\x{3082}\x{691C}\x{7D22}\x{3059}\x{308B}\x{3053}\x{3068}\x{304C}\x{3067}\x{304D}\x{307E}\x{3059}\x{3002}\x{305B}\x{3063}\x{304B}\x{304F}\x{898B}"
text run at (205,5) width 546: "\x{3064}\x{3051}\x{305F}\x{3059}\x{3070}\x{3089}\x{3057}\x{3044}\x{8A18}\x{4E8B}\x{304C}\x{3069}\x{3053}\x{306B}\x{3042}\x{3063}\x{305F}\x{304B}\x{5FD8}\x{308C}\x{3066}\x{3057}\x{307E}\x{3063}\x{305F}\x{7D4C}"
text run at (230,5) width 551: "\x{9A13}\x{306F}\x{3042}\x{308A}\x{307E}\x{3059}\x{304B} \x{306A}\x{3089}\x{30BF}\x{30A4}\x{30C8}\x{30EB}\x{3068}\x{30A2}\x{30C9}\x{30EC}\x{30B9}\x{3060}\x{3051}\x{3067}\x{306A}\x{304F}\x{3001}\x{8A2A}\x{554F}"
-selection start: position 10 of child 0 {#text} of body
+selection start: position 9 of child 0 {#text} of body
selection end: position 263 of child 0 {#text} of body
Modified: trunk/LayoutTests/platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -19,4 +19,4 @@
RenderText {#text} at (20,1) size 22x181
text run at (20,1) width 181: "\x{7B2C}\x{4E8C}\x{6BB5}\x{843D} paragraph 2"
selection start: position 8 of child 0 {#text} of child 0 {P} of child 3 {DIV} of child 1 {DIV} of body
-selection end: position 13 of child 0 {#text} of child 0 {P} of child 3 {DIV} of child 1 {DIV} of body
+selection end: position 12 of child 0 {#text} of child 0 {P} of child 3 {DIV} of child 1 {DIV} of body
Modified: trunk/LayoutTests/platform/gtk/fast/repaint/selection-rl-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/fast/repaint/selection-rl-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/fast/repaint/selection-rl-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/fast/repaint/selection-rl-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -36,5 +36,5 @@
RenderText {#text} at (162,0) size 17x305
text run at (162,0) width 305: "Testing both hit testing and painting of selection."
RenderBR {BR} at (162,305) size 17x0
-selection start: position 6 of child 0 {#text} of child 1 {SPAN} of body
+selection start: position 5 of child 0 {#text} of child 1 {SPAN} of body
selection end: position 19 of child 0 {#text} of child 1 {SPAN} of body
Modified: trunk/LayoutTests/platform/gtk/fast/text/atsui-rtl-override-selection-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/fast/text/atsui-rtl-override-selection-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/fast/text/atsui-rtl-override-selection-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/fast/text/atsui-rtl-override-selection-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -12,5 +12,5 @@
RenderBlock (anonymous) at (0,36) size 800x18
RenderText {#text} at (0,0) size 281x17
text run at (0,0) width 281: "\x{201C}remips\x{201D} should be highlighted in the above."
-selection start: position 2 of child 0 {#text} of child 3 {BDO} of body
+selection start: position 3 of child 0 {#text} of child 3 {BDO} of body
selection end: position 9 of child 0 {#text} of child 3 {BDO} of body
Modified: trunk/LayoutTests/platform/gtk/fast/text/in-rendered-text-rtl-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/fast/text/in-rendered-text-rtl-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/fast/text/in-rendered-text-rtl-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -26,4 +26,4 @@
text run at (0,0) width 62 RTL: "\x{5E9}\x{5EA}\x{5D4} \x{5DE}\x{5D9}\x{5E5}"
text run at (62,0) width 90 RTL: "\x{5D0}\x{5DB}\x{5DC}\x{5EA} \x{5E4}\x{5DC}\x{5E4}\x{5DC} "
RenderText {#text} at (0,0) size 0x0
-caret: position 2 of child 0 {#text} of child 7 {SPAN} of body
+caret: position 3 of child 0 {#text} of child 7 {SPAN} of body
Modified: trunk/LayoutTests/platform/gtk/svg/custom/foreignObject-crash-on-hover-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/svg/custom/foreignObject-crash-on-hover-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/svg/custom/foreignObject-crash-on-hover-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -13,4 +13,4 @@
text run at (0,18) width 246: "<path d=\"M50,80 L250,80 150,280 z\""
text run at (0,36) width 187: "style=\"fill:red; stroke:blue;\"/>"
RenderSVGPath {path} at (99,129) size 202x203 [stroke={[type=SOLID] [color=#0000FF]}] [fill={[type=SOLID] [color=#FF0000]}] [data="" 50 80 L 250 80 L 150 280 Z"]
-caret: position 67 of child 3 {#text} of child 5 {foreignObject} of child 3 {g} of child 1 {svg} of document
+caret: position 66 of child 3 {#text} of child 5 {foreignObject} of child 3 {g} of child 1 {svg} of document
Deleted: trunk/LayoutTests/platform/gtk/svg/text/select-text-svgfont-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/svg/text/select-text-svgfont-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/svg/text/select-text-svgfont-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -1,3 +0,0 @@
-This test checks that individual characters can be selected correctly when using an SVG font.
-aaaaaaaaaa
-FAIL: range was [4, 7]; expected [3, 6]
Modified: trunk/LayoutTests/platform/gtk/transitions/svg-text-shadow-transition-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/gtk/transitions/svg-text-shadow-transition-expected.txt (221973 => 221974)
--- trunk/LayoutTests/platform/gtk/transitions/svg-text-shadow-transition-expected.txt 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/LayoutTests/platform/gtk/transitions/svg-text-shadow-transition-expected.txt 2017-09-13 17:14:54 UTC (rev 221974)
@@ -10,9 +10,9 @@
chunk 1 text run 1 at (10.00,50.00) startOffset 0 endOffset 15 width 277.00: "Shadow on texts"
RenderText {#text} at (0,0) size 0x0
RenderBlock {DIV} at (0,104) size 784x36
- RenderText {#text} at (0,0) size 577x17
- text run at (0,0) width 577: "PASS - \"text-shadow\" property for \"text\" element at 0s saw something close to: -25,-5,0,15"
- RenderBR {BR} at (577,0) size 0x17
- RenderText {#text} at (0,18) size 559x17
- text run at (0,18) width 559: "PASS - \"text-shadow\" property for \"text\" element at 1s saw something close to: 5,5,0,15"
- RenderBR {BR} at (559,18) size 0x17
+ RenderText {#text} at (0,0) size 576x17
+ text run at (0,0) width 576: "PASS - \"text-shadow\" property for \"text\" element at 0s saw something close to: -25,-5,0,15"
+ RenderBR {BR} at (576,0) size 0x17
+ RenderText {#text} at (0,18) size 558x17
+ text run at (0,18) width 558: "PASS - \"text-shadow\" property for \"text\" element at 1s saw something close to: 5,5,0,15"
+ RenderBR {BR} at (558,18) size 0x17
Modified: trunk/Source/WebCore/ChangeLog (221973 => 221974)
--- trunk/Source/WebCore/ChangeLog 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/Source/WebCore/ChangeLog 2017-09-13 17:14:54 UTC (rev 221974)
@@ -1,3 +1,23 @@
+2017-09-13 Carlos Garcia Campos <[email protected]>
+
+ [HarfBuzz] Wrong offset returned by HarfBuzzShaper::offsetForPosition in some cases
+ https://bugs.webkit.org/show_bug.cgi?id=176848
+
+ Reviewed by Michael Catanzaro.
+
+ This patch rewrites HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition() to make it simpler and ensure we
+ return the right offset in all the cases, also honoring now the includePartialGlyphs parameter that we were
+ ignoring in FontCascade::offsetForPositionForComplexText().
+
+ Fixes several tests that started to fail after r221909.
+
+ * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
+ (WebCore::FontCascade::offsetForPositionForComplexText const):
+ * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
+ (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
+ (WebCore::HarfBuzzShaper::offsetForPosition):
+ * platform/graphics/harfbuzz/HarfBuzzShaper.h:
+
2017-09-13 Per Arne Vollan <[email protected]>
Initialize InternalSettings member variable.
Modified: trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp (221973 => 221974)
--- trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp 2017-09-13 17:14:54 UTC (rev 221974)
@@ -78,11 +78,11 @@
return 0;
}
-int FontCascade::offsetForPositionForComplexText(const TextRun& run, float x, bool) const
+int FontCascade::offsetForPositionForComplexText(const TextRun& run, float x, bool includePartialGlyphs) const
{
HarfBuzzShaper shaper(this, run);
if (shaper.shape())
- return shaper.offsetForPosition(x);
+ return shaper.offsetForPosition(x, includePartialGlyphs);
LOG_ERROR("Shaper couldn't shape text run.");
return 0;
}
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (221973 => 221974)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp 2017-09-13 17:14:54 UTC (rev 221974)
@@ -101,37 +101,32 @@
m_offsets[index] = FloatPoint(offsetX, offsetY);
}
-unsigned HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition(float targetX)
+unsigned HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition(float targetX, bool includePartialGlyphs)
{
ASSERT(targetX <= m_width);
float currentX = 0;
- float currentAdvance = m_advances[0];
unsigned glyphIndex = 0;
+ float characterWidth = 0;
+ unsigned characterIndex = 0;
+ do {
+ characterIndex = m_glyphToCharacterIndexes[glyphIndex];
+ characterWidth = m_advances[glyphIndex];
+ while (glyphIndex < m_numGlyphs - 1 && m_glyphToCharacterIndexes[glyphIndex + 1] == characterIndex)
+ characterWidth += m_advances[++glyphIndex];
- // Sum up advances that belong to a character.
- while (glyphIndex < m_numGlyphs - 1 && m_glyphToCharacterIndexes[glyphIndex] == m_glyphToCharacterIndexes[glyphIndex + 1])
- currentAdvance += m_advances[++glyphIndex];
- currentAdvance = currentAdvance / 2.0;
- if (targetX <= currentAdvance)
- return rtl() ? m_numCharacters : 0;
+ if ((includePartialGlyphs && (targetX < currentX + characterWidth / 2.0))
+ || (!includePartialGlyphs && (targetX < currentX + characterWidth)))
+ return rtl() ? std::min(m_numCharacters, characterIndex + 1) : characterIndex;
- ++glyphIndex;
- while (glyphIndex < m_numGlyphs) {
- unsigned prevCharacterIndex = m_glyphToCharacterIndexes[glyphIndex - 1];
- float prevAdvance = currentAdvance;
- currentAdvance = m_advances[glyphIndex];
- while (glyphIndex < m_numGlyphs - 1 && m_glyphToCharacterIndexes[glyphIndex] == m_glyphToCharacterIndexes[glyphIndex + 1])
- currentAdvance += m_advances[++glyphIndex];
- currentAdvance = currentAdvance / 2.0;
- float nextX = currentX + prevAdvance + currentAdvance;
- if (currentX <= targetX && targetX <= nextX)
- return rtl() ? prevCharacterIndex : m_glyphToCharacterIndexes[glyphIndex];
- currentX = nextX;
- prevAdvance = currentAdvance;
+ if ((includePartialGlyphs && (targetX >= (currentX + characterWidth / 2.0) && targetX < currentX + characterWidth))
+ || (!includePartialGlyphs && (targetX >= currentX && targetX < currentX + characterWidth)))
+ break;
+
+ currentX += characterWidth;
++glyphIndex;
- }
+ } while (glyphIndex < m_numGlyphs);
- return rtl() ? 0 : m_numCharacters;
+ return rtl() ? characterIndex : std::min(m_numCharacters, characterIndex + 1);
}
float HarfBuzzShaper::HarfBuzzRun::xPositionForOffset(unsigned offset)
@@ -581,7 +576,7 @@
return glyphBuffer->size();
}
-int HarfBuzzShaper::offsetForPosition(float targetX)
+int HarfBuzzShaper::offsetForPosition(float targetX, bool includePartialGlyphs)
{
int charactersSoFar = 0;
float currentX = 0;
@@ -594,7 +589,7 @@
float offsetForRun = targetX - currentX;
if (offsetForRun >= 0 && offsetForRun <= m_harfBuzzRuns[i]->width()) {
// The x value in question is within this script run.
- const unsigned index = m_harfBuzzRuns[i]->characterIndexForXPosition(offsetForRun);
+ const unsigned index = m_harfBuzzRuns[i]->characterIndexForXPosition(offsetForRun, includePartialGlyphs);
return charactersSoFar + index;
}
currentX = nextX;
@@ -604,7 +599,7 @@
float nextX = currentX + m_harfBuzzRuns[i]->width();
float offsetForRun = targetX - currentX;
if (offsetForRun >= 0 && offsetForRun <= m_harfBuzzRuns[i]->width()) {
- const unsigned index = m_harfBuzzRuns[i]->characterIndexForXPosition(offsetForRun);
+ const unsigned index = m_harfBuzzRuns[i]->characterIndexForXPosition(offsetForRun, includePartialGlyphs);
return charactersSoFar + index;
}
charactersSoFar += m_harfBuzzRuns[i]->numCharacters();
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h (221973 => 221974)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h 2017-09-13 17:08:00 UTC (rev 221973)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h 2017-09-13 17:14:54 UTC (rev 221974)
@@ -57,7 +57,7 @@
bool shape(GlyphBuffer* = 0);
FloatPoint adjustStartPoint(const FloatPoint&);
float totalWidth() { return m_totalWidth; }
- int offsetForPosition(float targetX);
+ int offsetForPosition(float targetX, bool includePartialGlyphs = true);
FloatRect selectionRect(const FloatPoint&, int height, unsigned from, unsigned to);
private:
@@ -69,7 +69,7 @@
void setGlyphAndPositions(unsigned index, uint16_t glyphId, float advance, float offsetX, float offsetY);
void setWidth(float width) { m_width = width; }
- unsigned characterIndexForXPosition(float targetX);
+ unsigned characterIndexForXPosition(float targetX, bool includePartialGlyphs);
float xPositionForOffset(unsigned offset);
const Font* fontData() { return m_fontData; }