Closed
Bug 347498
Opened 17 years ago
Closed 17 years ago
Disable Email Page Location for all about:URIs
Categories
(Camino Graveyard :: Toolbars & Menus, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino1.5
People
(Reporter: froodian, Assigned: froodian)
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 2 obsolete files)
4.95 KB,
patch
|
mikepinkerton
:
superreview+
|
Details | Diff | Splinter Review |
Per bug 342594: http://wiki.caminobrowser.org/Development:Planning:Toolbar_item_validation#Email_Page_Location
Assignee | ||
Comment 1•17 years ago
|
||
This steals the code I wrote to exclude about:URIs from the top ten list, and implements it as an extension to NSString.
Attachment #232867 -
Flags: review?(stuart.morgan)
Assignee | ||
Updated•17 years ago
|
Status: NEW → ASSIGNED
Comment 2•17 years ago
|
||
Comment on attachment 232867 [details] [diff] [review] Disables Email Page Location and Fill Form for all about:URIs >+- (BOOL)isAboutURI >+{ >+ NSRange firstColon = [self rangeOfString:@":"]; >+ // If there's a colon in the URI and everything up to it is "about", it is one >+ if((firstColon.location != NSNotFound) && [[self substringToIndex:firstColon.location] isEqual:@"about"]) >+ return YES; >+ >+ return NO; >+} Remove the comment (the code is self-explanatory), and just return the condition directly. >+ NSString* curURL = [[self getBrowserWrapper] getCurrentURI]; >+ return ![curURL isAboutURI]; Do this as one line (i.e., don't store curURL) r=me with (heck, even without) those changes
Attachment #232867 -
Flags: review?(stuart.morgan) → review+
Comment on attachment 232867 [details] [diff] [review] Disables Email Page Location and Fill Form for all about:URIs Requesting sr so we don't forget about this patch.
Attachment #232867 -
Flags: superreview?(mikepinkerton)
Assignee | ||
Comment 4•17 years ago
|
||
Attachment #232867 -
Attachment is obsolete: true
Attachment #233616 -
Flags: superreview?(mikepinkerton)
Attachment #232867 -
Flags: superreview?(mikepinkerton)
Comment 5•17 years ago
|
||
why can't you just check if the prefix of the url is "about:"? why do all the complicated gymnastics to do the same thing?
Assignee | ||
Comment 6•17 years ago
|
||
I thought that *was* what we're doing. This just shares the implementation instead of duplicating the code.
Comment 7•17 years ago
|
||
I think he means using -[NSString hasPrefix:]. I thought I looked for such a function when originally reviewing bug 302601, but I guess not.
Assignee | ||
Comment 8•17 years ago
|
||
Ah. Good stuff. :)
Attachment #233616 -
Attachment is obsolete: true
Attachment #234908 -
Flags: superreview?(mikepinkerton)
Attachment #233616 -
Flags: superreview?(mikepinkerton)
Comment 9•17 years ago
|
||
Comment on attachment 234908 [details] [diff] [review] uses hasPrefix: sr=pink
Attachment #234908 -
Flags: superreview?(mikepinkerton) → superreview+
Assignee | ||
Updated•17 years ago
|
Whiteboard: [needs checkin]
Comment 10•17 years ago
|
||
Checked in
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [needs checkin]
You need to log in
before you can comment on or make changes to this bug.
Description
•