Bug 133110 - [WK2] Fixed layout size of UIProcess isn't sync with WebProcess while viewport meta tag is changed.
Summary: [WK2] Fixed layout size of UIProcess isn't sync with WebProcess while viewpor...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-20 00:41 PDT by Gyuyoung Kim
Modified: 2014-05-20 00:42 PDT (History)
0 users

See Also:


Attachments
WIP (1.43 KB, patch)
2014-05-20 00:42 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2014-05-20 00:41:29 PDT
When viewport attribute is updated, WebPage::sendViewportAttributesChanged() changes fixed layout size of WebCore(ScrollView). However, it doesn't update fixed layout size with new fixed layout size for UIProcess. It can cause that UIProcess API (e.g. WKPageSetFixedLayoutSize()) can't change fixed layout size because WebPageProxy::m_fixedLayoutSize wasn't updated.

    void WebPage::sendViewportAttributesChanged()
    {
       ...
       // This also takes care of the relayout.
       setFixedLayoutSize(roundedIntSize(attr.layoutSize));
       ...
    }

    void WebPage::setFixedLayoutSize(const IntSize& size)
    {
        FrameView* view = mainFrameView();
        ...
        view->setFixedLayoutSize(size); => Change WebCore's fixed layout size !
        ...
    }



If WebPageProxy::m_fixedLayoutSize wasn't updated, WKPageSetFixedLayoutSize() can't update fixed layout size for WebCore.

    void WebPageProxy::setFixedLayoutSize(const IntSize& size)
    {
        ...
        if (size == m_fixedLayoutSize)
            return;

        m_fixedLayoutSize = size;
        m_process->send(Messages::WebPage::SetFixedLayoutSize(size), m_pageID);
    }
Comment 1 Gyuyoung Kim 2014-05-20 00:42:52 PDT
Created attachment 231756 [details]
WIP