Changeset 166572 in webkit


Ignore:
Timestamp:
Apr 1, 2014 1:34:12 AM (10 years ago)
Author:
eunmi15.lee@samsung.com
Message:

[CoordinatedGraphics] Content scale factor should not be applied to draw contents when fixed layout is not used.
https://bugs.webkit.org/show_bug.cgi?id=130962

Reviewed by Gyuyoung Kim.

Delegating scaling is turned off when fixed layout is not used in the
coordinated graphics, so page scale factor is applied to the contents
directly.
In that case, we should not apply page scale factor to coordinated
graphics to draw contents and calculate visible content rect.

Currently, page scale factor is applied twice to the coordinated
graphics and contents, so result of scaling is abnormal.

  • UIProcess/CoordinatedGraphics/WebView.cpp:

(WebKit::WebView::transformToScene):
(WebKit::WebView::visibleContentsSize):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r166571 r166572  
     12014-04-01  Eunmi Lee  <eunmi15.lee@samsung.com>
     2
     3        [CoordinatedGraphics] Content scale factor should not be applied to draw contents when fixed layout is not used.
     4        https://bugs.webkit.org/show_bug.cgi?id=130962
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Delegating scaling is turned off when fixed layout is not used in the
     9        coordinated graphics, so page scale factor is applied to the contents
     10        directly.
     11        In that case, we should not apply page scale factor to coordinated
     12        graphics to draw contents and calculate visible content rect.
     13
     14        Currently, page scale factor is applied twice to the coordinated
     15        graphics and contents, so result of scaling is abnormal.
     16
     17        * UIProcess/CoordinatedGraphics/WebView.cpp:
     18        (WebKit::WebView::transformToScene):
     19        (WebKit::WebView::visibleContentsSize):
     20
    1212014-04-01  Ryuan Choi  <ryuan.choi@samsung.com>
    222
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp

    r165313 r166572  
    235235{
    236236    FloatPoint position = -m_contentPosition;
    237     float effectiveScale = contentScaleFactor() * m_page->deviceScaleFactor();
     237    float effectiveScale = m_page->deviceScaleFactor();
     238    if (m_page->useFixedLayout())
     239        effectiveScale *= contentScaleFactor();
    238240    position.scale(effectiveScale, effectiveScale);
    239241
     
    275277{
    276278    FloatSize visibleContentsSize(dipSize());
    277     visibleContentsSize.scale(1 / contentScaleFactor());
     279    if (m_page->useFixedLayout())
     280        visibleContentsSize.scale(1 / contentScaleFactor());
    278281
    279282    return visibleContentsSize;
Note: See TracChangeset for help on using the changeset viewer.