[Webkit-unassigned] [Bug 110524] Add a way to watch pages for elements matching a CSS selector
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 13 11:07:39 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=110524
--- Comment #23 from Adam Barth <abarth at webkit.org> 2013-03-13 11:10:02 PST ---
(From update of attachment 192857)
View in context: https://bugs.webkit.org/attachment.cgi?id=192857&action=review
> Source/WebCore/dom/Document.cpp:2033
> +class Document::ReportCallbackSelectorChange : public Task {
> +public:
> + virtual void performTask(ScriptExecutionContext* context)
You can just use wtf/Functional.h to create a closure rather than making yet another task object. Document has a weak pointer factory if you need to bind to a weak ptr.
> Source/WebCore/dom/Document.cpp:2057
> + postTask(adoptPtr(new ReportCallbackSelectorChange));
Given that you're on the main thread, it might be easier to just use a Timer though.
> Source/WebCore/rendering/style/StyleRareNonInheritedData.h:160
> + Document* m_document;
This looks dangerous. What ensures that this document isn't used after free?
> Source/WebKit/chromium/public/WebFrameClient.h:129
> + virtual void cssMatches(WebFrame*, const WebVector<WebString>& newlyMatchingSelectors, const WebVector<WebString>& stoppedMatchingSelectors) { }
cssMatches --> we prefer names like didMatchFoo
> Source/WebKit/chromium/tests/WebFrameTest.cpp:223
> +static std::string AsString(const WebString& utf16Input)
Should we add this sort of method to WebString? I'm surprised it doesn't already have a way to convert to a std::string.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list