Bug 132893 - REGRESSION(WK2): Many pages have very wrong text size after rotating
Summary: REGRESSION(WK2): Many pages have very wrong text size after rotating
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-05-13 17:23 PDT by Enrica Casucci
Modified: 2014-05-14 11:03 PDT (History)
0 users

See Also:


Attachments
Patch (3.81 KB, patch)
2014-05-13 17:27 PDT, Enrica Casucci
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2014-05-13 17:23:01 PDT
Text autosizing seems to break most pages on rotation.

<rdar://problem/16806958>
Comment 1 Enrica Casucci 2014-05-13 17:27:32 PDT
Created attachment 231423 [details]
Patch
Comment 2 Benjamin Poulain 2014-05-13 17:30:40 PDT
Comment on attachment 231423 [details]
Patch

lgtm
Comment 3 Darin Adler 2014-05-13 22:43:13 PDT
Comment on attachment 231423 [details]
Patch

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

Sure would be nice to have some kind of bottleneck function rather than having a width check in three different places.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1910
> +    for (Frame* frame = &m_page->mainFrame(); frame; frame = frame->tree().traverseNext(&m_page->mainFrame())) {

This should just call traverseNext() with no arguments. There’s no reason to pass the main frame explicitly since there are no additional frames outside the main frame.
Comment 4 Enrica Casucci 2014-05-14 10:58:44 PDT
Thanks for the feedback.
I've removed the parameter to traverseNext and changed resetTextAutosizingBeforeLayout to resetTextAutosizingBeforeLayoutIfNeeded which takes p;d and new size.
This way the width check is inside the new method.
Comment 5 Enrica Casucci 2014-05-14 11:03:38 PDT
Committed revision 168848.