[Webkit-unassigned] [Bug 200003] New pages don't account for device orientation.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 22 13:40:11 PDT 2019


--- Comment #6 from Alfred <zienag at gmail.com> ---
Comment on attachment 374607
  --> https://bugs.webkit.org/attachment.cgi?id=374607
Save viewport size in dynamicViewportSizeUpdate

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

>> Source/WebKit/ChangeLog:3
>> +        New pages don't account for device orientation.
> "deviceOrientation" is one of the /other/ parameters to dynamicViewportSizeUpdate, so this title is quite confusing; this is really about the layout size

Yes, you are right, it is confusing from implementation point of view, but from user's perspective this is what actually happens. 
I tried to name the bug from the user's perspective, but I didn't know that bug title should be included in changelog file. Do you think that I should rename title to something like "New pages don't account for layout size after rotation"?

>> Source/WebKit/ChangeLog:13
>> +	if it is not changed. So, it is blocking new updates to pass to 
> _lastSentViewLayoutSize is reset upon process swap or crash, so I don't quite get this part

(1) One of the possible workarounds is to trigger layout size update just after rotation via `_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:` -> `_setViewLayoutSizeOverride` -> `_dispatchSetViewLayoutSize` -> `setViewportConfigurationViewLayoutSize`, but it early exits in `_dispatchSetViewLayoutSize` because `_lastSentViewLayoutSize` didn't change. Of course, it will reset when actual process swap occurs, but new page will be created with wrong values at this point.
(2) In `_didCompleteAnimatedResize` there is call to `_dispatchSetViewLayoutSize`, but it wrapped in `newViewLayoutSize != _lastSentViewLayoutSize.value()` condition.

>> Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:298
>> +    m_viewportConfigurationViewLayoutSize = viewLayoutSize;
> It seems surprising that we'd only need to save one of the parameters (what happens to e.g. maximumUnobscuredSize?). I wonder if it's missing from elsewhere instead of needing to be added here?

Firstly I tried to save `maximumUnobscuredSize` also, but I couldn't observe any effect off this. Unfortunately, I din't figure out a way how to initialize new page with correct knowledge about unobscured size/obscured insets yet, so now it initializes with default zero values (You can observe this by rotating to landscape and navigating to webpage from favorites on iPhone X).

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/20190722/cc576d7f/attachment.html>

More information about the webkit-unassigned mailing list