Sky: Change iframe positioning to use absoluteContentBox for the View's

coordinate system.

This fixes a bug where the iframe's view would be positioned incorrectly if there were elements above it.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/730253002
This commit is contained in:
Matt Perry
2014-11-17 17:38:27 -05:00
parent 9597c67904
commit 8eefcecb74
2 changed files with 21 additions and 7 deletions

View File

@@ -1,14 +1,26 @@
layer at (0,0) size 800x600
RenderView {#document} at (0,0) size 800x600
layer at (0,0) size 800x188
RenderBlock {sky} at (0,0) size 800x188
RenderBlock {div} at (0,0) size 800x188
layer at (0,0) size 800x506
RenderBlock {sky} at (0,0) size 800x506
RenderBlock {div} at (0,0) size 800x228
RenderBlock (anonymous) at (0,0) size 800x19
RenderText {#text} at (0,0) size 76x19
text run at (0,0) width 76: "This is an"
RenderBlock (anonymous) at (0,169) size 800x19
RenderBlock (anonymous) at (0,209) size 800x19
RenderText {#text} at (0,0) size 72x19
text run at (0,0) width 72: "element."
layer at (250,19) size 300x150
RenderReplaced {iframe} at (250,19) size 300x150
RenderBlock {div} at (0,228) size 800x200
RenderText {#text} at (0,0) size 99x19
text run at (0,0) width 99: "Placeholder."
RenderBlock {div} at (0,428) size 800x78
RenderBlock (anonymous) at (0,0) size 800x19
RenderText {#text} at (0,0) size 218x19
text run at (0,0) width 218: "Small iframe should render"
RenderBlock (anonymous) at (0,59) size 800x19
RenderText {#text} at (0,0) size 76x19
text run at (0,0) width 76: "correctly."
layer at (230,19) size 340x190
RenderReplaced {iframe} at (230,19) size 340x190 [border: (20px solid #000000)]
layer at (250,447) size 300x40
RenderReplaced {iframe} at (250,19) size 300x40

View File

@@ -1,4 +1,6 @@
<sky>
<import src="../resources/dump-as-render-tree.sky" />
<div>This is an <iframe src="abarth.sky">iframe</iframe> element.</div>
<div>This is an <iframe style="border-style: solid; border-width: 20px" src="abarth.sky">iframe</iframe> element.</div>
<div style="height: 200px">Placeholder.</div>
<div>Small iframe should render <iframe style="height: 40px" src="abarth.sky">iframe</iframe> correctly.</div>
</sky>