[Webkit-unassigned] [Bug 84306] [Qt][WK2] Fixed layers are shaking when zoom level is not 1.0 due to a rounding error.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 26 12:19:28 PDT 2012


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





--- Comment #6 from Kenneth Rohde Christiansen <kenneth at webkit.org>  2012-04-26 12:19:28 PST ---
(From update of attachment 139036)
View in context: https://bugs.webkit.org/attachment.cgi?id=139036&action=review

> Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp:108
> +void WebLayerTreeRenderer::paintToCurrentGLContext(const TransformationMatrix& transformationMatrix, float opacity, const FloatRect& clipRect, TextureMapper::PaintFlags PaintFlags)
>  {
> +    TransformationMatrix matrix = transformationMatrix;

Why not keep matrix and name the new one newMatrix or so, that would follow the style elsewehre

> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:551
> +    // We cannot use toAlignedRect() because it produces inconsistent width and height.

QRectF::toAlignedRect() to be more precise

// We avoid using QRectF::toAlignedRect() as it produces incon...

> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:556
> +    result.setWidth(floor(result.width()));
> +    result.setHeight(floor(result.height()));
> +    result.moveLeft(floor(result.x()));
> +    result.moveTop(floor(result.y()));
> +    return result;

So now it is basically a QRect? What is the advantage of returning a QRectF which is basically a QRect and then later (look below) converting it to a IntRect?

> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:601
> +    webPageProxy->drawingArea()->setVisibleContentsRect(IntRect(IntPoint(), IntSize(viewportSize.width(), viewportSize.height())), 1, FloatPoint());

Maybe it would be nicer to create an IntRect and call setWidth etc... or maybe there is a better ctor.

> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:788
> +    const QRectF visibleRect(visibleContentsRect());

What is the point in converting this to QRectF and then later converting it to IntRect, I assume it is already a FloatRect

> Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h:127
> +    QRectF visibleContentsRect() const;

Ah, it is not.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list