WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
31224
[V8] Return StyleSheet object instead of HTMLStyleElement w/document.styleSheets named property getter.
https://bugs.webkit.org/show_bug.cgi?id=31224
Summary
[V8] Return StyleSheet object instead of HTMLStyleElement w/document.styleShe...
johnnyding
Reported
2009-11-07 08:01:05 PST
In page
http://soren.qzone.qq.com/cgi-bin/soren/cgi_userinfo_search?bSimple=0&ptlang=2052
, it uses document.styleSheets["CssId"].rules to get style css rule list. In safari, the page run well, but in Google Chrome, accessing document.styleSheets["CssId"].rules got "undefined". After investigation, Safari returns a [CSSStyleSheet] object when accessing document.styleSheets["CssId"], so the "rules" can be gotten. Chrome returns a [HTMLStyleElement] object when accessing document.styleSheets["CssId"], so the "rules" can not be gotten. I believe it's v8 binding's fault. See JS binding (JSStyleSheetListCustom.cpp, line 60), it returns stylesheet instead of returning style element.
Attachments
patch to fix this issue.
(1.46 KB, patch)
2009-11-07 08:41 PST
,
johnnyding
dglazkov
: review-
Details
Formatted Diff
Diff
patch v2 for fix
(3.58 KB, patch)
2009-11-07 10:09 PST
,
johnnyding
no flags
Details
Formatted Diff
Diff
patch v3 for fix
(4.39 KB, patch)
2009-11-07 11:16 PST
,
johnnyding
no flags
Details
Formatted Diff
Diff
patch v3 for fix
(4.39 KB, patch)
2009-11-07 11:18 PST
,
johnnyding
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
johnnyding
Comment 1
2009-11-07 08:41:18 PST
Created
attachment 42694
[details]
patch to fix this issue.
Dimitri Glazkov (Google)
Comment 2
2009-11-07 08:45:05 PST
Comment on
attachment 42694
[details]
patch to fix this issue. Thanks for tackling this! We just need a layout test and one small nit:
> Index: WebCore/ChangeLog > =================================================================== > --- WebCore/ChangeLog (revision 50615) > +++ WebCore/ChangeLog (working copy) > @@ -1,3 +1,16 @@ > +2009-11-07 Johnny Ding <
johnnyding.webkit@gmail.com
> > + > + Reviewed by NOBODY (OOPS!). > + > +
https://bugs.webkit.org/show_bug.cgi?id=31224
> + Returns a StyleSheet object instead of HTMLStyleElement when using
Please update this to match the subject of the bug (including [V8] prefix).
> + V8 engine to retrieve style sheet by a name from document.styleSheets
.
> + > + No new tests since it is only V8 binding issue.(JS binding is OK)
Well, this is an easily testable case, so I would say a layout test is in order, regardless of whether it's a bindings issue for one engine and not another.
Dimitri Glazkov (Google)
Comment 3
2009-11-07 10:01:04 PST
I wonder if there's already a layout test that we're failing that tests this.
johnnyding
Comment 4
2009-11-07 10:09:08 PST
Created
attachment 42696
[details]
patch v2 for fix Thanks, patch v2 is coming:)
johnnyding
Comment 5
2009-11-07 11:16:01 PST
Created
attachment 42698
[details]
patch v3 for fix
johnnyding
Comment 6
2009-11-07 11:18:09 PST
Created
attachment 42699
[details]
patch v3 for fix
Dimitri Glazkov (Google)
Comment 7
2009-11-08 21:38:30 PST
Comment on
attachment 42699
[details]
patch v3 for fix Lovely. r=me.
WebKit Commit Bot
Comment 8
2009-11-08 21:52:47 PST
Comment on
attachment 42699
[details]
patch v3 for fix Clearing flags on attachment: 42699 Committed
r50637
: <
http://trac.webkit.org/changeset/50637
>
WebKit Commit Bot
Comment 9
2009-11-08 21:52:52 PST
All reviewed patches have been landed. Closing bug.
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