Bug 104042 - REGRESSION(r135082): Restore the ability to insert author level style sheets from script
Summary: REGRESSION(r135082): Restore the ability to insert author level style sheets ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tony Chang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-04 14:08 PST by Tony Chang
Modified: 2012-12-06 13:20 PST (History)
7 users (show)

See Also:


Attachments
Patch (13.08 KB, patch)
2012-12-04 14:14 PST, Tony Chang
no flags Details | Formatted Diff | Diff
Patch (18.66 KB, patch)
2012-12-04 15:53 PST, Tony Chang
no flags Details | Formatted Diff | Diff
Patch (18.58 KB, patch)
2012-12-05 12:05 PST, Tony Chang
no flags Details | Formatted Diff | Diff
Patch (18.65 KB, patch)
2012-12-05 15:32 PST, Tony Chang
no flags Details | Formatted Diff | Diff
Patch for landing (18.67 KB, patch)
2012-12-06 12:03 PST, Tony Chang
no flags Details | Formatted Diff | Diff
Patch for landing (18.58 KB, patch)
2012-12-06 12:45 PST, Tony Chang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chang 2012-12-04 14:08:43 PST
Chromium's extension API has a method for inserting a stylesheet from script.  We were using DocumentStyleSheetCollection::addUserSheet, but trying to add an author level stylesheet.  This broke in r135082, which seems OK since it using the API in an unintended way.

I'll upload a patch that adds a real method for adding author level stylesheets from script.
Comment 1 Tony Chang 2012-12-04 14:14:16 PST
Created attachment 177558 [details]
Patch
Comment 2 Tony Chang 2012-12-04 14:15:07 PST
The upstream bug tracking this is https://code.google.com/p/chromium/issues/detail?id=163445 .

antti or kling, can you review?
Comment 3 Build Bot 2012-12-04 15:23:11 PST
Comment on attachment 177558 [details]
Patch

Attachment 177558 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15132618
Comment 4 Build Bot 2012-12-04 15:33:43 PST
Comment on attachment 177558 [details]
Patch

Attachment 177558 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/15121922
Comment 5 Tony Chang 2012-12-04 15:53:12 PST
Created attachment 177590 [details]
Patch
Comment 6 kov's GTK+ EWS bot 2012-12-04 18:24:43 PST
Comment on attachment 177590 [details]
Patch

Attachment 177590 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/15157132
Comment 7 Antti Koivisto 2012-12-04 19:09:29 PST
Can't you use the existing PageGroup::addUserStyleSheetToWorld mechanism? Despite its name it supports inserting both user and author level stylesheets.
Comment 8 Tony Chang 2012-12-05 12:03:24 PST
(In reply to comment #7)
> Can't you use the existing PageGroup::addUserStyleSheetToWorld mechanism? Despite its name it supports inserting both user and author level stylesheets.

This is different from adding to a PageGroup since it's done from script.  E.g., if the user reloads the page, the style shouldn't automatically be re-inserted.  The PageGroup methods seem designed more for automatic insertion based on a URL pattern at fixed time periods.
Comment 9 Tony Chang 2012-12-05 12:05:41 PST
Created attachment 177805 [details]
Patch
Comment 10 Build Bot 2012-12-05 13:12:08 PST
Comment on attachment 177805 [details]
Patch

Attachment 177805 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/15153543
Comment 11 Tony Chang 2012-12-05 15:32:39 PST
Created attachment 177846 [details]
Patch
Comment 12 Build Bot 2012-12-05 17:53:52 PST
Comment on attachment 177846 [details]
Patch

Attachment 177846 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/15158518
Comment 13 Tony Chang 2012-12-06 11:43:15 PST
Comment on attachment 177846 [details]
Patch

The win bot failure should have been fixed by https://bugs.webkit.org/show_bug.cgi?id=104136 .
Comment 14 WebKit Review Bot 2012-12-06 11:59:47 PST
Comment on attachment 177846 [details]
Patch

Rejecting attachment 177846 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
-queue/Source/WebKit/chromium/tools/xdisplaycheck --revision 171376 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
50>At revision 171376.

________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://queues.webkit.org/results/15185065
Comment 15 Tony Chang 2012-12-06 12:03:07 PST
Created attachment 178053 [details]
Patch for landing
Comment 16 WebKit Review Bot 2012-12-06 12:28:33 PST
Comment on attachment 178053 [details]
Patch for landing

Rejecting attachment 178053 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
Kit/chromium/third_party/yasm/source/patched-yasm --revision 167605 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
51>At revision 167605.

________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://queues.webkit.org/results/15173471
Comment 17 Tony Chang 2012-12-06 12:45:37 PST
Created attachment 178062 [details]
Patch for landing
Comment 18 WebKit Review Bot 2012-12-06 13:20:07 PST
Comment on attachment 178062 [details]
Patch for landing

Clearing flags on attachment: 178062

Committed r136878: <http://trac.webkit.org/changeset/136878>
Comment 19 WebKit Review Bot 2012-12-06 13:20:13 PST
All reviewed patches have been landed.  Closing bug.