Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Qt][WK2] ASSERT(m_rawAttributes.initialScale > 0) in QtViewportHandl…
…er::initialRect()

https://bugs.webkit.org/show_bug.cgi?id=89026

Reviewed by Csaba Osztrogonác.

Only act on viewport attribute changes if the layout size is valid.

* UIProcess/qt/QtViewportHandler.cpp:
(WebKit::QtViewportHandler::setInitialScaleIfNeeded):
(WebKit::QtViewportHandler::viewportAttributesChanged):

Canonical link: https://commits.webkit.org/106853@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
bbandix committed Jun 13, 2012
1 parent 8946ded commit f54e6c9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,16 @@
2012-06-13 Andras Becsi <andras.becsi@nokia.com>

[Qt][WK2] ASSERT(m_rawAttributes.initialScale > 0) in QtViewportHandler::initialRect()
https://bugs.webkit.org/show_bug.cgi?id=89026

Reviewed by Csaba Osztrogonác.

Only act on viewport attribute changes if the layout size is valid.

* UIProcess/qt/QtViewportHandler.cpp:
(WebKit::QtViewportHandler::setInitialScaleIfNeeded):
(WebKit::QtViewportHandler::viewportAttributesChanged):

2012-06-13 Brent Fulgham <bfulgham@webkit.org>

[WinCairo] Build fix after Windows export definition file change.
Expand Down
5 changes: 4 additions & 1 deletion Source/WebKit2/UIProcess/qt/QtViewportHandler.cpp
Expand Up @@ -202,7 +202,7 @@ qreal QtViewportHandler::outerBoundedCSSScale(qreal cssScale) const

void QtViewportHandler::setInitialScaleIfNeeded()
{
if (m_rawAttributes.initialScale < 0)
if (m_rawAttributes.layoutSize.isEmpty() || m_rawAttributes.initialScale < 0)
return;

m_zoomOutScale = 0.0;
Expand All @@ -219,6 +219,9 @@ void QtViewportHandler::setInitialScaleIfNeeded()

void QtViewportHandler::viewportAttributesChanged(const WebCore::ViewportAttributes& newAttributes)
{
if (newAttributes.layoutSize.isEmpty())
return;

m_rawAttributes = newAttributes;
WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(m_rawAttributes);

Expand Down

0 comments on commit f54e6c9

Please sign in to comment.