mirror of
https://github.com/servo/servo.git
synced 2025-08-23 06:15:35 +01:00
Auto merge of #8932 - rilut:add-elementfrompoint, r=nox
Implement Document#elementFromPoint
Related to #8666. I haven't implemented elementsFromPoint, because from my past discussion with jdm, [it's not good yet](dbfa25214b (commitcomment-14668959)
) to implement elementsFromPoint because it may cause GC hazards.
By the way, I also have to include the test for this, right? I've found this [1]. So, is all I have to do is just to put this into `tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html`?
[1] http://test.csswg.org/suites/cssom-view-1_dev/nightly-unstable/html/elementFromPosition.htm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8932)
<!-- Reviewable:end -->
This commit is contained in:
commit
4bcdbe6d56
9 changed files with 60 additions and 88 deletions
|
@ -180,3 +180,8 @@ partial interface Document {
|
|||
|
||||
TouchList createTouchList(Touch... touches);
|
||||
};
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#dom-document-elementfrompoint
|
||||
partial interface Document {
|
||||
Element? elementFromPoint(double x, double y);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue