Patch by Hanspeter Schaub <Hanspeterschaub@mac.com>
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Jun 2005 17:18:16 +0000 (17:18 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Jun 2005 17:18:16 +0000 (17:18 +0000)
-fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3317
REGRESSION: CSS2: outline is applied to both <li> element
and its enclosing text with context dependent selector

        Reviewed by Hyatt.

        Test cases added:
        * layout-tests/fast/css/list-outline-expected.txt: Added.
        * layout-tests/fast/css/list-outline.html: Added.

        * khtml/rendering/render_line.cpp:
        (khtml::InlineFlowBox::paint):

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

LayoutTests/fast/css/list-outline-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/list-outline.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23
WebCore/khtml/rendering/render_line.cpp

diff --git a/LayoutTests/fast/css/list-outline-expected.txt b/LayoutTests/fast/css/list-outline-expected.txt
new file mode 100644 (file)
index 0000000..1b21f0d
--- /dev/null
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x82
+  RenderBlock {HTML} at (0,0) size 800x82
+    RenderBody {BODY} at (8,16) size 784x50
+      RenderBlock {OL} at (0,0) size 784x50
+        RenderListItem {LI} at (40,0) size 744x50
+          RenderListMarker at (16,16) size 0x14
+          RenderText {TEXT} at (16,16) size 582x18
+            text run at (16,16) width 582: "A single outline should only appear over the list element, and not over internal text elements."
diff --git a/LayoutTests/fast/css/list-outline.html b/LayoutTests/fast/css/list-outline.html
new file mode 100644 (file)
index 0000000..1e2c81f
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+<head>
+<title>The WebKit Open Source Project</title>
+<style type="text/css" media="all">
+       ol.test li {
+       outline: 1px solid red;
+       padding: 1em;
+    }
+</style>
+
+</head>
+
+
+<body>
+
+
+
+<ol class="test">
+<li >
+A single outline should only appear over the list element, and not over internal text elements.     
+</li> 
+</ol>
+
+
+
+</body>
+
+</html>
index 8b456ada7e6f37f4062b446515a9d0f1486b4e09..0a3927f33c1e21dcb8102807d0727cd1f64e3b77 100644 (file)
@@ -1,3 +1,20 @@
+2005-06-29  Geoffrey Garen  <ggaren@apple.com>
+
+       Patch by Hanspeter Schaub <Hanspeterschaub@mac.com>
+
+       -fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3317
+       REGRESSION: CSS2: outline is applied to both <li> element 
+       and its enclosing text with context dependent selector
+
+        Reviewed by Hyatt.
+
+        Test cases added: 
+        * layout-tests/fast/css/list-outline-expected.txt: Added.
+        * layout-tests/fast/css/list-outline.html: Added.
+
+        * khtml/rendering/render_line.cpp:
+        (khtml::InlineFlowBox::paint):
+
 2005-06-28  Vicki Murley  <vicki@apple.com>
 
         Reviewed by Maciej.
index 54d9b1235c9fa65abc02c294695469198bd82171..677a9d454731899a8979cb95864fae6cd274f337 100644 (file)
@@ -759,7 +759,7 @@ void InlineFlowBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
             // Add ourselves to the paint info struct's list of inlines that need to paint their
             // outlines.
             if (object()->style()->visibility() == VISIBLE && object()->style()->outlineWidth() > 0 &&
-                !object()->isInlineContinuation()) {
+                !object()->isInlineContinuation() && !isRootInlineBox()) {
                 if (!i.outlineObjects)
                     i.outlineObjects = new QPtrDict<RenderFlow>;
                 if (!i.outlineObjects->find(flowObject()))