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)

defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(1 file)

It seems that Document.elementsFromPoint does not include SVG 'text' elements. (See bug 1415068 comment 10.) It should do.
Priority: -- → P2
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 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+
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
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: