[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkdelibs/KDE/4=2E6=5D_khtml/rendering=3A_Align_fixed?=
From:       Allan Sandfeld Jensen <kde () carewolf ! com>
Date:       2011-03-31 22:16:35
Message-ID: 20110331221635.E6A63A609B () git ! kde ! org
[Download RAW message or body]

Git commit cf6cf2284603e8256dbdf6612ebe9ab98df28a87 by Allan Sandfeld Jensen.
Committed on 28/03/2011 at 17:22.
Pushed by carewolf into branch 'KDE/4.6'.

Align fixed background when printing

Fixes the problem with background images with attachment 'fixed',
which was unaligned after page 1 when printed.

M  +3    -0    khtml/rendering/render_box.cpp     

http://commits.kde.org/kdelibs/cf6cf2284603e8256dbdf6612ebe9ab98df28a87

diff --git a/khtml/rendering/render_box.cpp b/khtml/rendering/render_box.cpp
index fedd87f..b6d63d6 100644
--- a/khtml/rendering/render_box.cpp
+++ b/khtml/rendering/render_box.cpp
@@ -724,6 +724,9 @@ void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const Back
             sx+=b.x()-fix.x();
             sy+=b.y()-fix.y();
             cx=b.x();cy=b.y();cw=b.width();ch=b.height();
+
+	    if (canvas()->pagedMode() && scaledImageHeight > 0)
+		sy = (sy - viewRect().y()) % scaledImageHeight;
         }
         // restrict painting to repaint-clip
         if (cy < clipr.y()) {

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic