diff --git a/layout/forms/nsProgressFrame.cpp b/layout/forms/nsProgressFrame.cpp index c38447a880a7..3a733a4f3a35 100644 --- a/layout/forms/nsProgressFrame.cpp +++ b/layout/forms/nsProgressFrame.cpp @@ -266,7 +266,12 @@ nsProgressFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext, nsSize autoSize; autoSize.height = autoSize.width = fontMet->Font().size; // 1em - autoSize.width *= 10; // 10em + + if (GetStyleDisplay()->mOrient == NS_STYLE_ORIENT_VERTICAL) { + autoSize.height *= 10; // 10em + } else { + autoSize.width *= 10; // 10em + } return autoSize; } diff --git a/layout/reftests/forms/progress/bar-pseudo-element-vertical-ref.html b/layout/reftests/forms/progress/bar-pseudo-element-vertical-ref.html index e666e84db2f2..daf9d15be63e 100644 --- a/layout/reftests/forms/progress/bar-pseudo-element-vertical-ref.html +++ b/layout/reftests/forms/progress/bar-pseudo-element-vertical-ref.html @@ -18,70 +18,71 @@ body > div:nth-child(11) > .progress-bar { } /* 12 - 15 should have 100% width, no need to specify. */ body > div:nth-child(16) > .progress-bar { position: relative; top: 64px; left: 64px; - height: -moz-calc(100% + 128px - 1em); } + height: -moz-calc(100% - 32px); + width: -moz-calc(100% + 128px - 1em); } -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/layout/reftests/forms/progress/bar-pseudo-element-vertical-rtl-ref.html b/layout/reftests/forms/progress/bar-pseudo-element-vertical-rtl-ref.html index 2afb7c8a8c43..d56f89333ca4 100644 --- a/layout/reftests/forms/progress/bar-pseudo-element-vertical-rtl-ref.html +++ b/layout/reftests/forms/progress/bar-pseudo-element-vertical-rtl-ref.html @@ -17,71 +17,73 @@ body > div:nth-child(10) > .progress-bar { } body > div:nth-child(11) > .progress-bar { } /* 12 - 15 should have 100% width, no need to specify. */ - body > div:nth-child(16) > .progress-bar { position: relative; top: 64px; left: 64px; - height: -moz-calc(100% + 128px - 1em); } + body > div:nth-child(16) > .progress-bar { position: relative; top: 64px; + left: -moz-calc(100% + 128px + 32px ); + height: -moz-calc(100% - 32px); + width: -moz-calc(100% + 128px - 1em); } -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/layout/reftests/forms/progress/margin-padding-vertical-ref.html b/layout/reftests/forms/progress/margin-padding-vertical-ref.html index 33f35c306c79..1d964bdfa256 100644 --- a/layout/reftests/forms/progress/margin-padding-vertical-ref.html +++ b/layout/reftests/forms/progress/margin-padding-vertical-ref.html @@ -20,67 +20,67 @@ body > div:nth-child(16) { margin: 2px 4px 6px 8px; padding: 0px; } -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/layout/reftests/forms/progress/margin-padding-vertical-rtl-ref.html b/layout/reftests/forms/progress/margin-padding-vertical-rtl-ref.html index dcf76f0f3b8b..986a7ca44e62 100644 --- a/layout/reftests/forms/progress/margin-padding-vertical-rtl-ref.html +++ b/layout/reftests/forms/progress/margin-padding-vertical-rtl-ref.html @@ -20,67 +20,67 @@ body > div:nth-child(16) { margin: 2px 4px 6px 8px; padding: 0px; } -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/layout/reftests/forms/progress/style.css b/layout/reftests/forms/progress/style.css index 97aa489131fd..df93dd0bcac9 100644 --- a/layout/reftests/forms/progress/style.css +++ b/layout/reftests/forms/progress/style.css @@ -14,6 +14,11 @@ div.progress-element { background-color: #e6e6e6; } +div.progress-element.vertical { + height: 10em; + width: 1em; +} + div.progress-bar { -moz-appearance: progresschunk; height: 100%; diff --git a/layout/reftests/forms/progress/values-vertical-ref.html b/layout/reftests/forms/progress/values-vertical-ref.html index 61b1084e620a..e6d85b31719e 100644 --- a/layout/reftests/forms/progress/values-vertical-ref.html +++ b/layout/reftests/forms/progress/values-vertical-ref.html @@ -14,43 +14,43 @@ div:nth-child(10) > .progress-bar { position: relative; top: 90%; height: 10%; } -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/layout/reftests/forms/progress/values-vertical-rtl-ref.html b/layout/reftests/forms/progress/values-vertical-rtl-ref.html index c9c0f51ed781..6da23eae67af 100644 --- a/layout/reftests/forms/progress/values-vertical-rtl-ref.html +++ b/layout/reftests/forms/progress/values-vertical-rtl-ref.html @@ -14,43 +14,43 @@ div:nth-child(10) > .progress-bar { position: relative; top: 90%; height: 10%; } -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+