WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
73561
JSC/CSSOM: root(CSSElementStyleDeclaration) should never need to follow the element.
https://bugs.webkit.org/show_bug.cgi?id=73561
Summary
JSC/CSSOM: root(CSSElementStyleDeclaration) should never need to follow the e...
Andreas Kling
Reported
2011-12-01 07:15:05 PST
While digging following Darin's comment on
bug 72881
, I realized that root() for a style declaration with an associated element should always return the element sheet unless the element pointer is null. In light of this, we could replace the root-from-element code path with an assertion
Attachments
Proposed patch
(2.00 KB, patch)
2011-12-01 07:16 PST
,
Andreas Kling
koivisto
: review+
koivisto
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2011-12-01 07:16:59 PST
Created
attachment 117414
[details]
Proposed patch
Antti Koivisto
Comment 2
2011-12-01 10:09:18 PST
Comment on
attachment 117414
[details]
Proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=117414&action=review
> Source/WebCore/bindings/js/JSDOMBinding.h:214 > +#ifndef NDEBUG > + // A style declaration with an associated element should've returned a style sheet above. > + if (style->isElementStyleDeclaration()) > + ASSERT(!static_cast<CSSElementStyleDeclaration*>(style)->element()); > +#endif
maybe ASSERT(!style->isElementStyleDeclaration() || !static_cast<CSSElementStyleDeclaration*>(style)->element()); so you don't need #ifndef?
Andreas Kling
Comment 3
2011-12-01 10:11:48 PST
(In reply to
comment #2
)
> (From update of
attachment 117414
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=117414&action=review
> > > Source/WebCore/bindings/js/JSDOMBinding.h:214 > > +#ifndef NDEBUG > > + // A style declaration with an associated element should've returned a style sheet above. > > + if (style->isElementStyleDeclaration()) > > + ASSERT(!static_cast<CSSElementStyleDeclaration*>(style)->element()); > > +#endif > > maybe > > ASSERT(!style->isElementStyleDeclaration() || !static_cast<CSSElementStyleDeclaration*>(style)->element()); > > so you don't need #ifndef?
Duh. Yes, obviously :)
Andreas Kling
Comment 4
2011-12-01 10:50:17 PST
Committed
r101687
: <
http://trac.webkit.org/changeset/101687
>
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