Bug 71590 - [chromium] Use the security origin instead of the URL when checking notification permissions
Summary: [chromium] Use the security origin instead of the URL when checking notificat...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Cheng
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-04 15:11 PDT by Daniel Cheng
Modified: 2011-11-06 18:51 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.61 KB, patch)
2011-11-04 15:12 PDT, Daniel Cheng
no flags Details | Formatted Diff | Diff
Patch (5.33 KB, patch)
2011-11-04 15:53 PDT, Daniel Cheng
dcheng: review-
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Cheng 2011-11-04 15:11:44 PDT
[chromium] Use the security origin instead of the URL when checking notification permissions
Comment 1 Daniel Cheng 2011-11-04 15:12:06 PDT
Created attachment 113718 [details]
Patch
Comment 2 WebKit Review Bot 2011-11-04 15:14:21 PDT
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Comment 3 WebKit Review Bot 2011-11-04 15:17:51 PDT
Comment on attachment 113718 [details]
Patch

Attachment 113718 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/10332103
Comment 4 Adam Barth 2011-11-04 15:23:48 PDT
Comment on attachment 113718 [details]
Patch

Technically fishd should review this patch.

If you've updated Chromium already, you might need to update the chromium_rev in Source/WebKit/chromium/DEPS
Comment 5 Daniel Cheng 2011-11-04 15:25:29 PDT
Yep, I'm waiting for fishd and verifying that rolling the chromium DEPS in this patch will fix it.
Comment 6 Daniel Cheng 2011-11-04 15:53:14 PDT
Created attachment 113723 [details]
Patch
Comment 7 Daniel Cheng 2011-11-04 15:55:55 PDT
One weird thing I noticed--it looks like WebString has a conversion operator to WTF::String (http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebKit/chromium/public/WebString.h&exact_package=chromium&q=WebString&type=cs&l=104). However... it doesn't seem to work and I need to manually construct a WTF::String. Am I doing something wrong?
Comment 8 Adam Barth 2011-11-04 15:56:29 PDT
Comment on attachment 113723 [details]
Patch

LGTM, but please wait for a thumbs up from fishd before landing.
Comment 9 WebKit Review Bot 2011-11-04 16:32:47 PDT
Comment on attachment 113723 [details]
Patch

Attachment 113723 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/10332122

New failing tests:
fast/notifications/notifications-display-close-events.html
fast/notifications/notifications-click-event.html
fast/notifications/notifications-check-permission.html
fast/notifications/notifications-rtl.html
fast/notifications/notifications-no-icon.html
fast/notifications/notifications-replace.html
fast/notifications/notifications-with-permission.html
fast/notifications/notifications-double-show.html
Comment 10 Daniel Cheng 2011-11-04 16:35:14 PDT
Comment on attachment 113723 [details]
Patch

R- until I figure out how to fix the tests. Oddly enough the corresponding Chrome extension tests still seem to work.
Comment 11 Darin Fisher (:fishd, Google) 2011-11-05 14:57:51 PDT
Comment on attachment 113723 [details]
Patch

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

> Source/WebKit/chromium/public/WebNotificationPresenter.h:63
> +    virtual Permission checkPermission(const WebSecurityOrigin&) = 0;

WebKit API changes LGTM
Comment 12 Daniel Cheng 2011-11-05 21:15:09 PDT
Committed r99368: <http://trac.webkit.org/changeset/99368>
Comment 13 Yuta Kitamura 2011-11-06 02:03:44 PST
This change caused compile errors on Chromium canary builders:
http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Win%20Builder/builds/15854

Could you fix them or roll out your change at your earliest convenience? (I'm on  limited network connection right now and can't fix this for you.)
Comment 14 Daniel Cheng 2011-11-06 09:16:38 PST
(In reply to comment #13)
> This change caused compile errors on Chromium canary builders:
> http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Win%20Builder/builds/15854
> 
> Could you fix them or roll out your change at your earliest convenience? (I'm on  limited network connection right now and can't fix this for you.)

Sorry for not catching this locally. I have a Chromium-side fix ready to go, I'm waiting for the Chromium tree to re-open.
Comment 15 Daniel Cheng 2011-11-06 10:49:26 PST
Chromium r108814 should fix this. I'll clobber the Windows builder to be sure.
Comment 16 Yuta Kitamura 2011-11-06 18:51:57 PST
I confirmed the fix. Thanks!