Commit 5dc5867a authored by sataya.m's avatar sataya.m Committed by Commit bot

IFrame Scrollbar needs reconstruction.

IFrame Scrollbar needs reconstruction. In the updateWidgetGeometry set
frameview needs layout if frameview scrollbars needsreconstruction.

BUG=492785

Review-Url: https://codereview.chromium.org/2314593003
Cr-Commit-Position: refs/heads/master@{#418837}
parent 6becf9c4
......@@ -1260,3 +1260,5 @@ crbug.com/626703 [ Win10 ] imported/csswg-test/vendor-imports/mozilla/mozilla-ce
crbug.com/646598 [ Mac ] virtual/display_list_2d_canvas/fast/canvas/text-rendering-frameless-canvas.html [ Skip ]
crbug.com/646598 virtual/gpu/fast/canvas/text-rendering-frameless-canvas.html [ Skip ]
crbug.com/646598 fast/canvas/text-rendering-frameless-canvas.html [ Skip ]
crbug.com/492785 [ Linux Mac Win7 ] virtual/rootlayerscrolls/scrollbars/custom-scrollbar-reconstruction-on-inserting-style-sheet.html [ Failure ]
<!DOCTYPE html>
<iframe frameborder="0" src="resources/reconstruction-iframe-src.html"></iframe>
<!DOCTYPE html>
<iframe frameborder="0"></iframe>
<div id = "content">
<div style="width: 400px; height: 400px"></div>
</div>
<script>
var idoc = document.querySelector("iframe").contentDocument;
var sheet = idoc.head.appendChild(idoc.createElement("style")).sheet;
idoc.body.innerHTML = document.querySelector('#content').innerHTML;
document.body.offsetTop;
sheet.insertRule("::-webkit-scrollbar { width: 50px; height: 20px; }", 0);
sheet.insertRule("::-webkit-scrollbar-thumb { background: green; }", 1);
</script>
<!DOCTYPE html>
<style>
::-webkit-scrollbar {
width: 50px;
height: 20px;
}
::-webkit-scrollbar-thumb {
background: green;
}
div {
width: 400px;
height: 400px;
}
</style>
<div style="width:400px;height:400px;"></div>
......@@ -309,8 +309,9 @@ void LayoutPart::updateWidgetGeometry()
// If frame bounds are changing mark the view for layout. Also check the
// frame's page to make sure that the frame isn't in the process of being
// destroyed.
if (frameView && boundsWillChange && frameView->frame().page())
// destroyed. If iframe scrollbars needs reconstruction from native to custom
// scrollbar, then also we need to layout the frameview.
if (frameView && frameView->frame().page() && (boundsWillChange || frameView->needsScrollbarReconstruction()))
frameView->setNeedsLayout();
updateWidgetGeometryInternal();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment