Commit d105f9dc authored by barraclough@apple.com's avatar barraclough@apple.com

Add layer hosting mode to ViewState

https://bugs.webkit.org/show_bug.cgi?id=125803

Unreviewed - reverting last commit - might have broken tests. :-(

* Shared/ViewState.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
(WebKit::PageClientImpl::viewLayerHostingMode):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::layerHostingModeDidChange):
* UIProcess/PageClient.h:
(WebKit::PageClient::viewLayerHostingMode):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::updateViewState):
(WebKit::WebPageProxy::viewStateDidChange):
(WebKit::WebPageProxy::initializeCreationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::layerHostingMode):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::resumePainting):
(WebKit::DrawingArea::setLayerHostingMode):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::~WebPage):
(WebKit::WebPage::scalePage):
(WebKit::WebPage::setDeviceScaleFactor):
(WebKit::WebPage::setActive):
(WebKit::WebPage::setViewState):
(WebKit::WebPage::setWindowIsVisible):
(WebKit::WebPage::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::layerHostingMode):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setLayerHostingMode):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::sendComplexTextInputToPlugin):
(WebKit::WebPage::setLayerHostingMode):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent aeaa0987
2013-12-16 Gavin Barraclough <barraclough@apple.com>
Add layer hosting mode to ViewState
https://bugs.webkit.org/show_bug.cgi?id=125803
Unreviewed - reverting last commit - might have broken tests. :-(
* Shared/ViewState.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
(WebKit::PageClientImpl::viewLayerHostingMode):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::layerHostingModeDidChange):
* UIProcess/PageClient.h:
(WebKit::PageClient::viewLayerHostingMode):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::updateViewState):
(WebKit::WebPageProxy::viewStateDidChange):
(WebKit::WebPageProxy::initializeCreationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::layerHostingMode):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::resumePainting):
(WebKit::DrawingArea::setLayerHostingMode):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::~WebPage):
(WebKit::WebPage::scalePage):
(WebKit::WebPage::setDeviceScaleFactor):
(WebKit::WebPage::setActive):
(WebKit::WebPage::setViewState):
(WebKit::WebPage::setWindowIsVisible):
(WebKit::WebPage::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::layerHostingMode):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setLayerHostingMode):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::sendComplexTextInputToPlugin):
(WebKit::WebPage::setLayerHostingMode):
2013-12-13 Gavin Barraclough <barraclough@apple.com>
Add layer hosting mode to ViewState
......
......@@ -34,14 +34,13 @@ struct ViewState {
IsFocused = 1 << 1,
IsVisible = 1 << 2,
IsInWindow = 1 << 3,
WindowIsVisible = 1 << 4,
IsLayerWindowServerHosted = 1 << 5
WindowIsVisible = 1 << 4
};
typedef unsigned Flags;
static const Flags NoFlags = 0;
static const Flags AllFlags = WindowIsActive | IsFocused | IsVisible | IsInWindow | WindowIsVisible | IsLayerWindowServerHosted;
static const Flags AllFlags = WindowIsActive | IsFocused | IsVisible | IsInWindow | WindowIsVisible;
};
} // namespace WebKit
......
......@@ -62,6 +62,7 @@ void WebPageCreationParameters::encode(CoreIPC::ArgumentEncoder& encoder) const
encoder << backgroundExtendsBeyondPage;
#if PLATFORM(MAC)
encoder.encodeEnum(layerHostingMode);
encoder << colorSpace;
#endif
}
......@@ -124,6 +125,8 @@ bool WebPageCreationParameters::decode(CoreIPC::ArgumentDecoder& decoder, WebPag
return false;
#if PLATFORM(MAC)
if (!decoder.decodeEnum(parameters.layerHostingMode))
return false;
if (!decoder.decode(parameters.colorSpace))
return false;
#endif
......
......@@ -27,6 +27,7 @@
#define WebPageCreationParameters_h
#include "DrawingAreaInfo.h"
#include "LayerTreeContext.h"
#include "SessionState.h"
#include "ViewState.h"
#include "WebCoreArgumentCoders.h"
......@@ -99,6 +100,7 @@ struct WebPageCreationParameters {
bool backgroundExtendsBeyondPage;
#if PLATFORM(MAC)
LayerHostingMode layerHostingMode;
ColorSpaceData colorSpace;
#endif
};
......
......@@ -27,7 +27,6 @@
#define PageClientImpl_h
#include "CorrectionPanel.h"
#include "LayerTreeContext.h"
#include "PageClient.h"
#include "WebFullScreenManagerProxy.h"
#include <wtf/RetainPtr.h>
......@@ -67,7 +66,7 @@ private:
virtual bool isViewVisible();
virtual bool isWindowVisible();
virtual bool isViewInWindow();
virtual bool isLayerWindowServerHosted();
virtual LayerHostingMode viewLayerHostingMode() OVERRIDE;
virtual ColorSpaceData colorSpace() OVERRIDE;
virtual void setAcceleratedCompositingRootLayer(CALayer *) OVERRIDE;
......@@ -164,8 +163,6 @@ private:
#if USE(DICTATION_ALTERNATIVES)
OwnPtr<WebCore::AlternativeTextUIController> m_alternativeTextUIController;
#endif
LayerHostingMode m_layerHostingMode;
};
} // namespace WebKit
......
......@@ -127,11 +127,6 @@ PageClientImpl::PageClientImpl(WKView* wkView)
#if USE(DICTATION_ALTERNATIVES)
, m_alternativeTextUIController(adoptPtr(new AlternativeTextUIController))
#endif
#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
, m_layerHostingMode(LayerHostingModeInWindowServer)
#else
, m_layerHostingMode(LayerHostingModeDefault)
#endif
{
}
......@@ -220,20 +215,21 @@ bool PageClientImpl::isViewInWindow()
return [m_wkView window];
}
bool PageClientImpl::isLayerWindowServerHosted()
void PageClientImpl::viewWillMoveToAnotherWindow()
{
#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
// Only update m_layerHostingMode when the view is in a window - otherwise just report the last value.
if ([m_wkView window])
m_layerHostingMode = [[m_wkView window] _hostsLayersInWindowServer] ? LayerHostingModeInWindowServer : LayerHostingModeDefault;
#endif
return m_layerHostingMode == LayerHostingModeInWindowServer;
clearAllEditCommands();
}
void PageClientImpl::viewWillMoveToAnotherWindow()
LayerHostingMode PageClientImpl::viewLayerHostingMode()
{
clearAllEditCommands();
#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
if (![m_wkView window])
return LayerHostingModeDefault;
return [[m_wkView window] _hostsLayersInWindowServer] ? LayerHostingModeInWindowServer : LayerHostingModeDefault;
#else
return LayerHostingModeDefault;
#endif
}
ColorSpaceData PageClientImpl::colorSpace()
......
......@@ -53,6 +53,8 @@ public:
virtual void deviceScaleFactorDidChange() = 0;
// FIXME: These should be pure virtual.
virtual void layerHostingModeDidChange() { }
virtual void setBackingStoreIsDiscardable(bool) { }
virtual void waitForBackingStoreUpdateOnNextPaint() { }
......
......@@ -111,8 +111,8 @@ public:
// Return whether the view is in a window.
virtual bool isViewInWindow() = 0;
// Return whether the layer is window server hosted.
virtual bool isLayerWindowServerHosted() = 0;
// Return the layer hosting mode for the view.
virtual LayerHostingMode viewLayerHostingMode() { return LayerHostingModeDefault; }
virtual void processDidCrash() = 0;
virtual void didRelaunchProcess() = 0;
......
......@@ -92,9 +92,6 @@
#include <WebCore/WindowFeatures.h>
#include <stdio.h>
#import "DrawingAreaMessages.h"
#import "DrawingAreaProxyMessages.h"
#if USE(COORDINATED_GRAPHICS)
#include "CoordinatedLayerTreeHostProxyMessages.h"
#endif
......@@ -246,6 +243,11 @@ WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, Web
, m_pageScaleFactor(1)
, m_intrinsicDeviceScaleFactor(1)
, m_customDeviceScaleFactor(0)
#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
, m_layerHostingMode(LayerHostingModeInWindowServer)
#else
, m_layerHostingMode(LayerHostingModeDefault)
#endif
, m_drawsBackground(true)
, m_drawsTransparentBackground(false)
, m_areMemoryCacheClientCallsEnabled(true)
......@@ -313,10 +315,6 @@ WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, Web
#endif
, m_scrollPinningBehavior(DoNotPin)
{
#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
// By default assume we'll be window server hosted.
m_viewState |= ViewState::IsLayerWindowServerHosted;
#endif
updateViewState();
platformInitialize();
......@@ -952,8 +950,6 @@ void WebPageProxy::updateViewState(ViewState::Flags flagsToUpdate)
m_viewState |= ViewState::IsVisible;
if (flagsToUpdate & ViewState::IsInWindow && m_pageClient.isViewInWindow())
m_viewState |= ViewState::IsInWindow;
if (flagsToUpdate & ViewState::IsLayerWindowServerHosted && m_pageClient.isLayerWindowServerHosted())
m_viewState |= ViewState::IsLayerWindowServerHosted;
}
void WebPageProxy::viewStateDidChange(ViewState::Flags mayHaveChanged, WantsReplyOrNot wantsReply)
......@@ -961,10 +957,6 @@ void WebPageProxy::viewStateDidChange(ViewState::Flags mayHaveChanged, WantsRepl
if (!isValid())
return;
// If the in-window state may have changed, then so may the layer hosting.
if (mayHaveChanged & ViewState::IsInWindow)
mayHaveChanged |= ViewState::IsLayerWindowServerHosted;
// Record the prior view state, update the flags that may have changed,
// and check which flags have actually changed.
ViewState::Flags previousViewState = m_viewState;
......@@ -993,15 +985,22 @@ void WebPageProxy::viewStateDidChange(ViewState::Flags mayHaveChanged, WantsRepl
#endif
}
#if ENABLE(INPUT_TYPE_COLOR_POPOVER)
if (mayHaveChanged & ViewState::IsInWindow) {
if (!(m_viewState & ViewState::IsInWindow)) {
if (m_viewState & ViewState::IsInWindow) {
LayerHostingMode layerHostingMode = m_pageClient.viewLayerHostingMode();
if (m_layerHostingMode != layerHostingMode) {
m_layerHostingMode = layerHostingMode;
m_drawingArea->layerHostingModeDidChange();
}
}
#if ENABLE(INPUT_TYPE_COLOR_POPOVER)
else {
// When leaving the current page, close the popover color well.
if (m_colorPicker)
endColorPicker();
}
}
#endif
}
updateBackingStoreDiscardableState();
}
......@@ -3917,8 +3916,11 @@ void WebPageProxy::initializeCreationParameters()
m_creationParameters.scrollPinningBehavior = m_scrollPinningBehavior;
m_creationParameters.backgroundExtendsBeyondPage = m_backgroundExtendsBeyondPage;
#if PLATFORM(MAC) && !PLATFORM(IOS)
#if PLATFORM(MAC)
m_creationParameters.layerHostingMode = m_layerHostingMode;
#if !PLATFORM(IOS)
m_creationParameters.colorSpace = m_pageClient.colorSpace();
#endif // !PLATFORM(IOS)
#endif
}
......
......@@ -33,6 +33,7 @@
#include "DrawingAreaProxy.h"
#include "EditorState.h"
#include "GeolocationPermissionRequestManagerProxy.h"
#include "LayerTreeContext.h"
#include "MessageSender.h"
#include "NotificationPermissionRequestManagerProxy.h"
#include "PageLoadState.h"
......@@ -551,6 +552,8 @@ public:
void setCustomDeviceScaleFactor(float);
void windowScreenDidChange(PlatformDisplayID);
LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
void setUseFixedLayout(bool);
void setFixedLayoutSize(const WebCore::IntSize&);
bool useFixedLayout() const { return m_useFixedLayout; };
......@@ -1234,6 +1237,8 @@ private:
float m_intrinsicDeviceScaleFactor;
float m_customDeviceScaleFactor;
LayerHostingMode m_layerHostingMode;
bool m_drawsBackground;
bool m_drawsTransparentBackground;
......
......@@ -40,6 +40,7 @@ public:
private:
// DrawingAreaProxy
virtual void deviceScaleFactorDidChange() OVERRIDE;
virtual void layerHostingModeDidChange() OVERRIDE;
virtual void sizeDidChange() OVERRIDE;
virtual void waitForPossibleGeometryUpdate(double timeout = didUpdateBackingStoreStateTimeout) OVERRIDE;
virtual void colorSpaceDidChange() OVERRIDE;
......
......@@ -54,6 +54,11 @@ void TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange()
m_webPageProxy->process().send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()), m_webPageProxy->pageID());
}
void TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange()
{
m_webPageProxy->process().send(Messages::DrawingArea::SetLayerHostingMode(m_webPageProxy->layerHostingMode()), m_webPageProxy->pageID());
}
void TiledCoreAnimationDrawingAreaProxy::sizeDidChange()
{
if (!m_webPageProxy->isValid())
......
......@@ -27,7 +27,6 @@
#define DrawingArea_h
#include "DrawingAreaInfo.h"
#include "LayerTreeContext.h"
#include <WebCore/FloatPoint.h>
#include <WebCore/IntRect.h>
#include <wtf/Forward.h>
......@@ -107,7 +106,6 @@ public:
virtual void suspendPainting() { }
virtual void resumePainting() { }
virtual void setLayerHostingMode(LayerHostingMode) { }
protected:
DrawingArea(DrawingAreaType, WebPage*);
......@@ -121,6 +119,7 @@ private:
virtual void updateBackingStoreState(uint64_t /*backingStoreStateID*/, bool /*respondImmediately*/, float /*deviceScaleFactor*/, const WebCore::IntSize& /*size*/,
const WebCore::IntSize& /*scrollOffset*/) { }
virtual void didUpdate() { }
virtual void setLayerHostingMode(uint32_t) { }
#if PLATFORM(MAC)
// Used by TiledCoreAnimationDrawingArea.
......
......@@ -23,6 +23,7 @@
messages -> DrawingArea LegacyReceiver {
UpdateBackingStoreState(uint64_t backingStoreStateID, bool respondImmediately, float deviceScaleFactor, WebCore::IntSize size, WebCore::IntSize scrollOffset)
DidUpdate()
SetLayerHostingMode(uint32_t layerHostingMode)
#if PLATFORM(MAC)
// Used by TiledCoreAnimationDrawingArea.
......
......@@ -243,6 +243,7 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
#if PLATFORM(MAC)
, m_pdfPluginEnabled(false)
, m_hasCachedWindowFrame(false)
, m_layerHostingMode(parameters.layerHostingMode)
, m_keyboardEventBeingInterpreted(0)
#elif PLATFORM(GTK)
, m_accessibilityObject(0)
......@@ -441,8 +442,8 @@ WebPage::~WebPage()
m_sandboxExtensionTracker.invalidate();
for (auto* pluginView : m_pluginViews)
pluginView->webPageDestroyed();
for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
(*it)->webPageDestroyed();
#if !PLATFORM(IOS)
if (m_headerBanner)
......@@ -1232,8 +1233,8 @@ void WebPage::scalePage(double scale, const IntPoint& origin)
m_page->setPageScaleFactor(scale, origin);
for (auto* pluginView : m_pluginViews)
pluginView->pageScaleFactorDidChange();
for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
(*it)->pageScaleFactorDidChange();
if (m_drawingArea->layerTreeHost())
m_drawingArea->layerTreeHost()->deviceOrPageScaleFactorChanged();
......@@ -1259,8 +1260,8 @@ void WebPage::setDeviceScaleFactor(float scaleFactor)
// Tell all our plug-in views that the device scale factor changed.
#if PLATFORM(MAC) && !PLATFORM(IOS)
for (auto* pluginView : m_pluginViews)
pluginView->setDeviceScaleFactor(scaleFactor);
for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
(*it)->setDeviceScaleFactor(scaleFactor);
updateHeaderAndFooterLayersForDeviceScaleChange(scaleFactor);
#endif
......@@ -1911,8 +1912,8 @@ void WebPage::setActive(bool isActive)
#if PLATFORM(MAC)
// Tell all our plug-in views that the window focus changed.
for (auto* pluginView : m_pluginViews)
pluginView->setWindowIsFocused(isActive);
for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
(*it)->setWindowIsFocused(isActive);
#endif
}
......@@ -2094,8 +2095,6 @@ void WebPage::setViewState(ViewState::Flags viewState, bool wantsDidUpdateViewSt
setActive(viewState & ViewState::WindowIsActive);
if (changed & ViewState::IsInWindow)
setIsInWindow(viewState & ViewState::IsInWindow);
if (changed & ViewState::IsLayerWindowServerHosted)
setLayerHostingMode(viewState & ViewState::IsLayerWindowServerHosted ? LayerHostingModeInWindowServer : LayerHostingModeDefault);
m_viewState = viewState;
......@@ -3059,22 +3058,11 @@ void WebPage::setWindowIsVisible(bool windowIsVisible)
#if PLATFORM(MAC)
// Tell all our plug-in views that the window visibility changed.
for (auto* pluginView : m_pluginViews)
pluginView->setWindowIsVisible(windowIsVisible);
for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
(*it)->setWindowIsVisible(windowIsVisible);
#endif
}
void WebPage::setLayerHostingMode(LayerHostingMode layerHostingMode)
{
#if PLATFORM(MAC)
// Tell all our plug-in views that the layer hosting mode changed.
for (auto* pluginView : m_pluginViews)
pluginView->setLayerHostingMode(layerHostingMode);
#endif
m_drawingArea->setLayerHostingMode(layerHostingMode);
}
#if PLATFORM(MAC)
void WebPage::windowAndViewFramesChanged(const FloatRect& windowFrameInScreenCoordinates, const FloatRect& windowFrameInUnflippedScreenCoordinates, const FloatRect& viewFrameInWindowCoordinates, const FloatPoint& accessibilityViewCoordinates)
{
......@@ -3084,8 +3072,8 @@ void WebPage::windowAndViewFramesChanged(const FloatRect& windowFrameInScreenCoo
m_accessibilityPosition = accessibilityViewCoordinates;
// Tell all our plug-in views that the window and view frames have changed.
for (auto* pluginView : m_pluginViews)
pluginView->windowAndViewFramesChanged(enclosingIntRect(windowFrameInScreenCoordinates), enclosingIntRect(viewFrameInWindowCoordinates));
for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
(*it)->windowAndViewFramesChanged(enclosingIntRect(windowFrameInScreenCoordinates), enclosingIntRect(viewFrameInWindowCoordinates));
m_hasCachedWindowFrame = !m_windowFrameInUnflippedScreenCoordinates.isEmpty();
}
......
......@@ -348,11 +348,7 @@ public:
bool windowIsVisible() const { return m_windowIsVisible; }
#if PLATFORM(MAC)
LayerHostingMode layerHostingMode() const
{
return m_viewState & ViewState::IsLayerWindowServerHosted ? LayerHostingModeInWindowServer : LayerHostingModeDefault;
}
LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
void setLayerHostingMode(LayerHostingMode);
void updatePluginsActiveAndFocusedState();
......@@ -929,6 +925,9 @@ private:
// The accessibility position of the view.
WebCore::FloatPoint m_accessibilityPosition;
// The layer hosting mode.
LayerHostingMode m_layerHostingMode;
RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement;
WebCore::KeyboardEvent* m_keyboardEventBeingInterpreted;
......
......@@ -268,6 +268,11 @@ void WebPage::acceptsFirstMouse(int, const WebKit::WebMouseEvent&, bool&)
notImplemented();
}
void WebPage::setLayerHostingMode(LayerHostingMode)
{
notImplemented();
}
void WebPage::computePagesForPrintingPDFDocument(uint64_t, const PrintInfo&, Vector<IntRect>&)
{
notImplemented();
......
......@@ -101,7 +101,7 @@ private:
// Message handlers.
virtual void updateGeometry(const WebCore::IntSize& viewSize, const WebCore::IntSize& layerPosition) OVERRIDE;
virtual void setDeviceScaleFactor(float) OVERRIDE;
virtual void setLayerHostingMode(LayerHostingMode) OVERRIDE;
virtual void setLayerHostingMode(uint32_t) OVERRIDE;
virtual void setColorSpace(const ColorSpaceData&) OVERRIDE;
virtual void beginTransientZoom() OVERRIDE;
......
......@@ -504,8 +504,14 @@ void TiledCoreAnimationDrawingArea::setDeviceScaleFactor(float deviceScaleFactor
it->value->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
}
void TiledCoreAnimationDrawingArea::setLayerHostingMode(LayerHostingMode layerHostingMode)
void TiledCoreAnimationDrawingArea::setLayerHostingMode(uint32_t opaqueLayerHostingMode)
{
LayerHostingMode layerHostingMode = static_cast<LayerHostingMode>(opaqueLayerHostingMode);
if (layerHostingMode == m_webPage->layerHostingMode())
return;
m_webPage->setLayerHostingMode(layerHostingMode);
updateLayerHostingContext();
// Finally, inform the UIProcess that the context has changed.
......
......@@ -249,8 +249,8 @@ bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* event, bool saveCommands
void WebPage::sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput)
{
for (auto* pluginView : m_pluginViews) {
if (pluginView->sendComplexTextInput(pluginComplexTextInputIdentifier, textInput))
for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it) {
if ((*it)->sendComplexTextInput(pluginComplexTextInputIdentifier, textInput))
break;
}
}
......@@ -792,6 +792,14 @@ void WebPage::acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent& ev
result = !!hitResult.scrollbar();
}
void WebPage::setLayerHostingMode(LayerHostingMode layerHostingMode)
{
m_layerHostingMode = layerHostingMode;
for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
(*it)->setLayerHostingMode(layerHostingMode);
}
void WebPage::setTopOverhangImage(PassRefPtr<WebImage> image)
{
FrameView* frameView = m_mainFrame->coreFrame()->view();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment