Reviewed by darin
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Apr 2006 23:13:59 +0000 (23:13 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Apr 2006 23:13:59 +0000 (23:13 +0000)
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8337
          Incomplete repaint of inlines' outline during editing

        * manual-tests/inline-outline-repaint.html: Added.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutBlock): Add the maximal outline width to the
        inlines' repaint rect.

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

WebCore/ChangeLog
WebCore/manual-tests/inline-outline-repaint.html [new file with mode: 0644]
WebCore/rendering/RenderBlock.cpp

index 687e08f5ea7b1d7203a844d446d5dd0761f16ca1..6bc30025ab6718327e3b8a4390ed58ee9269c02d 100644 (file)
@@ -1,3 +1,15 @@
+2006-04-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
+
+        Reviewed by darin
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8337
+          Incomplete repaint of inlines' outline during editing
+
+        * manual-tests/inline-outline-repaint.html: Added.
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::layoutBlock): Add the maximal outline width to the
+        inlines' repaint rect.
+
 2006-04-12  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by darin
diff --git a/WebCore/manual-tests/inline-outline-repaint.html b/WebCore/manual-tests/inline-outline-repaint.html
new file mode 100644 (file)
index 0000000..6a4dfbb
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+        "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+</head>
+<body>
+<p><b>BUG ID:</b> <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=8337">Bugzilla bug 8337</a> Incomplete repaint of inlines&rsquo; outline during editing</p>
+
+<p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b> 
+Place the insertion point at the end of the outlined text below and press the Delete key 9 times.
+</p>
+
+<p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> 
+The words &ldquo;sit amet&rdquo; will be deleted, and the blue outline will shrink to
+surround only the remaining text, without leaving behind any trails or other artifacts.
+</p>
+
+<p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>  
+As the words &ldquo;sit amet&rdquo; will be deleted, the blue outline will leave
+trails behind as it shrinks to fit the remaining text.
+</p>
+
+<div contenteditable style="width: 100px; outline: none;">
+<span style="outline: blue solid;">Lorem ipsum dolor sit amet&nbsp;</span>
+</div>
+
+</body>
+</html>
index 0492aa0f37ac0879896aa6f723de74c00ed4de50..4f3ccf38391bae77dbf40649f082d50511e82c8b 100644 (file)
@@ -549,8 +549,10 @@ void RenderBlock::layoutBlock(bool relayoutChildren)
         didFullRepaint = repaintAfterLayoutIfNeeded(oldBounds, oldFullBounds);
     if (!didFullRepaint && !repaintRect.isEmpty()) {
         RenderCanvas* c = canvas();
-        if (c && c->view())
+        if (c && c->view()) {
+            repaintRect.inflate(maximalOutlineSize(PaintPhaseOutline));
             c->view()->addRepaintInfo(this, repaintRect); // We need to do a partial repaint of our content.
+        }
     }
     setNeedsLayout(false);
 }