[webkit-changes] cvs commit: LayoutTests/fast/replaced
absolute-image-sizing-expected.checksum
absolute-image-sizing-expected.png
absolute-image-sizing-expected.txt absolute-image-sizing.html
Darin
darin at opensource.apple.com
Tue Dec 27 10:39:35 PST 2005
darin 05/12/27 10:39:35
Modified: . ChangeLog
khtml/rendering render_box.cpp
. ChangeLog
Added: fast/replaced absolute-image-sizing-expected.checksum
absolute-image-sizing-expected.png
absolute-image-sizing-expected.txt
absolute-image-sizing.html
Log:
LayoutTests:
Reviewed by Maciej, landed by Darin.
- fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4101>
CSS Fibonacci spiral using 4 images doesn't render correctly
* fast/replaced/absolute-image-sizing-expected.checksum: Added.
* fast/replaced/absolute-image-sizing-expected.png: Added.
* fast/replaced/absolute-image-sizing-expected.txt: Added.
* fast/replaced/absolute-image-sizing.html: Added.
WebCore:
Reviewed by Maciej, landed by Darin.
- fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4101>
CSS Fibonacci spiral using 4 images doesn't render correctly
Added layout tests:
* fast/replaced/absolute-image-sizing.html
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteHorizontalValues): Use calcReplacedWidth() instead of intrinsicWidth()
for replaced elements.
(RenderBox::calcAbsoluteVerticalValues): Same thing for height.
Revision Changes Path
1.46 +40 -10 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- ChangeLog 27 Dec 2005 18:26:13 -0000 1.45
+++ ChangeLog 27 Dec 2005 18:39:33 -0000 1.46
@@ -1,3 +1,18 @@
+2005-12-27 Sam Weinig <sam.weinig at gmail.com>
+
+ Reviewed by Maciej, landed by Darin.
+
+ - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4101>
+ CSS Fibonacci spiral using 4 images doesn't render correctly
+
+ Added layout tests:
+ * fast/replaced/absolute-image-sizing.html
+
+ * khtml/rendering/render_box.cpp:
+ (RenderBox::calcAbsoluteHorizontalValues): Use calcReplacedWidth() instead of intrinsicWidth()
+ for replaced elements.
+ (RenderBox::calcAbsoluteVerticalValues): Same thing for height.
+
2005-12-27 Darin Adler <darin at apple.com>
Reviewed by Geoff and Eric.
@@ -104,7 +119,7 @@
http://bugzilla.opendarwin.org/show_bug.cgi?id=6231
- Fixed assertion failure in QString::mid caused by my last checkin.
- parseWindowFeatuers() sometimes called QString::mid() with a start
+ parseWindowFeatures() sometimes called QString::mid() with a start
index past the end of the string but a length of 0. There were two
problems there. (1) parseWindowFeatures() shouldn't have gotten past
the end of the string. (2) QString had range truncating code that was
@@ -149,24 +164,39 @@
This patch is long. Luckily, it's also complicated.
- The main thing I've done is to change our parsing of the window.open 'features' argument to match Win IE. This is important because we now implement the correct defaults for window.open, and resizing and scrolling are turned off by default. So, if we parse the 'features' string incorrectly, we'll end up with an annoying, incorrectly sized window that can't resize or scroll.
-
- To honor a long-standing request by Eric, I factored out the parsing into two new functions: parseWindowFeatures and constrainToScreen. I also added support for "innerWidth" and "innerHeight," since they're just synonyms for "width" and "height."
+ The main thing I've done is to change our parsing of the window.open 'features' argument to match Win IE.
+ This is important because we now implement the correct defaults for window.open, and resizing and
+ scrolling are turned off by default. So, if we parse the 'features' string incorrectly, we'll end
+ up with an annoying, incorrectly sized window that can't resize or scroll.
+
+ To honor a long-standing request by Eric, I factored out the parsing into two new functions:
+ parseWindowFeatures and constrainToScreen. I also added support for "innerWidth" and "innerHeight,"
+ since they're just synonyms for "width" and "height."
* khtml/ecma/kjs_window.cpp: removed "emit" statements, since emit is #defined as ""
(KJS::parseDialogFeatures): renamed from parseFeatures, since we now have a 'parseWindowFeatures'.
(KJS::showModalDialog): ditto on parseFeatures. Also added some missing initializations for WindowArgs data members.
(KJS::parseWindowFeatures): new function, all new functionality.
- (KJS::constrainToScreen): new function, no new functionality -- just cut and pasted code that used to run as part of our parsing routine.
+ (KJS::constrainToScreen): new function, no new functionality -- just cut and pasted code that used to run as
+ part of our parsing routine.
(KJS::WindowFunc::callAsFunction):
(1) Factored out previous parsing code.
- (2) Factored 17 lines of custom popup-blocking code into 3 lines that use pre-existing 'allowPopUp' function. Gratuitous, but it cried out to me.
- (3) Changed URL parsing to substitute "" for undefined *and* null values (we already did this for undefined), to avoid trying to navigate to 'http://null'.
+ (2) Factored 17 lines of custom popup-blocking code into 3 lines that use pre-existing 'allowPopUp' function.
+ Gratuitous, but it cried out to me.
+ (3) Changed URL parsing to substitute "" for undefined *and* null values (we already did this for undefined),
+ to avoid trying to navigate to 'http://null'.
(4) Factore a multiline if () { if () {}} into an if ( && )
- (4) Removed the main body of code from a giant 'else' block by inserting early returns for the exceptional cases. This caused some things to show up in the diff even though they're just whitespace changes. I didn't actually change any code past the line "if (!str.isEmpty() && activePart)"
+ (4) Removed the main body of code from a giant 'else' block by inserting early returns for the exceptional cases.
+ This caused some things to show up in the diff even though they're just whitespace changes.
+ I didn't actually change any code past the line "if (!str.isEmpty() && activePart)"
* kwq/KWQKHTMLPartBrowserExtension.mm:
- (KHTMLPartBrowserExtension::createNewWindow): Added code to set toolbars to visible if toolBarVisible is true *or* locationBarVisible is true. The parser used to do this for us, but it's really the browser that's responsible for saying that the toolbar and the locationbar are the same thing. Hopefully, we can add a setLocationBarVisible delegate in the future so that other webkit clients can make their own UI decisions.
- * kwq/KWQKPartsBrowserExtension.h: Added locationBarVisible data member to WindowArgs structure and renamed toolBarsVisible to toolBarVisible (see above). Removed initialization code from WindowArgs structure because this file is for platform-specific code, and what defaults to use for window arguments is purely engine stuff.
+ (KHTMLPartBrowserExtension::createNewWindow): Added code to set toolbars to visible if toolBarVisible is true *or*
+ locationBarVisible is true. The parser used to do this for us, but it's really the browser that's responsible for
+ saying that the toolbar and the locationbar are the same thing. Hopefully, we can add a setLocationBarVisible delegate
+ in the future so that other webkit clients can make their own UI decisions.
+ * kwq/KWQKPartsBrowserExtension.h: Added locationBarVisible data member to WindowArgs structure and renamed
+ toolBarsVisible to toolBarVisible (see above). Removed initialization code from WindowArgs structure because
+ this file is for platform-specific code, and what defaults to use for window arguments is purely engine stuff.
2005-12-23 Eric Seidel <eseidel at apple.com>
1.181 +3 -2 WebCore/khtml/rendering/render_box.cpp
Index: render_box.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_box.cpp,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -r1.180 -r1.181
--- render_box.cpp 23 Dec 2005 18:44:22 -0000 1.180
+++ render_box.cpp 27 Dec 2005 18:39:33 -0000 1.181
@@ -4,6 +4,7 @@
* Copyright (C) 1999 Lars Knoll (knoll at kde.org)
* (C) 1999 Antti Koivisto (koivisto at kde.org)
* (C) 2005 Allan Sandfeld Jensen (kde at carewolf.com)
+ * (C) 2005 Samuel Weinig (sam.weinig at gmail.com)
* Copyright (C) 2005 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -1441,7 +1442,7 @@
if (!width.isIntrinsicOrAuto())
w = calcContentBoxWidth(width.width(cw));
else if (isReplaced())
- w = intrinsicWidth();
+ w = calcReplacedWidth();
if (l != AUTO && w != AUTO && r != AUTO) {
// left, width, right all given, play with margins
@@ -1619,7 +1620,7 @@
ourHeight = h + pab;
}
else if (isReplaced())
- h = intrinsicHeight();
+ h = calcReplacedHeight();
int static_top=0;
if ((t == AUTO && b == AUTO) || style()->top().isStatic()) {
1.190 +12 -0 LayoutTests/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/LayoutTests/ChangeLog,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -r1.189 -r1.190
--- ChangeLog 27 Dec 2005 12:24:32 -0000 1.189
+++ ChangeLog 27 Dec 2005 18:39:34 -0000 1.190
@@ -1,3 +1,15 @@
+2005-12-27 Sam Weinig <sam.weinig at gmail.com>
+
+ Reviewed by Maciej, landed by Darin.
+
+ - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4101>
+ CSS Fibonacci spiral using 4 images doesn't render correctly
+
+ * fast/replaced/absolute-image-sizing-expected.checksum: Added.
+ * fast/replaced/absolute-image-sizing-expected.png: Added.
+ * fast/replaced/absolute-image-sizing-expected.txt: Added.
+ * fast/replaced/absolute-image-sizing.html: Added.
+
2005-12-27 Maciej Stachowiak <mjs at apple.com>
No review, just a test harness change.
1.1 LayoutTests/fast/replaced/absolute-image-sizing-expected.checksum
Index: absolute-image-sizing-expected.checksum
===================================================================
2552895879016afa77e080ce81d7e47e
1.1 LayoutTests/fast/replaced/absolute-image-sizing-expected.png
<<Binary file>>
1.1 LayoutTests/fast/replaced/absolute-image-sizing-expected.txt
Index: absolute-image-sizing-expected.txt
===================================================================
layer at (0,0) size 800x600
RenderCanvas at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x576
RenderBlock {P} at (0,0) size 784x36
RenderText {TEXT} at (0,0) size 763x36
text run at (0,0) width 763: "An absolute-positioned image with only one dimension specified should retain its aspect ratio. If this test succeeded, there"
text run at (0,18) width 533: "should be no red on the page and both compasses should be equal in size and height."
layer at (8,60) size 200x200
RenderBlock (positioned) {DIV} at (8,60) size 200x200 [bgcolor=#FF0000]
layer at (8,60) size 200x200
RenderImage {IMG} at (8,60) size 200x200
layer at (300,60) size 200x200
RenderBlock (positioned) {DIV} at (300,60) size 200x200 [bgcolor=#FF0000]
layer at (300,60) size 200x200
RenderImage {IMG} at (300,60) size 200x200
1.1 LayoutTests/fast/replaced/absolute-image-sizing.html
Index: absolute-image-sizing.html
===================================================================
<html>
<head>
<title></title>
<style type="text/css">
<!--
#img1
{
position: absolute;
}
#img2
{
position: absolute;
left: 300px;
}
#box1
{
position: absolute;
width: 200px;
height: 200px;
background-color: #FF0000;
}
#box2
{
position: absolute;
width: 200px;
height: 200px;
left: 300px;
background-color: #FF0000;
}
-->
</style>
</head>
<body>
<p>An absolute-positioned image with only one dimension specified should retain its aspect ratio. If this test succeeded, there should be no red on the page and both compasses should be equal in size and height.</p>
<div id="box1"></div>
<img id="img1" src="resources/compass.jpg" width="200px">
<div id="box2"></div>
<img id="img2" src="resources/compass.jpg" height="200px">
</body>
</html>
More information about the webkit-changes
mailing list