Changeset 221974 in webkit
- Timestamp:
- Sep 13, 2017 10:14:54 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r221973 r221974 1 2017-09-13 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [HarfBuzz] Wrong offset returned by HarfBuzzShaper::offsetForPosition in some cases 4 https://bugs.webkit.org/show_bug.cgi?id=176848 5 6 Reviewed by Michael Catanzaro. 7 8 Rebaseline several tests where we are now getting results similar to the mac ones. 9 10 * platform/gtk/editing/execCommand/findString-2-expected.txt: 11 * platform/gtk/editing/selection/14971-expected.png: 12 * platform/gtk/editing/selection/14971-expected.txt: 13 * platform/gtk/editing/selection/4895428-2-expected.png: 14 * platform/gtk/editing/selection/4895428-2-expected.txt: 15 * platform/gtk/editing/selection/5232159-expected.png: 16 * platform/gtk/editing/selection/5232159-expected.txt: 17 * platform/gtk/editing/selection/collapse-selection-in-bidi-expected.txt: 18 * platform/gtk/editing/selection/drag-select-1-expected.png: 19 * platform/gtk/editing/selection/drag-select-1-expected.txt: 20 * platform/gtk/editing/selection/editable-links-expected.png: 21 * platform/gtk/editing/selection/editable-links-expected.txt: 22 * platform/gtk/editing/selection/fake-doubleclick-expected.txt: 23 * platform/gtk/editing/selection/fake-drag-expected.txt: 24 * platform/gtk/editing/selection/select-across-readonly-input-1-expected.png: 25 * platform/gtk/editing/selection/select-across-readonly-input-1-expected.txt: 26 * platform/gtk/editing/selection/select-across-readonly-input-2-expected.png: 27 * platform/gtk/editing/selection/select-across-readonly-input-2-expected.txt: 28 * platform/gtk/editing/selection/select-across-readonly-input-3-expected.png: 29 * platform/gtk/editing/selection/select-across-readonly-input-3-expected.txt: 30 * platform/gtk/editing/selection/select-across-readonly-input-4-expected.png: 31 * platform/gtk/editing/selection/select-across-readonly-input-4-expected.txt: 32 * platform/gtk/editing/selection/select-across-readonly-input-5-expected.png: 33 * platform/gtk/editing/selection/select-across-readonly-input-5-expected.txt: 34 * platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.png: 35 * platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt: 36 * platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.png: 37 * platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt: 38 * platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.png: 39 * platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.txt: 40 * platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.png: 41 * platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.txt: 42 * platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.png: 43 * platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.txt: 44 * platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.png: 45 * platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.txt: 46 * platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.png: 47 * platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.txt: 48 * platform/gtk/fast/repaint/selection-rl-expected.png: 49 * platform/gtk/fast/repaint/selection-rl-expected.txt: 50 * platform/gtk/fast/text/atsui-rtl-override-selection-expected.png: 51 * platform/gtk/fast/text/atsui-rtl-override-selection-expected.txt: 52 * platform/gtk/fast/text/in-rendered-text-rtl-expected.txt: 53 * platform/gtk/svg/custom/foreignObject-crash-on-hover-expected.txt: 54 * platform/gtk/svg/text/select-text-svgfont-expected.txt: Removed. 55 * platform/gtk/transitions/svg-text-shadow-transition-expected.png: 56 * platform/gtk/transitions/svg-text-shadow-transition-expected.txt: 57 1 58 2017-09-13 Matt Lewis <jlewis3@apple.com> 2 59 -
trunk/LayoutTests/platform/gtk/editing/execCommand/findString-2-expected.txt
r221911 r221974 1 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 2 of #text > SPAN > DIV > BODY > HTML > #document to 2of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE1 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 2 2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > SPAN > DIV > BODY > HTML > #document to 2of #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:FALSE3 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 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/gtk/editing/selection/14971-expected.txt
r221911 r221974 19 19 text run at (39,0) width 39: "World" 20 20 selection start: position 0 of child 0 {#text} of child 0 {SPAN} of child 2 {DIV} of body 21 selection end: position 3of child 0 {#text} of child 2 {SPAN} of child 2 {DIV} of body21 selection end: position 2 of child 0 {#text} of child 2 {SPAN} of child 2 {DIV} of body -
trunk/LayoutTests/platform/gtk/editing/selection/4895428-2-expected.txt
r221911 r221974 26 26 RenderText {#text} at (0,0) size 50x17 27 27 text run at (0,0) width 50: "Success" 28 caret: position 5of child 0 {#text} of child 1 {TD} of child 0 {TR} of child 0 {TBODY} of child 0 {TABLE} of child 2 {DIV} of body28 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 -
trunk/LayoutTests/platform/gtk/editing/selection/5232159-expected.txt
r221911 r221974 25 25 text run at (0,72) width 643: "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer ut tortor." 26 26 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 27 selection end: position 23 6of child 2 {#text} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body27 selection end: position 237 of child 2 {#text} of child 1 {DIV} of child 1 {DIV} of child 3 {DIV} of body -
trunk/LayoutTests/platform/gtk/editing/selection/collapse-selection-in-bidi-expected.txt
r221911 r221974 4 4 PASS Selection is [anchorNode: [object Text](אבגדה) anchorOffset: 1 focusNode: [object Text](אבגדה) focusOffset: 1 isCollapsed: true] 5 5 PASS Selection is [anchorNode: [object Text](hello) anchorOffset: 2 focusNode: [object Text](hello) focusOffset: 2 isCollapsed: true] 6 PASS Selection is [anchorNode: [object Text](hello) anchorOffset: 5 focusNode: [object Text](hello) focusOffset: 5isCollapsed: true]6 PASS Selection is [anchorNode: [object Text](hello) anchorOffset: 4 focusNode: [object Text](hello) focusOffset: 4 isCollapsed: true] 7 7 PASS successfullyParsed is true 8 8 -
trunk/LayoutTests/platform/gtk/editing/selection/drag-select-1-expected.txt
r221911 r221974 18 18 layer at (81,47) size 185x18 19 19 RenderBlock {DIV} at (3,3) size 185x18 20 selection start: position 5of child 0 {#text} of child 0 {SPAN} of child 2 {DIV} of body20 selection start: position 4 of child 0 {#text} of child 0 {SPAN} of child 2 {DIV} of body 21 21 selection end: position 1 of child 1 {#text} of child 2 {DIV} of body -
trunk/LayoutTests/platform/gtk/editing/selection/editable-links-expected.txt
r221911 r221974 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 5 of BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 7 of #text > A > BODY > HTML > #document to 7of #text > A > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE3 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 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 5 layer at (0,0) size 800x600 … … 15 15 RenderText {#text} at (142,0) size 4x17 16 16 text run at (142,0) width 4: "." 17 caret: position 7of child 0 {#text} of child 3 {A} of body17 caret: position 6 of child 0 {#text} of child 3 {A} of body -
trunk/LayoutTests/platform/gtk/editing/selection/fake-doubleclick-expected.txt
r221911 r221974 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE3 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 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2of #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:FALSE5 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 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 7 layer at (0,0) size 800x600 -
trunk/LayoutTests/platform/gtk/editing/selection/fake-drag-expected.txt
r221911 r221974 3 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 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 5of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE5 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 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 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 6of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 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 8 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 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 9of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE9 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 10 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 11 Select me, select me, select me -
trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-1-expected.txt
r221911 r221974 24 24 RenderText {#text} at (0,0) size 35x17 25 25 text run at (0,0) width 35: "hello" 26 caret: position 5 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 5 {DIV} of body 26 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 27 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 -
trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-2-expected.txt
r221911 r221974 25 25 text run at (0,0) width 35: "hello" 26 26 selection start: position 0 of child 2 {#text} of child 5 {DIV} of body 27 selection end: position 3of child 0 {#text} of child 3 {SPAN} of child 5 {DIV} of body27 selection end: position 2 of child 0 {#text} of child 3 {SPAN} of child 5 {DIV} of body -
trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-3-expected.txt
r221911 r221974 24 24 RenderText {#text} at (0,0) size 39x17 25 25 text run at (0,0) width 39: "world" 26 selection start: position 3of child 0 {#text} of child 1 {SPAN} of child 5 {DIV} of body26 selection start: position 2 of child 0 {#text} of child 1 {SPAN} of child 5 {DIV} of body 27 27 selection end: position 1 of child 2 {#text} of child 5 {DIV} of body -
trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-4-expected.txt
r221911 r221974 31 31 RenderText {#text} at (0,0) size 52x17 32 32 text run at (0,0) width 52: "WebKit" 33 caret: position 5 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 5 {DIV} of body 33 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 34 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 -
trunk/LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-5-expected.txt
r221911 r221974 32 32 text run at (0,0) width 52: "WebKit" 33 33 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 34 selection end: position 3of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 5 {INPUT} of child 5 {DIV} of body34 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 -
trunk/LayoutTests/platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt
r221911 r221974 15 15 text run at (23,60) width 105 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}." 16 16 RenderBlock {PRE} at (0,212) size 784x0 17 selection start: position 4of child 0 {#text} of child 1 {P} of child 3 {DIV} of body17 selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body 18 18 selection end: position 5 of child 2 {#text} of child 1 {P} of child 3 {DIV} of body -
trunk/LayoutTests/platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt
r221911 r221974 15 15 text run at (0,60) width 105 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}." 16 16 RenderBlock {PRE} at (0,212) size 784x0 17 selection start: position 4of child 0 {#text} of child 1 {P} of child 3 {DIV} of body17 selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body 18 18 selection end: position 5 of child 0 {#text} of child 2 {P} of child 3 {DIV} of body -
trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.txt
r221911 r221974 34 34 RenderText {#text} at (0,0) size 507x21 35 35 text run at (0,0) width 507: "Right-To-Left containing replaced content blocking the ellipsis" 36 layer at (8,119) size 310x20 clip at (9,120) size 308x18 scrollWidth 7 1836 layer at (8,119) size 310x20 clip at (9,120) size 308x18 scrollWidth 721 37 37 RenderBlock {DIV} at (0,111) size 310x21 [border: (1px solid #000000)] 38 RenderText {#text} at ( 1,1) size 718x1739 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."40 layer at (8,200) size 310x74 clip at (9,201) size 308x72 scrollWidth 7 1838 RenderText {#text} at (3,1) size 719x17 39 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." 40 layer at (8,200) size 310x74 clip at (9,201) size 308x72 scrollWidth 721 41 41 RenderBlock {DIV} at (0,192) size 310x75 [border: (1px solid #000000)] 42 RenderText {#text} at ( 1,1) size 718x1743 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."42 RenderText {#text} at (3,1) size 719x17 43 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." 44 44 RenderBR {BR} at (0,0) size 0x0 45 RenderText {#text} at ( 1,19) size 708x1746 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."45 RenderText {#text} at (2,19) size 708x17 46 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." 47 47 RenderBR {BR} at (0,0) size 0x0 48 RenderText {#text} at ( 1,37) size 700x1749 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."48 RenderText {#text} at (4,37) size 700x17 49 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." 50 50 RenderBR {BR} at (0,0) size 0x0 51 RenderText {#text} at ( 1,55) size 695x1752 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."51 RenderText {#text} at (2,55) size 696x17 52 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." 53 53 RenderBR {BR} at (0,0) size 0x0 54 54 layer at (8,335) size 310x31 clip at (9,336) size 308x29 scrollWidth 747 … … 66 66 RenderText {#text} at (297,12) size 447x17 67 67 text run at (297,12) width 447: "ipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros." 68 layer at (8,518) size 310x20 clip at (9,519) size 308x18 scrollX 41 2 scrollWidth 72168 layer at (8,518) size 310x20 clip at (9,519) size 308x18 scrollX 410 scrollWidth 718 69 69 RenderBlock {DIV} at (0,510) size 310x21 [border: (1px solid #000000)] 70 RenderText {#text} at (-4 11,1) size 719x1771 text run at (-4 11,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."72 layer at (8,599) size 310x74 clip at (9,600) size 308x72 scrollX 41 2 scrollWidth 72170 RenderText {#text} at (-409,1) size 718x17 71 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." 72 layer at (8,599) size 310x74 clip at (9,600) size 308x72 scrollX 410 scrollWidth 718 73 73 RenderBlock {DIV} at (0,591) size 310x75 [border: (1px solid #000000)] 74 RenderText {#text} at (-4 11,1) size 719x1775 text run at (-4 11,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."74 RenderText {#text} at (-409,1) size 718x17 75 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." 76 76 RenderBR {BR} at (0,0) size 0x0 77 RenderText {#text} at (- 400,19) size 708x1778 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."77 RenderText {#text} at (-399,19) size 708x17 78 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." 79 79 RenderBR {BR} at (0,0) size 0x0 80 RenderText {#text} at (-39 4,37) size 700x1781 text run at (-39 4,37) width 700 RTL override: "rem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."80 RenderText {#text} at (-391,37) size 700x17 81 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." 82 82 RenderBR {BR} at (0,0) size 0x0 83 83 RenderText {#text} at (-386,55) size 695x17 -
trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-left-expected.txt
r221911 r221974 66 66 RenderText {#text} at (297,12) size 447x17 67 67 text run at (297,12) width 447: "ipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros." 68 layer at (8,518) size 310x20 clip at (9,519) size 308x18 scrollX 41 5 scrollWidth 72368 layer at (8,518) size 310x20 clip at (9,519) size 308x18 scrollX 410 scrollWidth 718 69 69 RenderBlock {DIV} at (0,510) size 310x21 [border: (1px solid #000000)] 70 RenderText {#text} at (-4 14,1) size 718x1771 text run at (-4 14,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."72 layer at (8,599) size 310x74 clip at (9,600) size 308x72 scrollX 41 5 scrollWidth 72370 RenderText {#text} at (-409,1) size 718x17 71 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." 72 layer at (8,599) size 310x74 clip at (9,600) size 308x72 scrollX 410 scrollWidth 718 73 73 RenderBlock {DIV} at (0,591) size 310x75 [border: (1px solid #000000)] 74 RenderText {#text} at (-4 14,1) size 718x1775 text run at (-4 14,1) width 718 RTL override: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."74 RenderText {#text} at (-409,1) size 718x17 75 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." 76 76 RenderBR {BR} at (0,0) size 0x0 77 RenderText {#text} at (- 401,19) size 708x1778 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."77 RenderText {#text} at (-399,19) size 708x17 78 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." 79 79 RenderBR {BR} at (0,0) size 0x0 80 RenderText {#text} at (-39 7,37) size 700x1781 text run at (-39 7,37) width 700 RTL override: "rem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae eros non libero faucibus sagittis sed ut eros."80 RenderText {#text} at (-391,37) size 700x17 81 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." 82 82 RenderBR {BR} at (0,0) size 0x0 83 83 RenderText {#text} at (-386,55) size 695x17 -
trunk/LayoutTests/platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.txt
r221911 r221974 34 34 RenderText {#text} at (0,0) size 507x21 35 35 text run at (0,0) width 507: "Right-To-Left containing replaced content blocking the ellipsis" 36 layer at (8,119) size 310x20 clip at (9,120) size 308x18 scrollWidth 7 1836 layer at (8,119) size 310x20 clip at (9,120) size 308x18 scrollWidth 723 37 37 RenderBlock {DIV} at (0,111) size 310x21 [border: (1px solid #000000)] 38 RenderText {#text} at ( 1,1) size 718x1739 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."40 layer at (8,200) size 310x74 clip at (9,201) size 308x72 scrollWidth 7 1838 RenderText {#text} at (6,1) size 718x17 39 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." 40 layer at (8,200) size 310x74 clip at (9,201) size 308x72 scrollWidth 723 41 41 RenderBlock {DIV} at (0,192) size 310x75 [border: (1px solid #000000)] 42 RenderText {#text} at ( 1,1) size 718x1743 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."42 RenderText {#text} at (6,1) size 718x17 43 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." 44 44 RenderBR {BR} at (0,0) size 0x0 45 RenderText {#text} at ( 1,19) size 708x1746 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."45 RenderText {#text} at (3,19) size 708x17 46 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." 47 47 RenderBR {BR} at (0,0) size 0x0 48 RenderText {#text} at ( 1,37) size 700x1749 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."48 RenderText {#text} at (7,37) size 700x17 49 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." 50 50 RenderBR {BR} at (0,0) size 0x0 51 RenderText {#text} at ( 1,55) size 695x1752 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."51 RenderText {#text} at (4,55) size 695x17 52 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." 53 53 RenderBR {BR} at (0,0) size 0x0 54 54 layer at (8,335) size 310x31 clip at (9,336) size 308x29 scrollWidth 747 -
trunk/LayoutTests/platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.txt
r221912 r221974 15 15 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}" 16 16 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}" 17 selection start: position 10of child 0 {#text} of body17 selection start: position 9 of child 0 {#text} of body 18 18 selection end: position 263 of child 0 {#text} of body -
trunk/LayoutTests/platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.txt
r221912 r221974 20 20 text run at (20,1) width 181: "\x{7B2C}\x{4E8C}\x{6BB5}\x{843D} paragraph 2" 21 21 selection start: position 8 of child 0 {#text} of child 0 {P} of child 3 {DIV} of child 1 {DIV} of body 22 selection end: position 1 3of child 0 {#text} of child 0 {P} of child 3 {DIV} of child 1 {DIV} of body22 selection end: position 12 of child 0 {#text} of child 0 {P} of child 3 {DIV} of child 1 {DIV} of body -
trunk/LayoutTests/platform/gtk/fast/repaint/selection-rl-expected.txt
r221912 r221974 37 37 text run at (162,0) width 305: "Testing both hit testing and painting of selection." 38 38 RenderBR {BR} at (162,305) size 17x0 39 selection start: position 6of child 0 {#text} of child 1 {SPAN} of body39 selection start: position 5 of child 0 {#text} of child 1 {SPAN} of body 40 40 selection end: position 19 of child 0 {#text} of child 1 {SPAN} of body -
trunk/LayoutTests/platform/gtk/fast/text/atsui-rtl-override-selection-expected.txt
r221675 r221974 13 13 RenderText {#text} at (0,0) size 281x17 14 14 text run at (0,0) width 281: "\x{201C}remips\x{201D} should be highlighted in the above." 15 selection start: position 2of child 0 {#text} of child 3 {BDO} of body15 selection start: position 3 of child 0 {#text} of child 3 {BDO} of body 16 16 selection end: position 9 of child 0 {#text} of child 3 {BDO} of body -
trunk/LayoutTests/platform/gtk/fast/text/in-rendered-text-rtl-expected.txt
r221912 r221974 27 27 text run at (62,0) width 90 RTL: "\x{5D0}\x{5DB}\x{5DC}\x{5EA} \x{5E4}\x{5DC}\x{5E4}\x{5DC} " 28 28 RenderText {#text} at (0,0) size 0x0 29 caret: position 2of child 0 {#text} of child 7 {SPAN} of body29 caret: position 3 of child 0 {#text} of child 7 {SPAN} of body -
trunk/LayoutTests/platform/gtk/svg/custom/foreignObject-crash-on-hover-expected.txt
r221912 r221974 14 14 text run at (0,36) width 187: "style=\"fill:red; stroke:blue;\"/>" 15 15 RenderSVGPath {path} at (99,129) size 202x203 [stroke={[type=SOLID] [color=#0000FF]}] [fill={[type=SOLID] [color=#FF0000]}] [data="M 50 80 L 250 80 L 150 280 Z"] 16 caret: position 6 7of child 3 {#text} of child 5 {foreignObject} of child 3 {g} of child 1 {svg} of document16 caret: position 66 of child 3 {#text} of child 5 {foreignObject} of child 3 {g} of child 1 {svg} of document -
trunk/LayoutTests/platform/gtk/transitions/svg-text-shadow-transition-expected.txt
r221720 r221974 11 11 RenderText {#text} at (0,0) size 0x0 12 12 RenderBlock {DIV} at (0,104) size 784x36 13 RenderText {#text} at (0,0) size 57 7x1714 text run at (0,0) width 57 7: "PASS - \"text-shadow\" property for \"text\" element at 0s saw something close to: -25,-5,0,15"15 RenderBR {BR} at (57 7,0) size 0x1716 RenderText {#text} at (0,18) size 55 9x1717 text run at (0,18) width 55 9: "PASS - \"text-shadow\" property for \"text\" element at 1s saw something close to: 5,5,0,15"18 RenderBR {BR} at (55 9,18) size 0x1713 RenderText {#text} at (0,0) size 576x17 14 text run at (0,0) width 576: "PASS - \"text-shadow\" property for \"text\" element at 0s saw something close to: -25,-5,0,15" 15 RenderBR {BR} at (576,0) size 0x17 16 RenderText {#text} at (0,18) size 558x17 17 text run at (0,18) width 558: "PASS - \"text-shadow\" property for \"text\" element at 1s saw something close to: 5,5,0,15" 18 RenderBR {BR} at (558,18) size 0x17 -
trunk/Source/WebCore/ChangeLog
r221972 r221974 1 2017-09-13 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [HarfBuzz] Wrong offset returned by HarfBuzzShaper::offsetForPosition in some cases 4 https://bugs.webkit.org/show_bug.cgi?id=176848 5 6 Reviewed by Michael Catanzaro. 7 8 This patch rewrites HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition() to make it simpler and ensure we 9 return the right offset in all the cases, also honoring now the includePartialGlyphs parameter that we were 10 ignoring in FontCascade::offsetForPositionForComplexText(). 11 12 Fixes several tests that started to fail after r221909. 13 14 * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp: 15 (WebCore::FontCascade::offsetForPositionForComplexText const): 16 * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: 17 (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition): 18 (WebCore::HarfBuzzShaper::offsetForPosition): 19 * platform/graphics/harfbuzz/HarfBuzzShaper.h: 20 1 21 2017-09-13 Per Arne Vollan <pvollan@apple.com> 2 22 -
trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
r219970 r221974 79 79 } 80 80 81 int FontCascade::offsetForPositionForComplexText(const TextRun& run, float x, bool ) const81 int FontCascade::offsetForPositionForComplexText(const TextRun& run, float x, bool includePartialGlyphs) const 82 82 { 83 83 HarfBuzzShaper shaper(this, run); 84 84 if (shaper.shape()) 85 return shaper.offsetForPosition(x );85 return shaper.offsetForPosition(x, includePartialGlyphs); 86 86 LOG_ERROR("Shaper couldn't shape text run."); 87 87 return 0; -
trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp
r220797 r221974 102 102 } 103 103 104 unsigned HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition(float targetX )104 unsigned HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition(float targetX, bool includePartialGlyphs) 105 105 { 106 106 ASSERT(targetX <= m_width); 107 107 float currentX = 0; 108 float currentAdvance = m_advances[0];109 108 unsigned glyphIndex = 0; 110 111 // Sum up advances that belong to a character. 112 while (glyphIndex < m_numGlyphs - 1 && m_glyphToCharacterIndexes[glyphIndex] == m_glyphToCharacterIndexes[glyphIndex + 1]) 113 currentAdvance += m_advances[++glyphIndex]; 114 currentAdvance = currentAdvance / 2.0; 115 if (targetX <= currentAdvance) 116 return rtl() ? m_numCharacters : 0; 117 118 ++glyphIndex; 119 while (glyphIndex < m_numGlyphs) { 120 unsigned prevCharacterIndex = m_glyphToCharacterIndexes[glyphIndex - 1]; 121 float prevAdvance = currentAdvance; 122 currentAdvance = m_advances[glyphIndex]; 123 while (glyphIndex < m_numGlyphs - 1 && m_glyphToCharacterIndexes[glyphIndex] == m_glyphToCharacterIndexes[glyphIndex + 1]) 124 currentAdvance += m_advances[++glyphIndex]; 125 currentAdvance = currentAdvance / 2.0; 126 float nextX = currentX + prevAdvance + currentAdvance; 127 if (currentX <= targetX && targetX <= nextX) 128 return rtl() ? prevCharacterIndex : m_glyphToCharacterIndexes[glyphIndex]; 129 currentX = nextX; 130 prevAdvance = currentAdvance; 109 float characterWidth = 0; 110 unsigned characterIndex = 0; 111 do { 112 characterIndex = m_glyphToCharacterIndexes[glyphIndex]; 113 characterWidth = m_advances[glyphIndex]; 114 while (glyphIndex < m_numGlyphs - 1 && m_glyphToCharacterIndexes[glyphIndex + 1] == characterIndex) 115 characterWidth += m_advances[++glyphIndex]; 116 117 if ((includePartialGlyphs && (targetX < currentX + characterWidth / 2.0)) 118 || (!includePartialGlyphs && (targetX < currentX + characterWidth))) 119 return rtl() ? std::min(m_numCharacters, characterIndex + 1) : characterIndex; 120 121 if ((includePartialGlyphs && (targetX >= (currentX + characterWidth / 2.0) && targetX < currentX + characterWidth)) 122 || (!includePartialGlyphs && (targetX >= currentX && targetX < currentX + characterWidth))) 123 break; 124 125 currentX += characterWidth; 131 126 ++glyphIndex; 132 } 133 134 return rtl() ? 0 : m_numCharacters;127 } while (glyphIndex < m_numGlyphs); 128 129 return rtl() ? characterIndex : std::min(m_numCharacters, characterIndex + 1); 135 130 } 136 131 … … 582 577 } 583 578 584 int HarfBuzzShaper::offsetForPosition(float targetX )579 int HarfBuzzShaper::offsetForPosition(float targetX, bool includePartialGlyphs) 585 580 { 586 581 int charactersSoFar = 0; … … 595 590 if (offsetForRun >= 0 && offsetForRun <= m_harfBuzzRuns[i]->width()) { 596 591 // The x value in question is within this script run. 597 const unsigned index = m_harfBuzzRuns[i]->characterIndexForXPosition(offsetForRun );592 const unsigned index = m_harfBuzzRuns[i]->characterIndexForXPosition(offsetForRun, includePartialGlyphs); 598 593 return charactersSoFar + index; 599 594 } … … 605 600 float offsetForRun = targetX - currentX; 606 601 if (offsetForRun >= 0 && offsetForRun <= m_harfBuzzRuns[i]->width()) { 607 const unsigned index = m_harfBuzzRuns[i]->characterIndexForXPosition(offsetForRun );602 const unsigned index = m_harfBuzzRuns[i]->characterIndexForXPosition(offsetForRun, includePartialGlyphs); 608 603 return charactersSoFar + index; 609 604 } -
trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h
r218799 r221974 58 58 FloatPoint adjustStartPoint(const FloatPoint&); 59 59 float totalWidth() { return m_totalWidth; } 60 int offsetForPosition(float targetX );60 int offsetForPosition(float targetX, bool includePartialGlyphs = true); 61 61 FloatRect selectionRect(const FloatPoint&, int height, unsigned from, unsigned to); 62 62 … … 70 70 void setWidth(float width) { m_width = width; } 71 71 72 unsigned characterIndexForXPosition(float targetX );72 unsigned characterIndexForXPosition(float targetX, bool includePartialGlyphs); 73 73 float xPositionForOffset(unsigned offset); 74 74
Note: See TracChangeset
for help on using the changeset viewer.