Bug 145225

Summary: [iOS] Using CSS viewport units causes incorrect layout
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: WebKit2Assignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, darin, sam, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 146090    
Attachments:
Description Flags
Test case
none
Patch benjamin: review+, benjamin: commit-queue-

Enrica Casucci
Reported 2015-05-20 15:20:27 PDT
Created attachment 253465 [details] Test case Run the attached test case on Safari on iPad. You'll see the text is very small because the initial scale is computed incorrectly. rdar://problem/20924495
Attachments
Test case (2.81 KB, text/html)
2015-05-20 15:20 PDT, Enrica Casucci
no flags
Patch (5.36 KB, patch)
2015-05-20 15:25 PDT, Enrica Casucci
benjamin: review+
benjamin: commit-queue-
Enrica Casucci
Comment 1 2015-05-20 15:25:51 PDT
Darin Adler
Comment 2 2015-05-20 16:14:28 PDT
I’d love to help by reviewing this, but seems like Ben or Tim should review.
Benjamin Poulain
Comment 3 2015-05-20 17:17:10 PDT
Comment on attachment 253467 [details] Patch I cannot think of a case where that would break something...but it seems wrong to use shouldIgnoreScalingConstraints() in the case initialScaleIgnoringContentSize(). That means the end results will depend on the shouldIgnoreScalingConstraints() heuristic, which seems wrong. You should pass shouldIgnoreScalingConstraints() as an argument to initialScaleFromSize() to make sure it is fully independent from the content size.
Enrica Casucci
Comment 4 2015-05-20 17:38:58 PDT
I want to implement what Ben suggested.
Enrica Casucci
Comment 5 2015-05-20 17:52:51 PDT
Committed revision 184681.
Note You need to log in before you can comment on or make changes to this bug.