Skip to content
Permalink
Browse files
[Win] WebKit fails to paint the bottom lines of the window at 125% sc…
…ale.

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

Reviewed by Alex Christensen.

The logical frame size is currently calculated by scaling the frame size in pixels,
and rounding the coordinates to the nearest integers. The computed logical frame
size will in some cases be smaller than the scaled frame size in pixels, since it is
represented as an IntSize. In these cases, the bottom line will not be painted.
Instead of calculating the logical frame size by rounding the scaled frame in
pixels, find the enclosing rectangle of the scaled frame rectangle in pixels.

* WebView.cpp:
(WebView::sizeChanged):


Canonical link: https://commits.webkit.org/190180@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
pvollan committed Jun 13, 2017
1 parent 51fe2d5 commit e9dd8fac7f777610e6b93458f8b71566b1b8aafe
Showing 2 changed files with 20 additions and 2 deletions.
@@ -1,3 +1,20 @@
2017-06-13 Per Arne Vollan <pvollan@apple.com>

[Win] WebKit fails to paint the bottom lines of the window at 125% scale.
https://bugs.webkit.org/show_bug.cgi?id=173318

Reviewed by Alex Christensen.

The logical frame size is currently calculated by scaling the frame size in pixels,
and rounding the coordinates to the nearest integers. The computed logical frame
size will in some cases be smaller than the scaled frame size in pixels, since it is
represented as an IntSize. In these cases, the bottom line will not be painted.
Instead of calculating the logical frame size by rounding the scaled frame in
pixels, find the enclosing rectangle of the scaled frame rectangle in pixels.

* WebView.cpp:
(WebView::sizeChanged):

2017-06-13 Sam Weinig <sam@webkit.org>

Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec.
@@ -1038,9 +1038,10 @@ void WebView::sizeChanged(const IntSize& newSize)
deleteBackingStore();

if (Frame* coreFrame = core(topLevelFrame())) {
IntSize logicalSize = newSize;
FloatSize logicalSize = newSize;
logicalSize.scale(1.0f / deviceScaleFactor());
coreFrame->view()->resize(logicalSize);
auto clientRect = enclosingIntRect(FloatRect(FloatPoint(), logicalSize));
coreFrame->view()->resize(clientRect.size());
}

#if USE(CA)

0 comments on commit e9dd8fa

Please sign in to comment.