Source/WebCore:
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jul 2015 19:30:02 +0000 (19:30 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jul 2015 19:30:02 +0000 (19:30 +0000)
commit3e09398631df12fe3331250835bf8972dada7ace
treec1519226edb5a3c8e6add167dbce014b50bfff7c
parent5ee368305889b926477183269a862187600b23ec
Source/WebCore:
[Win] Implement High DPI support features
https://bugs.webkit.org/show_bug.cgi?id=146335
<rdar://problem/21558269>

Reviewed by Alex Christensen.

* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(WebCore::PlatformCALayerWinInternal::drawTile): Don't translate the CGContext to the position
of the CACFLayerRef; the underlying context is already in the right position.
* platform/win/PlatformMouseEventWin.cpp: Update class to adjust mouse
event coordinates based on scaling factor.
(WebCore::deviceScaleFactor):
(WebCore::positionForEvent):
* platform/win/ScrollbarThemeWin.cpp:
(WebCore::scrollbarThicknessInPixels):
(WebCore::ScrollbarThemeWin::scrollbarThickness):
(WebCore::ScrollbarThemeWin::themeChanged):
* platform/win/WheelEventWin.cpp: Update class to adjust wheel event
coordinates based on scaling factor.
(WebCore::deviceScaleFactor):
(WebCore::positionForEvent):
(WebCore::globalPositionForEvent):
(WebCore::PlatformWheelEvent::PlatformWheelEvent):

Source/WebKit/win:
[Win] Implement High DPI support features
https://bugs.webkit.org/show_bug.cgi?id=146335
<rdar://problem/21558269>

Reviewed by Alex Christensen.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::transitionToCommittedForNewPage): Size
page for current device scale factor.
* WebFrame.cpp:
(WebFrame::paintDocumentRectToContext): Account for device scale factor.
(WebFrame::paintScrollViewRectToContextAtPoint): Ditto.
* WebView.cpp:
(WebView::repaint): Adjust paint rect for device scale factor.
(WebView::scrollBackingStore): Adjust coordinates for scale factor.
(WebView::sizeChanged): Ditto.
(WebView::updateBackingStore): Ditto.
(WebView::paint): Ditto.
(WebView::paintIntoBackingStore): Ditto.
(WebView::handleContextMenuEvent): Ditto.
(WebView::gestureNotify): Ditto.
(WebView::gesture): Ditto.
(WebView::initializeToolTipWindow): Adjust max tool tip width
for device scale factor.
(WebView::selectionRect): Adjust coordinates for scale factor.
(WebView::elementAtPoint): Ditto.
(WebView::scrollOffset): Ditto.
(WebView::scrollBy): Ditto.
(WebView::visibleContentRect): Ditto.
(WebView::paintContents): Ditto.
* WebView.h:

Tools:
[Win] Implement proper High DPI support features
https://bugs.webkit.org/show_bug.cgi?id=146335
<rdar://problem/21558269>

Reviewed by Alex Christensen.

Update WinLauncher to take device scaling factor into account.

* WinLauncher/Common.cpp:
(resizeSubViews): Make sure toolbars and URL bar are properly sized and using
a valid font.
(computeFullDesktopFrame): Handle high DPI desktops.
(WndProc): Make comments more precise.
* WinLauncher/WinLauncher.cpp:
(WinLauncher::init): Determine device scale factor at launch.
(WinLauncher::updateDeviceScaleFactor): Added.
* WinLauncher/WinLauncher.h:
* WinLauncher/WinLauncherWebHost.h: Use C++11 initialization.
* WinLauncher/WinMain.cpp: Size interface based on scaling factor.
(wWinMain): Ditto.
* win/DLLLauncher/DLLLauncherMain.cpp:
(wWinMain): Tell Windows we understand high DPI.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp
Source/WebCore/platform/win/GDIUtilities.cpp [new file with mode: 0644]
Source/WebCore/platform/win/GDIUtilities.h [new file with mode: 0644]
Source/WebCore/platform/win/PlatformMouseEventWin.cpp
Source/WebCore/platform/win/ScrollbarThemeWin.cpp
Source/WebCore/platform/win/WheelEventWin.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/win/WebFrame.cpp
Source/WebKit/win/WebPreferences.cpp
Source/WebKit/win/WebView.cpp
Source/WebKit/win/WebView.h
Tools/ChangeLog
Tools/WinLauncher/Common.cpp
Tools/WinLauncher/WinLauncher.cpp
Tools/WinLauncher/WinLauncher.h
Tools/WinLauncher/WinLauncherWebHost.h
Tools/WinLauncher/WinMain.cpp
Tools/win/DLLLauncher/DLLLauncherMain.cpp