-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Referenced SVG elements in an external resource document match :target
Track which elements are referenced (by <use>) in an external resource document by funneling the lookup through a special function on SVGResourceDocumentContent that creates SVGResourceTarget objects for each (valid) reference and lets the targeted element weakly reference the object. While matching :target, the selector checker will check if the element has a reference to an SVGResourceTarget object and let :target match if it does. Bug: 342705674 Change-Id: I9b88e4338dccc0e01c45afb0df3e1c412b2466a9
- Loading branch information
1 parent
1b98ea9
commit ed0088b
Showing
4 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions
9
svg/struct/reftests/use-external-resource-target-pseudo-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<title><use> referencing an external document resource with :target pseudo class</title> | ||
<link rel="help" href="https://svgwg.org/svg2-draft/linking.html#processingURL"> | ||
<link rel="help" href="https://svgwg.org/svg2-draft/struct.html#UseStyleInheritance"> | ||
<link rel="help" href="https://drafts.csswg.org/selectors/#the-target-pseudo"> | ||
<link rel="match" href="reference/green-100x100.html"> | ||
<svg width="100" height="100"> | ||
<use href="support/sprites-stacked.svg#green-rect"/> | ||
</svg> |
9 changes: 9 additions & 0 deletions
9
svg/struct/reftests/use-external-resource-target-pseudo-002.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<title><use> referencing an external document resource with :target pseudo class</title> | ||
<link rel="help" href="https://svgwg.org/svg2-draft/linking.html#processingURL"> | ||
<link rel="help" href="https://svgwg.org/svg2-draft/struct.html#UseStyleInheritance"> | ||
<link rel="help" href="https://drafts.csswg.org/selectors/#the-target-pseudo"> | ||
<link rel="match" href="reference/green-100x100.html"> | ||
<svg width="100" height="100"> | ||
<use href="support/sprites-target.svg#rect"/> | ||
</svg> |