mirror of
https://github.com/servo/servo.git
synced 2025-06-16 12:24:29 +00:00
Several issues are addressed in this commit: * Inline flows now bubble up their absolute descendants instead of making the inline flow the containing block for them. (In the future, we will need to make the inline flow *sometimes* be the containing block for them, but for now it improves sites to unconditionally bubble up.) * Fragments now look at their inline fragment context to determine whether they are positioned. * Inline flows now push the stacking-relative position of the absolute containing block down to their inline-block fragments. * Inline absolute hypothetical fragments can be containing blocks. * Fixes the logic in `containing_block_range_for_flow_surrounding_fragment_at_index`. The condition to determine whether fragments are positioned was inverted! * `Descendants`/`AbsDescendants` has been refactored in order to become more friendly to inline absolute containing blocks in the future. Improves the inline position of the green drop-down arrow in the Google SERPs. (The block position is still wrong.)
65 lines
1.4 KiB
HTML
65 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
html, body {
|
|
margin: 0;
|
|
font-size: 0.1px;
|
|
}
|
|
#a {
|
|
padding-left: 100px;
|
|
}
|
|
#b {
|
|
position: relative;
|
|
}
|
|
#c {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100px;
|
|
height: 100px;
|
|
background: purple;
|
|
}
|
|
.cover-up-platform-specific-differences {
|
|
position: absolute;
|
|
background: white;
|
|
}
|
|
#cover-up-platform-specific-differences-a, #cover-up-platform-specific-differences-b {
|
|
left: 0;
|
|
width: 300px;
|
|
}
|
|
#cover-up-platform-specific-differences-c, #cover-up-platform-specific-differences-d {
|
|
top: 0;
|
|
height: 300px;
|
|
}
|
|
#cover-up-platform-specific-differences-a {
|
|
top: 0;
|
|
height: 25px;
|
|
}
|
|
#cover-up-platform-specific-differences-b {
|
|
top: 75px;
|
|
height: 100px;
|
|
}
|
|
#cover-up-platform-specific-differences-c {
|
|
left: 0;
|
|
width: 125px;
|
|
}
|
|
#cover-up-platform-specific-differences-d {
|
|
left: 175px;
|
|
width: 100px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div><span id=a>a</span><span id=b><div id=c></div></span></span></div>
|
|
<div class=cover-up-platform-specific-differences id=cover-up-platform-specific-differences-a>
|
|
</div>
|
|
<div class=cover-up-platform-specific-differences id=cover-up-platform-specific-differences-b>
|
|
</div>
|
|
<div class=cover-up-platform-specific-differences id=cover-up-platform-specific-differences-c>
|
|
</div>
|
|
<div class=cover-up-platform-specific-differences id=cover-up-platform-specific-differences-d>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|