Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba34779c authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Android (Google) Code Review
Browse files

Merge "Add new LayoutAlgorithm -- TEXT_AUTOSIZING"

parents a43e9b7c 94e0bd3b
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@ public abstract class WebSettings {
     *   <li>SINGLE_COLUMN moves all content into one column that is the width of the
     *       view.</li>
     *   <li>NARROW_COLUMNS makes all columns no wider than the screen if possible.</li>
     *   <li>TEXT_AUTOSIZING boosts font size of paragraphs based on heuristics to make
     *       the text readable when viewing a wide-viewport layout in the overview mode.
     *       It is recommended to enable zoom support {@link #setSupportZoom} when
     *       using this mode.</li>
     * </ul>
     */
    // XXX: These must match LayoutAlgorithm in Settings.h in WebCore.
@@ -47,7 +51,11 @@ public abstract class WebSettings {
         */
        @Deprecated
        SINGLE_COLUMN,
        NARROW_COLUMNS
        NARROW_COLUMNS,
        /**
         * @hide
         */
        TEXT_AUTOSIZING
    }

    /**
+4 −0
Original line number Diff line number Diff line
@@ -816,6 +816,10 @@ public class WebSettingsClassic extends WebSettings {
     */
    @Override
    public synchronized void setLayoutAlgorithm(LayoutAlgorithm l) {
        if (l == LayoutAlgorithm.TEXT_AUTOSIZING) {
            throw new IllegalArgumentException(
                    "WebViewClassic does not support TEXT_AUTOSIZING layout mode");
        }
        // XXX: This will only be affective if libwebcore was built with
        // ANDROID_LAYOUT defined.
        if (mLayoutAlgorithm != l) {