Bug 156949 - [Win] Zoom page when Ctrl +/- is pressed.
Summary: [Win] Zoom page when Ctrl +/- is pressed.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-23 01:02 PDT by peavo
Modified: 2016-04-23 22:39 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.56 KB, patch)
2016-04-23 01:06 PDT, peavo
dbates: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peavo 2016-04-23 01:02:30 PDT
On Windows, the page is not zoomed if the WebView window has focus, and Ctrl +/- is pressed.
Comment 1 peavo 2016-04-23 01:06:19 PDT
Created attachment 277142 [details]
Patch
Comment 2 Daniel Bates 2016-04-23 11:18:12 PDT
Comment on attachment 277142 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=277142&action=review

> Source/WebKit/win/ChangeLog:8
> +        On Windows, the page is not zoomed if the WebView window has focus, and Ctrl +/- is pressed.

Shouldn't the embedding client control zooming? I mean, a non-browser app may embed a WebView and not want to allow zooming of its content.

> Source/WebKit/win/WebView.cpp:2232
> +        return SUCCEEDED(zoomIn(false));

Shouldn't we be passing m_zoomsTextOnly instead of false here to account for whether text-only zooming is enabled?

> Source/WebKit/win/WebView.cpp:2235
> +        return SUCCEEDED(zoomOut(false));

Ditto.
Comment 3 peavo 2016-04-23 14:03:47 PDT
(In reply to comment #2)
> Comment on attachment 277142 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=277142&action=review
>

Thanks for reviewing!
 
> > Source/WebKit/win/ChangeLog:8
> > +        On Windows, the page is not zoomed if the WebView window has focus, and Ctrl +/- is pressed.
> 
> Shouldn't the embedding client control zooming? I mean, a non-browser app
> may embed a WebView and not want to allow zooming of its content.
> 

Yes, this is a good point. Clients can for example do this by subclassing the WebView window procedure, if we don't implement some other way of notifying the client.
Comment 4 Daniel Bates 2016-04-23 22:39:35 PDT
Comment on attachment 277142 [details]
Patch

I'm r-'ing this patch because the embedding client should control zooming, including taking responsibility to expose such zoom functionality to the user. The embedding client should direct WebKit when the content should be zoomed in or out as well as whether such zooming should be text-only.