mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
Bug 568825 - Fix -moz-appearance: progresschunk overflows on the bottom on Windows. r=jimm
This commit is contained in:
parent
0b2e417121
commit
4d7e6898e5
7
layout/reftests/native-theme/progress-nobar.html
Normal file
7
layout/reftests/native-theme/progress-nobar.html
Normal file
@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<div style="-moz-appearance: progressbar; width:180px; height:6px;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
10
layout/reftests/native-theme/progress-overflow-ref.html
Normal file
10
layout/reftests/native-theme/progress-overflow-ref.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<div style="overflow: hidden; -moz-appearance: progressbar; width:180px; height:40px;">
|
||||
<div style="-moz-appearance: progresschunk; width:50%; height:100%;">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<div style="-moz-appearance: progressbar; width:180px; height:6px;">
|
||||
<div style="-moz-appearance: progresschunk; width:50%; height:100%;">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
9
layout/reftests/native-theme/progress-overflow.html
Normal file
9
layout/reftests/native-theme/progress-overflow.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<div style="-moz-appearance: progressbar; width:180px; height:40px;">
|
||||
<div style="-moz-appearance: progresschunk; width:50%; height:100%;">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -64,3 +64,6 @@ skip-if(!winWidget) == scroll-thumb-minimum-size-notheme.html scroll-thumb-minim
|
||||
== border-radius.html border-radius-ref.html
|
||||
|
||||
== checkbox-dynamic-1.html checkbox-dynamic-1-ref.html
|
||||
|
||||
== progress-overflow.html progress-overflow-ref.html
|
||||
fails-if(cocoaWidget) != progress-overflow-small.html progress-nobar.html
|
||||
|
@ -343,6 +343,13 @@ static CaptionButtonPadding buttonData[3] = {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Progress bar related constants.
|
||||
*/
|
||||
// PP_CHUNK is overflowing on the bottom for no appearant reasons.
|
||||
// This is a fix around this issue.
|
||||
static const PRInt32 kProgressDeterminedXPOverflow = 11;
|
||||
|
||||
// Adds "hot" caption button padding to minimum widget size.
|
||||
static void AddPaddingRect(nsIntSize* aSize, CaptionButton button) {
|
||||
if (!aSize)
|
||||
@ -1289,6 +1296,8 @@ RENDER_AGAIN:
|
||||
}
|
||||
else if (aWidgetType == NS_THEME_WINDOW_BUTTON_CLOSE) {
|
||||
OffsetBackgroundRect(widgetRect, CAPTIONBUTTON_CLOSE);
|
||||
} else if (aWidgetType == NS_THEME_PROGRESSBAR_CHUNK) {
|
||||
widgetRect.bottom -= kProgressDeterminedXPOverflow;
|
||||
}
|
||||
|
||||
// widgetRect is the bounding box for a widget, yet the scale track is only
|
||||
|
Loading…
Reference in New Issue
Block a user