Bug 90561

Summary: Text Autosizing: Add test framework and simple test.
Product: WebKit Reporter: John Mellor <johnme>
Component: TextAssignee: John Mellor <johnme>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, kenneth, peter, rakuco, satish, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 84186    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description John Mellor 2012-07-04 09:05:20 PDT
Text Autosizing: Add test framework and simple test.
Comment 1 John Mellor 2012-07-04 09:26:11 PDT
Created attachment 150815 [details]
Patch
Comment 2 John Mellor 2012-07-04 09:27:54 PDT
Please check that I've gotten the TestExpectations and Skipped files right - I think this is right but I may have gotten confused about the dependencies.
Comment 3 Eric Seidel (no email) 2012-07-04 09:32:30 PDT
Comment on attachment 150815 [details]
Patch

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

> Source/WebCore/page/Settings.cpp:143
> +#if HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP
> +    , m_textAutosizingWindowSizeOverride(320, 480)

It's unclear to me why the hack is needed.  I'm not sure what the best practice for turning on mobile-only flags are in Chromium, but presumably about: flags could work.  And then once its on, a <viewport> element would let you test it on your desktop w/o needing this compile time hack, no?

> Source/WebCore/page/Settings.cpp:423
> +void Settings::setTextAutosizingWindowSizeOverride(IntSize textAutosizingWindowSizeOverride)

I think we normally pass IntSize by const reference "const IntSize&", but I'm not sure.
Comment 4 Eric Seidel (no email) 2012-07-04 09:45:18 PDT
Comment on attachment 150815 [details]
Patch

LGTM.  Consider changing the const ref.
Comment 5 John Mellor 2012-07-04 14:57:47 PDT
Created attachment 150847 [details]
Patch

Passes IntSize by const reference.
Comment 6 Kenneth Rohde Christiansen 2012-07-04 19:32:04 PDT
Comment on attachment 150847 [details]
Patch

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

> Source/WebCore/page/Settings.cpp:144
> +#if HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP
> +    , m_textAutosizingWindowSizeOverride(320, 480)
>      , m_textAutosizingEnabled(true)

Is this needed as part of this patch if you call setTextAutosizingWindowSizeOverride anyway?

> Source/WebCore/rendering/TextAutosizer.cpp:-54
> -#ifdef HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP
> -    IntSize windowSize(320, 480);
> -#else

Ah it is because you had the code here before. Fine then
Comment 7 WebKit Review Bot 2012-07-04 19:34:32 PDT
Comment on attachment 150847 [details]
Patch

Rejecting attachment 150847 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
form/qt/TestExpectations
Hunk #1 FAILED at 101.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/platform/qt/TestExpectations.rej
patching file LayoutTests/platform/win/Skipped
Hunk #1 succeeded at 1286 (offset -10 lines).
patching file LayoutTests/platform/wincairo/Skipped
patching file LayoutTests/platform/wk2/Skipped

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Kenneth Ro..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue/

Full output: http://queues.webkit.org/results/13138823
Comment 8 John Mellor 2012-07-05 03:04:24 PDT
Created attachment 150910 [details]
Patch

Rebased TestExpectations
Comment 9 Adam Barth 2012-07-05 07:29:28 PDT
Comment on attachment 150910 [details]
Patch

Forwarding kenneth's R+.

@johnme: In the future, if you're just resolving merge conflicts, you can fill out the reviewer field in the ChangeLog.  I think webkit-patch land-safely will do that for you.
Comment 10 WebKit Review Bot 2012-07-05 08:38:27 PDT
Comment on attachment 150910 [details]
Patch

Clearing flags on attachment: 150910

Committed r121907: <http://trac.webkit.org/changeset/121907>
Comment 11 WebKit Review Bot 2012-07-05 08:38:32 PDT
All reviewed patches have been landed.  Closing bug.