layout: Use the margin box for vertical positioning of inline-block

fragments if `overflow` is not `visible` per CSS 2.1 § 10.8.1.

Additionally, this patch reverts the change introduced in #12642 in
favor of the spec-compliant behavior described above. This patch also
removes the `inline_block_overflow.html` reftest introduced in #3725, as
the behavior it expected contradicted CSS 2.1 (and in fact the test
fails in Gecko).

The changes that this patch makes to `input_selection_a.html` and
`input_selection_incremental_a.html` are necessary workarounds to make
the tests pass in light of the fact that Servo's UA stylesheet applies
`overflow: hidden` to `<input>` elements. I believe that the changes are
not necessary in other rendering engines because they hard-code
`overflow: hidden`-like behavior for `<input>` elements, while Servo
uses the actual CSS `overflow: hidden` behavior. As far as I can tell,
Servo's behavior is arguably more spec-compliant, but it remains to be
seen how Web compatible it is.

Improves the Google results pages.

Closes #13707.
This commit is contained in:
Patrick Walton 2016-10-12 12:13:48 -07:00
parent a332e0bb56
commit c25dd2adf6
13 changed files with 97 additions and 57 deletions

View file

@ -2540,6 +2540,18 @@
"url": "/_mozilla/css/inline_block_centering_a.html"
}
],
"css/inline_block_explicit_height_a.html": [
{
"path": "css/inline_block_explicit_height_a.html",
"references": [
[
"/_mozilla/css/inline_block_explicit_height_ref.html",
"=="
]
],
"url": "/_mozilla/css/inline_block_explicit_height_a.html"
}
],
"css/inline_block_height_with_out_of_flow_child_a.html": [
{
"path": "css/inline_block_height_with_out_of_flow_child_a.html",
@ -2624,18 +2636,6 @@
"url": "/_mozilla/css/inline_block_opacity_change.html"
}
],
"css/inline_block_overflow.html": [
{
"path": "css/inline_block_overflow.html",
"references": [
[
"/_mozilla/css/inline_block_overflow_ref.html",
"=="
]
],
"url": "/_mozilla/css/inline_block_overflow.html"
}
],
"css/inline_block_overflow_hidden_a.html": [
{
"path": "css/inline_block_overflow_hidden_a.html",
@ -16322,6 +16322,18 @@
"url": "/_mozilla/css/inline_block_centering_a.html"
}
],
"css/inline_block_explicit_height_a.html": [
{
"path": "css/inline_block_explicit_height_a.html",
"references": [
[
"/_mozilla/css/inline_block_explicit_height_ref.html",
"=="
]
],
"url": "/_mozilla/css/inline_block_explicit_height_a.html"
}
],
"css/inline_block_height_with_out_of_flow_child_a.html": [
{
"path": "css/inline_block_height_with_out_of_flow_child_a.html",
@ -16406,18 +16418,6 @@
"url": "/_mozilla/css/inline_block_opacity_change.html"
}
],
"css/inline_block_overflow.html": [
{
"path": "css/inline_block_overflow.html",
"references": [
[
"/_mozilla/css/inline_block_overflow_ref.html",
"=="
]
],
"url": "/_mozilla/css/inline_block_overflow.html"
}
],
"css/inline_block_overflow_hidden_a.html": [
{
"path": "css/inline_block_overflow_hidden_a.html",