haikuwebkit/LayoutTests/fast/repaint/vertical-overflow-same.html

44 lines
1.3 KiB
HTML
Raw Permalink Normal View History

Incomplete repaint of input elements in writing-mode overflow https://bugs.webkit.org/show_bug.cgi?id=110246 Patch by Yuki Sekiguchi <yuki.sekiguchi@access-company.com> on 2013-06-19 Reviewed by Simon Fraser. Source/WebCore: We calculate repaint rect using unflipped rect. However, RenderBox::applyCachedClipAndScrollOffsetForRepaint() which is called from repaint rect calculation wants that its argument rect is flipped. The reason is: - paintRect.move(-scrolledContentOffset()); cannot scroll if the rect is unflipped. - It cannot clip using intersect. Passing unflipped rect to applyCachedClipAndScrollOffsetForRepaint() cause invalid clipping. Therefore, this patch flipped the rect at the first part of the function and unflipped it at the last part of the function. Scroll bar rect is absolute rect, so it is flipped rect. RenderLayer::invalidateScrollbarRect() pass the rect to repaintRectangle() which expects an argument rect is unflipped. This cause part of overlapping scroll bar doesn't fade out. Therefore, this patch flipped the rect and pass it to repaintRectangle(). Tests: fast/repaint/horizontal-bt-overflow-child.html fast/repaint/horizontal-bt-overflow-parent.html fast/repaint/horizontal-bt-overflow-same.html fast/repaint/vertical-overflow-child.html fast/repaint/vertical-overflow-parent.html fast/repaint/vertical-overflow-same.html * rendering/RenderBox.cpp: (WebCore::RenderBox::applyCachedClipAndScrollOffsetForRepaint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::invalidateScrollbarRect): LayoutTests: * fast/repaint/horizontal-bt-overflow-child-expected.txt: Added. * fast/repaint/horizontal-bt-overflow-child.html: Added. * fast/repaint/horizontal-bt-overflow-parent-expected.txt: Added. * fast/repaint/horizontal-bt-overflow-parent.html: Added. * fast/repaint/horizontal-bt-overflow-same-expected.txt: Added. * fast/repaint/horizontal-bt-overflow-same.html: Added. * fast/repaint/vertical-overflow-child-expected.txt: Added. * fast/repaint/vertical-overflow-child.html: Added. * fast/repaint/vertical-overflow-parent-expected.txt: Added. * fast/repaint/vertical-overflow-parent.html: Added. * fast/repaint/vertical-overflow-same-expected.txt: Added. * fast/repaint/vertical-overflow-same.html: Added. Canonical link: https://commits.webkit.org/135948@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-06-20 01:06:22 +00:00
<!DOCTYPE html>
<html><head>
<style>
.container {
margin: 20px;
width: 300px;
height: 200px;
border: 1px solid black;
overflow: scroll;
}
.vertical-rl {
-webkit-writing-mode: vertical-rl;
}
.offset {
width: 2000px;
height: 100px;
}
.target {
width: 100px;
height: 100px;
background-color: red;
visibility: hidden;
}
</style>
</head>
<body>
<!-- A rect (target class) should be painted. -->
<!-- In DumpRenderTree, there should be repaint logs of 100x100 rect. We don't care how many times is the log dumpped. -->
<div class="vertical-rl container">
<div class="offset"></div>
<div class="target"></div>
</div>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script>
repaintTest = function() {
var target = document.getElementsByClassName("target")[0];
target.style.visibility = "visible";
};
var container = document.getElementsByClassName("container")[0];
scrollLeft returns different values for viewport and non-viewport scrolling with rtl https://bugs.webkit.org/show_bug.cgi?id=94405 rdar://problem/21829754 Reviewed by Zalan Bujtas. Source/WebCore: Use scrollPosition for DOM-exposed scroll* values on overflow scroll elements, matching the CSS OM View spec, and Gecko behavior. Test: fast/scrolling/programmatic-overflow-rtl-scrollIntoView.html * rendering/RenderBox.cpp: (WebCore::RenderBox::scrollLeft): (WebCore::RenderBox::scrollTop): (WebCore::RenderBox::setScrollLeft): (WebCore::RenderBox::setScrollTop): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToXPosition): (WebCore::RenderLayer::scrollToYPosition): * rendering/RenderLayer.h: LayoutTests: programmatic-overflow-rtl-scrollIntoView.html is a basic test for negative scrollLeft in an RTL scroller. Other tests are fixed to programmatically scroll to negative scroll positions. * compositing/rtl/rtl-overflow-scrolling.html: * fast/overflow/scroll-div-hide-show-expected.txt: * fast/overflow/scroll-div-hide-show.html: * fast/repaint/horizontal-bt-overflow-parent.html: * fast/repaint/horizontal-bt-overflow-same.html: * fast/repaint/vertical-overflow-parent.html: * fast/repaint/vertical-overflow-same.html: * fast/scrolling/programmatic-overflow-rtl-scrollIntoView-expected.txt: Added. * fast/scrolling/programmatic-overflow-rtl-scrollIntoView.html: Added. * fast/writing-mode/flipped-blocks-hit-test-overflow-scroll.html: * imported/blink/compositing/overflow/rtl-overflow.html: Canonical link: https://commits.webkit.org/170752@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-01-03 18:06:50 +00:00
container.scrollLeft = -1815;
Incomplete repaint of input elements in writing-mode overflow https://bugs.webkit.org/show_bug.cgi?id=110246 Patch by Yuki Sekiguchi <yuki.sekiguchi@access-company.com> on 2013-06-19 Reviewed by Simon Fraser. Source/WebCore: We calculate repaint rect using unflipped rect. However, RenderBox::applyCachedClipAndScrollOffsetForRepaint() which is called from repaint rect calculation wants that its argument rect is flipped. The reason is: - paintRect.move(-scrolledContentOffset()); cannot scroll if the rect is unflipped. - It cannot clip using intersect. Passing unflipped rect to applyCachedClipAndScrollOffsetForRepaint() cause invalid clipping. Therefore, this patch flipped the rect at the first part of the function and unflipped it at the last part of the function. Scroll bar rect is absolute rect, so it is flipped rect. RenderLayer::invalidateScrollbarRect() pass the rect to repaintRectangle() which expects an argument rect is unflipped. This cause part of overlapping scroll bar doesn't fade out. Therefore, this patch flipped the rect and pass it to repaintRectangle(). Tests: fast/repaint/horizontal-bt-overflow-child.html fast/repaint/horizontal-bt-overflow-parent.html fast/repaint/horizontal-bt-overflow-same.html fast/repaint/vertical-overflow-child.html fast/repaint/vertical-overflow-parent.html fast/repaint/vertical-overflow-same.html * rendering/RenderBox.cpp: (WebCore::RenderBox::applyCachedClipAndScrollOffsetForRepaint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::invalidateScrollbarRect): LayoutTests: * fast/repaint/horizontal-bt-overflow-child-expected.txt: Added. * fast/repaint/horizontal-bt-overflow-child.html: Added. * fast/repaint/horizontal-bt-overflow-parent-expected.txt: Added. * fast/repaint/horizontal-bt-overflow-parent.html: Added. * fast/repaint/horizontal-bt-overflow-same-expected.txt: Added. * fast/repaint/horizontal-bt-overflow-same.html: Added. * fast/repaint/vertical-overflow-child-expected.txt: Added. * fast/repaint/vertical-overflow-child.html: Added. * fast/repaint/vertical-overflow-parent-expected.txt: Added. * fast/repaint/vertical-overflow-parent.html: Added. * fast/repaint/vertical-overflow-same-expected.txt: Added. * fast/repaint/vertical-overflow-same.html: Added. Canonical link: https://commits.webkit.org/135948@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-06-20 01:06:22 +00:00
runRepaintTest();
</script>
</body></html>