REGRESSION (r139282): Caret repainting is broken for text-align: center'd <input>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jan 2013 11:20:31 +0000 (11:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jan 2013 11:20:31 +0000 (11:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=108283

Patch by Tien-Ren Chen <trchen@chromium.org> on 2013-01-30
Reviewed by Tim Horton.

Occasionally carets won't be fully erased when blinking.
There used to be 1-pixel padding but removed since r139282.
This patch adds back the same workaround.

Source/WebCore:

Need to rebaseline test expectations.

* editing/FrameSelection.cpp:
(WebCore::repaintCaretForLocalRect):

LayoutTests:

* platform/chromium/TestExpectations:
* platform/mac/TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/editing/FrameSelection.cpp

index 4deed10..0fbc4f0 100644 (file)
@@ -1,3 +1,17 @@
+2013-01-30  Tien-Ren Chen  <trchen@chromium.org>
+
+        REGRESSION (r139282): Caret repainting is broken for text-align: center'd <input>
+        https://bugs.webkit.org/show_bug.cgi?id=108283
+
+        Reviewed by Tim Horton.
+
+        Occasionally carets won't be fully erased when blinking.
+        There used to be 1-pixel padding but removed since r139282.
+        This patch adds back the same workaround.
+
+        * platform/chromium/TestExpectations:
+        * platform/mac/TestExpectations:
+
 2013-01-30  Dominik Röttsches  <dominik.rottsches@intel.com>
 
         [EFL] Unreviewed gardening.
index 2e9ed16..f8ea3b0 100644 (file)
@@ -4272,12 +4272,10 @@ webkit.org/b/106746 css3/filters/filter-property-parsing.html [ Failure ]
 webkit.org/b/108065 [ Debug ] tables/mozilla_expected_failures/bugs/bug2479-5.html [ Crash ]
 
 # Transient. Needs rebaseline.
-webkit.org/b/103955 fast/repaint/caret-outside-block.html [ ImageOnlyFailure ]
-webkit.org/b/103955 [ Linux ] fast/repaint/japanese-rl-selection-repaint-in-regions.html [ ImageOnlyFailure ]
-webkit.org/b/103955 [ Linux Lion SnowLeopard ] fast/repaint/japanese-rl-selection-repaint.html [ ImageOnlyFailure ]
-webkit.org/b/103955 fast/repaint/repaint-across-writing-mode-boundary.html [ ImageOnlyFailure ]
-webkit.org/b/103955 fast/repaint/selection-rl.html [ ImageOnlyFailure ]
-webkit.org/b/103955 fast/repaint/caret-with-transformation.html [ Missing ]
+webkit.org/b/108283 fast/repaint/4774354.html [ ImageOnlyFailure ]
+webkit.org/b/108283 fast/repaint/4776765.html [ ImageOnlyFailure ]
+webkit.org/b/108283 fast/repaint/caret-with-transformation.html [ ImageOnlyFailure ]
+
 webkit.org/b/106609 [ Win ] animations/fill-mode-iteration-count-non-integer.html [ Failure ]
 
 webkit.org/b/106689 canvas/philip/tests/2d.gradient.interpolate.overlap2.html [ Failure ]
index 06e76b2..9e33555 100644 (file)
@@ -1269,10 +1269,6 @@ webkit.org/b/106957 svg/dom/SVGViewSpec-invalid-ref-crash.html [ Failure ]
 webkit.org/b/39725 fast/events/drag-and-drop-autoscroll.html [ Skip ]
 
 # Transient. Needs rebaseline.
-webkit.org/b/103955 fast/repaint/4774354.html [ ImageOnlyFailure ]
-webkit.org/b/103955 fast/repaint/4776765.html [ ImageOnlyFailure ]
-webkit.org/b/103955 fast/repaint/caret-outside-block.html [ ImageOnlyFailure ]
-webkit.org/b/103955 fast/repaint/selection-rl.html [ ImageOnlyFailure ]
 webkit.org/b/103955 fast/repaint/caret-with-transformation.html [ Missing ]
 
 # Needs rebaseline.
index b3b7b30..995d3df 100644 (file)
@@ -1,3 +1,19 @@
+2013-01-30  Tien-Ren Chen  <trchen@chromium.org>
+
+        REGRESSION (r139282): Caret repainting is broken for text-align: center'd <input>
+        https://bugs.webkit.org/show_bug.cgi?id=108283
+
+        Reviewed by Tim Horton.
+
+        Occasionally carets won't be fully erased when blinking.
+        There used to be 1-pixel padding but removed since r139282.
+        This patch adds back the same workaround.
+
+        Need to rebaseline test expectations.
+
+        * editing/FrameSelection.cpp:
+        (WebCore::repaintCaretForLocalRect):
+
 2013-01-30  Dominik Röttsches  <dominik.rottsches@intel.com>
 
         [HarfBuzz] Remove the HarfBuzz-old code
index 95a3465..041374c 100644 (file)
@@ -1337,7 +1337,12 @@ static void repaintCaretForLocalRect(Node* node, const LayoutRect& rect)
     if (!caretPainter)
         return;
 
-    caretPainter->repaintRectangle(rect);
+    // FIXME: Need to over-paint 1 pixel to workaround some rounding problems.
+    // https://bugs.webkit.org/show_bug.cgi?id=108283
+    LayoutRect inflatedRect = rect;
+    inflatedRect.inflate(1);
+
+    caretPainter->repaintRectangle(inflatedRect);
 }
 
 bool FrameSelection::recomputeCaretRect()