Diff
Modified: trunk/Source/WebCore/ChangeLog (230058 => 230059)
--- trunk/Source/WebCore/ChangeLog 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebCore/ChangeLog 2018-03-28 23:16:50 UTC (rev 230059)
@@ -1,3 +1,23 @@
+2018-03-28 Zalan Bujtas <[email protected]>
+
+ Make it possible to override the screen size
+ https://bugs.webkit.org/show_bug.cgi?id=184111
+ <rdar://problem/38972181>
+
+ Reviewed by Tim Horton.
+
+ We just call screenSize() atm.
+
+ * page/Chrome.cpp:
+ (WebCore::Chrome::overrideScreenSize const):
+ * page/Chrome.h:
+ * page/ChromeClient.h:
+ * platform/HostWindow.h:
+ * platform/PlatformScreen.h:
+ * platform/ios/PlatformScreenIOS.mm:
+ (WebCore::screenRect):
+ (WebCore::overrideScreenSize):
+
2018-03-28 Timothy Hatcher <[email protected]>
Include the 'text' color keyword as a system color.
Modified: trunk/Source/WebCore/page/Chrome.cpp (230058 => 230059)
--- trunk/Source/WebCore/page/Chrome.cpp 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebCore/page/Chrome.cpp 2018-03-28 23:16:50 UTC (rev 230059)
@@ -450,6 +450,11 @@
return m_client.availableScreenSize();
}
+FloatSize Chrome::overrideScreenSize() const
+{
+ return m_client.overrideScreenSize();
+}
+
void Chrome::dispatchViewportPropertiesDidChange(const ViewportArguments& arguments) const
{
#if PLATFORM(IOS)
Modified: trunk/Source/WebCore/page/Chrome.h (230058 => 230059)
--- trunk/Source/WebCore/page/Chrome.h 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebCore/page/Chrome.h 2018-03-28 23:16:50 UTC (rev 230059)
@@ -91,6 +91,7 @@
FloatSize screenSize() const override;
FloatSize availableScreenSize() const override;
+ FloatSize overrideScreenSize() const override;
void scrollRectIntoView(const IntRect&) const;
Modified: trunk/Source/WebCore/page/ChromeClient.h (230058 => 230059)
--- trunk/Source/WebCore/page/ChromeClient.h 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebCore/page/ChromeClient.h 2018-03-28 23:16:50 UTC (rev 230059)
@@ -185,6 +185,7 @@
virtual FloatSize screenSize() const { return const_cast<ChromeClient&>(*this).windowRect().size(); }
virtual FloatSize availableScreenSize() const { return const_cast<ChromeClient&>(*this).windowRect().size(); }
+ virtual FloatSize overrideScreenSize() const { return const_cast<ChromeClient&>(*this).windowRect().size(); }
virtual void dispatchViewportPropertiesDidChange(const ViewportArguments&) const { }
Modified: trunk/Source/WebCore/platform/HostWindow.h (230058 => 230059)
--- trunk/Source/WebCore/platform/HostWindow.h 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebCore/platform/HostWindow.h 2018-03-28 23:16:50 UTC (rev 230059)
@@ -78,6 +78,7 @@
virtual FloatSize screenSize() const = 0;
virtual FloatSize availableScreenSize() const = 0;
+ virtual FloatSize overrideScreenSize() const = 0;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/PlatformScreen.h (230058 => 230059)
--- trunk/Source/WebCore/platform/PlatformScreen.h 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebCore/platform/PlatformScreen.h 2018-03-28 23:16:50 UTC (rev 230059)
@@ -101,6 +101,7 @@
float screenPPIFactor();
WEBCORE_EXPORT FloatSize screenSize();
WEBCORE_EXPORT FloatSize availableScreenSize();
+WEBCORE_EXPORT FloatSize overrideScreenSize();
WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr);
#endif
Modified: trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm (230058 => 230059)
--- trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm 2018-03-28 23:16:50 UTC (rev 230059)
@@ -96,7 +96,7 @@
CGRect screenRect = { CGPointZero, [window screenSize] };
return enclosingIntRect(screenRect);
}
- return enclosingIntRect(FloatRect(FloatPoint(), widget->root()->hostWindow()->screenSize()));
+ return enclosingIntRect(FloatRect(FloatPoint(), widget->root()->hostWindow()->overrideScreenSize()));
}
FloatRect screenAvailableRect(Widget* widget)
@@ -146,6 +146,11 @@
return FloatSize([get_UIKit_UIScreenClass() mainScreen].bounds.size);
}
+FloatSize overrideScreenSize()
+{
+ return screenSize();
+}
+
float screenScaleFactor(UIScreen *screen)
{
if (!screen)
Modified: trunk/Source/WebKit/ChangeLog (230058 => 230059)
--- trunk/Source/WebKit/ChangeLog 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/ChangeLog 2018-03-28 23:16:50 UTC (rev 230059)
@@ -1,3 +1,28 @@
+2018-03-28 Zalan Bujtas <[email protected]>
+
+ Make it possible to override the screen size
+ https://bugs.webkit.org/show_bug.cgi?id=184111
+ <rdar://problem/38972181>
+
+ Reviewed by Tim Horton.
+
+ * Shared/WebPageCreationParameters.cpp:
+ (WebKit::WebPageCreationParameters::encode const):
+ (WebKit::WebPageCreationParameters::decode):
+ * Shared/WebPageCreationParameters.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::creationParameters):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::overrideScreenSize):
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::overrideScreenSize const):
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::overrideScreenSize const):
+
2018-03-28 Chris Dumez <[email protected]>
Do process swap when opening a cross-origin URL via window.open(url, '_blank', 'noopener')
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp (230058 => 230059)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2018-03-28 23:16:50 UTC (rev 230059)
@@ -87,6 +87,7 @@
#if PLATFORM(IOS)
encoder << screenSize;
encoder << availableScreenSize;
+ encoder << overrideScreenSize;
encoder << textAutosizingWidth;
encoder << ignoresViewportScaleLimits;
encoder << viewportConfigurationMinimumLayoutSize;
@@ -245,6 +246,8 @@
return std::nullopt;
if (!decoder.decode(parameters.availableScreenSize))
return std::nullopt;
+ if (!decoder.decode(parameters.overrideScreenSize))
+ return std::nullopt;
if (!decoder.decode(parameters.textAutosizingWidth))
return std::nullopt;
if (!decoder.decode(parameters.ignoresViewportScaleLimits))
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.h (230058 => 230059)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2018-03-28 23:16:50 UTC (rev 230059)
@@ -144,6 +144,7 @@
#if PLATFORM(IOS)
WebCore::FloatSize screenSize;
WebCore::FloatSize availableScreenSize;
+ WebCore::FloatSize overrideScreenSize;
float textAutosizingWidth;
bool ignoresViewportScaleLimits;
WebCore::FloatSize viewportConfigurationMinimumLayoutSize;
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (230058 => 230059)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-03-28 23:16:50 UTC (rev 230059)
@@ -5869,6 +5869,7 @@
#if PLATFORM(IOS)
parameters.screenSize = screenSize();
parameters.availableScreenSize = availableScreenSize();
+ parameters.overrideScreenSize = overrideScreenSize();
parameters.textAutosizingWidth = textAutosizingWidth();
parameters.mimeTypesWithCustomContentProviders = m_pageClient.mimeTypesWithCustomContentProviders();
parameters.ignoresViewportScaleLimits = m_forceAlwaysUserScalable;
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (230058 => 230059)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2018-03-28 23:16:50 UTC (rev 230059)
@@ -1626,6 +1626,7 @@
#if PLATFORM(IOS)
WebCore::FloatSize screenSize();
WebCore::FloatSize availableScreenSize();
+ WebCore::FloatSize overrideScreenSize();
float textAutosizingWidth();
void dynamicViewportUpdateChangedTarget(double newTargetScale, const WebCore::FloatPoint& newScrollPosition, uint64_t dynamicViewportSizeUpdateID);
Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (230058 => 230059)
--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2018-03-28 23:16:50 UTC (rev 230059)
@@ -899,7 +899,12 @@
{
return WebCore::availableScreenSize();
}
-
+
+FloatSize WebPageProxy::overrideScreenSize()
+{
+ return WebCore::overrideScreenSize();
+}
+
float WebPageProxy::textAutosizingWidth()
{
return WebCore::screenSize().width();
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (230058 => 230059)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2018-03-28 23:16:50 UTC (rev 230059)
@@ -1021,6 +1021,11 @@
return m_page.availableScreenSize();
}
+FloatSize WebChromeClient::overrideScreenSize() const
+{
+ return m_page.overrideScreenSize();
+}
+
#endif
void WebChromeClient::dispatchViewportPropertiesDidChange(const ViewportArguments& viewportArguments) const
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (230058 => 230059)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h 2018-03-28 23:16:50 UTC (rev 230059)
@@ -279,6 +279,7 @@
#if PLATFORM(IOS)
WebCore::FloatSize screenSize() const final;
WebCore::FloatSize availableScreenSize() const final;
+ WebCore::FloatSize overrideScreenSize() const final;
#endif
void dispatchViewportPropertiesDidChange(const WebCore::ViewportArguments&) const final;
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (230058 => 230059)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-03-28 23:16:50 UTC (rev 230059)
@@ -367,6 +367,7 @@
, m_forceAlwaysUserScalable(parameters.ignoresViewportScaleLimits)
, m_screenSize(parameters.screenSize)
, m_availableScreenSize(parameters.availableScreenSize)
+ , m_overrideScreenSize(parameters.overrideScreenSize)
#endif
, m_layerVolatilityTimer(*this, &WebPage::layerVolatilityTimerFired)
, m_activityState(parameters.activityState)
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (230058 => 230059)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-03-28 23:16:50 UTC (rev 230059)
@@ -551,6 +551,7 @@
#if PLATFORM(IOS)
WebCore::FloatSize screenSize() const;
WebCore::FloatSize availableScreenSize() const;
+ WebCore::FloatSize overrideScreenSize() const;
int32_t deviceOrientation() const { return m_deviceOrientation; }
void didReceiveMobileDocType(bool);
@@ -1628,6 +1629,7 @@
Seconds m_estimatedLatency { 0 };
WebCore::FloatSize m_screenSize;
WebCore::FloatSize m_availableScreenSize;
+ WebCore::FloatSize m_overrideScreenSize;
RefPtr<WebCore::Range> m_currentBlockSelection;
WebCore::IntRect m_blockRectForTextSelection;
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (230058 => 230059)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-03-28 23:16:50 UTC (rev 230059)
@@ -252,6 +252,11 @@
return m_availableScreenSize;
}
+FloatSize WebPage::overrideScreenSize() const
+{
+ return m_overrideScreenSize;
+}
+
void WebPage::didReceiveMobileDocType(bool isMobileDoctype)
{
resetViewportDefaultConfiguration(m_mainFrame.get(), isMobileDoctype);
Modified: trunk/Source/WebKitLegacy/ios/ChangeLog (230058 => 230059)
--- trunk/Source/WebKitLegacy/ios/ChangeLog 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKitLegacy/ios/ChangeLog 2018-03-28 23:16:50 UTC (rev 230059)
@@ -1,3 +1,15 @@
+2018-03-28 Zalan Bujtas <[email protected]>
+
+ Make it possible to override the screen size
+ https://bugs.webkit.org/show_bug.cgi?id=184111
+ <rdar://problem/38972181>
+
+ Reviewed by Tim Horton.
+
+ * WebCoreSupport/WebChromeClientIOS.h:
+ * WebCoreSupport/WebChromeClientIOS.mm:
+ (WebChromeClientIOS::overrideScreenSize const):
+
2018-03-25 Tim Horton <[email protected]>
Disable geolocation prompt in minimal simulator mode
Modified: trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.h (230058 => 230059)
--- trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.h 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.h 2018-03-28 23:16:50 UTC (rev 230059)
@@ -58,6 +58,7 @@
void clearContentChangeObservers(WebCore::Frame&) final;
WebCore::FloatSize screenSize() const final;
WebCore::FloatSize availableScreenSize() const final;
+ WebCore::FloatSize overrideScreenSize() const final;
void dispatchViewportPropertiesDidChange(const WebCore::ViewportArguments&) const final;
void notifyRevealedSelectionByScrollingFrame(WebCore::Frame&) final;
bool isStopping() final;
Modified: trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.mm (230058 => 230059)
--- trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.mm 2018-03-28 23:14:05 UTC (rev 230058)
+++ trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.mm 2018-03-28 23:16:50 UTC (rev 230059)
@@ -227,6 +227,11 @@
return FloatSize();
}
+FloatSize WebChromeClientIOS::overrideScreenSize() const
+{
+ return screenSize();
+}
+
void WebChromeClientIOS::dispatchViewportPropertiesDidChange(const WebCore::ViewportArguments& arguments) const
{
[[webView() _UIKitDelegateForwarder] webView:webView() didReceiveViewportArguments:dictionaryForViewportArguments(arguments)];