Bug 218090
Summary: | [css-logical] Fix getComputedStyle for logical properties | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | obrufau, simon.fraser, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari Technology Preview | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=256739 | ||
Bug Depends on: | |||
Bug Blocks: | 185977 |
Simon Fraser (smfr)
- Fix CSSOM problems like:
document.documentElement.style.marginLeft = "1px";
getComputedStyle(document.documentElement).marginLeft; // "1px", good
document.documentElement.style.marginInlineStart = "2px";
getComputedStyle(document.documentElement).marginLeft; // "2px", good
document.documentElement.style.marginLeft = "3px";
getComputedStyle(document.documentElement).marginLeft; // "2px", bad, should be "3px"
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/70578989>
Oriol Brufau
Note the underlying problem is not in getComputedStyle,
document.documentElement.style.marginLeft = "1px";
document.documentElement.style.cssText; // "margin-left: 1px;"
document.documentElement.style.marginInlineStart = "2px";
document.documentElement.style.cssText; // "margin-left: 1px; margin-inline-start: 2px;"
document.documentElement.style.marginLeft = "3px";
document.documentElement.style.cssText; // "margin-left: 3px; margin-inline-start: 2px;"
the last one should become "margin-inline-start: 2px; margin-left: 3px;" so that margin-left takes precedence.
Chromium has the same problem, Firefox does it right.
Oriol Brufau
Fixed in bug 226461.
*** This bug has been marked as a duplicate of bug 226461 ***