зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1500530 - Make the anonymous child <label> have display:inline-block so that it applies its min-inline-size. r=jfkthame
This commit is contained in:
Родитель
66c9ef8188
Коммит
0feccf9fd7
|
@ -634,6 +634,11 @@ nsFileControlFrame::UpdateDisplayedValue(const nsAString& aValue, bool aNotify)
|
|||
if (auto* textFrame = static_cast<nsTextFrame*>(text->GetPrimaryFrame())) {
|
||||
textFrame->NotifyNativeAnonymousTextnodeChange(oldLength);
|
||||
}
|
||||
nsBlockFrame* label = do_QueryFrame(mTextContent->GetPrimaryFrame());
|
||||
if (label && label->LinesBegin() != label->LinesEnd()) {
|
||||
label->AddStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
|
||||
label->LinesBegin()->MarkDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase for bug 1500530</title>
|
||||
<style type="text/css">
|
||||
html,body {
|
||||
color:black; background-color:black; font:48pt/1 Arial; padding:0; margin:0;
|
||||
}
|
||||
|
||||
div { width: 100px; height: 20px; margin-top: -2px; background: lime; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div></div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase for bug 1500530</title>
|
||||
<style type="text/css">
|
||||
html,body {
|
||||
color:black; background-color:white; font:48pt/1 Arial; padding:0; margin:0;
|
||||
}
|
||||
|
||||
input {
|
||||
font-family: Arial;
|
||||
font-size: 48pt;
|
||||
vertical-align: top;
|
||||
background: lime;
|
||||
}
|
||||
div { text-indent: -24ch; margin-top: -2px; }
|
||||
|
||||
mask {
|
||||
position: absolute;
|
||||
left: 100px; right: 0; top: 0; bottom: 0;
|
||||
background: black;
|
||||
}
|
||||
|
||||
mask2 {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 18px; bottom: 0;
|
||||
background: black;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<mask></mask>
|
||||
<mask2></mask2>
|
||||
<div><input type="file"></div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -5,4 +5,5 @@ fuzzy-if(gtkWidget||webrender,0-1,0-10) fails-if(Android) == background.html bac
|
|||
fuzzy-if(gtkWidget,0-1,0-10) fails-if(Android) == style.html style-ref.xul
|
||||
!= width-clip.html width-clip-ref.html
|
||||
fails-if(Android) == color-inherit.html color-inherit-ref.html
|
||||
fuzzy-if(Android,1-2,2-2) fails-if(webrender) == dynamic-max-width.html dynamic-max-width-ref.html # bug 1496542 for webrender.
|
||||
fuzzy-if(Android,1-2,2-2) fails-if(webrender&&!cocoaWidget) == dynamic-max-width.html dynamic-max-width-ref.html # bug 1496542 for webrender.
|
||||
== label-min-inline-size.html label-min-inline-size-ref.html
|
||||
|
|
|
@ -486,6 +486,7 @@ input[type="file"] {
|
|||
}
|
||||
|
||||
input[type="file"] > label {
|
||||
display: inline-block;
|
||||
min-inline-size: 12em;
|
||||
padding-inline-start: 5px;
|
||||
text-align: match-parent;
|
||||
|
|
Загрузка…
Ссылка в новой задаче