| Summary: | [iOS] WK2: Provide implementation for windowFrame | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||||
| Component: | WebKit2 | Assignee: | Brent Fulgham <bfulgham> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | benjamin, bfulgham, mitz, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | iPhone / iPad | ||||||||
| OS: | All | ||||||||
| Attachments: |
|
||||||||
|
Description
Brent Fulgham
2014-05-22 22:34:03 PDT
And by windowRect I meant windowFrame. Created attachment 231942 [details]
Patch.
Comment on attachment 231942 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=231942&action=review Let's talk about it tomorrow. After reading http://www.quirksmode.org/blog/archives/2012/03/windowouterwidt.html it looks like we have an extra bug to fix on WebKit1... :( > Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:252 > + return WebCore::enclosingIntRect(m_uiDelegate.m_webView.frame); I think you want to the bounds, not the frame. We should have an extra step here: -Try to get the UIWindow from the WebView. If there is a window, return that size. -If there is not window, return the WebView bounds. > Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm:309 > + FloatRect userRect(rect); > + userRect.scale(m_webView->_page->deviceScaleFactor()); > + return userRect; Sorry, that's my fault. When you said we need to convert the rect to user space, I thought you meant in the WebProcess to convert to ContentCoordinates. This is not right. I think you can just return the incoming rect here on iOS. Created attachment 231988 [details]
Patch
Comment on attachment 231988 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=231988&action=review > Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:252 > + UIWindow* window = m_uiDelegate.m_webView.window; if (UIWindow* window = m_uiDelegate.m_webView.window) ... > Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm:312 > + return rect; // Nothing to do on iOS Missing period. But I think you should remove the comment. Committed r169281: <http://trac.webkit.org/changeset/169281> |