Skip to content

Commit

Permalink
servo: Merge #1408 - layout: Stop going to the DOM for iframe sizes (…
Browse files Browse the repository at this point in the history
…from pcwalton:stop-going-to-dom-for-iframes); r=larsbergstrom

r? larsbergstrom

Source-Repo: https://github.com/servo/servo
Source-Revision: a9980b992c47e6fcac1f6c4510e36a49aa22fbbd

UltraBlame original commit: 8646e68fb605c7e9a7fd7b134b6735d91ead1021
  • Loading branch information
marco-c committed Sep 30, 2019
1 parent 56e2610 commit 9398e14
Show file tree
Hide file tree
Showing 9 changed files with 819 additions and 483 deletions.
326 changes: 1 addition & 325 deletions servo/src/components/main/layout/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ geom
Point2D
Rect
SideOffsets2D
Size2D
}
;
use
Expand All @@ -180,10 +179,7 @@ servo_util
geometry
:
:
{
Au
to_frac_px
}
;
use
servo_util
Expand Down Expand Up @@ -367,6 +363,7 @@ is_root
bool
/
/
/
Additional
floating
flow
Expand Down Expand Up @@ -3644,292 +3641,6 @@ list
)
;
}
if
self
.
base
.
node
.
is_iframe_element
(
)
{
let
x
=
self
.
base
.
abs_position
.
x
+
do
self
.
box
.
as_ref
(
)
.
map_default
(
Au
:
:
new
(
0
)
)
|
box
|
{
box
.
margin
.
get
(
)
.
left
+
box
.
border
.
get
(
)
.
left
+
box
.
padding
.
get
(
)
.
left
}
;
let
y
=
self
.
base
.
abs_position
.
y
+
do
self
.
box
.
as_ref
(
)
.
map_default
(
Au
:
:
new
(
0
)
)
|
box
|
{
box
.
margin
.
get
(
)
.
top
+
box
.
border
.
get
(
)
.
top
+
box
.
padding
.
get
(
)
.
top
}
;
let
w
=
self
.
base
.
position
.
size
.
width
-
do
self
.
box
.
as_ref
(
)
.
map_default
(
Au
:
:
new
(
0
)
)
|
box
|
{
box
.
noncontent_width
(
)
}
;
let
h
=
self
.
base
.
position
.
size
.
height
-
do
self
.
box
.
as_ref
(
)
.
map_default
(
Au
:
:
new
(
0
)
)
|
box
|
{
box
.
noncontent_height
(
)
}
;
do
self
.
base
.
node
.
with_mut_iframe_element
|
iframe_element
|
{
iframe_element
.
size
.
get_mut_ref
(
)
.
set_rect
(
Rect
(
Point2D
(
to_frac_px
(
x
)
as
f32
to_frac_px
(
y
)
as
f32
)
Size2D
(
to_frac_px
(
w
)
as
f32
to_frac_px
(
h
)
as
f32
)
)
)
;
}
}
let
abs_rect
=
Expand Down Expand Up @@ -4112,40 +3823,6 @@ E
>
bool
{
/
/
TODO
:
implement
iframe
size
messaging
if
self
.
base
.
node
.
is_iframe_element
(
)
{
error
!
(
"
float
iframe
size
messaging
not
implemented
yet
"
)
;
}
let
abs_rect
=
Expand Down Expand Up @@ -4176,7 +3853,6 @@ dirty
{
return
true
;
}
let
offset
Expand Down
Loading

0 comments on commit 9398e14

Please sign in to comment.