summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/display-inline-block-scrollbar.html
diff options
context:
space:
mode:
authorpdr@chromium.org <pdr@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2014-03-17 02:33:17 +0000
committerpdr@chromium.org <pdr@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2014-03-17 02:33:17 +0000
commiteeed9154a6a215203d461b2bdb188e59fb01192d (patch)
treee55cc621d5a3c6cd0a9e76ee019eb7679977db13 /third_party/WebKit/LayoutTests/fast/css/display-inline-block-scrollbar.html
parent882d19eaa47ce09c32471ae00be366cf0e38e97d (diff)
downloadchromium_src-eeed9154a6a215203d461b2bdb188e59fb01192d.zip
chromium_src-eeed9154a6a215203d461b2bdb188e59fb01192d.tar.gz
chromium_src-eeed9154a6a215203d461b2bdb188e59fb01192d.tar.bz2
Make sure to reset overflow in InlineFlowBow::computeOverflow
This patch fixes a bug where the overflow rects were not being reset in InlineFlowBow::computeOverflow which led to a stale scroll size. With this patch we clear the overflow rects at the beginning of computeOverflow. This patch is a partial merge of http://trac.webkit.org/changeset/165602 by Manish R Gurnaney <m.gurnaney@samsung.com>. This patch also includes a few cleanups not present in the original: 1) setLayoutOverflow and setVisualOverflow were unnecessarily public functions. They have been redeclared as private. 2) setLayoutOverflow and setVisualOverflow did redundant work to compute the frameBox. This patch factors out the frameBox calculation into setOverflowFromLogicalRects so it is only done once. 3) An assert has been added that knownToHaveNoOverflow() implies m_overflow is null. BUG=316549 Review URL: https://codereview.chromium.org/199523005 git-svn-id: svn://svn.chromium.org/blink/trunk@169321 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/css/display-inline-block-scrollbar.html')
-rw-r--r--third_party/WebKit/LayoutTests/fast/css/display-inline-block-scrollbar.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/css/display-inline-block-scrollbar.html b/third_party/WebKit/LayoutTests/fast/css/display-inline-block-scrollbar.html
new file mode 100644
index 0000000..b02378e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/display-inline-block-scrollbar.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<script src="../../resources/check-layout.js"></script>
+<script>
+ onload = function() {
+ document.getElementById('container').style.width = '110%';
+ document.getElementById('margin').style.left = '200px';
+ document.getElementById('container').style.width = '100%';
+ var forceLayout = document.body.offsetTop;
+ document.getElementById('margin').style.left = '12px';
+ window.checkLayout('#scrollable', document.getElementById('output'));
+ }
+</script>
+<style>
+ #spacer {
+ width: 100px;
+ height: 100px;
+ background: blue;
+ }
+ #scrollable {
+ background: white;
+ border: 1px solid black;
+ overflow: auto;
+ position: relative;
+ width: 250px;
+ }
+ #container {
+ position: relative;
+ display: inline-block;
+ width: 100%;
+ height: 130px;
+ }
+ #margin {
+ position: absolute;
+ width: 200px;
+ top: 12px;
+ margin-right: 12px;
+ left: 12px;
+ height: 110px;
+ }
+</style>
+Test for crbug.com/316549: This test passes if the scrollable div has width=250.<br/>
+<div id="scrollable" data-expected-scroll-width="250">
+ <div id="container" style="width: 100%;">
+ <div id="margin" style="left: 12px;">
+ <div id="spacer" style="height: 100px; width: 100%;"></div>
+ </div>
+ </div>
+</div>
+<div id="output"></div> \ No newline at end of file