Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPF - Update ZoomLevel xml doc re same origin behaviour #2834

Closed
David-Loving opened this issue Jul 10, 2019 · 4 comments
Closed

WPF - Update ZoomLevel xml doc re same origin behaviour #2834

David-Loving opened this issue Jul 10, 2019 · 4 comments

Comments

@David-Loving
Copy link

So working on pages sharing the same sub domain in chrome have the same zoom level.

  • I create 2 ChromiumWebBrowser controls in my WPF application pointing at same website.
  • Change the ZoomLevel in the first control.

Both windows seem to visual zoom to the same level but when you ask the second control what it's ZoomLevel is it reports the original value and not the updated zoom.

@amaitland
Copy link
Member

Please fill out the bug report at https://github.com/cefsharp/CefSharp/blob/master/.github/ISSUE_TEMPLATE/bug_report.md#bug-report

Are both controls visible at the same time?

@David-Loving
Copy link
Author

CefSharp.WPf version 71.0.2
Architecture x64
Windows 10
Using WPF

Steps

  • I create 2 ChromiumWebBrowser controls in my WPF application pointing at same website or websites on the same sub domain, for example http://www.bbc.co.uk and http://www.bbc.co.uk/news.
  • Change the ZoomLevel in the first control.

Out come/error
Both windows content seem to visual zoom to the same level but when you ask the second control what it's ZoomLevel is it reports the original value and not the updated zoom.

Are both controls visible at the same time?
Yes.

@amaitland amaitland changed the title Zoom Level across 2 controls WPF - Update ZoomLevel xml doc re same origin behaviour Jul 11, 2019
@amaitland
Copy link
Member

The XML Doc for ZoomLevel should be updated to reflect that this is the expected behaviour. CEF doesn't provide any sort of notification for zoom change so we have no means of tracking between browser instances when they are all visible. It's not practical to try and track this manually as there are many different factors Chromium Process Model, Request Context, etc that change the behaviour of which browsers share a render process.

For Tabbed browsers we update the zoom level when the browser becomes visible to get around this https://github.com/cefsharp/CefSharp/blob/cefsharp/73/CefSharp.Wpf/ChromiumWebBrowser.cs#L1858

Your options are:

Are both controls visible at the same time?
Yes.

I'd ask that if you open another issue at later date that you provide more detail in your steps to reproduce, ideally a code example that clearly reproduces your problem.

@amaitland amaitland added this to the 75.0.0 milestone Jul 12, 2019
amaitland added a commit that referenced this issue Jul 20, 2019
@amaitland
Copy link
Member

XML Doc has been updated, at the moment that's likely the best we can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants