mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 09:54:42 +00:00
Bug 1723709 - Ignore line-height in the inside of the datetimebox when there's a fixed height specified. r=layout-reviewers,jfkthame
But use it when we're intrinsically sized. This matches other browsers. Differential Revision: https://phabricator.services.mozilla.com/D121616
This commit is contained in:
parent
fd0013fc0c
commit
77c4eb5db9
@ -155,8 +155,9 @@ void nsDateTimeControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
if (contentBoxBSize == NS_UNCONSTRAINEDSIZE) {
|
||||
// We are intrinsically sized -- we should shrinkwrap the input area's
|
||||
// block-size:
|
||||
contentBoxBSize = childMarginBoxBSize;
|
||||
// block-size, or our line-height:
|
||||
contentBoxBSize =
|
||||
std::max(aReflowInput.GetLineHeight(), childMarginBoxBSize);
|
||||
|
||||
// Make sure we obey min/max-bsize in the case when we're doing intrinsic
|
||||
// sizing (we get it for free when we have a non-intrinsic
|
||||
|
@ -0,0 +1,9 @@
|
||||
<!doctype html>
|
||||
<style>
|
||||
input {
|
||||
box-sizing: border-box;
|
||||
height: 34px;
|
||||
}
|
||||
</style>
|
||||
<input type=date>
|
||||
<input type=time>
|
10
layout/reftests/forms/input/datetime/line-height-01.html
Normal file
10
layout/reftests/forms/input/datetime/line-height-01.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!doctype html>
|
||||
<style>
|
||||
input {
|
||||
box-sizing: border-box;
|
||||
height: 34px;
|
||||
line-height: 80px;
|
||||
}
|
||||
</style>
|
||||
<input type=date>
|
||||
<input type=time>
|
@ -0,0 +1,8 @@
|
||||
<!doctype html>
|
||||
<style>
|
||||
input {
|
||||
height: 80px;
|
||||
}
|
||||
</style>
|
||||
<input type=date>
|
||||
<input type=time>
|
8
layout/reftests/forms/input/datetime/line-height-02.html
Normal file
8
layout/reftests/forms/input/datetime/line-height-02.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!doctype html>
|
||||
<style>
|
||||
input {
|
||||
line-height: 80px;
|
||||
}
|
||||
</style>
|
||||
<input type=date>
|
||||
<input type=time>
|
@ -20,3 +20,6 @@ skip-if(Android) fuzzy-if(!nativeThemePref,0-24,0-4) == time-reset-button-right-
|
||||
== reset-button-visibility-hidden.html reset-button-visibility-hidden-ref.html
|
||||
|
||||
!= text-align.html text-align-notref.html
|
||||
|
||||
== line-height-01.html line-height-01-ref.html
|
||||
== line-height-02.html line-height-02-ref.html
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
.datetimebox {
|
||||
display: flex;
|
||||
line-height: normal;
|
||||
/* TODO: Enable selection once bug 1455893 is fixed */
|
||||
user-select: none;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user