Title: [186981] trunk
Revision
186981
Author
[email protected]
Date
2015-07-17 20:46:22 -0700 (Fri, 17 Jul 2015)

Log Message

(display: block)input range's thumb disappears when moved.
https://bugs.webkit.org/show_bug.cgi?id=146896
<rdar://problem/21787807>

Reviewed by Simon Fraser.

Since the thumb is positioned after the layout for the input (shadow) subtree is finished, the repaint rects
issued during the layout will not cover the re-positioned thumb.
We need to issue a repaint soon after the thumb is re-positioned.

Source/WebCore:

Test: fast/repaint/block-inputrange-repaint.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderContainer::layout):

LayoutTests:

* fast/repaint/block-inputrange-repaint-expected.txt: Added.
* fast/repaint/block-inputrange-repaint.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (186980 => 186981)


--- trunk/LayoutTests/ChangeLog	2015-07-18 03:16:32 UTC (rev 186980)
+++ trunk/LayoutTests/ChangeLog	2015-07-18 03:46:22 UTC (rev 186981)
@@ -1,3 +1,18 @@
+2015-07-17  Zalan Bujtas  <[email protected]>
+
+        (display: block)input range's thumb disappears when moved.
+        https://bugs.webkit.org/show_bug.cgi?id=146896
+        <rdar://problem/21787807>
+
+        Reviewed by Simon Fraser.
+
+        Since the thumb is positioned after the layout for the input (shadow) subtree is finished, the repaint rects
+        issued during the layout will not cover the re-positioned thumb.
+        We need to issue a repaint soon after the thumb is re-positioned.
+
+        * fast/repaint/block-inputrange-repaint-expected.txt: Added.
+        * fast/repaint/block-inputrange-repaint.html: Added.
+
 2015-07-17  Tim Horton  <[email protected]>
 
         Improve rect shrink-wrapping algorithm

Added: trunk/LayoutTests/fast/repaint/block-inputrange-repaint-expected.txt (0 => 186981)


--- trunk/LayoutTests/fast/repaint/block-inputrange-repaint-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/repaint/block-inputrange-repaint-expected.txt	2015-07-18 03:46:22 UTC (rev 186981)
@@ -0,0 +1,5 @@
+PASS repaintRects.indexOf('495 8 15 15') is not -1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/repaint/block-inputrange-repaint.html (0 => 186981)


--- trunk/LayoutTests/fast/repaint/block-inputrange-repaint.html	                        (rev 0)
+++ trunk/LayoutTests/fast/repaint/block-inputrange-repaint.html	2015-07-18 03:46:22 UTC (rev 186981)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<head>
+<title>This tests when input=range is block we issue correct repaint rects</title>
+<script>jsTestIsAsync = true;</script>
+<script src=""
+<style>
+  input[type="range"] {
+    display: block;
+    width: 500px;
+  }
+</style>
+</head>
+<body>
+<input id=moveme type=range>
+<script>
+  window.internals.startTrackingRepaints();
+  document.getElementById("moveme").value = 100;
+  document.body.offsetHeight;
+  if (window.internals) {
+    repaintRects = window.internals.repaintRectsAsText();
+    window.internals.stopTrackingRepaints();
+    shouldNotBe("repaintRects.indexOf('495 8 15 15')", "-1");
+    finishJSTest();
+  }
+</script>
+</body>
+<script src=""
+</html>

Modified: trunk/Source/WebCore/ChangeLog (186980 => 186981)


--- trunk/Source/WebCore/ChangeLog	2015-07-18 03:16:32 UTC (rev 186980)
+++ trunk/Source/WebCore/ChangeLog	2015-07-18 03:46:22 UTC (rev 186981)
@@ -1,3 +1,20 @@
+2015-07-17  Zalan Bujtas  <[email protected]>
+
+        (display: block)input range's thumb disappears when moved.
+        https://bugs.webkit.org/show_bug.cgi?id=146896
+        <rdar://problem/21787807>
+
+        Reviewed by Simon Fraser.
+
+        Since the thumb is positioned after the layout for the input (shadow) subtree is finished, the repaint rects
+        issued during the layout will not cover the re-positioned thumb.
+        We need to issue a repaint soon after the thumb is re-positioned.
+
+        Test: fast/repaint/block-inputrange-repaint.html
+
+        * html/shadow/SliderThumbElement.cpp:
+        (WebCore::RenderSliderContainer::layout):
+
 2015-07-17  Simon Fraser  <[email protected]>
 
         Attempt to fix the build.

Modified: trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp (186980 => 186981)


--- trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp	2015-07-18 03:16:32 UTC (rev 186980)
+++ trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp	2015-07-18 03:46:22 UTC (rev 186981)
@@ -190,6 +190,7 @@
     else
         thumbLocation.setX(thumbLocation.x() - offset);
     thumb->setLocation(thumbLocation);
+    thumb->repaint();
 }
 
 // --------------------------------
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to