[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/khtml/rendering
From: Allan Sandfeld Jensen <kde () carewolf ! com>
Date: 2006-10-14 15:17:10
Message-ID: 1160839030.775782.7709.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 595508 by carewolf:
Add sanity to fixed background painting as well.
BUG: 87336
M +10 -8 render_box.cpp
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_box.cpp #595507:595508
@@ -568,24 +568,26 @@
calculateBackgroundSize(bgLayer, scaledImageWidth, scaledImageHeight);
EBackgroundRepeat bgr = bgLayer->backgroundRepeat();
- if( (bgr == NO_REPEAT || bgr == REPEAT_Y) && pw > scaledImageWidth ) {
- cw = scaledImageWidth;
- cx = vr.x() + bgLayer->backgroundXPosition().minWidth(pw - \
scaledImageWidth); + int xPosition = \
bgLayer->backgroundXPosition().minWidth(pw-scaledImageWidth); + if (bgr == \
NO_REPEAT || bgr == REPEAT_Y) { + cw = kMin(scaledImageWidth, pw - \
xPosition); + cx = vr.x() + xPosition;
} else {
cw = pw;
cx = vr.x();
if (scaledImageWidth > 0)
- sx = scaledImageWidth - \
bgLayer->backgroundXPosition().minWidth(pw - scaledImageWidth) % scaledImageWidth; + \
sx = scaledImageWidth - xPosition % scaledImageWidth; }
- if( (bgr == NO_REPEAT || bgr == REPEAT_X) && ph > scaledImageHeight ) {
- ch = scaledImageHeight;
- cy = vr.y() + bgLayer->backgroundYPosition().minWidth(ph - \
scaledImageHeight); + int yPosition = \
bgLayer->backgroundYPosition().minWidth(ph-scaledImageHeight); + if (bgr \
== NO_REPEAT || bgr == REPEAT_X) { + ch = kMin(scaledImageHeight, ph - \
yPosition); + cy = vr.y() + yPosition;
} else {
ch = ph;
cy = vr.y();
if (scaledImageHeight > 0)
- sy = scaledImageHeight - \
bgLayer->backgroundYPosition().minWidth(ph - scaledImageHeight) % scaledImageHeight; \
+ sy = scaledImageHeight - yPosition % scaledImageHeight; }
QRect fix(cx, cy, cw, ch);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic