Closed
Bug 1421368
Opened 8 years ago
Closed 8 years ago
Document.elementsFromPoint should include SVG 'text' elements
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: jwatt, Assigned: jwatt)
References
Details
Attachments
(1 file)
1.06 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
It seems that Document.elementsFromPoint does not include SVG 'text' elements. (See bug 1415068 comment 10.) It should do.
![]() |
Assignee | |
Comment 1•8 years ago
|
||
Attachment #8932573 -
Flags: review?(cam)
Updated•8 years ago
|
Priority: -- → P2
![]() |
Assignee | |
Comment 2•8 years ago
|
||
I guess the place to add a test is in:
https://dxr.mozilla.org/mozilla-central/source/testing/web-platform/tests/css/cssom-view/elementsFromPoint-svg.html
or in a parallel version of that file created just for SVG text.
Comment 3•8 years ago
|
||
Comment on attachment 8932573 [details] [diff] [review]
part 1 - Include SVG text elements in elementsFromPoint
Review of attachment 8932573 [details] [diff] [review]:
-----------------------------------------------------------------
(If attaching patches to Bugzilla directly please use 8 lines of context.)
::: dom/base/nsDocument.cpp
@@ +3777,5 @@
> // If this helper is called via ElementsFromPoint, we need to make sure
> // our frame is an element. Otherwise return whatever the top frame is
> // even if it isn't the top-painted element.
> + // SVG 'text' elements only have frames for their text nodes, not the
> + // 'text' elements. We need to handle that case specially here.
It's not that they don't have other frames, since they will always have at least the anonymous nsBlockFrame and the SVGTextFrame itself. But I guess it is that those frames don't respond to hit testing? If so, please mention that.
Attachment #8932573 -
Flags: review?(cam) → review+
Comment 4•8 years ago
|
||
Not sure why the landing of the patch was announced on bug 1415068 and not on this one, but here the appropriate commits:
(In reply to Pulsebot from comment #13)
> Pushed by jwatt@jwatt.org:
> https://hg.mozilla.org/integration/mozilla-inbound/rev/2a7ce8b0ff6e
> Include SVG text elements in elementsFromPoint. r=heycam
(In reply to Dorel Luca [:dluca] from comment #14)
> https://hg.mozilla.org/mozilla-central/rev/2a7ce8b0ff6e
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•