Diff
Modified: trunk/Source/Platform/ChangeLog (132418 => 132419)
--- trunk/Source/Platform/ChangeLog 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/Platform/ChangeLog 2012-10-24 23:19:45 UTC (rev 132419)
@@ -1,3 +1,23 @@
+2012-10-24 Mark Pilgrim <[email protected]>
+
+ [Chromium] Remove screen-related functions from PlatformSupport
+ https://bugs.webkit.org/show_bug.cgi?id=97474
+
+ Reviewed by Adam Barth.
+
+ Screen-related functions like screenHorizontalDPI that
+ used to be on PlatformSupport are now accessed through a new
+ PlatformPageClient attached to Widget in WebCore-land, which is
+ implemented by ChromeClientImpl in WebKit-land, which proxies
+ calls to WebWidgetClient, which is actually implemented in
+ Chromium-land.
+
+ * Platform.gypi:
+ * chromium/public/WebScreenInfo.h: Added.
+ (WebKit):
+ (WebScreenInfo):
+ (WebKit::WebScreenInfo::WebScreenInfo):
+
2012-10-23 David Reveman <[email protected]>
[Chromium] Add CHROMIUM_texture_from_image extension support.
Modified: trunk/Source/Platform/Platform.gypi (132418 => 132419)
--- trunk/Source/Platform/Platform.gypi 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/Platform/Platform.gypi 2012-10-24 23:19:45 UTC (rev 132419)
@@ -119,6 +119,7 @@
'chromium/public/WebRect.h',
'chromium/public/WebReferrerPolicy.h',
'chromium/public/WebRenderingStats.h',
+ 'chromium/public/WebScreenInfo.h',
'chromium/public/WebScrollbar.h',
'chromium/public/WebScrollbarLayer.h',
'chromium/public/WebScrollbarThemeGeometry.h',
Copied: trunk/Source/Platform/chromium/public/WebScreenInfo.h (from rev 132417, trunk/Source/WebKit/chromium/public/WebScreenInfo.h) (0 => 132419)
--- trunk/Source/Platform/chromium/public/WebScreenInfo.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebScreenInfo.h 2012-10-24 23:19:45 UTC (rev 132419)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebScreenInfo_h
+#define WebScreenInfo_h
+
+#include "WebRect.h"
+
+namespace WebKit {
+
+struct WebScreenInfo {
+ // The horizontal screen dpi.
+ int horizontalDPI;
+
+ // The vertical screen dpi.
+ int verticalDPI;
+
+ // The screen depth in bits per pixel
+ int depth;
+
+ // The bits per colour component. This assumes that the colours are balanced
+ // equally.
+ int depthPerComponent;
+
+ // This can be true for black and white printers
+ bool isMonochrome;
+
+ // This is set from the rcMonitor member of MONITORINFOEX, to whit:
+ // "A RECT structure that specifies the display monitor rectangle,
+ // expressed in virtual-screen coordinates. Note that if the monitor
+ // is not the primary display monitor, some of the rectangle's
+ // coordinates may be negative values."
+ WebRect rect;
+
+ // This is set from the rcWork member of MONITORINFOEX, to whit:
+ // "A RECT structure that specifies the work area rectangle of the
+ // display monitor that can be used by applications, expressed in
+ // virtual-screen coordinates. Windows uses this rectangle to
+ // maximize an application on the monitor. The rest of the area in
+ // rcMonitor contains system windows such as the task bar and side
+ // bars. Note that if the monitor is not the primary display monitor,
+ // some of the rectangle's coordinates may be negative values".
+ WebRect availableRect;
+
+ WebScreenInfo()
+ : horizontalDPI(0)
+ , verticalDPI(0)
+ , depth(0)
+ , depthPerComponent(0)
+ , isMonochrome(false) { }
+};
+
+} // namespace WebKit
+
+#endif
Modified: trunk/Source/WebCore/ChangeLog (132418 => 132419)
--- trunk/Source/WebCore/ChangeLog 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebCore/ChangeLog 2012-10-24 23:19:45 UTC (rev 132419)
@@ -1,3 +1,34 @@
+2012-10-24 Mark Pilgrim <[email protected]>
+
+ [Chromium] Remove screen-related functions from PlatformSupport
+ https://bugs.webkit.org/show_bug.cgi?id=97474
+
+ Reviewed by Adam Barth.
+
+ Screen-related functions like screenHorizontalDPI that
+ used to be on PlatformSupport are now accessed through a new
+ PlatformPageClient attached to Widget in WebCore-land, which is
+ implemented by ChromeClientImpl in WebKit-land, which proxies
+ calls to WebWidgetClient, which is actually implemented in
+ Chromium-land.
+
+ * WebCore.gypi:
+ * platform/Widget.h:
+ * platform/chromium/PageClientChromium.h: Copied from Source/WebCore/platform/chromium/PlatformWidget.h.
+ (PageClientChromium):
+ * platform/chromium/PlatformScreenChromium.cpp:
+ (WebCore::toPlatformPageClient):
+ (WebCore):
+ (WebCore::screenHorizontalDPI):
+ (WebCore::screenVerticalDPI):
+ (WebCore::screenDepth):
+ (WebCore::screenDepthPerComponent):
+ (WebCore::screenIsMonochrome):
+ (WebCore::screenRect):
+ (WebCore::screenAvailableRect):
+ * platform/chromium/PlatformSupport.h:
+ (PlatformSupport):
+
2012-10-24 Adam Barth <[email protected]>
[V8] WorkerContextExecutionProxy doesn't need to track events
Modified: trunk/Source/WebCore/WebCore.gypi (132418 => 132419)
--- trunk/Source/WebCore/WebCore.gypi 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebCore/WebCore.gypi 2012-10-24 23:19:45 UTC (rev 132419)
@@ -4702,6 +4702,7 @@
'platform/chromium/LinkHashChromium.cpp',
'platform/chromium/MemoryUsageSupportChromium.cpp',
'platform/chromium/MIMETypeRegistryChromium.cpp',
+ 'platform/chromium/PageClientChromium.h',
'platform/chromium/PasteboardChromium.cpp',
'platform/chromium/PlatformCursor.h',
'platform/chromium/PlatformKeyboardEventChromium.cpp',
Modified: trunk/Source/WebCore/platform/Widget.h (132418 => 132419)
--- trunk/Source/WebCore/platform/Widget.h 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebCore/platform/Widget.h 2012-10-24 23:19:45 UTC (rev 132419)
@@ -32,6 +32,7 @@
#include <wtf/RefCounted.h>
#if PLATFORM(CHROMIUM)
+#include "PageClientChromium.h"
#include "PlatformWidget.h"
#endif
@@ -93,6 +94,8 @@
#elif PLATFORM(EFL)
class PageClientEfl;
typedef PageClientEfl* PlatformPageClient;
+#elif PLATFORM(CHROMIUM)
+typedef WebCore::PageClientChromium* PlatformPageClient;
#else
typedef PlatformWidget PlatformPageClient;
#endif
Copied: trunk/Source/WebCore/platform/chromium/PageClientChromium.h (from rev 132417, trunk/Source/WebCore/platform/chromium/PlatformScreenChromium.cpp) (0 => 132419)
--- trunk/Source/WebCore/platform/chromium/PageClientChromium.h (rev 0)
+++ trunk/Source/WebCore/platform/chromium/PageClientChromium.h 2012-10-24 23:19:45 UTC (rev 132419)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2012, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PageClientChromium_h
+#define PageClientChromium_h
+
+#include <public/WebScreenInfo.h>
+
+namespace WebCore {
+
+class PageClientChromium {
+public:
+ virtual WebKit::WebScreenInfo screenInfo() = 0;
+};
+
+} // namespace WebCore
+
+#endif // PageClientChromium_h
Modified: trunk/Source/WebCore/platform/chromium/PlatformScreenChromium.cpp (132418 => 132419)
--- trunk/Source/WebCore/platform/chromium/PlatformScreenChromium.cpp 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebCore/platform/chromium/PlatformScreenChromium.cpp 2012-10-24 23:19:45 UTC (rev 132419)
@@ -31,46 +31,82 @@
#include "config.h"
#include "PlatformScreen.h"
-#include "IntRect.h"
-#include "PlatformSupport.h"
-
+#include "FloatRect.h"
+#include "HostWindow.h"
+#include "ScrollView.h"
+#include "Widget.h"
#include <public/Platform.h>
+#include <public/WebScreenInfo.h>
namespace WebCore {
+static PlatformPageClient toPlatformPageClient(Widget* widget)
+{
+ if (!widget)
+ return 0;
+ ScrollView* root = widget->root();
+ if (!root)
+ return 0;
+ HostWindow* hostWindow = root->hostWindow();
+ if (!hostWindow)
+ return 0;
+ return hostWindow->platformPageClient();
+}
+
int screenHorizontalDPI(Widget* widget)
{
- return PlatformSupport::screenHorizontalDPI(widget);
+ PlatformPageClient client = toPlatformPageClient(widget);
+ if (!client)
+ return 0;
+ return client->screenInfo().horizontalDPI;
}
int screenVerticalDPI(Widget* widget)
{
- return PlatformSupport::screenVerticalDPI(widget);
+ PlatformPageClient client = toPlatformPageClient(widget);
+ if (!client)
+ return 0;
+ return client->screenInfo().verticalDPI;
}
int screenDepth(Widget* widget)
{
- return PlatformSupport::screenDepth(widget);
+ PlatformPageClient client = toPlatformPageClient(widget);
+ if (!client)
+ return 0;
+ return client->screenInfo().depth;
}
int screenDepthPerComponent(Widget* widget)
{
- return PlatformSupport::screenDepthPerComponent(widget);
+ PlatformPageClient client = toPlatformPageClient(widget);
+ if (!client)
+ return 0;
+ return client->screenInfo().depthPerComponent;
}
bool screenIsMonochrome(Widget* widget)
{
- return PlatformSupport::screenIsMonochrome(widget);
+ PlatformPageClient client = toPlatformPageClient(widget);
+ if (!client)
+ return false;
+ return client->screenInfo().isMonochrome;
}
FloatRect screenRect(Widget* widget)
{
- return PlatformSupport::screenRect(widget);
+ PlatformPageClient client = toPlatformPageClient(widget);
+ if (!client)
+ return FloatRect();
+ return IntRect(client->screenInfo().rect);
}
FloatRect screenAvailableRect(Widget* widget)
{
- return PlatformSupport::screenAvailableRect(widget);
+ PlatformPageClient client = toPlatformPageClient(widget);
+ if (!client)
+ return FloatRect();
+ return IntRect(client->screenInfo().availableRect);
}
void screenColorProfile(ColorProfile& toProfile)
Modified: trunk/Source/WebCore/platform/chromium/PlatformSupport.h (132418 => 132419)
--- trunk/Source/WebCore/platform/chromium/PlatformSupport.h 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebCore/platform/chromium/PlatformSupport.h 2012-10-24 23:19:45 UTC (rev 132419)
@@ -98,15 +98,6 @@
static bool plugins(bool refresh, Vector<PluginInfo>*);
static NPObject* pluginScriptableObject(Widget*);
- // Screen -------------------------------------------------------------
- static int screenHorizontalDPI(Widget*);
- static int screenVerticalDPI(Widget*);
- static int screenDepth(Widget*);
- static int screenDepthPerComponent(Widget*);
- static bool screenIsMonochrome(Widget*);
- static IntRect screenRect(Widget*);
- static IntRect screenAvailableRect(Widget*);
-
// Theming ------------------------------------------------------------
#if OS(WINDOWS)
static void paintButton(
Modified: trunk/Source/WebKit/chromium/ChangeLog (132418 => 132419)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-10-24 23:19:45 UTC (rev 132419)
@@ -1,3 +1,29 @@
+2012-10-24 Mark Pilgrim <[email protected]>
+
+ [Chromium] Remove screen-related functions from PlatformSupport
+ https://bugs.webkit.org/show_bug.cgi?id=97474
+
+ Reviewed by Adam Barth.
+
+ Screen-related functions like screenHorizontalDPI that
+ used to be on PlatformSupport are now accessed through a new
+ PlatformPageClient attached to Widget in WebCore-land, which is
+ implemented by ChromeClientImpl in WebKit-land, which proxies
+ calls to WebWidgetClient, which is actually implemented in
+ Chromium-land.
+
+ * public/WebScreenInfo.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::screenInfo):
+ (WebKit):
+ * src/ChromeClientImpl.h:
+ (WebKit):
+ (WebKit::ChromeClientImpl::platformPageClient):
+ (ChromeClientImpl):
+ * src/PlatformSupport.cpp:
+ (WebCore):
+ * src/WebPagePopupImpl.cpp:
+
2012-10-24 Sailesh Agrawal <[email protected]>
Incorrect keycodes for numpad /, -, +, .
Modified: trunk/Source/WebKit/chromium/public/WebScreenInfo.h (132418 => 132419)
--- trunk/Source/WebKit/chromium/public/WebScreenInfo.h 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebKit/chromium/public/WebScreenInfo.h 2012-10-24 23:19:45 UTC (rev 132419)
@@ -28,55 +28,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebScreenInfo_h
-#define WebScreenInfo_h
-
-#include "platform/WebRect.h"
-
-namespace WebKit {
-
-struct WebScreenInfo {
- // The horizontal screen dpi.
- int horizontalDPI;
-
- // The vertical screen dpi.
- int verticalDPI;
-
- // The screen depth in bits per pixel
- int depth;
-
- // The bits per colour component. This assumes that the colours are balanced
- // equally.
- int depthPerComponent;
-
- // This can be true for black and white printers
- bool isMonochrome;
-
- // This is set from the rcMonitor member of MONITORINFOEX, to whit:
- // "A RECT structure that specifies the display monitor rectangle,
- // expressed in virtual-screen coordinates. Note that if the monitor
- // is not the primary display monitor, some of the rectangle's
- // coordinates may be negative values."
- WebRect rect;
-
- // This is set from the rcWork member of MONITORINFOEX, to whit:
- // "A RECT structure that specifies the work area rectangle of the
- // display monitor that can be used by applications, expressed in
- // virtual-screen coordinates. Windows uses this rectangle to
- // maximize an application on the monitor. The rest of the area in
- // rcMonitor contains system windows such as the task bar and side
- // bars. Note that if the monitor is not the primary display monitor,
- // some of the rectangle's coordinates may be negative values".
- WebRect availableRect;
-
- WebScreenInfo()
- : horizontalDPI(0)
- , verticalDPI(0)
- , depth(0)
- , depthPerComponent(0)
- , isMonochrome(false) { }
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../Platform/chromium/public/WebScreenInfo.h"
Modified: trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp (132418 => 132419)
--- trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp 2012-10-24 23:19:45 UTC (rev 132419)
@@ -896,6 +896,11 @@
m_webView->client()->postAccessibilityNotification(WebAccessibilityObject(obj), toWebAccessibilityNotification(notification));
}
+WebKit::WebScreenInfo ChromeClientImpl::screenInfo()
+{
+ return m_webView->client()->screenInfo();
+}
+
bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
{
Frame* frame = m_webView->mainFrameImpl()->frame();
Modified: trunk/Source/WebKit/chromium/src/ChromeClientImpl.h (132418 => 132419)
--- trunk/Source/WebKit/chromium/src/ChromeClientImpl.h 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebKit/chromium/src/ChromeClientImpl.h 2012-10-24 23:19:45 UTC (rev 132419)
@@ -60,10 +60,11 @@
class WebColorChooserClient;
class WebViewImpl;
struct WebCursorInfo;
+struct WebScreenInfo;
struct WebPopupMenuInfo;
// Handles window-level notifications from WebCore on behalf of a WebView.
-class ChromeClientImpl : public WebCore::ChromeClientChromium {
+class ChromeClientImpl : public WebCore::ChromeClientChromium, public WebCore::PageClientChromium {
public:
explicit ChromeClientImpl(WebViewImpl* webView);
virtual ~ChromeClientImpl();
@@ -123,7 +124,7 @@
const WebCore::IntRect& clipRect);
virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) const;
virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) const;
- virtual PlatformPageClient platformPageClient() const { return 0; }
+ virtual PlatformPageClient platformPageClient() const { return PlatformPageClient(this); }
virtual void contentsSizeChanged(WebCore::Frame*, const WebCore::IntSize&) const;
virtual void layoutUpdated(WebCore::Frame*) const;
virtual void scrollRectIntoView(
@@ -194,6 +195,9 @@
virtual void popupClosed(WebCore::PopupContainer* popupContainer);
virtual void postAccessibilityNotification(WebCore::AccessibilityObject*, WebCore::AXObjectCache::AXNotification);
+ // PageClientChromium methods:
+ virtual WebScreenInfo screenInfo();
+
// ChromeClientImpl:
void setCursorForPlugin(const WebCursorInfo&);
void setNewWindowNavigationPolicy(WebNavigationPolicy);
Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (132418 => 132419)
--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-10-24 23:19:45 UTC (rev 132419)
@@ -100,30 +100,6 @@
namespace WebCore {
-static WebWidgetClient* toWebWidgetClient(Widget* widget)
-{
- if (!widget)
- return 0;
-
- FrameView* view;
- if (widget->isFrameView())
- view = static_cast<FrameView*>(widget);
- else if (widget->parent() && widget->parent()->isFrameView())
- view = static_cast<FrameView*>(widget->parent());
- else
- return 0;
-
- Page* page = view->frame() ? view->frame()->page() : 0;
- if (!page)
- return 0;
-
- void* webView = page->chrome()->client()->webView();
- if (!webView)
- return 0;
-
- return static_cast<WebViewImpl*>(webView)->client();
-}
-
static WebCookieJar* getCookieJar(const Document* document)
{
WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(document->frame());
@@ -330,62 +306,6 @@
// Glue layer. Once the Glue layer moves entirely into the WebKit layer, these
// methods will be deleted.
-int PlatformSupport::screenHorizontalDPI(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return 0;
- return client->screenInfo().horizontalDPI;
-}
-
-int PlatformSupport::screenVerticalDPI(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return 0;
- return client->screenInfo().verticalDPI;
-}
-
-int PlatformSupport::screenDepth(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return 0;
- return client->screenInfo().depth;
-}
-
-int PlatformSupport::screenDepthPerComponent(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return 0;
- return client->screenInfo().depthPerComponent;
-}
-
-bool PlatformSupport::screenIsMonochrome(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return 0;
- return client->screenInfo().isMonochrome;
-}
-
-IntRect PlatformSupport::screenRect(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return IntRect();
- return client->screenInfo().rect;
-}
-
-IntRect PlatformSupport::screenAvailableRect(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return IntRect();
- return client->screenInfo().availableRect;
-}
-
#if ENABLE(WORKERS)
WorkerContextProxy* WorkerContextProxy::create(Worker* worker)
{
Modified: trunk/Source/WebKit/chromium/src/WebPagePopupImpl.cpp (132418 => 132419)
--- trunk/Source/WebKit/chromium/src/WebPagePopupImpl.cpp 2012-10-24 23:18:32 UTC (rev 132418)
+++ trunk/Source/WebKit/chromium/src/WebPagePopupImpl.cpp 2012-10-24 23:19:45 UTC (rev 132419)
@@ -44,6 +44,7 @@
#include "Settings.h"
#include "WebInputEventConversion.h"
#include "WebPagePopup.h"
+#include "WebViewClient.h"
#include "WebViewImpl.h"
#include "WebWidgetClient.h"
@@ -54,7 +55,7 @@
#if ENABLE(PAGE_POPUP)
-class PagePopupChromeClient : public EmptyChromeClient {
+class PagePopupChromeClient : public EmptyChromeClient, public WebCore::PageClientChromium {
WTF_MAKE_NONCOPYABLE(PagePopupChromeClient);
WTF_MAKE_FAST_ALLOCATED;
@@ -124,6 +125,17 @@
return FloatSize(0, 0);
}
+ virtual PlatformPageClient platformPageClient() const OVERRIDE
+ {
+ return PlatformPageClient(this);
+ }
+
+ // PageClientChromium methods:
+ virtual WebKit::WebScreenInfo screenInfo() OVERRIDE
+ {
+ return m_popup->m_webView->client()->screenInfo();
+ }
+
WebPagePopupImpl* m_popup;
};