WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
12384
getComputedStyle with td.style.display='none' reports '' for all properties except display
https://bugs.webkit.org/show_bug.cgi?id=12384
Summary
getComputedStyle with td.style.display='none' reports '' for all properties e...
Steven Saviano
Reported
2007-01-23 11:41:15 PST
Summary: 1) Make a table with td's 2) Set one of the td's display to "none" 3) getComputedStyle on that td will report that element's display as "" (empty string) This was tested with TOT Webkit (
r19043
).
Attachments
Test Case
(685 bytes, text/html)
2007-01-23 11:42 PST
,
Steven Saviano
no flags
Details
[WIP] return rich computed style declarations for elements without renderers
(14.05 KB, patch)
2007-07-07 17:27 PDT
,
mitz
no flags
Details
Formatted Diff
Diff
Return rich computed style declarations for elements without renderers
(24.58 KB, patch)
2007-07-08 00:24 PDT
,
mitz
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Steven Saviano
Comment 1
2007-01-23 11:42:15 PST
Created
attachment 12631
[details]
Test Case
mitz
Comment 2
2007-01-23 11:51:56 PST
*** This bug has been marked as a duplicate of
4125
***
mitz
Comment 3
2007-01-23 11:54:08 PST
Sorry, this is not a duplicate of
bug 4125
.
mitz
Comment 4
2007-01-23 11:55:03 PST
True for all properties of all objects that do not have a renderer.
Darin Adler
Comment 5
2007-01-25 08:41:11 PST
Hyatt and I discussed how to fix this a long time ago. We need to change the CSS style selector so it can create a style for a DOM element that does not have a RenderObject, which should be relatively straightforward. Then we need to create a cache of these RenderStyle objects for elements they have been computed for -- presumably a HashMap. We need to invalidate the styles in the cache when changes are made to the element. And we need to make the computed style look up the RenderStyle in this cache.
Mark Rowe (bdash)
Comment 6
2007-01-28 15:43:49 PST
<
rdar://problem/4960104
>
Maciej Stachowiak
Comment 7
2007-02-07 01:19:05 PST
Although an annoying bug, this has workarounds and is not a regression, thus not P1.
mitz
Comment 8
2007-03-31 09:05:59 PDT
(In reply to
comment #4
)
> True for all properties of all objects that do not have a renderer. >
Starting with <
http://trac.webkit.org/projects/webkit/changeset/20570
>, this is true for all properties *except* display.
mitz
Comment 9
2007-07-07 17:27:34 PDT
Created
attachment 15441
[details]
[WIP] return rich computed style declarations for elements without renderers Still not thoroughly tested. I am also worried that I missed something:
> We need to change the CSS style selector so it can create a style for a DOM > element that does not have a RenderObject.
mitz
Comment 10
2007-07-08 00:24:36 PDT
Created
attachment 15442
[details]
Return rich computed style declarations for elements without renderers Added a test and a change log. Still wondering what needs changed in CSSStyleSelector.
Darin Adler
Comment 11
2007-07-08 04:58:44 PDT
Comment on
attachment 15442
[details]
Return rich computed style declarations for elements without renderers + virtual RenderStyle* computedStyle() { return parent() ? parent()->computedStyle() : 0; } I don't think it's helpful to define a virtual function like this one as an inline in the header. It's easier to modify it if it's even needed if you keep it in the .cpp file instead, and it would only actually get inlined if it was a non-virtual call, which should never happen in this case. But that's a nitpick. This looks great! I guess I was wrong about CSSStyleSelector needing a change! r=me
Sam Weinig
Comment 12
2007-07-08 10:53:37 PDT
Landed in
r24099
with Darin's suggestion.
mitz
Comment 13
2007-07-08 14:13:09 PDT
Leaks fixed in
r24103
, which introduced
bug 14563
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug