aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/flow.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2018-01-19 12:12:47 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2018-01-20 15:33:39 +0100
commita311e0f569f8aba447aeef3034a37ee900720307 (patch)
treec5cc08df49134de8d987e7149fbccde709f74418 /components/layout/flow.rs
parentc2ed7c963262e58f4222d7b958da04b773e20014 (diff)
downloadservo-a311e0f569f8aba447aeef3034a37ee900720307.tar.gz
servo-a311e0f569f8aba447aeef3034a37ee900720307.zip
Merge layout and layout_tests
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r--components/layout/flow.rs38
1 files changed, 22 insertions, 16 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index b145aef0ad6..e42871dfa24 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -552,11 +552,13 @@ pub trait MutableOwnedFlowUtils {
/// Sets the flow as the containing block for all absolute descendants that have been marked
/// as having reached their containing block. This is needed in order to handle cases like:
///
- /// <div>
- /// <span style="position: relative">
- /// <span style="position: absolute; ..."></span>
- /// </span>
- /// </div>
+ /// ```html
+ /// <div>
+ /// <span style="position: relative">
+ /// <span style="position: absolute; ..."></span>
+ /// </span>
+ /// </div>
+ /// ```
fn take_applicable_absolute_descendants(&mut self,
absolute_descendants: &mut AbsoluteDescendants);
}
@@ -742,12 +744,14 @@ pub struct AbsoluteDescendantInfo {
/// Whether the absolute descendant has reached its containing block. This exists so that we
/// can handle cases like the following:
///
- /// <div>
- /// <span id=a style="position: absolute; ...">foo</span>
- /// <span style="position: relative">
- /// <span id=b style="position: absolute; ...">bar</span>
- /// </span>
- /// </div>
+ /// ```html
+ /// <div>
+ /// <span id=a style="position: absolute; ...">foo</span>
+ /// <span style="position: relative">
+ /// <span id=b style="position: absolute; ...">bar</span>
+ /// </span>
+ /// </div>
+ /// ```
///
/// When we go to create the `InlineFlow` for the outer `div`, our absolute descendants will
/// be `a` and `b`. At this point, we need a way to distinguish between the two, because the
@@ -1343,11 +1347,13 @@ impl MutableOwnedFlowUtils for FlowRef {
/// Sets the flow as the containing block for all absolute descendants that have been marked
/// as having reached their containing block. This is needed in order to handle cases like:
///
- /// <div>
- /// <span style="position: relative">
- /// <span style="position: absolute; ..."></span>
- /// </span>
- /// </div>
+ /// ```html
+ /// <div>
+ /// <span style="position: relative">
+ /// <span style="position: absolute; ..."></span>
+ /// </span>
+ /// </div>
+ /// ```
fn take_applicable_absolute_descendants(&mut self,
absolute_descendants: &mut AbsoluteDescendants) {
let mut applicable_absolute_descendants = AbsoluteDescendants::new();