Bug 48803 - ComputedStyle returns -webkit-auto instead of left or right
Summary: ComputedStyle returns -webkit-auto instead of left or right
Status: RESOLVED DUPLICATE of bug 79914
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Minor
Assignee: Nobody
URL: http://dev.w3.org/csswg/css3-text/#te...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2010-11-01 16:31 PDT by Ryosuke Niwa
Modified: 2012-10-02 01:28 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2010-11-01 16:31:26 PDT
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
Comment 1 Jeremy Moskovich 2011-03-30 07:00:05 PDT
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
Comment 2 Glenn Adams 2012-10-02 01:28:27 PDT
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 ***