Skip to content

Commit

Permalink
Merge r186981 - (display: block)input range's thumb disappears when m…
Browse files Browse the repository at this point in the history
…oved.

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.
  • Loading branch information
alanbaradlay authored and carlosgcampos committed Aug 4, 2015
1 parent 7c167b6 commit 9b6dbb1
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
15 changes: 15 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
2015-07-17 Zalan Bujtas <zalan@apple.com>

(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 Myles C. Maxfield <mmaxfield@apple.com>

style.fontFamily accessor crashes on unstyled node created from DOMParser().parseFromString()
Expand Down
@@ -0,0 +1,5 @@
PASS repaintRects.indexOf('495 8 15 15') is not -1
PASS successfullyParsed is true

TEST COMPLETE

28 changes: 28 additions & 0 deletions LayoutTests/fast/repaint/block-inputrange-repaint.html
@@ -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="../../resources/js-test-pre.js"></script>
<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="../../resources/js-test-post.js"></script>
</html>
17 changes: 17 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,20 @@
2015-07-17 Zalan Bujtas <zalan@apple.com>

(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 Myles C. Maxfield <mmaxfield@apple.com>

style.fontFamily accessor crashes on unstyled node created from DOMParser().parseFromString()
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/html/shadow/SliderThumbElement.cpp
Expand Up @@ -190,6 +190,7 @@ void RenderSliderContainer::layout()
else
thumbLocation.setX(thumbLocation.x() - offset);
thumb->setLocation(thumbLocation);
thumb->repaint();
}

// --------------------------------
Expand Down

0 comments on commit 9b6dbb1

Please sign in to comment.