Bug 151270 - Add SPI for handling inline link navigation for peek/pop
Summary: Add SPI for handling inline link navigation for peek/pop
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-13 12:03 PST by Beth Dakin
Modified: 2015-11-16 14:38 PST (History)
6 users (show)

See Also:


Attachments
Patch (21.37 KB, patch)
2015-11-13 12:59 PST, Beth Dakin
no flags Details | Formatted Diff | Diff
Patch (21.52 KB, patch)
2015-11-13 14:21 PST, Beth Dakin
no flags Details | Formatted Diff | Diff
Patch (24.95 KB, patch)
2015-11-13 18:09 PST, Beth Dakin
no flags Details | Formatted Diff | Diff
Patch (24.97 KB, patch)
2015-11-14 14:21 PST, Beth Dakin
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2015-11-13 12:03:58 PST
Add SPI for handling inline link navigation for peek/pop

rdar://problem/22233739
Comment 1 Beth Dakin 2015-11-13 12:59:38 PST
Created attachment 265492 [details]
Patch
Comment 2 WebKit Commit Bot 2015-11-13 13:02:12 PST
Attachment 265492 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementInfo.mm:28:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 mitz 2015-11-13 13:33:56 PST
Comment on attachment 265492 [details]
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:40
> +@class _WKPreviewingElementInfo;

“previewing element” sound a little weird, because the element isn’t doing any previewing, it is being previewed perhaps, so maybe _WKPreviewedElementInfo or _WKPreviewableElementInfo fit better.

> Source/WebKit2/UIProcess/API/Cocoa/_WKElementInfo.mm:59
> +    return _URL.get();

Because BOOL is sometimes just an unsigned char, this will return NO if the URL pointer ends in a 0 byte, so you should !! it or explicitly compare to nil.
Comment 4 Beth Dakin 2015-11-13 14:21:19 PST
(In reply to comment #3)
> Comment on attachment 265492 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=265492&action=review
> 
> > Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:40
> > +@class _WKPreviewingElementInfo;
> 
> “previewing element” sound a little weird, because the element isn’t doing
> any previewing, it is being previewed perhaps, so maybe
> _WKPreviewedElementInfo or _WKPreviewableElementInfo fit better.
> 

That's true. I think that _WKPreviewableElementInfo is the most accurate, but it's a little clumsy, maybe? Maybe it's fine. _WKPreviewedElementInfo sounds past-tense, so I don't like it as much. I changed it to _WKPreviewElementInfo for now, but I could be convinced that _WKPreviewableElementInfo is better.

> > Source/WebKit2/UIProcess/API/Cocoa/_WKElementInfo.mm:59
> > +    return _URL.get();
> 
> Because BOOL is sometimes just an unsigned char, this will return NO if the
> URL pointer ends in a 0 byte, so you should !! it or explicitly compare to
> nil.

Oh, yes, thank you!
Comment 5 Beth Dakin 2015-11-13 14:21:37 PST
Created attachment 265500 [details]
Patch
Comment 6 Beth Dakin 2015-11-13 18:09:48 PST
Created attachment 265523 [details]
Patch
Comment 7 WebKit Commit Bot 2015-11-13 18:11:41 PST
Attachment 265523 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementInfoInternal.h:32:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKPreviewElementInfo.mm:28:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Beth Dakin 2015-11-14 14:21:55 PST
Created attachment 265547 [details]
Patch

Hopefully the Mac bots will be happier with this patch.
Comment 9 WebKit Commit Bot 2015-11-14 14:23:29 PST
Attachment 265547 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKElementInfoInternal.h:32:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKPreviewElementInfo.mm:28:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Beth Dakin 2015-11-16 14:38:55 PST
Thanks Darin, Anders, and Dan!

http://trac.webkit.org/changeset/192486