Bug 62951
Summary: | used value support (IE currentStyle) | ||
---|---|---|---|
Product: | WebKit | Reporter: | chrome |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Enhancement | CC: | ap, bfulgham, chrome, hyatt |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
chrome
please add support for IE currentStyle (i.e. used CSS value). it's vital to oop-app-ui-programming.
current solution is:
this.getDefinedHeightParent=function(n)
{
var cS,cS2
while(n!=app.rootElement)
{
cS=app.getCS(n)
if(cS.position=="absolute"||cS.position=="fixed")return n
if((cS2=n.currentStyle) && n.currentStyle.height!="auto")return n
else if(!cS2 && n.style.height && n.style.height!="auto") return n //not dry!
if(!n.parentNode) return n
n=n.parentNode
}
return n
}
this forces user/programmer to add "height:auto;" to every element of an "app-object-source", like:
this.containerHTML=function(param,$class$)
{
return {
tabheadsleft:[
{tagName:"DIV",$id$:"tabheadcontainerleft",style:"height:auto;" //<-------- redundant
,children:[$this$.getTabBorderStart.call(this,"left"),{tagName:"DIV",$id$:"tabheadleft",children:["<SPAN style='white-space:nowrap;'>Tab "+this.uid+" "+this.classType+" "+this.chainStr+"</SPAN>"]}
,$this$.getTabBorderEnd.call(this,"left")]}]
...
and/or app notation which sets node.style.height to auto like:
sizes{tabheadcontainerleft:{height:"auto"}}
thank you
stefan
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
chrome
i am confused about "used" and "computed". "there should be access to parsed css and element.style without any rendering results, all in one property", is what i tried to say.
currently, i can't think of a situation where "rendered css" should not be overwritten by element.style. (ok, except "",null etc.)
scrollbar presence/width/height will still be missed, but can be calculated.
thank you
stefan
chrome
(In reply to comment #1)
> overwritten by element.style. (ok, except "",null etc.)
oops, i didn't think of "!important"
stefan
Brent Fulgham
We do not plan on supporting non-standard features.