Title: [238857] trunk/Source/WebKit
- Revision
- 238857
- Author
- [email protected]
- Date
- 2018-12-04 10:12:10 -0800 (Tue, 04 Dec 2018)
Log Message
Device orientation may be wrong on page reload after crash
https://bugs.webkit.org/show_bug.cgi?id=192349
<rdar://problem/46359466>
Reviewed by Eric Carlson.
On page crash, the process is relaunched and the page is reloaded.
At that point, the orientation information of the page is not reset until the next device orientation change.
To fix that, add the device orientation to the page creation parameters so that we pass it everytime we create a page.
Covered by manual testing.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (238856 => 238857)
--- trunk/Source/WebKit/ChangeLog 2018-12-04 17:38:03 UTC (rev 238856)
+++ trunk/Source/WebKit/ChangeLog 2018-12-04 18:12:10 UTC (rev 238857)
@@ -1,3 +1,24 @@
+2018-12-04 Youenn Fablet <[email protected]>
+
+ Device orientation may be wrong on page reload after crash
+ https://bugs.webkit.org/show_bug.cgi?id=192349
+ <rdar://problem/46359466>
+
+ Reviewed by Eric Carlson.
+
+ On page crash, the process is relaunched and the page is reloaded.
+ At that point, the orientation information of the page is not reset until the next device orientation change.
+ To fix that, add the device orientation to the page creation parameters so that we pass it everytime we create a page.
+ Covered by manual testing.
+
+ * Shared/WebPageCreationParameters.cpp:
+ (WebKit::WebPageCreationParameters::encode const):
+ (WebKit::WebPageCreationParameters::decode):
+ * Shared/WebPageCreationParameters.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::creationParameters):
+ * WebProcess/WebPage/WebPage.cpp:
+
2018-12-04 Carlos Eduardo Ramalho <[email protected]>
[WPE] Add gtk-doc
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp (238856 => 238857)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2018-12-04 17:38:03 UTC (rev 238856)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2018-12-04 18:12:10 UTC (rev 238857)
@@ -90,6 +90,7 @@
encoder << viewportConfigurationLayoutSizeScaleFactor;
encoder << viewportConfigurationViewSize;
encoder << maximumUnobscuredSize;
+ encoder << deviceOrientation;
#endif
#if PLATFORM(COCOA)
encoder << smartInsertDeleteEnabled;
@@ -257,6 +258,8 @@
return std::nullopt;
if (!decoder.decode(parameters.maximumUnobscuredSize))
return std::nullopt;
+ if (!decoder.decode(parameters.deviceOrientation))
+ return std::nullopt;
#endif
#if PLATFORM(COCOA)
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.h (238856 => 238857)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2018-12-04 17:38:03 UTC (rev 238856)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2018-12-04 18:12:10 UTC (rev 238857)
@@ -146,6 +146,7 @@
double viewportConfigurationLayoutSizeScaleFactor;
WebCore::FloatSize viewportConfigurationViewSize;
WebCore::FloatSize maximumUnobscuredSize;
+ int32_t deviceOrientation { 0 };
#endif
#if PLATFORM(COCOA)
bool smartInsertDeleteEnabled;
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (238856 => 238857)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-12-04 17:38:03 UTC (rev 238856)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-12-04 18:12:10 UTC (rev 238857)
@@ -6533,6 +6533,7 @@
parameters.viewportConfigurationViewLayoutSize = m_viewportConfigurationViewLayoutSize;
parameters.viewportConfigurationLayoutSizeScaleFactor = m_viewportConfigurationLayoutSizeScaleFactor;
parameters.maximumUnobscuredSize = m_maximumUnobscuredSize;
+ parameters.deviceOrientation = m_deviceOrientation;
#endif
#if PLATFORM(MAC)
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (238856 => 238857)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-12-04 17:38:03 UTC (rev 238856)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-12-04 18:12:10 UTC (rev 238857)
@@ -388,6 +388,7 @@
, m_screenSize(parameters.screenSize)
, m_availableScreenSize(parameters.availableScreenSize)
, m_overrideScreenSize(parameters.overrideScreenSize)
+ , m_deviceOrientation(parameters.deviceOrientation)
#endif
, m_layerVolatilityTimer(*this, &WebPage::layerVolatilityTimerFired)
, m_activityState(parameters.activityState)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes