Commit 5a40ea25 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

[LayoutNG] Include frame rect into visual rect for NGPhysicalTextFragment

This patch changes visual rect of NGPhysicalTextFragment to
include its frame rect. Legacy does so, but NG did not when
it was first implemented due to the lack of understanding.

After reviewing test results, it turns out that by not doing
so, background and decorations on space characters are
affected by this difference because space characters do not
have glyph bounding box, which results in empty visual rect.

Includes rebaselines that improve the rendering.

Bug: 636993, 714962
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I888f8b27680aa1ff806cca15c84919461c06fc31
Reviewed-on: https://chromium-review.googlesource.com/1027012Reviewed-by: default avatarAleks Totic <atotic@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553914}
parent d58a8923
...@@ -863,9 +863,11 @@ crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/overflow-content.h ...@@ -863,9 +863,11 @@ crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/overflow-content.h
crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/overflow-unsplittable.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/overflow-unsplittable.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/pageLogicalOffset-vertical.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/pageLogicalOffset-vertical.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/paginate-block-replaced.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/paginate-block-replaced.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/positioned-outside-of-columns.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/positioned-outside-of-columns.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/positioned-split.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/positioned-split.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/positioned-with-constrained-height.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/positioned-with-constrained-height.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/positive-leading.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/pushed-line-affected-by-float.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/pushed-line-affected-by-float.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/relayout-and-push-float.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/relayout-and-push-float.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/renderer-positioned-assert-crash.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/renderer-positioned-assert-crash.html [ Failure ]
......
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 698, 14], "rect": [8, 8, 699, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 698, 14], "rect": [8, 8, 699, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,62 +19,62 @@ ...@@ -19,62 +19,62 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 224, 31, 9], "rect": [8, 221, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 208, 31, 9], "rect": [8, 205, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 192, 31, 9], "rect": [8, 189, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 176, 31, 9], "rect": [8, 173, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 160, 31, 9], "rect": [8, 157, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 144, 31, 9], "rect": [8, 141, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 128, 31, 9], "rect": [8, 125, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 112, 31, 9], "rect": [8, 109, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 96, 31, 9], "rect": [8, 93, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 80, 31, 9], "rect": [8, 77, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 64, 31, 9], "rect": [8, 61, 48, 16],
"reason": "style change" "reason": "style change"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [24, 240, 31, 6], "rect": [8, 237, 48, 9],
"reason": "style change" "reason": "style change"
} }
] ]
......
...@@ -24,42 +24,42 @@ ...@@ -24,42 +24,42 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 73, 369, 15], "rect": [8, 69, 369, 20],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 73, 369, 15], "rect": [8, 69, 369, 20],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 53, 345, 15], "rect": [8, 49, 345, 20],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 53, 345, 15], "rect": [8, 49, 345, 20],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 11, 334, 15], "rect": [8, 8, 334, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 11, 334, 15], "rect": [8, 8, 334, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 93, 174, 15], "rect": [8, 89, 175, 20],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 93, 174, 15], "rect": [8, 89, 175, 20],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 750, 14], "rect": [8, 36, 751, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 750, 14], "rect": [8, 36, 751, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -34,22 +34,22 @@ ...@@ -34,22 +34,22 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [91, 20, 307, 14], "rect": [91, 16, 307, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [91, 20, 307, 14], "rect": [91, 16, 307, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 83, 14], "rect": [8, 16, 83, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 83, 14], "rect": [8, 16, 83, 19],
"reason": "disappeared" "reason": "disappeared"
} }
] ]
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 750, 14], "rect": [8, 36, 751, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 750, 14], "rect": [8, 36, 751, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -34,22 +34,22 @@ ...@@ -34,22 +34,22 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [91, 20, 307, 14], "rect": [91, 16, 307, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [91, 20, 307, 14], "rect": [91, 16, 307, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 83, 14], "rect": [8, 16, 83, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 83, 14], "rect": [8, 16, 83, 19],
"reason": "disappeared" "reason": "disappeared"
} }
] ]
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "LayoutNGBlockFlow (positioned) DIV id='absolute'", "object": "LayoutNGBlockFlow (positioned) DIV id='absolute'",
"rect": [8, 2056, 774, 246], "rect": [8, 2046, 774, 257],
"reason": "appeared" "reason": "appeared"
} }
], ],
......
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 508, 14], "rect": [8, 16, 509, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 508, 14], "rect": [8, 16, 509, 19],
"reason": "disappeared" "reason": "disappeared"
} }
] ]
......
...@@ -39,52 +39,52 @@ ...@@ -39,52 +39,52 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [105, 59, 662, 14], "rect": [101, 55, 666, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [105, 59, 662, 14], "rect": [101, 55, 666, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [103, 121, 631, 14], "rect": [100, 117, 634, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [103, 121, 631, 14], "rect": [100, 117, 634, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [191, 20, 326, 14], "rect": [191, 16, 326, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [191, 20, 326, 14], "rect": [191, 16, 326, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [11, 79, 315, 14], "rect": [11, 75, 316, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [11, 79, 315, 14], "rect": [11, 75, 316, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [74, 20, 117, 14], "rect": [74, 16, 117, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [74, 20, 117, 14], "rect": [74, 16, 117, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -94,12 +94,22 @@ ...@@ -94,12 +94,22 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [11, 141, 93, 14], "rect": [11, 137, 94, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [11, 141, 93, 14], "rect": [11, 137, 94, 19],
"reason": "disappeared"
},
{
"object": "NGPaintFragment",
"rect": [11, 55, 90, 19],
"reason": "appeared"
},
{
"object": "NGPaintFragment",
"rect": [11, 55, 90, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -119,12 +129,12 @@ ...@@ -119,12 +129,12 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [11, 59, 89, 11], "rect": [11, 117, 89, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [11, 59, 89, 11], "rect": [11, 117, 89, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -144,22 +154,22 @@ ...@@ -144,22 +154,22 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [11, 121, 88, 11], "rect": [8, 16, 62, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [11, 121, 88, 11], "rect": [8, 16, 62, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 61, 12], "rect": [70, 16, 4, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 61, 12], "rect": [70, 16, 4, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 151, 768, 51], "rect": [8, 147, 768, 59],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 151, 768, 34], "rect": [8, 147, 768, 39],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
}, },
{ {
"object": "LayoutNGBlockFlow HTML", "object": "LayoutNGBlockFlow HTML",
"rect": [18, 22, 22, 11], "rect": [18, 18, 22, 19],
"reason": "disappeared" "reason": "disappeared"
} }
] ]
......
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [25, 55, 67, 102], "rect": [23, 51, 72, 110],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [25, 55, 65, 101], "rect": [23, 51, 69, 109],
"reason": "disappeared" "reason": "disappeared"
} }
] ]
......
...@@ -24,17 +24,17 @@ ...@@ -24,17 +24,17 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 340, 14], "rect": [8, 8, 341, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 340, 14], "rect": [8, 8, 341, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "LayoutNGBlockFlow HTML", "object": "LayoutNGBlockFlow HTML",
"rect": [9, 304, 59, 13], "rect": [8, 300, 60, 22],
"reason": "appeared" "reason": "appeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 238, 528, 14], "rect": [8, 234, 529, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 238, 528, 14], "rect": [8, 234, 529, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [0, 324, 413, 11], "rect": [0, 320, 413, 19],
"reason": "style change" "reason": "style change"
} }
], ],
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [100, 124, 40, 11], "rect": [100, 120, 40, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [100, 124, 29, 11], "rect": [100, 120, 29, 19],
"reason": "appeared" "reason": "appeared"
} }
] ]
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [102, 126, 40, 11], "rect": [102, 122, 40, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [102, 126, 29, 11], "rect": [102, 122, 29, 19],
"reason": "appeared" "reason": "appeared"
} }
] ]
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [100, 124, 34, 11], "rect": [100, 120, 34, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [100, 124, 29, 11], "rect": [100, 120, 29, 19],
"reason": "appeared" "reason": "appeared"
} }
] ]
......
...@@ -19,42 +19,42 @@ ...@@ -19,42 +19,42 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [124, 56, 383, 14], "rect": [124, 52, 383, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [124, 56, 383, 14], "rect": [124, 52, 383, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 339, 11], "rect": [8, 16, 340, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 339, 11], "rect": [8, 16, 340, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 56, 116, 14], "rect": [8, 52, 116, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 56, 116, 14], "rect": [8, 52, 116, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [507, 56, 3, 14], "rect": [507, 52, 4, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [507, 56, 3, 14], "rect": [507, 52, 4, 19],
"reason": "disappeared" "reason": "disappeared"
} }
] ]
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
}, },
{ {
"object": "LayoutNGBlockFlow HTML", "object": "LayoutNGBlockFlow HTML",
"rect": [3, 67, 55, 11], "rect": [3, 65, 55, 17],
"reason": "paint property change" "reason": "paint property change"
}, },
{ {
......
...@@ -19,32 +19,32 @@ ...@@ -19,32 +19,32 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 742, 14], "rect": [8, 8, 742, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 742, 14], "rect": [8, 8, 742, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 32, 543, 14], "rect": [8, 28, 543, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 32, 543, 14], "rect": [8, 28, 543, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 52, 327, 14], "rect": [8, 48, 328, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 52, 327, 14], "rect": [8, 48, 328, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,32 +19,32 @@ ...@@ -19,32 +19,32 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 762, 14], "rect": [8, 8, 762, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 762, 14], "rect": [8, 8, 762, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 32, 543, 14], "rect": [8, 28, 543, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 32, 543, 14], "rect": [8, 28, 543, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 52, 327, 14], "rect": [8, 48, 328, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 52, 327, 14], "rect": [8, 48, 328, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 446, 14], "rect": [8, 16, 447, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 446, 14], "rect": [8, 16, 447, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,22 +19,22 @@ ...@@ -19,22 +19,22 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [369, 20, 418, 14], "rect": [369, 16, 418, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [369, 20, 418, 14], "rect": [369, 16, 418, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [60, 20, 305, 14], "rect": [60, 16, 305, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [60, 20, 305, 14], "rect": [60, 16, 305, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -49,12 +49,22 @@ ...@@ -49,12 +49,22 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 52, 14], "rect": [8, 16, 52, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 52, 14], "rect": [8, 16, 52, 19],
"reason": "disappeared"
},
{
"object": "NGPaintFragment",
"rect": [365, 16, 4, 19],
"reason": "appeared"
},
{
"object": "NGPaintFragment",
"rect": [365, 16, 4, 19],
"reason": "disappeared" "reason": "disappeared"
} }
] ]
......
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [9, 34, 102, 11], "rect": [8, 30, 103, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [9, 34, 102, 11], "rect": [8, 30, 103, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 763, 14], "rect": [8, 16, 763, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 763, 14], "rect": [8, 16, 763, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 772, 14], "rect": [8, 16, 772, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 772, 14], "rect": [8, 16, 772, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -44,12 +44,12 @@ ...@@ -44,12 +44,12 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 209, 14], "rect": [8, 36, 209, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 209, 14], "rect": [8, 36, 209, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 749, 14], "rect": [8, 16, 749, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 749, 14], "rect": [8, 16, 749, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -59,12 +59,12 @@ ...@@ -59,12 +59,12 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 128, 14], "rect": [8, 36, 128, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 128, 14], "rect": [8, 36, 128, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 750, 14], "rect": [8, 16, 750, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 750, 14], "rect": [8, 16, 750, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 360, 14], "rect": [8, 36, 360, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 360, 14], "rect": [8, 36, 360, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 772, 14], "rect": [8, 16, 772, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 772, 14], "rect": [8, 16, 772, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
...@@ -44,12 +44,12 @@ ...@@ -44,12 +44,12 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 209, 14], "rect": [8, 36, 209, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 209, 14], "rect": [8, 36, 209, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 676, 14], "rect": [8, 16, 676, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 676, 14], "rect": [8, 16, 676, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,22 +19,22 @@ ...@@ -19,22 +19,22 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 721, 14], "rect": [8, 16, 721, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 721, 14], "rect": [8, 16, 721, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 670, 14], "rect": [8, 36, 670, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 670, 14], "rect": [8, 36, 670, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,22 +19,22 @@ ...@@ -19,22 +19,22 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 729, 14], "rect": [8, 16, 729, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 729, 14], "rect": [8, 16, 729, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 670, 14], "rect": [8, 36, 670, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 40, 670, 14], "rect": [8, 36, 670, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 676, 14], "rect": [8, 16, 676, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 676, 14], "rect": [8, 16, 676, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 676, 14], "rect": [8, 16, 676, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 676, 14], "rect": [8, 16, 676, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 664, 14], "rect": [8, 16, 665, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 664, 14], "rect": [8, 16, 665, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 765, 14], "rect": [8, 16, 765, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 20, 765, 14], "rect": [8, 16, 765, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
}, },
{ {
"object": "LayoutSVGForeignObject foreignObject", "object": "LayoutSVGForeignObject foreignObject",
"rect": [211, 124, 88, 26], "rect": [210, 114, 91, 46],
"reason": "paint property change" "reason": "paint property change"
}, },
{ {
"object": "LayoutSVGForeignObject foreignObject", "object": "LayoutSVGForeignObject foreignObject",
"rect": [211, 24, 88, 26], "rect": [210, 14, 91, 46],
"reason": "paint property change" "reason": "paint property change"
}, },
{ {
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
}, },
{ {
"object": "LayoutSVGForeignObject foreignObject", "object": "LayoutSVGForeignObject foreignObject",
"rect": [6, 3, 3, 2], "rect": [6, 3, 4, 2],
"reason": "paint property change" "reason": "paint property change"
}, },
{ {
......
...@@ -39,62 +39,62 @@ ...@@ -39,62 +39,62 @@
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 360, 14], "rect": [8, 8, 361, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 360, 14], "rect": [8, 8, 361, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 360, 14], "rect": [8, 8, 361, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 360, 14], "rect": [8, 8, 361, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 360, 14], "rect": [8, 8, 361, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 12, 360, 14], "rect": [8, 8, 361, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 32, 215, 14], "rect": [8, 28, 216, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 32, 215, 14], "rect": [8, 28, 216, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 32, 215, 14], "rect": [8, 28, 216, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 32, 215, 14], "rect": [8, 28, 216, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 32, 215, 14], "rect": [8, 28, 216, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [8, 32, 215, 14], "rect": [8, 28, 216, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
......
...@@ -19,27 +19,27 @@ ...@@ -19,27 +19,27 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [18, 134, 251, 14], "rect": [18, 130, 251, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [18, 154, 240, 14], "rect": [18, 150, 240, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [18, 114, 125, 14], "rect": [18, 110, 125, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [18, 114, 125, 14], "rect": [18, 110, 125, 19],
"reason": "disappeared" "reason": "disappeared"
}, },
{ {
"object": "NGPaintFragment", "object": "NGPaintFragment",
"rect": [18, 134, 82, 14], "rect": [18, 130, 82, 19],
"reason": "appeared" "reason": "appeared"
}, },
{ {
......
...@@ -16,6 +16,23 @@ ...@@ -16,6 +16,23 @@
namespace blink { namespace blink {
// Convert logical cooridnate to local physical coordinate.
NGPhysicalOffsetRect NGPhysicalTextFragment::ConvertToLocal(
const LayoutRect& logical_rect) const {
switch (LineOrientation()) {
case NGLineOrientation::kHorizontal:
return NGPhysicalOffsetRect(logical_rect);
case NGLineOrientation::kClockWiseVertical:
return {{size_.width - logical_rect.MaxY(), logical_rect.X()},
{logical_rect.Height(), logical_rect.Width()}};
case NGLineOrientation::kCounterClockWiseVertical:
return {{logical_rect.Y(), size_.height - logical_rect.MaxX()},
{logical_rect.Height(), logical_rect.Width()}};
}
NOTREACHED();
return NGPhysicalOffsetRect(logical_rect);
}
// Compute the inline position from text offset, in logical coordinate relative // Compute the inline position from text offset, in logical coordinate relative
// to this fragment. // to this fragment.
LayoutUnit NGPhysicalTextFragment::InlinePositionForOffset( LayoutUnit NGPhysicalTextFragment::InlinePositionForOffset(
...@@ -76,8 +93,8 @@ NGPhysicalOffsetRect NGPhysicalTextFragment::LocalRect( ...@@ -76,8 +93,8 @@ NGPhysicalOffsetRect NGPhysicalTextFragment::LocalRect(
} }
NGPhysicalOffsetRect NGPhysicalTextFragment::SelfVisualRect() const { NGPhysicalOffsetRect NGPhysicalTextFragment::SelfVisualRect() const {
if (!shape_result_) if (UNLIKELY(!shape_result_))
return {}; return LocalRect();
// Glyph bounds is in logical coordinate, origin at the alphabetic baseline. // Glyph bounds is in logical coordinate, origin at the alphabetic baseline.
LayoutRect visual_rect = EnclosingLayoutRect(shape_result_->Bounds()); LayoutRect visual_rect = EnclosingLayoutRect(shape_result_->Bounds());
...@@ -85,8 +102,7 @@ NGPhysicalOffsetRect NGPhysicalTextFragment::SelfVisualRect() const { ...@@ -85,8 +102,7 @@ NGPhysicalOffsetRect NGPhysicalTextFragment::SelfVisualRect() const {
// Make the origin at the logical top of this fragment. // Make the origin at the logical top of this fragment.
const ComputedStyle& style = Style(); const ComputedStyle& style = Style();
const Font& font = style.GetFont(); const Font& font = style.GetFont();
const SimpleFontData* font_data = font.PrimaryFont(); if (const SimpleFontData* font_data = font.PrimaryFont()) {
if (font_data) {
visual_rect.SetY(visual_rect.Y() + font_data->GetFontMetrics().FixedAscent( visual_rect.SetY(visual_rect.Y() + font_data->GetFontMetrics().FixedAscent(
kAlphabeticBaseline)); kAlphabeticBaseline));
} }
...@@ -120,18 +136,11 @@ NGPhysicalOffsetRect NGPhysicalTextFragment::SelfVisualRect() const { ...@@ -120,18 +136,11 @@ NGPhysicalOffsetRect NGPhysicalTextFragment::SelfVisualRect() const {
visual_rect = LayoutRect(EnclosingIntRect(visual_rect)); visual_rect = LayoutRect(EnclosingIntRect(visual_rect));
switch (LineOrientation()) { // Uniting the frame rect ensures that non-ink spaces such side bearings, or
case NGLineOrientation::kHorizontal: // even space characters, are included in the visual rect for decorations.
return NGPhysicalOffsetRect(visual_rect); NGPhysicalOffsetRect local_visual_rect = ConvertToLocal(visual_rect);
case NGLineOrientation::kClockWiseVertical: local_visual_rect.Unite(LocalRect());
return {{size_.width - visual_rect.MaxY(), visual_rect.X()}, return local_visual_rect;
{visual_rect.Height(), visual_rect.Width()}};
case NGLineOrientation::kCounterClockWiseVertical:
return {{visual_rect.Y(), size_.height - visual_rect.MaxX()},
{visual_rect.Height(), visual_rect.Width()}};
}
NOTREACHED();
return {};
} }
scoped_refptr<NGPhysicalFragment> NGPhysicalTextFragment::CloneWithoutOffset() scoped_refptr<NGPhysicalFragment> NGPhysicalTextFragment::CloneWithoutOffset()
......
...@@ -116,6 +116,7 @@ class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragment { ...@@ -116,6 +116,7 @@ class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragment {
// Start and end offsets must be between StartOffset() and EndOffset(). // Start and end offsets must be between StartOffset() and EndOffset().
NGPhysicalOffsetRect LocalRect(unsigned start_offset, NGPhysicalOffsetRect LocalRect(unsigned start_offset,
unsigned end_offset) const; unsigned end_offset) const;
using NGPhysicalFragment::LocalRect;
// The visual bounding box that includes glpyh bounding box and CSS // The visual bounding box that includes glpyh bounding box and CSS
// properties, in local coordinates. // properties, in local coordinates.
...@@ -146,6 +147,8 @@ class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragment { ...@@ -146,6 +147,8 @@ class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragment {
LayoutUnit (*round)(float), LayoutUnit (*round)(float),
AdjustMidCluster) const; AdjustMidCluster) const;
NGPhysicalOffsetRect ConvertToLocal(const LayoutRect&) const;
// The text of NGInlineNode; i.e., of a parent block. The text for this // The text of NGInlineNode; i.e., of a parent block. The text for this
// fragment is a substring(start_offset_, end_offset_) of this string. // fragment is a substring(start_offset_, end_offset_) of this string.
const String text_; const String text_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment