Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Issue 12045023: Merge 140035 (Closed)

Created:
7 years, 11 months ago by Peter Beverloo
Modified:
7 years, 11 months ago
Reviewers:
commit-queue
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Visibility:
Public.

Description

Merge 140035 As approved in http://crbug.com/167028 > [chromium] Double-tap zoom should take into account accessibility fontScaleFactor > https://bugs.webkit.org/show_bug.cgi?id=107123 > > Patch by John Mellor <johnme@chromium.org>; on 2013-01-17 > Reviewed by Adam Barth. > > Platforms which support Text Autosizing (currently just Chrome for > Android) may provide a textAutosizingFontScaleFactor (defaults to 1.0). > > This value is intended to be chosen by the user to indicate how large > they want text to appear, for example Chrome for Android has a "Text > scaling" slider in Settings > Accessibility that lets you choose a value > in the range 50% - 200% (defaults to 100%*). > > For text in wide columns that typically gets autosized, this value is > applied by multiplying the textAutosizingMultiplier computed for each > cluster by the textAutosizingFontScaleFactor. Double-tap zoom will fit > the column to the screen (ignoring the textAutosizingFontScaleFactor) > since the column is wide. This part already works. > > For text in narrow columns that doesn't get autosized, the > textAutosizingFontScaleFactor is not applied through Text Autosizing, > and instead needs to be applied by adjusting the double-tap zoom level. > When double-tapping on narrow columns, instead of fitting the column to > the screen (which would often zoom in excessively far), the existing > logic in computeScaleAndScrollForHitRect applies a maximum zoom level > called the legibleScale. This value needs to be multiplied by the > textAutosizingFontScaleFactor, so that we zoom in proportionately > further on non-autosized narrow columns, hence the effective text size > (taking into account zoom) will have increased in proportion to the > textAutosizingFontScaleFactor as expected. > > * src/WebViewImpl.cpp: > (WebKit::WebViewImpl::computeScaleAndScrollForHitRect): > Multiplies legibleScale (the maximum zoom level) by the > textAutosizingFontScaleFactor. > * tests/WebFrameTest.cpp: > Added WebFrameTest.DivAutoZoomScaleFontScaleFactorTest based on > WebFrameTest.DivAutoZoomScaleBoundsTest to test the interaction > between textAutosizingFontScaleFactor and the double-tap zoom logic. > Also did minor cleanup to WebFrameTest.DivAutoZoomScaleBoundsTest. TBR=commit-queue@webkit.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=140432

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -2 lines) Patch
M Source/WebKit/chromium/src/WebViewImpl.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/WebKit/chromium/tests/WebFrameTest.cpp View 5 chunks +80 lines, -2 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Peter Beverloo
7 years, 11 months ago (2013-01-22 17:22:01 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698