[Webkit-unassigned] [Bug 174239] WKWindowFeatures needs to expose scrollbar, fullscreen, and dialog configuration properties

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 7 13:00:31 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=174239

--- Comment #5 from Brady Eidson <beidson at apple.com> ---
(In reply to Ansh Shukla from comment #4)
> Comment on attachment 314819 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=314819&action=review
> 
> >> Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesPrivate.h:37
> >> + at property (nonatomic, readonly, getter=_isDialog) BOOL _dialog WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
> > 
> > These should be exposed as NSNumber *s the same way the API bool properties are.
> 
> width, height, x, and y are the only API::WindowFeature properties that are
> optional. 

This is *currently* true for the WebCore::WindowFeatures object, but it's not actually true for the web API itself.

> All others are always specified

This is not true. You can call window.open with *no* window features string.

https://html.spec.whatwg.org/multipage/window-object.html#dom-open
https://html.spec.whatwg.org/multipage/window-object.html#window-open-steps
https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-tokenize

Or more casually:
https://developer.mozilla.org/en-US/docs/Web/API/Window/open
"An optional parameter listing the features (size, position, scrollbars, etc.) of the new window as a DOMString."

> The documentation on the public API is incorrect because, for example, menuBarVisibility can never be
> nil. 

The documentation on the public API is correct. Our implementation is wrong.

> I can change these to NSNumber * if I'm misinterpreting when
> values can be unspecified or if you think it's better to keep it consistent
> regardless.

Please correctly make the new SPI represent the optionality of these features.

I filed https://bugs.webkit.org/show_bug.cgi?id=174271 to fix the implementation.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170707/e8def109/attachment.html>


More information about the webkit-unassigned mailing list