Bug 143327
| Summary: | No-op inline style changes cause style recalcs | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Elliott Sprehn <esprehn> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | bfulgham, kling, koivisto |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Elliott Sprehn
Confirmed in r182227
<div id="test"></div>
<script>
var test = document.getElementById("test");
setInterval(function() {
test.style.top = "0px";
});
</script>
This causes an infinite number of style recalcs even though it's just assigning the same number repeatedly. It seems the parser returns true to mean "successfully parsed", and the inline style machinery interprets that bool to mean "something changed". Probably want to compare the CSSProperty objects to see that they're actually different instead (different value, different important).
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Brent Fulgham
This doesn't seem to be an issue in Safari 15.5+. I only see the initial style and layout, then the timer running with no further style recalls.