RESOLVED FIXED 104042
REGRESSION(r135082): Restore the ability to insert author level style sheets from script
https://bugs.webkit.org/show_bug.cgi?id=104042
Summary REGRESSION(r135082): Restore the ability to insert author level style sheets ...
Tony Chang
Reported 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.
Attachments
Patch (13.08 KB, patch)
2012-12-04 14:14 PST, Tony Chang
no flags
Patch (18.66 KB, patch)
2012-12-04 15:53 PST, Tony Chang
no flags
Patch (18.58 KB, patch)
2012-12-05 12:05 PST, Tony Chang
no flags
Patch (18.65 KB, patch)
2012-12-05 15:32 PST, Tony Chang
no flags
Patch for landing (18.67 KB, patch)
2012-12-06 12:03 PST, Tony Chang
no flags
Patch for landing (18.58 KB, patch)
2012-12-06 12:45 PST, Tony Chang
no flags
Tony Chang
Comment 1 2012-12-04 14:14:16 PST
Tony Chang
Comment 2 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?
Build Bot
Comment 3 2012-12-04 15:23:11 PST
Build Bot
Comment 4 2012-12-04 15:33:43 PST
Tony Chang
Comment 5 2012-12-04 15:53:12 PST
kov's GTK+ EWS bot
Comment 6 2012-12-04 18:24:43 PST
Antti Koivisto
Comment 7 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.
Tony Chang
Comment 8 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.
Tony Chang
Comment 9 2012-12-05 12:05:41 PST
Build Bot
Comment 10 2012-12-05 13:12:08 PST
Tony Chang
Comment 11 2012-12-05 15:32:39 PST
Build Bot
Comment 12 2012-12-05 17:53:52 PST
Tony Chang
Comment 13 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 .
WebKit Review Bot
Comment 14 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
Tony Chang
Comment 15 2012-12-06 12:03:07 PST
Created attachment 178053 [details] Patch for landing
WebKit Review Bot
Comment 16 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
Tony Chang
Comment 17 2012-12-06 12:45:37 PST
Created attachment 178062 [details] Patch for landing
WebKit Review Bot
Comment 18 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>
WebKit Review Bot
Comment 19 2012-12-06 13:20:13 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.