WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
82832
CSSStyleRules should own their CSSStyleDeclarations
https://bugs.webkit.org/show_bug.cgi?id=82832
Summary
CSSStyleRules should own their CSSStyleDeclarations
Antti Koivisto
Reported
2012-03-31 09:02:30 PDT
Move the rule properties CSSOM wrapper ownership from the StylePropertySet to the rule itself. This is preparation for
bug 82728
(Split remaining CSSRules into internal and CSSOM types) easier to do. This temporarily grows the size of CSSStyleRule by a pointer (82728 will give the memory back and more).
Attachments
patch
(21.62 KB, patch)
2012-03-31 09:59 PDT
,
Antti Koivisto
kling
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2012-03-31 09:59:20 PDT
Created
attachment 134961
[details]
patch
Andreas Kling
Comment 2
2012-03-31 10:18:06 PDT
Comment on
attachment 134961
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=134961&action=review
r=me with some sherlocking.
> Source/WebCore/css/PropertySetCSSStyleDeclaration.h:93 > + ~StyleRuleCSSStyleDeclaration();
Should be marked virtual.
> Source/WebCore/css/PropertySetCSSStyleDeclaration.h:97 > + virtual CSSRule* parentRule() const { return m_parentRule; } > virtual void setNeedsStyleRecalc(); > virtual CSSStyleSheet* contextStyleSheet() const;
We're missing some OVERRIDE decorations here.
Antti Koivisto
Comment 3
2012-03-31 11:03:09 PDT
http://trac.webkit.org/changeset/112798
Eric Seidel (no email)
Comment 4
2012-03-31 11:58:36 PDT
Comment on
attachment 134961
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=134961&action=review
> Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp:309 > +void StyleRuleCSSStyleDeclaration::ref() > +{ > + ++m_refCount; > +}
Isn't this just RefCounted?
Andreas Kling
Comment 5
2012-03-31 12:04:30 PDT
Comment on
attachment 134961
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=134961&action=review
>> Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp:309 >> +} > > Isn't this just RefCounted?
ref() and deref() are virtual here, for this subclass it's a simple RefCounted workalike, for e.g PropertySetCSSStyleDeclaration it forwards the refs/derefs to the underlying StylePropertySet.
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