[webkit-changes] cvs commit: WebCore/khtml/xml dom_nodeimpl.cpp
Adele
adele at opensource.apple.com
Wed Nov 16 16:32:33 PST 2005
adele 05/11/16 16:32:33
Modified: . ChangeLog
khtml/rendering render_layer.cpp
khtml/xml dom_nodeimpl.cpp
Log:
Reviewed by Dave Harrson.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5759
<rdar://problem/4346132> REGRESSION (10.4.3-10.4.4): horizontal link scrolling broken at aplacecalledcommon.co.uk (5759)
* khtml/rendering/render_layer.cpp: (khtml::RenderLayer::getRectToExpose): If the rect is larger than the visible rect, and we're trying to align to the closest edge, align to the left edge.
* khtml/xml/dom_nodeimpl.cpp: (DOM::ContainerNodeImpl::getRect): If width or height is negative, we were setting both to zero.
Now we only set the negative value to zero without affecting the other value.
Revision Changes Path
1.373 +11 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.372
retrieving revision 1.373
diff -u -r1.372 -r1.373
--- ChangeLog 16 Nov 2005 09:43:08 -0000 1.372
+++ ChangeLog 17 Nov 2005 00:32:27 -0000 1.373
@@ -1,3 +1,14 @@
+2005-11-16 Adele Peterson <adele at apple.com>
+
+ Reviewed by Dave Harrson.
+
+ - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5759
+ <rdar://problem/4346132> REGRESSION (10.4.3-10.4.4): horizontal link scrolling broken at aplacecalledcommon.co.uk (5759)
+
+ * khtml/rendering/render_layer.cpp: (khtml::RenderLayer::getRectToExpose): If the rect is larger than the visible rect, and we're trying to align to the closest edge, align to the left edge.
+ * khtml/xml/dom_nodeimpl.cpp: (DOM::ContainerNodeImpl::getRect): If width or height is negative, we were setting both to zero.
+ Now we only set the negative value to zero without affecting the other value.
+
2005-11-14 Anders Carlsson <andersca at mac.com>
Reviewed by Eric.
1.124 +4 -4 WebCore/khtml/rendering/render_layer.cpp
Index: render_layer.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_layer.cpp,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- render_layer.cpp 9 Nov 2005 23:05:09 -0000 1.123
+++ render_layer.cpp 17 Nov 2005 00:32:31 -0000 1.124
@@ -631,8 +631,8 @@
if (scrollX == noScroll)
x = visibleRect.x();
- // If we're trying to align to the closest edge, and the exposeRect is further right than the visibleRect, then alignRight.
- else if ((scrollX == alignRight) || ((scrollX == alignToClosestEdge) && exposeRect.right() > visibleRect.right()))
+ // If we're trying to align to the closest edge, and the exposeRect is further right than the visibleRect, and not bigger than the visible area, then alignRight.
+ else if ((scrollX == alignRight) || ((scrollX == alignToClosestEdge) && exposeRect.right() > visibleRect.right() && w < visibleRect.width()))
x = exposeRect.right() - visibleRect.width();
else if (scrollX == alignCenter)
x -= (visibleRect.width() - w) / 2;
@@ -659,8 +659,8 @@
if (scrollY == noScroll)
y = visibleRect.y();
- // If we're trying to align to the closest edge, and the exposeRect is further down than the visibleRect, then alignBottom.
- else if ((scrollY == alignBottom) || ((scrollY == alignToClosestEdge) && exposeRect.bottom() > visibleRect.bottom()))
+ // If we're trying to align to the closest edge, and the exposeRect is further down than the visibleRect, and not bigger than the visible area, then alignBottom.
+ else if ((scrollY == alignBottom) || ((scrollY == alignToClosestEdge) && exposeRect.bottom() > visibleRect.bottom() && h < visibleRect.height()))
y = exposeRect.bottom() - visibleRect.height();
else if (scrollY == alignCenter)
y -= (visibleRect.height() - h) / 2;
1.211 +5 -3 WebCore/khtml/xml/dom_nodeimpl.cpp
Index: dom_nodeimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_nodeimpl.cpp,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -r1.210 -r1.211
--- dom_nodeimpl.cpp 16 Nov 2005 09:43:12 -0000 1.210
+++ dom_nodeimpl.cpp 17 Nov 2005 00:32:32 -0000 1.211
@@ -2717,9 +2717,11 @@
if (yPos==0)
yPos = yEnd;
}
- if ( xEnd <= xPos || yEnd <= yPos )
- return QRect( QPoint( xPos, yPos ), QSize() );
-
+ if (xEnd < xPos)
+ xEnd = xPos;
+ if (yEnd < yPos)
+ yEnd = yPos;
+
return QRect(xPos, yPos, xEnd - xPos, yEnd - yPos);
}
More information about the webkit-changes
mailing list