Changeset 159864 in webkit


Ignore:
Timestamp:
Nov 28, 2013 11:51:24 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[CoordinatedGraphics][WK2] Correct wrong usage of m_contentPosition variable in the WebView.
https://bugs.webkit.org/show_bug.cgi?id=118548

Patch by Eunmi Lee <eunmi15.lee@samsung.com> on 2013-11-28
Reviewed by Noam Rosenthal.

CoordinatedGraphics uses its own scaling logic - contents scaling - and
WebView of CoordinatedGraphics maintains contents position by scaling
with contents scaling factor.
However transformToScene() and updateViewportSize() of WebView regard
the contents position as a non-scaled value, so it should be fixed.

  • UIProcess/CoordinatedGraphics/WebView.cpp:

(WebKit::WebView::transformToScene):
(WebKit::WebView::updateViewportSize):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r159863 r159864  
     12013-11-28  Eunmi Lee  <eunmi15.lee@samsung.com>
     2
     3        [CoordinatedGraphics][WK2] Correct wrong usage of m_contentPosition variable in the WebView.
     4        https://bugs.webkit.org/show_bug.cgi?id=118548
     5
     6        Reviewed by Noam Rosenthal.
     7
     8        CoordinatedGraphics uses its own scaling logic - contents scaling - and
     9        WebView of CoordinatedGraphics maintains contents position by scaling
     10        with contents scaling factor.
     11        However transformToScene() and updateViewportSize() of WebView regard
     12        the contents position as a non-scaled value, so it should be fixed.
     13
     14        * UIProcess/CoordinatedGraphics/WebView.cpp:
     15        (WebKit::WebView::transformToScene):
     16        (WebKit::WebView::updateViewportSize):
     17
    1182013-11-28  Ryuan Choi  <ryuan.choi@samsung.com>
    219
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp

    r159861 r159864  
    237237    FloatPoint position = -m_contentPosition;
    238238    float effectiveScale = m_contentScaleFactor * m_page->deviceScaleFactor();
    239     position.scale(effectiveScale, effectiveScale);
     239    position.scale(m_page->deviceScaleFactor(), m_page->deviceScaleFactor());
    240240
    241241    TransformationMatrix transform = m_userViewportTransform;
     
    259259        // Web Process expects sizes in UI units, and not raw device units.
    260260        drawingArea->setSize(roundedIntSize(dipSize()), IntSize(), IntSize());
    261         FloatRect visibleContentsRect(contentPosition(), visibleContentsSize());
     261        FloatPoint position = contentPosition();
     262        position.scale(1 / m_contentScaleFactor, 1 / m_contentScaleFactor);
     263        FloatRect visibleContentsRect(position, visibleContentsSize());
    262264        visibleContentsRect.intersect(FloatRect(FloatPoint(), contentsSize()));
    263265        drawingArea->setVisibleContentsRect(visibleContentsRect, FloatPoint());
Note: See TracChangeset for help on using the changeset viewer.