When the user had opened software keyboard, the visual viewport width & height should be updated and resize event should be dispatched.
Created attachment 359234 [details] Fixes the bug
Comment on attachment 359234 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=359234&action=review > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:3044 > + frameView.didUpdateViewportOverrideRects(); Do we know that the visual viewport actually changed? Perhaps setVisualViewportOverrideRect() should return a bool and we only call this when it changes.
(In reply to Simon Fraser (smfr) from comment #2) > Comment on attachment 359234 [details] > Fixes the bug > > View in context: > https://bugs.webkit.org/attachment.cgi?id=359234&action=review > > > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:3044 > > + frameView.didUpdateViewportOverrideRects(); > > Do we know that the visual viewport actually changed? Perhaps > setVisualViewportOverrideRect() should return a bool and we only call this > when it changes. VisualViewport::update checks whether the values had changed then schedule resize event, etc... only if the values had changed.
Thanks for the review!
<rdar://problem/47305687>
Committed r240027: <https://trac.webkit.org/changeset/240027>
Comment on attachment 359234 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=359234&action=review > Source/WebCore/page/FrameView.h:596 > +#if PLATFORM(IOS_FAMILY) Can we use a more fine grained #ifdef here? Perhaps something like #if SUPPORTS(VIEWPORTS) or something akin to that?
(In reply to Sam Weinig from comment #7) > Comment on attachment 359234 [details] > Fixes the bug > > View in context: > https://bugs.webkit.org/attachment.cgi?id=359234&action=review > > > Source/WebCore/page/FrameView.h:596 > > +#if PLATFORM(IOS_FAMILY) > > Can we use a more fine grained #ifdef here? Perhaps something like #if > SUPPORTS(VIEWPORTS) or something akin to that? I think we can in theory but the code I'm adding is pretty specific to iOS, and as far as I can tell, no other port support this.