forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Fix CSS tag seletor case sensitivity for SVG elements
SVG element names need to be case-sensitive. Everything else (currently only HTML) needs to be case-insensitive.
- Loading branch information
Showing
3 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
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
6 changes: 6 additions & 0 deletions
6
Tests/LibWeb/Ref/expected/css-selector-svg-case-sensitivity.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,6 @@ | ||
<!DOCTYPE html> | ||
<svg viewBox="0 0 200 200"> | ||
<foreignObject width="200" height="200"> | ||
<span style="color:green;">This should be green.</span> | ||
</foreignObject> | ||
</svg> |
16 changes: 16 additions & 0 deletions
16
Tests/LibWeb/Ref/input/css-selector-svg-case-sensitivity.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,16 @@ | ||
<!DOCTYPE html> | ||
<link rel="match" href="../expected/css-selector-svg-case-sensitivity.html" /> | ||
<style> | ||
foreignObject * { | ||
color: green; | ||
} | ||
foreignobject * { | ||
color: red; | ||
} | ||
</style> | ||
|
||
<svg viewBox="0 0 200 200"> | ||
<foreignObject width="200" height="200"> | ||
<span>This should be green.</span> | ||
</foreignObject> | ||
</svg> |