-
-
Notifications
You must be signed in to change notification settings - Fork 969
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Don't crash when resolving grid properties of inline elements
Previously, attempting to get the computed value for a grid-template-rows or grid-template-columns property would cause a crash for inline elements.
- Loading branch information
1 parent
f65df3f
commit 087fcb8
Showing
4 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
Tests/LibWeb/Text/input/css/getComputedStyle-no-paintable-box.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,21 @@ | ||
<!DOCTYPE html> | ||
<script src="../include.js"></script> | ||
<script> | ||
test(() => { | ||
const elementsToTest = [ | ||
"br", | ||
"span", | ||
]; | ||
for (const elementName of elementsToTest) { | ||
const element = document.createElement(elementName); | ||
document.body.appendChild(element); | ||
const style = getComputedStyle(element); | ||
let values = []; | ||
for (const propertyName of style) { | ||
values.push(style[propertyName]); | ||
} | ||
element.remove(); | ||
} | ||
println("PASS (didn't crash)"); | ||
}); | ||
</script> |
15 changes: 0 additions & 15 deletions
15
Tests/LibWeb/Text/input/css/getComputedStyle-no-paintable.html
This file was deleted.
Oops, something went wrong.
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