WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
46487
Implement CSSStyleRule::setSelectorText()
https://bugs.webkit.org/show_bug.cgi?id=46487
Summary
Implement CSSStyleRule::setSelectorText()
Alexander Pavlov (apavlov)
Reported
2010-09-24 10:59:14 PDT
CSSStyleRule::setSelectorText() is needed for the new upcoming Web Inspector CSS editing approach.
Attachments
[PATCH] Suggested solution
(11.35 KB, patch)
2010-09-24 11:43 PDT
,
Alexander Pavlov (apavlov)
sam
: review-
Details
Formatted Diff
Diff
[PATCH] Comments addressed
(13.89 KB, patch)
2010-09-27 02:36 PDT
,
Alexander Pavlov (apavlov)
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alexander Pavlov (apavlov)
Comment 1
2010-09-24 11:43:01 PDT
Created
attachment 68722
[details]
[PATCH] Suggested solution The only thing is, I'm not sure about the correct way of notifying the document about the selector change, doc->styleSelectorChanged(DeferRecalcStyle); Should it perhaps use RecalcStyleImmediately instead?
Sam Weinig
Comment 2
2010-09-24 12:00:10 PDT
Comment on
attachment 68722
[details]
[PATCH] Suggested solution View in context:
https://bugs.webkit.org/attachment.cgi?id=68722&action=review
Can you add some tests of invalid selectors?
> WebCore/css/CSSStyleRule.cpp:57 > +void CSSStyleRule::setSelectorText(const String& selectorText, ExceptionCode& /*ec*/)
We should remove the ExcpectionCode parameter (and the raises in the IDL file) since the latest spec (
http://dev.w3.org/csswg/cssom/#dom-cssstylerule-selectortext
) doesn't have it ever raising.
> WebCore/css/CSSStyleRule.cpp:60 > + CSSParser p; > + CSSSelectorList selectorList;
There is no reason to declare these at the top of the function.
Alexander Pavlov (apavlov)
Comment 3
2010-09-27 02:36:36 PDT
Created
attachment 68890
[details]
[PATCH] Comments addressed
Alexander Pavlov (apavlov)
Comment 4
2010-09-27 03:10:08 PDT
(In reply to
comment #2
)
> (From update of
attachment 68722
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=68722&action=review
> > Can you add some tests of invalid selectors?
Done.
> > WebCore/css/CSSStyleRule.cpp:57 > > +void CSSStyleRule::setSelectorText(const String& selectorText, ExceptionCode& /*ec*/) > > We should remove the ExcpectionCode parameter (and the raises in the IDL file) since the latest spec (
http://dev.w3.org/csswg/cssom/#dom-cssstylerule-selectortext
) doesn't have it ever raising.
Good point. Fixed "raises" in CSSStyleRule.idl and CSSPageRule.idl
> > WebCore/css/CSSStyleRule.cpp:60 > > + CSSParser p; > > + CSSSelectorList selectorList; > > There is no reason to declare these at the top of the function.
Right, was moving the code around and forgot to follow on these.
Alexander Pavlov (apavlov)
Comment 5
2010-09-27 06:41:18 PDT
Committing to
http://svn.webkit.org/repository/webkit/trunk
... M LayoutTests/ChangeLog A LayoutTests/fast/css/css-set-selector-text-expected.txt A LayoutTests/fast/css/css-set-selector-text.html M WebCore/ChangeLog M WebCore/css/CSSPageRule.idl M WebCore/css/CSSStyleRule.cpp M WebCore/css/CSSStyleRule.h M WebCore/css/CSSStyleRule.idl Committed
r68388
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