2007-03-23 Mitz Pettel <mitz@webkit.org>
authorbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2007 11:37:57 +0000 (11:37 +0000)
committerbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2007 11:37:57 +0000 (11:37 +0000)
        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13157
          List markers positioned incorrectly and don't repaint properly on Oxford homepage

        Test: fast/lists/marker-image-error.html

        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::imageChanged): Mark ourselves for relayout if
        the image failed to load, since that means we will use a bullet instead.

2007-03-23  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - test for http://bugs.webkit.org/show_bug.cgi?id=13157
          List markers positioned incorrectly and don't repaint properly on Oxford homepage

        * fast/lists/marker-image-error-expected.checksum: Added.
        * fast/lists/marker-image-error-expected.png: Added.
        * fast/lists/marker-image-error-expected.txt: Added.
        * fast/lists/marker-image-error.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20429 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/lists/marker-image-error-expected.checksum [new file with mode: 0644]
LayoutTests/fast/lists/marker-image-error-expected.png [new file with mode: 0644]
LayoutTests/fast/lists/marker-image-error-expected.txt [new file with mode: 0644]
LayoutTests/fast/lists/marker-image-error.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderListMarker.cpp

index ca524215da2f533abb35ef384a424f05d7e51728..8d42964e95a20185cc15c5271f5175047c39cf68 100644 (file)
@@ -1,3 +1,15 @@
+2007-03-23  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Dave Hyatt.
+
+        - test for http://bugs.webkit.org/show_bug.cgi?id=13157
+          List markers positioned incorrectly and don't repaint properly on Oxford homepage
+
+        * fast/lists/marker-image-error-expected.checksum: Added.
+        * fast/lists/marker-image-error-expected.png: Added.
+        * fast/lists/marker-image-error-expected.txt: Added.
+        * fast/lists/marker-image-error.html: Added.
+
 2007-03-23  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by Adam.
diff --git a/LayoutTests/fast/lists/marker-image-error-expected.checksum b/LayoutTests/fast/lists/marker-image-error-expected.checksum
new file mode 100644 (file)
index 0000000..27bb3cb
--- /dev/null
@@ -0,0 +1 @@
+a8d5387fe67bd8289f2942f8a7efaf87
\ No newline at end of file
diff --git a/LayoutTests/fast/lists/marker-image-error-expected.png b/LayoutTests/fast/lists/marker-image-error-expected.png
new file mode 100644 (file)
index 0000000..15d5ca3
Binary files /dev/null and b/LayoutTests/fast/lists/marker-image-error-expected.png differ
diff --git a/LayoutTests/fast/lists/marker-image-error-expected.txt b/LayoutTests/fast/lists/marker-image-error-expected.txt
new file mode 100644 (file)
index 0000000..5ea472a
--- /dev/null
@@ -0,0 +1,42 @@
+layer at (0,0) size 800x600
+  RenderView 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 53x18
+          text run at (0,0) width 53: "Test for "
+        RenderInline {I} at (0,0) size 768x36
+          RenderInline {A} at (0,0) size 301x18 [color=#0000EE]
+            RenderText {#text} at (53,0) size 301x18
+              text run at (53,0) width 301: "http://bugs.webkit.org/show_bug.cgi?id=13157"
+          RenderText {#text} at (354,0) size 768x36
+            text run at (354,0) width 4: " "
+            text run at (358,0) width 410: "List markers positioned incorrectly and don't repaint properly on"
+            text run at (0,18) width 115: "Oxford homepage"
+        RenderText {#text} at (115,18) size 4x18
+          text run at (115,18) width 4: "."
+      RenderBlock {P} at (0,52) size 784x18
+        RenderText {#text} at (0,0) size 397x18
+          text run at (0,0) width 397: "There should be a bullet next to each item on the following list:"
+      RenderBlock {UL} at (0,86) size 784x90
+        RenderListItem {LI} at (40,0) size 744x18
+          RenderListMarker at (-17,0) size 7x18: bullet
+          RenderText {#text} at (0,0) size 159x18
+            text run at (0,0) width 159: "Prospectuses and courses"
+        RenderListItem {LI} at (40,18) size 744x18
+          RenderListMarker at (-17,0) size 7x18: bullet
+          RenderText {#text} at (0,0) size 167x18
+            text run at (0,0) width 167: "Undergraduate admissions"
+        RenderListItem {LI} at (40,36) size 744x18
+          RenderListMarker at (-17,0) size 7x18: bullet
+          RenderText {#text} at (0,0) size 131x18
+            text run at (0,0) width 131: "Graduate admissions"
+        RenderListItem {LI} at (40,54) size 744x18
+          RenderListMarker at (-17,0) size 7x18: bullet
+          RenderText {#text} at (0,0) size 136x18
+            text run at (0,0) width 136: "Continuing education"
+        RenderListItem {LI} at (40,72) size 744x18
+          RenderListMarker at (-17,0) size 7x18: bullet
+          RenderText {#text} at (0,0) size 94x18
+            text run at (0,0) width 94: "Online courses"
diff --git a/LayoutTests/fast/lists/marker-image-error.html b/LayoutTests/fast/lists/marker-image-error.html
new file mode 100644 (file)
index 0000000..677747d
--- /dev/null
@@ -0,0 +1,27 @@
+<html>
+<head>
+    <style>
+        li { list-style-image: url(about:blank); }
+    </style>
+</head>
+<body>
+    <p>
+        Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=13157">http://bugs.webkit.org/show_bug.cgi?id=13157</a>
+        List markers positioned incorrectly and don't repaint properly on Oxford homepage</i>.
+    </p>
+    <p>
+        There should be a bullet next to each item on the following list:
+    </p>
+    <ul>
+        <li>Prospectuses and courses</li>
+        <li>Undergraduate admissions</li>
+        <li>Graduate admissions</li>
+        <li>Continuing education</li>
+        <li>Online courses</li>
+    </ul>
+    <script>
+        // Force layout to happen before loading the marker image fails.
+        document.body.offsetTop;
+    </script>
+</body>
+</html>
index 17de00566e59752ef3b7eb43666990fa7fb88b44..74dbbf2930c48190b58cadcd1cd7ce96e9d5cb79 100644 (file)
@@ -1,3 +1,16 @@
+2007-03-23  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Dave Hyatt.
+
+        - fix http://bugs.webkit.org/show_bug.cgi?id=13157
+          List markers positioned incorrectly and don't repaint properly on Oxford homepage
+
+        Test: fast/lists/marker-image-error.html
+
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::imageChanged): Mark ourselves for relayout if
+        the image failed to load, since that means we will use a bullet instead.
+
 2007-03-23  Zack Rusin  <zrusin@trolltech.com>
 
         Fix the compile.
index 2a74edd0fe40efdd93f41e391a139f35e57159b5..f16e59e4c319db87a2d6be304c971767708086d2 100644 (file)
@@ -635,7 +635,7 @@ void RenderListMarker::imageChanged(CachedImage* o)
     if (o != m_image)
         return;
 
-    if (m_width != m_image->imageSize().width() || m_height != m_image->imageSize().height())
+    if (m_width != m_image->imageSize().width() || m_height != m_image->imageSize().height() || m_image->errorOccurred())
         setNeedsLayoutAndMinMaxRecalc();
     else
         repaint();