Bug 48803
Summary: | ComputedStyle returns -webkit-auto instead of left or right | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Minor | CC: | glenn, hyatt, jparent, justin.garcia, marcosalmeida, mitz, playmobil |
Priority: | P2 | Keywords: | HasReduction |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://dev.w3.org/csswg/css3-text/#text-align |
Ryosuke Niwa
window.getComputedStyle returns text-align: -webkit-auto instead of text-align: left / text-align: right when queried against a node when text-align property is not explicitly specified.
For example, suppose we have:
<div id="mydiv" contentEditable>foo</div>
The following script gives -webkit-auto:
window.getComputedStyle(document.getElementById('mydiv'))['textAlign']
Demo:
http://plexode.com/eval3/#ht=%3Cdiv%20id%3D%22mydiv%22%20contentEditable%3Efoo%3C%2Fdiv%3E&ohh=1&ohj=0&jt=window.getComputedStyle(document.getElementById('mydiv'))%5B'textAlign'%5D&ojh=1&ojj=1&ms=100&oth=0&otj=0&cex=1
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Jeremy Moskovich
I was looking into whether we can remove -webkit-auto wholesale in favor of start. These are basically the same [as far as I can tell] except for a case in CSSStyleSelector::adjustRenderStyle() which has a special case for TH tags introduced in http://trac.webkit.org/changeset/20889 .
So I looked back at when -webkit-auto was introduced into the tree, it used to be called -khtml-auto and before that -konq-auto , relevant CLs:
http://trac.webkit.org/changeset/13874
http://trac.webkit.org/changeset/1024
Glenn Adams
This bug is OBE with bug 79914 already applied. The only thing that remains is removing support for using the older -webkit-auto value, for which I've filed a bug 98126.
*** This bug has been marked as a duplicate of bug 79914 ***