Bug 65158 - [Chromium] Add better WebKit API for chrome.tabs.insertCSS extension API
Summary: [Chromium] Add better WebKit API for chrome.tabs.insertCSS extension API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mihai Parparita
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-25 18:25 PDT by Mihai Parparita
Modified: 2011-07-27 11:34 PDT (History)
2 users (show)

See Also:


Attachments
Patch (9.89 KB, patch)
2011-07-25 18:31 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff
Patch (9.96 KB, patch)
2011-07-27 11:09 PDT, Mihai Parparita
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Parparita 2011-07-25 18:25:55 PDT
[Chromium] Add better WebKit API for chrome.tabs.insertCSS extension API
Comment 1 Mihai Parparita 2011-07-25 18:31:09 PDT
Created attachment 101958 [details]
Patch
Comment 2 Dave Hyatt 2011-07-27 10:41:39 PDT
Comment on attachment 101958 [details]
Patch

I don't really understand this patch. Why would you not just use the page group user sheets that are already being passed in? I don't like having yet another redundant user sheets vector.
Comment 3 Dave Hyatt 2011-07-27 10:50:03 PDT
Comment on attachment 101958 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=101958&action=review

So basically just change userSheets to documentUserSheets in the CSSStyleSelector code. I think it's ok to use the generic m_userSheets in Document, since it's more clear over there that they are per-document.

> Source/WebCore/css/CSSStyleSelector.cpp:432
> +                                   CSSStyleSheet* pageUserSheet, const Vector<RefPtr<CSSStyleSheet> >* pageGroupUserSheets, const Vector<RefPtr<CSSStyleSheet> >* userSheets,

Rename userSheets to documentUserSheets here.

> Source/WebCore/css/CSSStyleSelector.cpp:489
> +    if (userSheets) {

Same here. Change userSheets to documentUserSheets.

> Source/WebCore/css/CSSStyleSelector.h:93
> +                         CSSStyleSheet* pageUserSheet, const Vector<RefPtr<CSSStyleSheet> >* pageGroupUserSheets, const Vector<RefPtr<CSSStyleSheet> >* userSheets,

Ditto.
Comment 4 Mihai Parparita 2011-07-27 11:09:37 PDT
Created attachment 102157 [details]
Patch
Comment 5 Mihai Parparita 2011-07-27 11:10:14 PDT
(In reply to comment #3)
> So basically just change userSheets to documentUserSheets in the CSSStyleSelector code. I think it's ok to use the generic m_userSheets in Document, since it's more clear over there that they are per-document.

Done.
Comment 6 Dave Hyatt 2011-07-27 11:31:07 PDT
Comment on attachment 102157 [details]
Patch

r=me
Comment 7 Mihai Parparita 2011-07-27 11:34:19 PDT
Committed r91860: <http://trac.webkit.org/changeset/91860>