Title: [150197] trunk/Source/WebKit2
- Revision
- 150197
- Author
- [email protected]
- Date
- 2013-05-16 12:08:38 -0700 (Thu, 16 May 2013)
Log Message
[wk2] Minimum layout width is lost if the WebProcess crashes
https://bugs.webkit.org/show_bug.cgi?id=116202
<rdar://problem/13202320>
Reviewed by Darin Adler.
Send the minimum layout width to the WebProcess upon initialization,
so that crashed-and-restarted WebProcesses have the correct width.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
(WebPageCreationParameters):
Add minimumLayoutWidth WebPage creation parameter.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
Send the current minimumLayoutWidth to the WebPage when it's created.
(WebKit::WebPageProxy::setMinimumLayoutWidth):
Store minimumLayoutWidth changes that come in while the WebProcess is
not valid, so that the correct width is sent once it is restarted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Set minimumLayoutWidth to the value provided by our creation parameters.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (150196 => 150197)
--- trunk/Source/WebKit2/ChangeLog 2013-05-16 19:03:16 UTC (rev 150196)
+++ trunk/Source/WebKit2/ChangeLog 2013-05-16 19:08:38 UTC (rev 150197)
@@ -1,3 +1,33 @@
+2013-05-16 Tim Horton <[email protected]>
+
+ [wk2] Minimum layout width is lost if the WebProcess crashes
+ https://bugs.webkit.org/show_bug.cgi?id=116202
+ <rdar://problem/13202320>
+
+ Reviewed by Darin Adler.
+
+ Send the minimum layout width to the WebProcess upon initialization,
+ so that crashed-and-restarted WebProcesses have the correct width.
+
+ * Shared/WebPageCreationParameters.cpp:
+ (WebKit::WebPageCreationParameters::encode):
+ (WebKit::WebPageCreationParameters::decode):
+ * Shared/WebPageCreationParameters.h:
+ (WebPageCreationParameters):
+ Add minimumLayoutWidth WebPage creation parameter.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::creationParameters):
+ Send the current minimumLayoutWidth to the WebPage when it's created.
+
+ (WebKit::WebPageProxy::setMinimumLayoutWidth):
+ Store minimumLayoutWidth changes that come in while the WebProcess is
+ not valid, so that the correct width is sent once it is restarted.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ Set minimumLayoutWidth to the value provided by our creation parameters.
+
2013-05-16 Zoltan Arvai <[email protected]>
[Win] Unreviewed buildfix after r150161.
Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp (150196 => 150197)
--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp 2013-05-16 19:03:16 UTC (rev 150196)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp 2013-05-16 19:08:38 UTC (rev 150197)
@@ -60,6 +60,7 @@
encoder << mediaVolume;
encoder << mayStartMediaWhenInWindow;
encoder << overridePrivateBrowsingEnabled;
+ encoder << minimumLayoutWidth;
#if PLATFORM(MAC)
encoder.encodeEnum(layerHostingMode);
@@ -123,6 +124,8 @@
return false;
if (!decoder.decode(parameters.overridePrivateBrowsingEnabled))
return false;
+ if (!decoder.decode(parameters.minimumLayoutWidth))
+ return false;
#if PLATFORM(MAC)
if (!decoder.decodeEnum(parameters.layerHostingMode))
Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.h (150196 => 150197)
--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.h 2013-05-16 19:03:16 UTC (rev 150196)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.h 2013-05-16 19:08:38 UTC (rev 150197)
@@ -91,6 +91,8 @@
bool overridePrivateBrowsingEnabled;
+ float minimumLayoutWidth;
+
#if PLATFORM(MAC)
LayerHostingMode layerHostingMode;
ColorSpaceData colorSpace;
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (150196 => 150197)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2013-05-16 19:03:16 UTC (rev 150196)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2013-05-16 19:08:38 UTC (rev 150197)
@@ -3943,6 +3943,7 @@
parameters.mediaVolume = m_mediaVolume;
parameters.mayStartMediaWhenInWindow = m_mayStartMediaWhenInWindow;
parameters.overridePrivateBrowsingEnabled = m_overridePrivateBrowsingEnabled;
+ parameters.minimumLayoutWidth = m_minimumLayoutWidth;
#if PLATFORM(MAC)
parameters.layerHostingMode = m_layerHostingMode;
@@ -4312,10 +4313,11 @@
if (m_minimumLayoutWidth == minimumLayoutWidth)
return;
+ m_minimumLayoutWidth = minimumLayoutWidth;
+
if (!isValid())
return;
- m_minimumLayoutWidth = minimumLayoutWidth;
m_process->send(Messages::WebPage::SetMinimumLayoutWidth(minimumLayoutWidth), m_pageID, 0);
m_drawingArea->minimumLayoutWidthDidChange();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (150196 => 150197)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-05-16 19:03:16 UTC (rev 150196)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-05-16 19:08:38 UTC (rev 150197)
@@ -379,6 +379,8 @@
setIsInWindow(parameters.isInWindow);
+ setMinimumLayoutWidth(parameters.minimumLayoutWidth);
+
m_userAgent = parameters.userAgent;
WebBackForwardListProxy::setHighestItemIDFromUIProcess(parameters.highestUsedBackForwardItemID);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes