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
wip.patch (text/plain), 20.03 KB, created by
Fujii Hironori
on 2024-12-19 23:58:50 PST
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2024-12-19 23:58:50 PST
Size:
20.03 KB
patch
obsolete
>diff --git a/Source/WebCore/PlatformWin.cmake b/Source/WebCore/PlatformWin.cmake >index e056d5d5a9dc..5c7df5edc428 100644 >--- a/Source/WebCore/PlatformWin.cmake >+++ b/Source/WebCore/PlatformWin.cmake >@@ -68,6 +68,7 @@ list(APPEND WebCore_SOURCES > > platform/graphics/win/DIBPixelData.cpp > platform/graphics/win/DisplayRefreshMonitorWin.cpp >+ platform/graphics/win/FloatPointWin.cpp > platform/graphics/win/FloatRectWin.cpp > platform/graphics/win/FullScreenController.cpp > platform/graphics/win/FullScreenWindow.cpp >diff --git a/Source/WebCore/platform/graphics/FloatPoint.h b/Source/WebCore/platform/graphics/FloatPoint.h >index 7a33c0423bc7..6493bb1dad82 100644 >--- a/Source/WebCore/platform/graphics/FloatPoint.h >+++ b/Source/WebCore/platform/graphics/FloatPoint.h >@@ -182,6 +182,10 @@ public: > WEBCORE_EXPORT operator NSPoint() const; > #endif > >+#if PLATFORM(WIN) >+ WEBCORE_EXPORT FloatPoint(const POINT&); >+#endif >+ > WEBCORE_EXPORT FloatPoint matrixTransform(const TransformationMatrix&) const; > WEBCORE_EXPORT FloatPoint matrixTransform(const AffineTransform&) const; > >diff --git a/Source/WebCore/platform/graphics/win/FloatPointWin.cpp b/Source/WebCore/platform/graphics/win/FloatPointWin.cpp >new file mode 100644 >index 000000000000..b0f4a911dda9 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/win/FloatPointWin.cpp >@@ -0,0 +1,39 @@ >+/* >+ * Copyright (C) 2022 Apple 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: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. 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. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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 "FloatPoint.h" >+ >+#include <windows.h> >+ >+namespace WebCore { >+ >+FloatPoint::FloatPoint(const POINT& p) >+ : m_x(p.x) >+ , m_y(p.y) >+{ >+} >+ >+} >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h >index 5fcbcff1a4fd..ee227b8ac3fc 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.h >+++ b/Source/WebKit/Shared/WebPageCreationParameters.h >@@ -145,6 +145,9 @@ struct WebPageCreationParameters { > bool canRunModal { false }; > > float deviceScaleFactor { 0 }; >+#if PLATFORM(WIN) >+ float intrinsicDeviceScaleFactor { 0 }; >+#endif > float viewScaleFactor { 0 }; > > double textZoomFactor { 1 }; >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.serialization.in b/Source/WebKit/Shared/WebPageCreationParameters.serialization.in >index 73de51337027..18489589aa15 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.serialization.in >+++ b/Source/WebKit/Shared/WebPageCreationParameters.serialization.in >@@ -68,6 +68,9 @@ enum class WebCore::UserInterfaceLayoutDirection : bool; > bool canRunModal; > > float deviceScaleFactor; >+#if PLATFORM(WIN) >+ float intrinsicDeviceScaleFactor; >+#endif > float viewScaleFactor; > > double textZoomFactor; >diff --git a/Source/WebKit/Shared/win/WebEventFactory.cpp b/Source/WebKit/Shared/win/WebEventFactory.cpp >index a1044685ff59..23ec85c14289 100644 >--- a/Source/WebKit/Shared/win/WebEventFactory.cpp >+++ b/Source/WebKit/Shared/win/WebEventFactory.cpp >@@ -395,9 +395,9 @@ WebMouseEvent WebEventFactory::createWebMouseEvent(HWND hWnd, UINT message, WPAR > POINT positionPoint = point(lParam); > POINT globalPositionPoint = positionPoint; > ::ClientToScreen(hWnd, &globalPositionPoint); >- IntPoint globalPosition(globalPositionPoint); >+ FloatPoint globalPosition(globalPositionPoint); > globalPosition.scale(1 / deviceScaleFactor); >- IntPoint position = positionPoint; >+ FloatPoint position = positionPoint; > position.scale(1 / deviceScaleFactor); > > double timestamp = ::GetTickCount() * 0.001; // ::GetTickCount returns milliseconds (Chrome uses GetMessageTime() / 1000.0) >@@ -406,16 +406,16 @@ WebMouseEvent WebEventFactory::createWebMouseEvent(HWND hWnd, UINT message, WPAR > auto modifiers = modifiersForEvent(wParam); > auto buttons = buttonsForEvent(wParam); > >- return WebMouseEvent( { type, modifiers, WallTime::now() }, button, buttons, position, globalPosition, 0, 0, 0, clickCount, didActivateWebView); >+ return WebMouseEvent( { type, modifiers, WallTime::now() }, button, buttons, flooredIntPoint(position), flooredIntPoint(globalPosition), 0, 0, 0, clickCount, didActivateWebView); > } > > WebWheelEvent WebEventFactory::createWebWheelEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, float deviceScaleFactor) > { > POINT positionPoint = point(lParam); >- IntPoint globalPosition = positionPoint; >+ FloatPoint globalPosition = positionPoint; > ::ScreenToClient(hWnd, &positionPoint); > globalPosition.scale(1 / deviceScaleFactor); >- IntPoint position = positionPoint; >+ FloatPoint position = positionPoint; > position.scale(1 / deviceScaleFactor); > > WebWheelEvent::Granularity granularity = WebWheelEvent::ScrollByPixelWheelEvent; >@@ -453,7 +453,7 @@ WebWheelEvent WebEventFactory::createWebWheelEvent(HWND hWnd, UINT message, WPAR > } > } > >- return WebWheelEvent( { WebEventType::Wheel, modifiers, WallTime::now() }, position, globalPosition, FloatSize(deltaX, deltaY), FloatSize(wheelTicksX, wheelTicksY), granularity); >+ return WebWheelEvent( { WebEventType::Wheel, modifiers, WallTime::now() }, flooredIntPoint(position), flooredIntPoint(globalPosition), FloatSize(deltaX, deltaY), FloatSize(wheelTicksX, wheelTicksY), granularity); > } > > static WindowsKeyNames& windowsKeyNames() >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index 70e541c16aaa..e73db8e3561d 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -11258,7 +11258,11 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc > parameters.userAgent = userAgent(); > parameters.canRunBeforeUnloadConfirmPanel = m_uiClient->canRunBeforeUnloadConfirmPanel(); > parameters.canRunModal = m_canRunModal; >+ > parameters.deviceScaleFactor = deviceScaleFactor(); >+#if PLATFORM(WIN) >+ parameters.intrinsicDeviceScaleFactor = intrinsicDeviceScaleFactor(); >+#endif > parameters.viewScaleFactor = m_viewScaleFactor; > parameters.textZoomFactor = m_textZoomFactor; > parameters.pageZoomFactor = m_pageZoomFactor; >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index b32552f9951b..647de80f266a 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -1373,6 +1373,7 @@ public: > #endif > > float deviceScaleFactor() const; >+ float intrinsicDeviceScaleFactor() const { return m_intrinsicDeviceScaleFactor; } > void setIntrinsicDeviceScaleFactor(float); > std::optional<float> customDeviceScaleFactor() const { return m_customDeviceScaleFactor; } > void setCustomDeviceScaleFactor(float, CompletionHandler<void()>&&); >diff --git a/Source/WebKit/UIProcess/wc/DrawingAreaProxyWC.cpp b/Source/WebKit/UIProcess/wc/DrawingAreaProxyWC.cpp >index cfe236c0f271..5c15791cf827 100644 >--- a/Source/WebKit/UIProcess/wc/DrawingAreaProxyWC.cpp >+++ b/Source/WebKit/UIProcess/wc/DrawingAreaProxyWC.cpp >@@ -72,7 +72,7 @@ void DrawingAreaProxyWC::sizeDidChange() > discardBackingStore(); > m_currentBackingStoreStateID++; > if (m_webPageProxy) >- send(Messages::DrawingArea::UpdateGeometryWC(m_currentBackingStoreStateID, m_size, m_webPageProxy->deviceScaleFactor())); >+ send(Messages::DrawingArea::UpdateGeometryWC(m_currentBackingStoreStateID, m_size, m_webPageProxy->deviceScaleFactor(), m_webPageProxy->intrinsicDeviceScaleFactor())); > } > > void DrawingAreaProxyWC::update(uint64_t backingStoreStateID, UpdateInfo&& updateInfo) >diff --git a/Source/WebKit/UIProcess/win/WebView.cpp b/Source/WebKit/UIProcess/win/WebView.cpp >index 8b521de62266..203f80c3706c 100644 >--- a/Source/WebKit/UIProcess/win/WebView.cpp >+++ b/Source/WebKit/UIProcess/win/WebView.cpp >@@ -334,7 +334,7 @@ void WebView::windowAncestryDidChange() > > LRESULT WebView::onMouseEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, bool& handled) > { >- NativeWebMouseEvent mouseEvent = NativeWebMouseEvent(hWnd, message, wParam, lParam, m_wasActivatedByMouseEvent, m_page->deviceScaleFactor()); >+ NativeWebMouseEvent mouseEvent = NativeWebMouseEvent(hWnd, message, wParam, lParam, m_wasActivatedByMouseEvent, m_page->intrinsicDeviceScaleFactor()); > setWasActivatedByMouseEvent(false); > > switch (message) { >@@ -371,7 +371,7 @@ LRESULT WebView::onMouseEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa > > LRESULT WebView::onWheelEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, bool& handled) > { >- NativeWebWheelEvent wheelEvent(hWnd, message, wParam, lParam, m_page->deviceScaleFactor()); >+ NativeWebWheelEvent wheelEvent(hWnd, message, wParam, lParam, m_page->intrinsicDeviceScaleFactor()); > if (wheelEvent.controlKey()) { > // We do not want WebKit to handle Control + Wheel, this should be handled by the client application > // to zoom the page. >@@ -475,7 +475,7 @@ static void drawPageBackground(HDC dc, const WebPageProxy* page, const IntRect& > return; > > auto scaledRect = rect; >- scaledRect.scale(page->deviceScaleFactor()); >+ scaledRect.scale(page->intrinsicDeviceScaleFactor()); > RECT viewRect = scaledRect; > ::FillRect(dc, &viewRect, reinterpret_cast<HBRUSH>(COLOR_WINDOW + 1)); > } >@@ -491,8 +491,8 @@ void WebView::paint(HDC hdc, const IntRect& dirtyRect) > Region unpaintedRegion; > #if USE(CAIRO) > cairo_surface_t* surface = cairo_win32_surface_create(hdc); >- auto deviceScaleFactor = m_page->deviceScaleFactor(); >- cairo_surface_set_device_scale(surface, deviceScaleFactor, deviceScaleFactor); >+ auto intrinsicDeviceScaleFactor = m_page->intrinsicDeviceScaleFactor(); >+ cairo_surface_set_device_scale(surface, intrinsicDeviceScaleFactor, intrinsicDeviceScaleFactor); > cairo_t* context = cairo_create(surface); > > drawingArea->paint(context, dirtyRect, unpaintedRegion); >@@ -531,7 +531,7 @@ LRESULT WebView::onPaintEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& han > PAINTSTRUCT paintStruct; > HDC hdc = ::BeginPaint(m_window, &paintStruct); > FloatRect dirtyRect(paintStruct.rcPaint); >- dirtyRect.scale(1 / m_page->deviceScaleFactor()); >+ dirtyRect.scale(1 / m_page->intrinsicDeviceScaleFactor()); > paint(hdc, enclosingIntRect(dirtyRect)); > > ::EndPaint(m_window, &paintStruct); >@@ -554,11 +554,10 @@ LRESULT WebView::onPrintClientEvent(HWND hWnd, UINT, WPARAM wParam, LPARAM, bool > > LRESULT WebView::onSizeEvent(HWND hwnd, UINT, WPARAM, LPARAM lParam, bool& handled) > { >+ float intrinsicDeviceScaleFactor = deviceScaleFactorForWindow(hwnd); > if (m_page) >- m_page->setIntrinsicDeviceScaleFactor(deviceScaleFactorForWindow(hwnd)); >- // If there are no m_page, use intrinsic device scale factor. >- float deviceScaleFactor = m_page ? m_page->deviceScaleFactor() : deviceScaleFactorForWindow(hwnd); >- m_viewSize = expandedIntSize(FloatSize(LOWORD(lParam), HIWORD(lParam)) / deviceScaleFactor); >+ m_page->setIntrinsicDeviceScaleFactor(intrinsicDeviceScaleFactor); >+ m_viewSize = expandedIntSize(FloatSize(LOWORD(lParam), HIWORD(lParam)) / intrinsicDeviceScaleFactor); > > if (m_page && m_page->drawingArea()) { > // FIXME specify correctly layerPosition. >@@ -863,13 +862,13 @@ void WebView::setScrollOffsetOnNextResize(const IntSize& scrollOffset) > { > // The next time we get a WM_SIZE message, scroll by the specified amount in onSizeEvent(). > m_nextResizeScrollOffset = scrollOffset; >- m_nextResizeScrollOffset.scale(1 / m_page->deviceScaleFactor()); >+ m_nextResizeScrollOffset.scale(1 / m_page->intrinsicDeviceScaleFactor()); > } > > void WebView::setViewNeedsDisplay(const WebCore::Region& region) > { > auto rect = region.bounds(); >- rect.scale(m_page->deviceScaleFactor()); >+ rect.scale(m_page->intrinsicDeviceScaleFactor()); > const RECT viewRect(rect); > ::InvalidateRect(m_window, &viewRect, true); > } >diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.h b/Source/WebKit/WebProcess/WebPage/DrawingArea.h >index c641cf97ccc4..d9e012288732 100644 >--- a/Source/WebKit/WebProcess/WebPage/DrawingArea.h >+++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.h >@@ -157,7 +157,8 @@ public: > #endif > > #if USE(GRAPHICS_LAYER_WC) >- virtual void updateGeometryWC(uint64_t, WebCore::IntSize, float deviceScaleFactor) { }; >+ virtual void setIntrinsicDeviceScaleFactor(float) { } >+ virtual void updateGeometryWC(uint64_t, WebCore::IntSize, float deviceScaleFactor, float intrinsicDeviceScaleFactor) { }; > #endif > > #if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER) >diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in b/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in >index 8f7741876952..a0239c744ef1 100644 >--- a/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in >+++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in >@@ -47,7 +47,7 @@ messages -> DrawingArea { > #endif > > #if USE(GRAPHICS_LAYER_WC) >- UpdateGeometryWC(uint64_t backingStoreStateID, WebCore::IntSize viewSize, float deviceScaleFactor) >+ UpdateGeometryWC(uint64_t backingStoreStateID, WebCore::IntSize viewSize, float deviceScaleFactor, float intrinsicDeviceScaleFactor) > #endif > > #if PLATFORM(COCOA) || PLATFORM(GTK) >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 7ea8ed7a7fc8..b17b5387ae03 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -892,6 +892,11 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters) > // to ensure it's created with the right size. > m_page->setDeviceScaleFactor(parameters.deviceScaleFactor); > >+#if USE(GRAPHICS_LAYER_WC) >+ m_drawingArea->setIntrinsicDeviceScaleFactor(parameters.intrinsicDeviceScaleFactor); >+#endif >+ >+ > #if USE(SKIA) > FontRenderOptions::singleton().setUseSubpixelPositioning(parameters.deviceScaleFactor >= 2.); > #endif >diff --git a/Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.cpp b/Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.cpp >index 54db1e6045e3..e78b223a7f96 100644 >--- a/Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.cpp >+++ b/Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.cpp >@@ -140,13 +140,19 @@ void DrawingAreaWC::setLayerTreeStateIsFrozen(bool isFrozen) > } > } > >-void DrawingAreaWC::updateGeometryWC(uint64_t backingStoreStateID, IntSize viewSize, float deviceScaleFactor) >+void DrawingAreaWC::updateGeometryWC(uint64_t backingStoreStateID, IntSize viewSize, float deviceScaleFactor, float intrinsicDeviceScaleFactor) > { >+ m_intrinsicDeviceScaleFactor = intrinsicDeviceScaleFactor; > m_backingStoreStateID = backingStoreStateID; > m_webPage->setDeviceScaleFactor(deviceScaleFactor); > m_webPage->setSize(viewSize); > } > >+void DrawingAreaWC::setIntrinsicDeviceScaleFactor(float intrinsicDeviceScaleFactor) >+{ >+ m_intrinsicDeviceScaleFactor = intrinsicDeviceScaleFactor; >+} >+ > void DrawingAreaWC::setNeedsDisplay() > { > m_dirtyRegion = m_webPage->bounds(); >@@ -272,7 +278,7 @@ void DrawingAreaWC::sendUpdateAC() > else > size = frame->size(); > FloatSize viewport { size }; >- viewport.scale(m_webPage->deviceScaleFactor()); >+ viewport.scale(m_intrinsicDeviceScaleFactor); > m_updateInfo.viewport = WebCore::expandedIntSize(viewport); > updateRootLayerDeviceScaleFactor(rootLayer.layer); > rootLayer.layer->flushCompositingStateForThisLayerOnly(); >@@ -307,9 +313,8 @@ void DrawingAreaWC::sendUpdateAC() > > void DrawingAreaWC::updateRootLayerDeviceScaleFactor(WebCore::GraphicsLayer& layer) > { >- float deviceScaleFactor = m_webPage->deviceScaleFactor(); > TransformationMatrix m; >- m.scale(deviceScaleFactor); >+ m.scale(m_intrinsicDeviceScaleFactor); > layer.setTransform(m); > } > >diff --git a/Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.h b/Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.h >index 9dbc0bd90023..3cd079359b60 100644 >--- a/Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.h >+++ b/Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.h >@@ -64,7 +64,7 @@ private: > #if USE(GRAPHICS_LAYER_TEXTURE_MAPPER) > void updateGeometry(const WebCore::IntSize&, CompletionHandler<void()>&&) override { } > #endif >- void updateGeometryWC(uint64_t, WebCore::IntSize, float deviceScaleFactor) override; >+ void updateGeometryWC(uint64_t, WebCore::IntSize, float deviceScaleFactor, float intrinsicDeviceScaleFactor) override; > void setRootCompositingLayer(WebCore::Frame&, WebCore::GraphicsLayer*) override; > void addRootFrame(WebCore::FrameIdentifier) override; > void attachViewOverlayGraphicsLayer(WebCore::FrameIdentifier, WebCore::GraphicsLayer*) override; >@@ -77,6 +77,8 @@ private: > void commitLayerUpdateInfo(WCLayerUpdateInfo&&) override; > RefPtr<WebCore::ImageBuffer> createImageBuffer(WebCore::FloatSize, float deviceScaleFactor) override; > >+ void setIntrinsicDeviceScaleFactor(float) final; >+ > bool isCompositingMode(); > void updateRendering(); > void sendUpdateAC(); >@@ -97,6 +99,7 @@ private: > WCLayerFactory m_layerFactory; > DoublyLinkedList<GraphicsLayerWC> m_liveGraphicsLayers; > WebCore::Timer m_updateRenderingTimer; >+ float m_intrinsicDeviceScaleFactor { 1 }; > bool m_isRenderingSuspended { false }; > bool m_hasDeferredRenderingUpdate { false }; > bool m_inUpdateRendering { false }; >diff --git a/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp b/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp >index d7331491e7a1..b628eadd1521 100644 >--- a/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp >+++ b/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp >@@ -148,6 +148,10 @@ Ref<BrowserWindow> WebKitBrowserWindow::create(BrowserWindowClient& client, HWND > WKPreferencesSetMediaCapabilitiesEnabled(preferences.get(), false); > WKPreferencesSetDeveloperExtrasEnabled(preferences.get(), true); > >+#if 1 // Don't land this >+ WKPreferencesSetBoolValueForKeyForTesting(preferences.get(), false, createWKString("UseGPUProcessForWebGLEnabled").get()); >+#endif >+ > auto pageConf = adoptWK(WKPageConfigurationCreate()); > WKPageConfigurationSetWebsiteDataStore(pageConf.get(), websiteDataStore.get()); > WKPageConfigurationSetContext(pageConf.get(), context.get()); >@@ -229,13 +233,10 @@ void WebKitBrowserWindow::adjustScaleFactors() > { > WKPageRef page = WKViewGetPage(m_view.get()); > >- float customZoomRatio = WKPageGetPageZoomFactor(page) / m_defaultResetPageZoomFactor; >- float deviceScaleFactor = WebCore::deviceScaleFactorForWindow(hwnd()); >- int roundedDeviceScaleFactor = std::round(deviceScaleFactor); >- m_defaultResetPageZoomFactor = deviceScaleFactor / roundedDeviceScaleFactor; >+ m_defaultResetPageZoomFactor = 1; > >- WKPageSetCustomBackingScaleFactor(page, roundedDeviceScaleFactor); >- WKPageSetPageZoomFactor(page, m_defaultResetPageZoomFactor * customZoomRatio); >+ WKPageSetCustomBackingScaleFactor(page, 2); >+ WKPageSetPageZoomFactor(page, m_defaultResetPageZoomFactor); > } > > HRESULT WebKitBrowserWindow::init()
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 285007
:
473612