Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Issue 1083073002: Add a "logical query mode" to SVGTextQuery (Closed)

Created:
5 years, 8 months ago by fs
Modified:
5 years, 8 months ago
CC:
blink-reviews, blink-reviews-rendering, Dominik Röttsches, krit, eae+blinkwatch, ed+blinkwatch_opera.com, f(malita), fs, gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, zoltan1
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Add a "logical query mode" to SVGTextQuery This CL adds an additional query "mode" to use for some of the query functions. This new methods searches "logically" - using the layout objects rather than the line boxes to guide the search. The existing method is renamed to spatialQuery, leaving us with: spatialQuery() - for point -> something logicalQuery() - for character (code unit) -> something This new search-order is needed to handle bi-directionality correctly. Previously the direction of the text would influence the search, since the line boxes would be processed in their spatial-ordering and the search position would be adjusted based on that ordering. (As an example, this would mean that given: <text direction="rtl">ltrRTL</text> and a query range [2, 4], the third character of the RTL run and the first character of the ltr run would be included rather than the other way around. See also new test in bidi-getsubstringlength.html) The value returned by getCharNumAtPosition() is adjusted such that the layout object of the intersected glyph is used to determine the character index based on the query root (the element on which the method is called.) This means that the value returned is in the same query space as that handled by logicalQuery(). BUG=471205, 470326 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=193944

Patch Set 1 #

Patch Set 2 : Fix "final tweaking" breakage. #

Patch Set 3 : Missing TEs. #

Total comments: 16

Patch Set 4 : Fix WS-handling; Add additional (WS-)test. #

Total comments: 2

Patch Set 5 : Older URL. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -45 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/svg/text/bidi-getcharnumatpos.html View 1 2 3 1 chunk +40 lines, -0 lines 0 comments Download
A LayoutTests/svg/text/bidi-getcharnumatpos-expected.txt View 1 1 chunk +7 lines, -0 lines 0 comments Download
M LayoutTests/svg/text/bidi-getsubstringlength.html View 2 chunks +12 lines, -2 lines 0 comments Download
M LayoutTests/svg/text/bidi-getsubstringlength-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
M LayoutTests/svg/text/bidi-text-query.svg View 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/svg/text/textquery-collapsed-whitespace.html View 1 2 3 1 chunk +41 lines, -0 lines 0 comments Download
A LayoutTests/svg/text/textquery-collapsed-whitespace-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/layout/svg/SVGTextQuery.cpp View 1 2 3 4 13 chunks +120 lines, -43 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
fs
This is the last bit for bug 470326 - with this I think we should ...
5 years, 8 months ago (2015-04-15 09:30:17 UTC) #2
pdr.
LGTM! https://codereview.chromium.org/1083073002/diff/40001/LayoutTests/svg/text/bidi-getcharnumatpos.html File LayoutTests/svg/text/bidi-getcharnumatpos.html (right): https://codereview.chromium.org/1083073002/diff/40001/LayoutTests/svg/text/bidi-getcharnumatpos.html#newcode8 LayoutTests/svg/text/bidi-getcharnumatpos.html:8: <text text-anchor="end" y="70" direction="rtl">Foo הפוך</text> My Hebrew is ...
5 years, 8 months ago (2015-04-16 02:34:58 UTC) #3
fs
Great review, I had completely failed to consider the WS-cases (I suppose I can blame ...
5 years, 8 months ago (2015-04-16 14:22:21 UTC) #4
pdr.
LGTM https://codereview.chromium.org/1083073002/diff/60001/Source/core/layout/svg/SVGTextQuery.cpp File Source/core/layout/svg/SVGTextQuery.cpp (right): https://codereview.chromium.org/1083073002/diff/60001/Source/core/layout/svg/SVGTextQuery.cpp#newcode545 Source/core/layout/svg/SVGTextQuery.cpp:545: // https://svgwg.org/svg2-draft/single-page.html#text-__svg__SVGTextContentElement__getCharNumAtPosition Sorry for the churn. I use ...
5 years, 8 months ago (2015-04-16 21:13:26 UTC) #5
fs
https://codereview.chromium.org/1083073002/diff/60001/Source/core/layout/svg/SVGTextQuery.cpp File Source/core/layout/svg/SVGTextQuery.cpp (right): https://codereview.chromium.org/1083073002/diff/60001/Source/core/layout/svg/SVGTextQuery.cpp#newcode545 Source/core/layout/svg/SVGTextQuery.cpp:545: // https://svgwg.org/svg2-draft/single-page.html#text-__svg__SVGTextContentElement__getCharNumAtPosition On 2015/04/16 21:13:25, pdr wrote: > Sorry ...
5 years, 8 months ago (2015-04-17 11:05:40 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1083073002/80001
5 years, 8 months ago (2015-04-17 13:16:53 UTC) #9
commit-bot: I haz the power
5 years, 8 months ago (2015-04-17 13:20:05 UTC) #10
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=193944

Powered by Google App Engine
This is Rietveld 408576698