Closed
Bug 1198405
Opened 9 years ago
Closed 9 years ago
chrome.tabs.query’s url parameter doesn't match “one or more URL patterns”.
Categories
(WebExtensions :: Untriaged, defect, P1)
WebExtensions
Untriaged
Tracking
(firefox43 affected, firefox44 fixed)
RESOLVED
FIXED
mozilla44
People
(Reporter: bwinton, Assigned: johannh, Mentored)
References
Details
(Whiteboard: [tabs])
Attachments
(1 file, 2 obsolete files)
5.90 KB,
patch
|
johannh
:
review+
|
Details | Diff | Splinter Review |
The documents say it should match one or more url patterns[0]. Our code does a simple != match on the string value[1]. It would be awesome if we handled not only a single pattern, but also arrays of patterns and strings, intermingled! :) [0] https://developer.chrome.com/extensions/tabs#property-queryInfo-url [1] https://dxr.mozilla.org/mozilla-central/source/browser/components/extensions/ext-tabs.js#366
Reporter | ||
Comment 1•9 years ago
|
||
https://dxr.mozilla.org/mozilla-central/source/toolkit/components/extensions/ExtensionContent.jsm?offset=100#95 looks like it might be helpful in implementing this…
Mentor: gkrizsanits
Updated•9 years ago
|
Whiteboard: [tabs]
I'm guessing Blake's link was meant to refer to something about MatchPattern, which is how we would implement this: https://dxr.mozilla.org/mozilla-central/source/toolkit/modules/addons/MatchPattern.jsm
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → mail
Assignee | ||
Comment 3•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8675592 -
Flags: review?(wmccloskey)
Comment on attachment 8675592 [details] [diff] [review] Match one or more URL patterns in tabs.query Review of attachment 8675592 [details] [diff] [review]: ----------------------------------------------------------------- Looks great! Thanks. ::: browser/components/extensions/ext-tabs.js @@ +428,5 @@ > return false; > } > } > > + if (pattern && !pattern.matches(ioService.newURI(tab.url, null, null))) { It's a bit easier to do Services.io.newURI. You'll want to import Services.jsm at the top using Cu.import.
Attachment #8675592 -
Flags: review?(wmccloskey) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8675592 -
Attachment is obsolete: true
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8676715 [details] [diff] [review] Match one or more URL patterns in tabs.query Done :)
Attachment #8676715 -
Flags: review?(wmccloskey)
Attachment #8676715 -
Flags: review?(wmccloskey) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8676715 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8677286 -
Flags: review+
Assignee | ||
Comment 8•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=dce1dcb8f88c
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2676b3f48d03
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Updated•9 years ago
|
Flags: blocking-webextensions+
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•