Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[Chromium] Correct zoom for focused node when using compositor scaling
https://bugs.webkit.org/show_bug.cgi?id=107599 Reviewed by Adam Barth. When applyDeviceScaleFactorInCompositor, targetScale should exclude device scale factor. When applyPageScaleFactorInCompositor, caret size and content sizes are in css pixels and they should be in the viewport of the new scale. * src/WebViewImpl.cpp: (WebKit::WebViewImpl::scrollFocusedNodeIntoRect): (WebKit): (WebKit::WebViewImpl::computeScaleAndScrollForFocusedNode): Extracted from scrollFocusedNodeIntoRect() to ease testing. * src/WebViewImpl.h: (WebViewImpl): * tests/WebFrameTest.cpp: Updated test DivScrollEditableTest * tests/data/get_scale_for_zoom_into_editable_test.html: Moved the logic of onload script (which seems not to work) into WebFrameTest.cpp. Canonical link: https://commits.webkit.org/126444@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
100 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
<html> | ||
<head> | ||
<script> | ||
function getfocus() | ||
{ | ||
var textfield = document.getElementById('EditBoxWithText'); | ||
textfield.focus(); | ||
textfield.setSelectionRange(textfield.value.length,textfield.value.length); | ||
} | ||
</script> | ||
</head> | ||
<body onload="getfocus()"> | ||
<input id="EditBoxWithText" style=" position: absolute; left: 200px; top: 200px; width: 250; height:20" value = "Long text to fill the edit box" type="text"> | ||
<input id="EditBoxWithNoText" style=" position: absolute; left: 200px; top: 250px; width: 250; height:20" type="text"> | ||
<body> | ||
<input id="EditBoxWithText" style=" position: absolute; left: 200px; top: 200px; width: 250px; height:20" value = "Long long long long text to fill the edit box" type="text"> | ||
<input id="EditBoxWithNoText" style=" position: absolute; left: 200px; top: 250px; width: 250px; height:20" type="text"> | ||
</body> | ||
</html> |