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

List:       kde-bugs-dist
Subject:    [Bug 169608] Background-attachment: scroll should scroll within the
From:       Germain Garand <germain () ebooksfrance ! org>
Date:       2008-09-01 0:07:35
Message-ID: 20080901000735.A4B5312DE9 () immanuel ! kde ! org
[Download RAW message or body]

http://bugs.kde.org/show_bug.cgi?id=169608


Germain Garand germain ebooksfrance org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |germain@ebooksfrance.org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED




--- Comment #3 from Germain Garand <germain ebooksfrance org>  2008-09-01 02:07:34 ---
SVN commit 855521 by ggarand:

Consider the real root background box when computing some background
properties - not the one that is extended on the whole canvas.

Patch based on work by Anatoli Papirovski <apapirovski mac dot com>

BUG: 169608


 M  +15 -2     render_box.cpp  


--- trunk/KDE/kdelibs/khtml/rendering/render_box.cpp #855520:855521
@@ -575,8 +575,21 @@
                 }
             }

-            int pw = w - hpab;
-            int ph = h - vpab;
+            int pw, ph;
+            if (isRoot()) {
+                // the root's background box 'spills out' to cover the whole
canvas, so we have to
+                // go back to its true edge for the purpose of computing
background-size
+                // and honouring background-origin
+                pw = width() - hpab;
+                ph = height() - vpab; 
+                left += marginLeft();
+                hpab += marginLeft() + marginRight();
+                vpab += marginTop() + marginBottom();
+                top += marginTop();
+            } else {
+                pw = w - hpab;
+                ph = h - vpab;
+            }
             scaledImageWidth = pw;
             scaledImageHeight = ph;
             calculateBackgroundSize(bgLayer, scaledImageWidth,
scaledImageHeight);


-- 
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

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