mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #13923 - pcwalton:inline-absolute-hypothetical-margin, r=SimonSapin
layout: Remove margins from inline absolute hypothetical boxes. As they're hypothetical, their margins shouldn't take up space! Improves Google search results. Closes #13915. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13923) <!-- Reviewable:end -->
This commit is contained in:
commit
e888b76534
4 changed files with 50 additions and 1 deletions
|
@ -1233,7 +1233,8 @@ impl Fragment {
|
||||||
SpecificFragmentInfo::Table |
|
SpecificFragmentInfo::Table |
|
||||||
SpecificFragmentInfo::TableCell |
|
SpecificFragmentInfo::TableCell |
|
||||||
SpecificFragmentInfo::TableRow |
|
SpecificFragmentInfo::TableRow |
|
||||||
SpecificFragmentInfo::TableColumn(_) => {
|
SpecificFragmentInfo::TableColumn(_) |
|
||||||
|
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => {
|
||||||
self.margin.inline_start = Au(0);
|
self.margin.inline_start = Au(0);
|
||||||
self.margin.inline_end = Au(0);
|
self.margin.inline_end = Au(0);
|
||||||
return
|
return
|
||||||
|
|
|
@ -2432,6 +2432,18 @@
|
||||||
"url": "/_mozilla/css/inline_absolute_hypothetical_line_metrics_a.html"
|
"url": "/_mozilla/css/inline_absolute_hypothetical_line_metrics_a.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"css/inline_absolute_hypothetical_margin_a.html": [
|
||||||
|
{
|
||||||
|
"path": "css/inline_absolute_hypothetical_margin_a.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/_mozilla/css/inline_absolute_hypothetical_margin_ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/_mozilla/css/inline_absolute_hypothetical_margin_a.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"css/inline_absolute_hypothetical_metrics_a.html": [
|
"css/inline_absolute_hypothetical_metrics_a.html": [
|
||||||
{
|
{
|
||||||
"path": "css/inline_absolute_hypothetical_metrics_a.html",
|
"path": "css/inline_absolute_hypothetical_metrics_a.html",
|
||||||
|
@ -16268,6 +16280,18 @@
|
||||||
"url": "/_mozilla/css/inline_absolute_hypothetical_line_metrics_a.html"
|
"url": "/_mozilla/css/inline_absolute_hypothetical_line_metrics_a.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"css/inline_absolute_hypothetical_margin_a.html": [
|
||||||
|
{
|
||||||
|
"path": "css/inline_absolute_hypothetical_margin_a.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/_mozilla/css/inline_absolute_hypothetical_margin_ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/_mozilla/css/inline_absolute_hypothetical_margin_a.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"css/inline_absolute_hypothetical_metrics_a.html": [
|
"css/inline_absolute_hypothetical_metrics_a.html": [
|
||||||
{
|
{
|
||||||
"path": "css/inline_absolute_hypothetical_metrics_a.html",
|
"path": "css/inline_absolute_hypothetical_metrics_a.html",
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<link rel="match" href="inline_absolute_hypothetical_margin_ref.html">
|
||||||
|
<style>
|
||||||
|
div, span {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
top: 0;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div>Wikipedia<span>X</span></div>
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<style>
|
||||||
|
span {
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div>Wikipedia<span>X</span></div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue