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

fixed zoom bug #109

Merged
merged 1 commit into from Nov 25, 2015
Merged

fixed zoom bug #109

merged 1 commit into from Nov 25, 2015

Conversation

QingWei-Li
Copy link
Contributor

No description provided.

@cburgmer
Copy link
Owner

Hey, thanks for the change. There's a bit more we need to do though:

After your change, the integration tests are failing for Firefox now. You should be able to reproduce it easily:

Run the following on the command line

$ python -m SimpleHTTPServer

and open http://localhost:8000/test/manualIntegrationTestForWebkit.html in the browser. While Chrome is still looking good, the last three images are broken in Firefox.

Can you provide a simple example to show how the zoom is failing? I'll might be able to help out. Also after we fix the issue, we should provide a test using the failing example to make sure it doesn't fail again in the future.

@QingWei-Li
Copy link
Contributor Author

hey, cburgmer
My issue like is https://jsfiddle.net/cinwell_li/z1kxmrnn/2/
In chrome and FF, the result is different. the box element is 50px 50px size in chrome, is 100px 100px size in firefox.

When element is relative position and set zoom, the issue is happened.

@cburgmer
Copy link
Owner

Thanks, I'll have a more detailed look with a bit more time.

I think the issue with your latest change is that the zoom parameter is tightly coupled to width/height and x/y parameter. The assumption so far has been that the transform happens on the same element.

Those values are calculated in calculateContentSize() in browser.js. Changing the parameter placement might need changing this calculation.

@cburgmer
Copy link
Owner

Hey, I've been thinking a bit about where this issue is coming from. If we truly understood what is going wrong, the fix would probably be fairly simple. However, I currently do not understand why Chrome decides to render the example differently to Firefox. I am hesitant to implement a workaround until we understand if it is either a fault on our side, or a bug in Chrome. For the latter we should raise an issue with Chrome (while we could still add a workaround).

For further debugging, I've simplified your example down to "just" SVG code, so we can reason about the issue without any code in rasterizeHTML.js: http://jsfiddle.net/cburgmer/o7sgq4oe/

Just wanted to let you know that I haven't forgotten about you :)

@QingWei-Li
Copy link
Contributor Author

Hi!
In safari also has the same issue. so I think this is bug in webkit (maybe?).

@cburgmer
Copy link
Owner

Yes, Chrome and Safari are still pretty close in behaviour and issues.

What I'll try to see is wether we can experience a similar behaviour when using non-SVG tags, with the same styling setup.

cburgmer added a commit that referenced this pull request Nov 25, 2015
@cburgmer cburgmer merged commit 86bb994 into cburgmer:master Nov 25, 2015
@cburgmer
Copy link
Owner

Hey, it turns out there was just a minor thing lacking to make Firefox happy with your change.

I still don't understand the issue Chrome/Safari are facing, it might make sense to open a bug report with them.

@cburgmer
Copy link
Owner

Thanks for the fix!

@QingWei-Li QingWei-Li deleted the fixed-zoom branch November 25, 2015 13:52
@QingWei-Li
Copy link
Contributor Author

:-P

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

Successfully merging this pull request may close these issues.

None yet

2 participants