зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug 387154 -- rendering of narrow buttons (for which we need to scoot the
text over to the left) regressed. r+sr=dbaron
This commit is contained in:
Родитель
be05cfa434
Коммит
4786dc1f42
|
@ -347,7 +347,6 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
|
|||
// Indent the child inside us by the focus border. We must do this separate
|
||||
// from the regular border.
|
||||
availSize.width -= aFocusPadding.LeftRight();
|
||||
availSize.width = PR_MAX(availSize.width,0);
|
||||
|
||||
// See whether out availSize's width is big enough. If it's smaller than our
|
||||
// intrinsic min width, that means that the kid wouldn't really fit; for a
|
||||
|
@ -367,6 +366,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
|
|||
xoffset -= extraleft;
|
||||
availSize.width += extraleft + extraright;
|
||||
}
|
||||
availSize.width = PR_MAX(availSize.width,0);
|
||||
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, aFirstKid,
|
||||
availSize);
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.none { -moz-appearance: none; }
|
||||
input, button { width: 1.5em; padding: 0; font-size: 12px }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<input class="none" type="button" value="M"><br>
|
||||
<input class="none" type="button" value="M"><br>
|
||||
|
||||
<input class="none" type="button" value="Long Text"><br>
|
||||
<input class="none" type="button" value="Long Text"><br>
|
||||
|
||||
<input type="button" value="M"><br>
|
||||
<input type="button" value="M"><br>
|
||||
|
||||
<input type="button" value="Long Text"><br>
|
||||
<input type="button" value="Long Text"><br>
|
||||
|
||||
<button class="none" type="button">M</button><br>
|
||||
<button class="none" type="button">M</button><br>
|
||||
|
||||
<button class="none" type="button">Long Text</button><br>
|
||||
<button class="none" type="button">Long Text</button><br>
|
||||
|
||||
<button type="button">M</button><br>
|
||||
<button type="button">M</button><br>
|
||||
|
||||
<button type="button">Long Text</button><br>
|
||||
<button type="button">Long Text</button><br>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.none { -moz-appearance: none; }
|
||||
input, button { width: 1.5em; padding-top: 0; padding-bottom: 0; font-size: 12px }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<input class="none" type="button" value="M"><br>
|
||||
<input class="none" type="button" style="padding: 0 0.2em;" value="M"><br>
|
||||
|
||||
<input class="none" type="button" value="Long Text"><br>
|
||||
<input class="none" type="button" style="padding: 0 0.2em;" value="Long Text"><br>
|
||||
|
||||
<input type="button" value="M"><br>
|
||||
<input type="button" style="padding: 0 0.2em;" value="M"><br>
|
||||
|
||||
<input type="button" value="Long Text"><br>
|
||||
<input type="button" style="padding: 0 0.2em;" value="Long Text"><br>
|
||||
|
||||
<button class="none" type="button">M</button><br>
|
||||
<button class="none" type="button" style="padding: 0 0.2em;" >M</button><br>
|
||||
|
||||
<button class="none" type="button">Long Text</button><br>
|
||||
<button class="none" type="button" style="padding: 0 0.2em;">Long Text</button><br>
|
||||
|
||||
<button type="button">M</button><br>
|
||||
<button type="button" style="padding: 0 0.2em;">M</button><br>
|
||||
|
||||
<button type="button">Long Text</button><br>
|
||||
<button type="button" style="padding: 0 0.2em;" >Long Text</button><br>
|
||||
</body>
|
||||
</html>
|
|
@ -73,7 +73,8 @@ fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 28811-2a.html 28811-2-ref.html # bug 38
|
|||
== 163504-2b.html 163504-2-ref.html
|
||||
== 169749-1.html 169749-1-ref.html
|
||||
== 172073-1.html 172073-1-ref.html
|
||||
fails == 180085-1.html 180085-1-ref.html
|
||||
== 180085-1.html 180085-1-ref.html
|
||||
== 180085-2.html 180085-2-ref.html
|
||||
== 185388-1.html 185388-1-ref.html
|
||||
== 201215-1.html 201215-1-ref.html
|
||||
== 206516-1.html 206516-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче