WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
WIP Patch
bug-97474-20120924153013.patch (text/plain), 16.60 KB, created by
Mark Pilgrim (Google)
on 2012-09-24 12:30:57 PDT
(
hide
)
Description:
WIP Patch
Filename:
MIME Type:
Creator:
Mark Pilgrim (Google)
Created:
2012-09-24 12:30:57 PDT
Size:
16.60 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 129398) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,30 @@ >+2012-09-24 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Remove screen-related functions from PlatformSupport >+ https://bugs.webkit.org/show_bug.cgi?id=97474 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * platform/Widget.h: >+ (Widget): >+ * platform/chromium/PlatformScreenChromium.cpp: >+ (WebCore::screenHorizontalDPI): >+ (WebCore::screenVerticalDPI): >+ (WebCore::screenDepth): >+ (WebCore::screenDepthPerComponent): >+ (WebCore::screenIsMonochrome): >+ (WebCore::screenRect): >+ (WebCore::screenAvailableRect): >+ * platform/chromium/PlatformSupport.h: >+ (PlatformSupport): >+ * platform/chromium/PlatformWidget.h: >+ (PlatformWidgetChromium): >+ (WebCore): >+ > 2012-09-24 Tommy Widenflycht <tommyw@google.com> > > MediaStream API: Fix the incorrectly spelled RTCPeerConnection::onnegotiationneeded callback >Index: Source/WebCore/platform/Widget.h >=================================================================== >--- Source/WebCore/platform/Widget.h (revision 129358) >+++ Source/WebCore/platform/Widget.h (working copy) >@@ -33,6 +33,7 @@ > > #if PLATFORM(CHROMIUM) > #include "PlatformWidget.h" >+#include <wtf/StdLibExtras.h> // for intptr_t > #endif > > #if PLATFORM(MAC) >@@ -93,6 +94,8 @@ typedef PageClientBlackBerry* PlatformPa > #elif PLATFORM(EFL) > class PageClientEfl; > typedef PageClientEfl* PlatformPageClient; >+#elif PLATFORM(CHROMIUM) >+typedef intptr_t PlatformPageClient; > #else > typedef PlatformWidget PlatformPageClient; > #endif >@@ -125,9 +128,9 @@ enum WidgetNotification { WillPaintFlatt > // Scrollbar - Mac, Gtk > // Plugin - Mac, Windows (windowed only), Qt (windowed only, widget is an HWND on windows), Gtk (windowed only) > // >-class Widget : public RefCounted<Widget> { >-public: >- explicit Widget(PlatformWidget = 0); >+ class Widget : public RefCounted<Widget> { >+ public: >+ explicit Widget(PlatformWidget = 0); > virtual ~Widget(); > > PlatformWidget platformWidget() const; >Index: Source/WebCore/platform/chromium/PlatformScreenChromium.cpp >=================================================================== >--- Source/WebCore/platform/chromium/PlatformScreenChromium.cpp (revision 129358) >+++ Source/WebCore/platform/chromium/PlatformScreenChromium.cpp (working copy) >@@ -29,10 +29,10 @@ > */ > > #include "config.h" >-#include "PlatformScreen.h" >- > #include "IntRect.h" >-#include "PlatformSupport.h" >+#include "PlatformScreen.h" >+#include "PlatformWidget.h" >+#include "Widget.h" > > #include <public/Platform.h> > >@@ -40,37 +40,37 @@ namespace WebCore { > > int screenHorizontalDPI(Widget* widget) > { >- return PlatformSupport::screenHorizontalDPI(widget); >+ return widget->platformWidget()->screenHorizontalDPI(); > } > > int screenVerticalDPI(Widget* widget) > { >- return PlatformSupport::screenVerticalDPI(widget); >+ return widget->platformWidget()->screenVerticalDPI(); > } > > int screenDepth(Widget* widget) > { >- return PlatformSupport::screenDepth(widget); >+ return widget->platformWidget()->screenDepth(); > } > > int screenDepthPerComponent(Widget* widget) > { >- return PlatformSupport::screenDepthPerComponent(widget); >+ return widget->platformWidget()->screenDepthPerComponent(); > } > > bool screenIsMonochrome(Widget* widget) > { >- return PlatformSupport::screenIsMonochrome(widget); >+ return widget->platformWidget()->screenIsMonochrome(); > } > > FloatRect screenRect(Widget* widget) > { >- return PlatformSupport::screenRect(widget); >+ return widget->platformWidget()->screenRect(); > } > > FloatRect screenAvailableRect(Widget* widget) > { >- return PlatformSupport::screenAvailableRect(widget); >+ return widget->platformWidget()->screenAvailableRect(); > } > > void screenColorProfile(ColorProfile& toProfile) >Index: Source/WebCore/platform/chromium/PlatformSupport.h >=================================================================== >--- Source/WebCore/platform/chromium/PlatformSupport.h (revision 129358) >+++ Source/WebCore/platform/chromium/PlatformSupport.h (working copy) >@@ -110,15 +110,6 @@ public: > 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( >Index: Source/WebCore/platform/chromium/PlatformWidget.h >=================================================================== >--- Source/WebCore/platform/chromium/PlatformWidget.h (revision 129358) >+++ Source/WebCore/platform/chromium/PlatformWidget.h (working copy) >@@ -31,12 +31,23 @@ > #ifndef PlatformWidget_h > #define PlatformWidget_h > >-#include <wtf/StdLibExtras.h> // for intptr_t >+#include "IntRect.h" > >-// PlatformWidget is an opaque identifier corresponding to whatever native >-// view type the embedder may use. PlatformWidget CANNOT be assumed to be >-// a valid pointer. Some embedders may not use this identifier at all. >+namespace WebCore { > >-typedef intptr_t PlatformWidget; >+class PlatformWidgetChromium { >+public: >+ virtual int screenHorizontalDPI(); >+ virtual int screenVerticalDPI(); >+ virtual int screenDepth(); >+ virtual int screenDepthPerComponent(); >+ virtual bool screenIsMonochrome(); >+ virtual IntRect screenRect(); >+ virtual IntRect screenAvailableRect(); >+}; > >-#endif >+typedef PlatformWidgetChromium* PlatformWidget; >+ >+} // namespace WebCore >+ >+#endif // PlatformWidget_h >Index: Source/WebKit/chromium/ChangeLog >=================================================================== >--- Source/WebKit/chromium/ChangeLog (revision 129398) >+++ Source/WebKit/chromium/ChangeLog (working copy) >@@ -1,3 +1,30 @@ >+2012-09-24 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Remove screen-related functions from PlatformSupport >+ https://bugs.webkit.org/show_bug.cgi?id=97474 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). >+ >+ * WebKit.gyp: >+ * src/PlatformSupport.cpp: >+ (WebCore): >+ * src/PlatformWidgetImpl.cpp: Added. >+ (WebKit): >+ (WebKit::PlatformWidgetImpl::screenHorizontalDPI): >+ (WebKit::PlatformWidgetImpl::screenVerticalDPI): >+ (WebKit::PlatformWidgetImpl::screenDepth): >+ (WebKit::PlatformWidgetImpl::screenDepthPerComponent): >+ (WebKit::PlatformWidgetImpl::screenIsMonochrome): >+ (WebKit::PlatformWidgetImpl::screenRect): >+ (WebKit::PlatformWidgetImpl::screenAvailableRect): >+ * src/PlatformWidgetImpl.h: Added. >+ (WebKit): >+ (PlatformWidgetImpl): >+ * src/WebFrameImpl.cpp: >+ (WebKit::WebFrameImpl::createFrameView): >+ > 2012-09-24 Tony Chang <tony@chromium.org> > > Unreviewed. Rolled DEPS. >Index: Source/WebKit/chromium/WebKit.gyp >=================================================================== >--- Source/WebKit/chromium/WebKit.gyp (revision 129358) >+++ Source/WebKit/chromium/WebKit.gyp (working copy) >@@ -449,6 +449,8 @@ > 'src/PlatformMessagePortChannel.cpp', > 'src/PlatformMessagePortChannel.h', > 'src/PlatformSupport.cpp', >+ 'src/PlatformWidgetImpl.cpp', >+ 'src/PlatformWidgetImpl.h', > 'src/ScrollbarGroup.cpp', > 'src/ScrollbarGroup.h', > 'src/SharedWorkerRepository.cpp', >Index: Source/WebKit/chromium/src/PlatformSupport.cpp >=================================================================== >--- Source/WebKit/chromium/src/PlatformSupport.cpp (revision 129358) >+++ Source/WebKit/chromium/src/PlatformSupport.cpp (working copy) >@@ -479,62 +479,6 @@ void PlatformSupport::paintThemePart( > // 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) > { >Index: Source/WebKit/chromium/src/PlatformWidgetImpl.cpp >=================================================================== >--- Source/WebKit/chromium/src/PlatformWidgetImpl.cpp (revision 0) >+++ Source/WebKit/chromium/src/PlatformWidgetImpl.cpp (revision 0) >@@ -0,0 +1,98 @@ >+/* >+ * 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. >+ */ >+ >+#include "config.h" >+#include "PlatformWidget.h" >+ >+namespace WebKit { >+ >+ //PlatformWidgetImpl::PlatformWidgetImpl(WebBatteryStatusClient* client) >+ // : m_client(client) >+ // , m_controller(0) >+ //{ >+ //} >+ >+int PlatformWidgetImpl::screenHorizontalDPI(Widget* widget) >+{ >+ WebWidgetClient* client = toWebWidgetClient(widget); >+ if (!client) >+ return 0; >+ return client->screenInfo().horizontalDPI; >+} >+ >+int PlatformWidgetImpl::screenVerticalDPI(Widget* widget) >+{ >+ WebWidgetClient* client = toWebWidgetClient(widget); >+ if (!client) >+ return 0; >+ return client->screenInfo().verticalDPI; >+} >+ >+int PlatformWidgetImpl::screenDepth(Widget* widget) >+{ >+ WebWidgetClient* client = toWebWidgetClient(widget); >+ if (!client) >+ return 0; >+ return client->screenInfo().depth; >+} >+ >+int PlatformWidgetImpl::screenDepthPerComponent(Widget* widget) >+{ >+ WebWidgetClient* client = toWebWidgetClient(widget); >+ if (!client) >+ return 0; >+ return client->screenInfo().depthPerComponent; >+} >+ >+bool PlatformWidgetImpl::screenIsMonochrome(Widget* widget) >+{ >+ WebWidgetClient* client = toWebWidgetClient(widget); >+ if (!client) >+ return 0; >+ return client->screenInfo().isMonochrome; >+} >+ >+IntRect PlatformWidgetImpl::screenRect(Widget* widget) >+{ >+ WebWidgetClient* client = toWebWidgetClient(widget); >+ if (!client) >+ return IntRect(); >+ return client->screenInfo().rect; >+} >+ >+IntRect PlatformWidgetImpl::screenAvailableRect(Widget* widget) >+{ >+ WebWidgetClient* client = toWebWidgetClient(widget); >+ if (!client) >+ return IntRect(); >+ return client->screenInfo().availableRect; >+} >+ >+} // namespace WebKit >Index: Source/WebKit/chromium/src/PlatformWidgetImpl.h >=================================================================== >--- Source/WebKit/chromium/src/PlatformWidgetImpl.h (revision 0) >+++ Source/WebKit/chromium/src/PlatformWidgetImpl.h (revision 0) >@@ -0,0 +1,51 @@ >+/* >+ * 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 PlatformWidgetImpl_h >+#define PlatformWidgetImpl_h >+ >+#include "PlatformWidget.h" >+ >+namespace WebKit { >+ >+class PlatformWidgetImpl : public WebCore::PlatformWidget { >+public: >+ virtual int screenHorizontalDPI(); >+ virtual int screenVerticalDPI(); >+ virtual int screenDepth(); >+ virtual int screenDepthPerComponent(); >+ virtual bool screenIsMonochrome(); >+ virtual IntRect screenRect(); >+ virtual IntRect screenAvailableRect(); >+}; >+ >+} // namespce WebKit >+ >+#endif // PlatformWidgetImpl_h >Index: Source/WebKit/chromium/src/WebFrameImpl.cpp >=================================================================== >--- Source/WebKit/chromium/src/WebFrameImpl.cpp (revision 129358) >+++ Source/WebKit/chromium/src/WebFrameImpl.cpp (working copy) >@@ -2389,6 +2389,7 @@ void WebFrameImpl::createFrameView() > WebViewImpl* webView = viewImpl(); > bool isMainFrame = webView->mainFrameImpl()->frame() == m_frame; > m_frame->createView(webView->size(), Color::white, webView->isTransparent(), webView->fixedLayoutSize(), isMainFrame ? webView->isFixedLayoutModeEnabled() : 0); >+ m_frame->view()->setPlatformWidget(m_frame->view()); > if (webView->shouldAutoResize() && isMainFrame) > m_frame->view()->enableAutoSizeMode(true, webView->minAutoSize(), webView->maxAutoSize()); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 97474
:
165430
|
165680
|
165685
|
165697
|
165700
|
165826
|
166059
|
166087
|
166542
|
170469