Changeset 130866 in webkit


Ignore:
Timestamp:
Oct 10, 2012 12:23:25 AM (12 years ago)
Author:
aelias@chromium.org
Message:

Text Autosizing: Counteract funky window sizing on Android.
https://bugs.webkit.org/show_bug.cgi?id=98809

Reviewed by Adam Barth.

In Chrome for Android, the window sizes provided to WebCore are
currently in physical screen pixels instead of
device-scale-adjusted units. For example window width on a
Galaxy Nexus is 720 instead of 360. Text autosizing expects
device-independent pixels. When Chrome for Android cuts over to
the new coordinate space, it will be tied to the setting
applyPageScaleFactorInCompositor.

No new tests.

  • rendering/TextAutosizer.cpp:

(WebCore::TextAutosizer::processSubtree):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r130855 r130866  
     12012-10-10  Alexandre Elias  <aelias@chromium.org>
     2
     3        Text Autosizing: Counteract funky window sizing on Android.
     4        https://bugs.webkit.org/show_bug.cgi?id=98809
     5
     6        Reviewed by Adam Barth.
     7
     8        In Chrome for Android, the window sizes provided to WebCore are
     9        currently in physical screen pixels instead of
     10        device-scale-adjusted units. For example window width on a
     11        Galaxy Nexus is 720 instead of 360.  Text autosizing expects
     12        device-independent pixels.  When Chrome for Android cuts over to
     13        the new coordinate space, it will be tied to the setting
     14        applyPageScaleFactorInCompositor.
     15
     16        No new tests.
     17
     18        * rendering/TextAutosizer.cpp:
     19        (WebCore::TextAutosizer::processSubtree):
     20
    1212012-10-09  Philip Rogers  <pdr@google.com>
    222
  • trunk/Source/WebCore/rendering/TextAutosizer.cpp

    r129195 r130866  
    6565    if (windowInfo.windowSize.isEmpty()) {
    6666        bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenWidthOverride(mainFrame);
    67         windowInfo.windowSize = mainFrame->view()->visibleContentRect(includeScrollbars).size(); // FIXME: Check that this is always in logical (density-independent) pixels (see wkbug.com/87440).
     67        windowInfo.windowSize = mainFrame->view()->visibleContentRect(includeScrollbars).size();
     68        if (!m_document->settings()->applyPageScaleFactorInCompositor())
     69            windowInfo.windowSize.scale(1 / m_document->page()->deviceScaleFactor());
    6870    }
    6971
Note: See TracChangeset for help on using the changeset viewer.