// On WebProcess, JS runs before visible content rect is updated by UIProcess
// In this case, JS returns incorrect inner size value because scale factor is not updated yet
// So, we update fixed visible content rect at here.
- // Fixed visible content rect should be updated for new page only
- // mainFrameView()->didFirstLayout() checks it's new page or not
- // ref 1. https://bugs.webkit.org/show_bug.cgi?id=105627
- // ref 2. https://bugs.webkit.org/show_bug.cgi?id=103737
- if (!mainFrameView()->didFirstLayout()) {
- FloatSize contentFixedSize = m_viewportSize;
- contentFixedSize.scale(1 / (attr.initialScale * attr.devicePixelRatio));
- mainFrameView()->setFixedVisibleContentRect(IntRect(mainFrameView()->scrollPosition(), roundedIntSize(contentFixedSize)));
- }
+ // FIXME: scale factor needs to be calculated and set fixed visible content rect
+ FloatSize contentFixedSize = m_viewportSize;
+ contentFixedSize.scale(1 / (attr.initialScale * attr.devicePixelRatio));
+ mainFrameView()->setFixedVisibleContentRect(IntRect(mainFrameView()->scrollPosition(), roundedIntSize(contentFixedSize)));
// If viewport meta tag is not defined or initial scale factor is not defined,
// initial scale factor can be defined by "Default View" setting of UIProcess.