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

Issue 1454623002: Hit test SVG line boxes (Closed)

Created:
5 years, 1 month ago by pdr.
Modified:
5 years, 1 month ago
Reviewers:
fs
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, krit, eae+blinkwatch, f(malita), fs, gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Hit test SVG line boxes This patch is a partial merge of http://wkrev.com/192020 by Antoine Quint <graouts@apple.com>;. Hit testing for SVG <text> elements was using the same code as hit testing for regular HTML elements. However, in SVG, text elements should only hit test based on their character cells, not the rectangular bounds of the element, see section 16.6 of the SVG 1.1 specification: http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty We now hit test each SVGTextFragment of each SVGInlineTextBox that is a child of an SVGRootInlineBox to correctly find whether the provided HitTestLocation is contained within a character cell. This patch is almost identical to the original patch but the tests have been rewritten to be text-based reftests and to not rely on timeouts. BUG=551058 Committed: https://crrev.com/e0b3579267bd648ded7ab13d2708296da5f92c02 Cr-Commit-Position: refs/heads/master@{#360197}

Patch Set 1 #

Patch Set 2 : Cleanup extra debugging code and minor bugs #

Total comments: 8

Patch Set 3 : Address reviewer comments: FloatRect->FloatQuad, new rotated-text.svg test, cleanup tests #

Patch Set 4 : Add forgotten test. Sorry, test! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, --1 lines) Patch
A third_party/WebKit/LayoutTests/svg/hittest/rotated-text.svg View 1 2 3 1 chunk +45 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/svg/hittest/rotated-text-expected.txt View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/hittest/text-with-multiple-tspans.svg View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/svg/hittest/text-with-multiple-tspans-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/hittest/text-with-text-node-and-content-elements.svg View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/svg/hittest/text-with-text-node-and-content-elements-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/hittest/text-with-text-node-only.svg View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/svg/hittest/text-with-text-node-only-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/hittest/text-with-text-path.svg View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/svg/hittest/text-with-text-path-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/RootInlineBox.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp View 1 2 1 chunk +17 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/line/SVGRootInlineBox.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/line/SVGRootInlineBox.cpp View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
pdr.
5 years, 1 month ago (2015-11-17 06:08:13 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1454623002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1454623002/20001
5 years, 1 month ago (2015-11-17 06:08:56 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-17 07:26:23 UTC) #7
fs
LGTM w/ questions, test comments and nits. But no ponies. Definitely no ponies. https://codereview.chromium.org/1454623002/diff/20001/third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg File ...
5 years, 1 month ago (2015-11-17 09:47:49 UTC) #8
pdr.
Thanks! https://codereview.chromium.org/1454623002/diff/20001/third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg File third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg (right): https://codereview.chromium.org/1454623002/diff/20001/third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg#newcode7 third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg:7: font-family: Ahem; On 2015/11/17 at 09:47:49, fs wrote: ...
5 years, 1 month ago (2015-11-17 21:51:23 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1454623002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1454623002/60001
5 years, 1 month ago (2015-11-17 21:51:48 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 1 month ago (2015-11-17 23:14:16 UTC) #13
commit-bot: I haz the power
5 years, 1 month ago (2015-11-17 23:15:58 UTC) #14
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e0b3579267bd648ded7ab13d2708296da5f92c02
Cr-Commit-Position: refs/heads/master@{#360197}

Powered by Google App Engine
This is Rietveld 408576698