Skip to content

Commit

Permalink
Apply length conversion flags for incremental styles
Browse files Browse the repository at this point in the history
Incremental style resolutions never enter ApplyBaseStyleNoCache,
which is where ApplyLengthConversionFlags normally happens. Call this
function for incremental styling as well.

Note: There's already a call to ApplyLengthConversionFlags in
ApplyAnimatedStyle, so there should not be a similar issue for the
base ComputedStyle optimization.

Fixed: 1402548
Change-Id: I8fafb495c52c1c209d9b59b20e472ce489ad560a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4116982
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1085846}
  • Loading branch information
andruud authored and chromium-wpt-export-bot committed Dec 21, 2022
1 parent 0467ad1 commit 9b3bbd5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions css/css-values/crashtests/viewport-unit-inline-style-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Don't crash when setting viewport units on inline style</title>
<link rel="help" href="https://crbug.com/1402548">
<div id="div">
PASS if no crash
</div>
<script>
div.style.setProperty("margin-bottom", "1px");
div.offsetTop;
div.style.setProperty("margin-bottom", "1vh");
</script>

0 comments on commit 9b3bbd5

Please sign in to comment.