Back out bug 514437, bug 567872, bug 568825, bug 633209, bug 633913, bug 634086, bug 634088, bug 634549, bug 634551, bug 638176, bug 641517, bug 641905, bug 641942, bug 642127, and bug 642667 to undo the performance regression tracked by bug 655860.
authorShawn Wilsher <me@shawnwilsher.com>
Mon, 09 May 2011 15:48:39 -0700
changeset 69464 dd9ba28d2bd9b813eed90c551bbf6d2cda5832b1
parent 69400 390072430c56bad2c63b473f3b91570dbd6b2262
child 69465 65316725d03b17320542473d89362b5ccfd2f84b
push id76
push userbzbarsky@mozilla.com
push dateTue, 05 Jul 2011 17:00:57 +0000
treeherdermozilla-beta@d3a2732c35f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs514437, 567872, 568825, 633209, 633913, 634086, 634088, 634549, 634551, 638176, 641517, 641905, 641942, 642127, 642667, 655860
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Back out bug 514437, bug 567872, bug 568825, bug 633209, bug 633913, bug 634086, bug 634088, bug 634549, bug 634551, bug 638176, bug 641517, bug 641905, bug 641942, bug 642127, and bug 642667 to undo the performance regression tracked by bug 655860.
content/html/content/src/nsHTMLProgressElement.cpp
content/html/content/test/Makefile.in
content/html/content/test/test_bug514437.html
content/html/content/test/test_bug588683-1.html
layout/base/nsCSSFrameConstructor.cpp
layout/forms/Makefile.in
layout/forms/nsProgressFrame.cpp
layout/forms/nsProgressFrame.h
layout/generic/nsHTMLParts.h
layout/generic/nsQueryFrame.h
layout/reftests/bugs/474336-1-ref.xul
layout/reftests/bugs/474336-1.xul
layout/reftests/forms/progress/bar-pseudo-element-ref.html
layout/reftests/forms/progress/bar-pseudo-element-rtl-ref.html
layout/reftests/forms/progress/bar-pseudo-element-rtl.html
layout/reftests/forms/progress/bar-pseudo-element.html
layout/reftests/forms/progress/indeterminate-style-width-ref.html
layout/reftests/forms/progress/indeterminate-style-width.html
layout/reftests/forms/progress/margin-padding-ref.html
layout/reftests/forms/progress/margin-padding-rtl-ref.html
layout/reftests/forms/progress/margin-padding-rtl.html
layout/reftests/forms/progress/margin-padding.html
layout/reftests/forms/progress/reftest.list
layout/reftests/forms/progress/style.css
layout/reftests/forms/progress/transformations-ref.html
layout/reftests/forms/progress/transformations.html
layout/reftests/forms/progress/values-ref.html
layout/reftests/forms/progress/values-rtl-ref.html
layout/reftests/forms/progress/values-rtl.html
layout/reftests/forms/progress/values.html
layout/reftests/forms/reftest.list
layout/reftests/native-theme/progress-nobar.html
layout/reftests/native-theme/progress-overflow-ref.html
layout/reftests/native-theme/progress-overflow-small.html
layout/reftests/native-theme/progress-overflow.html
layout/reftests/native-theme/reftest.list
layout/style/forms.css
layout/style/html.css
layout/style/nsCSSPseudoElementList.h
layout/style/nsStyleContext.cpp
widget/reftests/progressbar-fallback-default-style-ref.html
widget/reftests/progressbar-fallback-default-style.html
widget/reftests/reftest.list
widget/src/cocoa/nsNativeThemeCocoa.h
widget/src/cocoa/nsNativeThemeCocoa.mm
widget/src/gtk2/gtk2drawing.c
widget/src/gtk2/gtkdrawing.h
widget/src/gtk2/nsNativeThemeGTK.cpp
widget/src/windows/nsNativeThemeWin.cpp
widget/src/windows/nsUXThemeConstants.h
widget/src/xpwidgets/Makefile.in
widget/src/xpwidgets/nsNativeTheme.cpp
widget/src/xpwidgets/nsNativeTheme.h
widget/src/xpwidgets/nsWidgetAtomList.h
--- a/content/html/content/src/nsHTMLProgressElement.cpp
+++ b/content/html/content/src/nsHTMLProgressElement.cpp
@@ -33,17 +33,16 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMHTMLProgressElement.h"
 #include "nsGenericHTMLElement.h"
 #include "nsAttrValue.h"
-#include "nsEventStateManager.h"
 
 
 class nsHTMLProgressElement : public nsGenericHTMLFormElement,
                               public nsIDOMHTMLProgressElement
 {
 public:
   nsHTMLProgressElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual ~nsHTMLProgressElement();
@@ -63,18 +62,16 @@ public:
   // nsIDOMHTMLProgressElement
   NS_DECL_NSIDOMHTMLPROGRESSELEMENT
 
   // nsIFormControl
   NS_IMETHOD_(PRUint32) GetType() const { return NS_FORM_PROGRESS; }
   NS_IMETHOD Reset();
   NS_IMETHOD SubmitNamesValues(nsFormSubmission* aFormSubmission);
 
-  nsEventStates IntrinsicState() const;
-
   nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const;
 
   PRBool ParseAttribute(PRInt32 aNamespaceID, nsIAtom* aAttribute,
                         const nsAString& aValue, nsAttrValue& aResult);
 
   virtual nsXPCClassInfo* GetClassInfo();
 
 protected:
@@ -132,28 +129,16 @@ nsHTMLProgressElement::Reset()
 
 NS_IMETHODIMP
 nsHTMLProgressElement::SubmitNamesValues(nsFormSubmission* aFormSubmission)
 {
   // The progress element is not submittable.
   return NS_OK;
 }
 
-nsEventStates
-nsHTMLProgressElement::IntrinsicState() const
-{
-  nsEventStates state = nsGenericHTMLFormElement::IntrinsicState();
-
-  if (IsIndeterminate()) {
-    state |= NS_EVENT_STATE_INDETERMINATE;
-  }
-
-  return state;
-}
-
 PRBool
 nsHTMLProgressElement::ParseAttribute(PRInt32 aNamespaceID, nsIAtom* aAttribute,
                                       const nsAString& aValue, nsAttrValue& aResult)
 {
   if (aNamespaceID == kNameSpaceID_None) {
     if (aAttribute == nsGkAtoms::value || aAttribute == nsGkAtoms::max) {
       return aResult.ParseDoubleValue(aValue);
     }
--- a/content/html/content/test/Makefile.in
+++ b/content/html/content/test/Makefile.in
@@ -257,13 +257,12 @@ include $(topsrcdir)/config/rules.mk
 		test_bug622597.html \
 		test_bug636336.html \
 		test_bug630889.html \
 		test_bug610212.html \
 		test_bug633058.html \
 		test_bug641219.html \
 		test_bug643051.html \
 		test_bug583514.html \
-		test_bug514437.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
deleted file mode 100644
--- a/content/html/content/test/test_bug514437.html
+++ /dev/null
@@ -1,323 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=514437
-https://bugzilla.mozilla.org/show_bug.cgi?id=633913
--->
-<head>
-  <title>Test for Bug 514437 and Bug 633913</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=514437">Mozilla Bug 514437</a>
-and
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=633913">Mozilla Bug 633913</a>
-<p id="display"></p>
-<iframe name="submit_frame" onload="onFormSubmission();" style="visibility: hidden;"></iframe>
-<div id="content" style="visibility: hidden;">
-  <form id='f' method='get' target='submit_frame' action='foo'>
-    <progress id='p'></progress>
-  </form>
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-/** Test for Bug 514437 and Bug 633913 **/
-
-function checkFormIDLAttribute(aElement)
-{
-  var form = document.forms[0];
-  var content = document.getElementById('content');
-  is(aElement.form, form, "The form IDL attribute should be the parent form");
-
-  content.removeChild(form);
-  content.appendChild(aElement);
-  is(aElement.form, null, "The form IDL attribute should be null");
-
-  // Cleaning-up.
-  content.appendChild(form);
-  form.appendChild(aElement);
-}
-
-function checkAttribute(aElement, aAttribute, aNewValue, aExpectedValueForIDL)
-{
-  var expectedValueForIDL = aNewValue;
-  var expectedValueForContent = aNewValue;
-
-  if (aExpectedValueForIDL !== undefined) {
-    expectedValueForIDL = aExpectedValueForIDL;
-  }
-
-  if (aNewValue != null) {
-    aElement.setAttribute(aAttribute, aNewValue);
-    is(aElement.getAttribute(aAttribute), expectedValueForContent,
-       aAttribute + " content attribute should be " + expectedValueForContent);
-    is(aElement[aAttribute], expectedValueForIDL,
-       aAttribute + " IDL attribute should be " + expectedValueForIDL);
-
-    if (parseFloat(aNewValue) == aNewValue) {
-      aElement[aAttribute] = aNewValue;
-      is(aElement.getAttribute(aAttribute), expectedValueForContent,
-         aAttribute + " content attribute should be " + expectedValueForContent);
-      is(aElement[aAttribute], parseFloat(expectedValueForIDL),
-         aAttribute + " IDL attribute should be " + parseFloat(expectedValueForIDL));
-    }
-  } else {
-    aElement.removeAttribute(aAttribute);
-    is(aElement.getAttribute(aAttribute), expectedValueForContent,
-       aAttribute + " content attribute should be " + expectedValueForContent);
-    is(aElement[aAttribute], expectedValueForIDL,
-       aAttribute + " IDL attribute should be " + expectedValueForIDL);
-  }
-}
-
-function checkValueAttribute()
-{
-  var tests = [
-    // value has to be a valid float, its default value is 0.0 otherwise.
-    [ null, 0.0 ],
-    [ 'fo', 0.0 ],
-    // If value < 0.0, 0.0 is used instead.
-    [ -1.0, 0.0 ],
-    // If value >= max, max is used instead (max default value is 1.0).
-    [  2.0, 1.0 ],
-    [  1.0, 0.5, 0.5 ],
-    [  10.0, 5.0, 5.0 ],
-    [ 13.37, 13.37, 42.0 ],
-    // Regular reflection.
-    [  0.0 ],
-    [  0.5 ],
-    [  1.0 ],
-    // Check double-precision value.
-    [  0.234567898765432 ],
-  ];
-
-  var element = document.createElement('progress');
-
-  for each(var test in tests) {
-    if (test[2]) {
-      element.setAttribute('max', test[2]);
-    }
-
-    checkAttribute(element, 'value', test[0], test[1]);
-
-    element.removeAttribute('max');
-  }
-}
-
-function checkMaxAttribute()
-{
-  var tests = [
-    // max default value is 1.0.
-    [ null, 1.0 ],
-    // If value <= 0.0, 1.0 is used instead.
-    [  0.0, 1.0 ],
-    [ -1.0, 1.0 ],
-    // Regular reflection.
-    [  0.5 ],
-    [  1.0 ],
-    [  2.0 ],
-    // Check double-precision value.
-    [  0.234567898765432 ],
-  ];
-
-  var element = document.createElement('progress');
-
-  for each(var test in tests) {
-    checkAttribute(element, 'max', test[0], test[1]);
-  }
-}
-
-function checkPositionAttribute()
-{
-  function checkPositionValue(aElement, aValue, aMax, aExpected) {
-    if (aValue != null) {
-      aElement.setAttribute('value', aValue);
-    } else {
-      aElement.removeAttribute('value');
-    }
-
-    if (aMax != null) {
-      aElement.setAttribute('max', aMax);
-    } else {
-      aElement.removeAttribute('max');
-    }
-
-    is(aElement.position, aExpected, "position IDL attribute should be " + aExpected);
-  }
-
-  var tests = [
-    // value has to be defined (indeterminate state).
-    [ null, null, -1.0 ],
-    [ null,  1.0, -1.0 ],
-    // value has to be defined to a valid float (indeterminate state).
-    [ 'foo', 1.0, -1.0 ],
-    // If value < 0.0, 0.0 is used instead.
-    [ -1.0,  1.0,  0.0 ],
-    // If value >= max, max is used instead.
-    [  2.0,  1.0,  1.0 ],
-    // If max isn't present, max is set to 1.0.
-    [ 1.0,  null,  1.0 ],
-    // If max isn't a valid float, max is set to 1.0.
-    [ 1.0, 'foo',  1.0 ],
-    // If max isn't > 0, max is set to 1.0.
-    [ 1.0,  -1.0,  1.0 ],
-    // A few simple and valid values.
-    [ 0.0,   1.0,  0.0 ],
-    [ 0.1,   1.0,  0.1/1.0  ],
-    [ 0.1,   2.0,  0.1/2.0  ],
-    [  10,    50,  10/50 ],
-    // Values implying .position is a double.
-    [ 1.0,   3.0,  1.0/3.0 ],
-    [ 0.1,   0.7,  0.1/0.7  ],
-  ];
-
-  var element = document.createElement('progress');
-
-  for each(var test in tests) {
-    checkPositionValue(element, test[0], test[1], test[2], test[3]);
-  }
-}
-
-function checkIndeterminatePseudoClass()
-{
-  function checkIndeterminate(aElement, aValue, aMax, aIndeterminate) {
-    if (aValue != null) {
-      aElement.setAttribute('value', aValue);
-    } else {
-      aElement.removeAttribute('value');
-    }
-
-    if (aMax != null) {
-      aElement.setAttribute('max', aMax);
-    } else {
-      aElement.removeAttribute('max');
-    }
-
-    is(aElement.mozMatchesSelector("progress:indeterminate"), aIndeterminate,
-       "<progress> indeterminate state should be " + aIndeterminate);
-  }
-
-  var tests = [
-    // Indeterminate state: (value is undefined, or not a float)
-    // value has to be defined (indeterminate state).
-    [ null, null, true ],
-    [ null,  1.0, true ],
-    [ 'foo', 1.0, true ],
-    // Determined state:
-    [ -1.0,  1.0, false ],
-    [  2.0,  1.0, false ],
-    [ 1.0,  null, false ],
-    [ 1.0, 'foo', false ],
-    [ 1.0,  -1.0, false ],
-    [ 0.0,   1.0, false ],
-  ];
-
-  var element = document.createElement('progress');
-
-  for each(var test in tests) {
-    checkIndeterminate(element, test[0], test[1], test[2]);
-  }
-}
-
-function checkFormListedElement(aElement)
-{
-  is(document.forms[0].elements.length, 0, "the form should have no element");
-}
-
-function checkLabelable(aElement)
-{
-  var content = document.getElementById('content');
-  var label = document.createElement('label');
-
-  content.appendChild(label);
-  label.appendChild(aElement);
-  is(label.control, aElement, "progress should be labelable");
-
-  // Cleaning-up.
-  content.removeChild(label);
-  content.appendChild(aElement);
-}
-
-function checkNotResetableAndFormSubmission(aElement)
-{
-  // Creating an input element to check the submission worked.
-  var form = document.forms[0];
-  var input = document.createElement('input');
-
-  input.name = 'a';
-  input.value = 'tulip';
-  form.appendChild(input);
-
-  // Setting values.
-  aElement.value = 42.0;
-  aElement.max = 100.0;
-
-  // This is going to call onFormSubmission().
-  form.submit();
-}
-
-function onFormSubmission()
-{
-  /**
-   * All elements values have been set just before the submission.
-   * The input element value should be in the submit url but the progress
-   * element value should not appear.
-   */
-  is(frames['submit_frame'].location.href,
-    'http://mochi.test:8888/tests/content/html/content/test/foo?a=tulip',
-     "The progress element value should not be submitted");
-
-  checkNotResetable();
-}
-
-function checkNotResetable()
-{
-  // Try to reset the form.
-  var form = document.forms[0];
-  var element = document.getElementById('p');
-
-  element.value = 3.0;
-  element.max = 42.0;
-
-  form.reset();
-
-  SimpleTest.executeSoon(function() {
-    is(element.value, 3.0, "progress.value should not have changed");
-    is(element.max, 42.0, "progress.max should not have changed");
-
-    SimpleTest.finish();
-  });
-}
-
-SimpleTest.waitForExplicitFinish();
-
-var p = document.getElementById('p');
-
-ok(p instanceof HTMLProgressElement,
-   "The progress element should be instance of HTMLProgressElement");
-is(p.constructor, HTMLProgressElement,
-   "The progress element constructor should be HTMLProgressElement");
-
-checkFormIDLAttribute(p);
-
-checkValueAttribute();
-
-checkMaxAttribute();
-
-checkPositionAttribute();
-
-checkIndeterminatePseudoClass();
-
-checkFormListedElement(p);
-
-checkLabelable(p);
-
-checkNotResetableAndFormSubmission(p);
-
-</script>
-</pre>
-</body>
-</html>
--- a/content/html/content/test/test_bug588683-1.html
+++ b/content/html/content/test/test_bug588683-1.html
@@ -396,22 +396,23 @@ var content = document.getElementById('c
 var forms = [
   document.createElement('form'),
   document.createElement('form'),
   document.createElement('form'),
 ];
 
 var elementNames = [
   'button', 'fieldset', 'input', 'label', 'object', 'output', 'select',
-  'textarea', 'progress',
+  'textarea',
 ];
 
 var todoElements = [
   ['keygen', 'Keygen'],
   ['meter', 'Meter'],
+  ['progress', 'Progress'],
 ];
 
 for each(var e in todoElements) {
   var node = document.createElement(e[0]);
   var nodeString = HTMLElement.prototype.toString.apply(node);
   nodeString = nodeString.replace(/Element[\] ].*/, "Element");
   todo_is(nodeString, "[object HTML" + e[1] + "Element",
           e[0] + " should not be implemented");
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -3543,18 +3543,17 @@ nsCSSFrameConstructor::FindHTMLData(Elem
     SIMPLE_TAG_CREATE(frameset, NS_NewHTMLFramesetFrame),
     SIMPLE_TAG_CREATE(iframe, NS_NewSubDocumentFrame),
     COMPLEX_TAG_CREATE(button, &nsCSSFrameConstructor::ConstructButtonFrame),
     SIMPLE_TAG_CREATE(canvas, NS_NewHTMLCanvasFrame),
 #if defined(MOZ_MEDIA)
     SIMPLE_TAG_CREATE(video, NS_NewHTMLVideoFrame),
     SIMPLE_TAG_CREATE(audio, NS_NewHTMLVideoFrame),
 #endif
-    SIMPLE_TAG_CREATE(isindex, NS_NewIsIndexFrame),
-    SIMPLE_TAG_CREATE(progress, NS_NewProgressFrame)
+    SIMPLE_TAG_CREATE(isindex, NS_NewIsIndexFrame)
   };
 
   return FindDataByTag(aTag, aElement, aStyleContext, sHTMLData,
                        NS_ARRAY_LENGTH(sHTMLData));
 }
 
 /* static */
 const nsCSSFrameConstructor::FrameConstructionData*
--- a/layout/forms/Makefile.in
+++ b/layout/forms/Makefile.in
@@ -67,17 +67,16 @@ CPPSRCS		= \
 		nsButtonFrameRenderer.cpp \
 		nsComboboxControlFrame.cpp \
 		nsFieldSetFrame.cpp \
 		nsFileControlFrame.cpp \
 		nsFormControlFrame.cpp \
 		nsGfxButtonControlFrame.cpp \
 		nsGfxCheckboxControlFrame.cpp \
 		nsGfxRadioControlFrame.cpp \
-		nsProgressFrame.cpp \
 		nsTextControlFrame.cpp \
 		nsHTMLButtonControlFrame.cpp \
 		nsImageControlFrame.cpp \
 		nsLegendFrame.cpp \
 		nsListControlFrame.cpp \
 		nsIsIndexFrame.cpp \
 		nsSelectsAreaFrame.cpp \
 		$(NULL)
deleted file mode 100644
--- a/layout/forms/nsProgressFrame.cpp
+++ /dev/null
@@ -1,289 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Mozilla Foundation
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Mounir Lamouri <mounir.lamouri@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsProgressFrame.h"
-
-#include "nsIDOMHTMLProgressElement.h"
-#include "nsIContent.h"
-#include "prtypes.h"
-#include "nsPresContext.h"
-#include "nsGkAtoms.h"
-#include "nsINameSpaceManager.h"
-#include "nsIDocument.h"
-#include "nsIPresShell.h"
-#include "nsNodeInfoManager.h"
-#include "nsINodeInfo.h"
-#include "nsContentCreatorFunctions.h"
-#include "nsContentUtils.h"
-#include "nsFormControlFrame.h"
-#include "nsFontMetrics.h"
-
-
-nsIFrame*
-NS_NewProgressFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
-{
-  return new (aPresShell) nsProgressFrame(aContext);
-}
-
-NS_IMPL_FRAMEARENA_HELPERS(nsProgressFrame)
-
-nsProgressFrame::nsProgressFrame(nsStyleContext* aContext)
-  : nsHTMLContainerFrame(aContext)
-  , mBarDiv(nsnull)
-{
-}
-
-nsProgressFrame::~nsProgressFrame()
-{
-}
-
-NS_IMETHODIMP
-nsProgressFrame::SetInitialChildList(nsIAtom*     aListName,
-                                     nsFrameList& aChildList)
-{
-  NS_ASSERTION(mBarDiv, "Progress bar div must exist!");
-
-  nsresult rv = nsHTMLContainerFrame::SetInitialChildList(aListName,
-                                                          aChildList);
-
-  nsIFrame* barFrame = mBarDiv->GetPrimaryFrame();
-  nsCSSPseudoElements::Type pseudoType = nsCSSPseudoElements::ePseudo_mozProgressBar;
-  nsRefPtr<nsStyleContext> newStyleContext;
-
-  newStyleContext = barFrame->PresContext()->StyleSet()->
-    ResolvePseudoElementStyle(mContent->AsElement(), pseudoType,
-                              barFrame->GetParent()->GetStyleContext());
-
-  if (newStyleContext) {
-    barFrame->SetStyleContext(newStyleContext);
-  }
-
-  return rv;
-}
-
-void
-nsProgressFrame::DestroyFrom(nsIFrame* aDestructRoot)
-{
-  NS_ASSERTION(!GetPrevContinuation(),
-               "nsProgressFrame should not have continuations; if it does we "
-               "need to call RegUnregAccessKey only for the first.");
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), PR_FALSE);
-  nsContentUtils::DestroyAnonymousContent(&mBarDiv);
-  nsHTMLContainerFrame::DestroyFrom(aDestructRoot);
-}
-
-nsresult
-nsProgressFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
-{
-  // Get the NodeInfoManager and tag necessary to create the progress bar div.
-  nsCOMPtr<nsIDocument> doc = mContent->GetDocument();
-
-  nsCOMPtr<nsINodeInfo> nodeInfo;
-  nodeInfo = doc->NodeInfoManager()->GetNodeInfo(nsGkAtoms::div, nsnull,
-                                                 kNameSpaceID_XHTML);
-  NS_ENSURE_TRUE(nodeInfo, NS_ERROR_OUT_OF_MEMORY);
-
-  // Create the div.
-  nsresult rv = NS_NewHTMLElement(getter_AddRefs(mBarDiv), nodeInfo.forget(),
-                                  mozilla::dom::NOT_FROM_PARSER);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  if (!aElements.AppendElement(mBarDiv)) {
-    return NS_ERROR_OUT_OF_MEMORY;
-  }
-
-  return NS_OK;
-}
-
-void
-nsProgressFrame::AppendAnonymousContentTo(nsBaseContentList& aElements,
-                                          PRUint32 aFilter)
-{
-  aElements.MaybeAppendElement(mBarDiv);
-}
-
-NS_QUERYFRAME_HEAD(nsProgressFrame)
-  NS_QUERYFRAME_ENTRY(nsProgressFrame)
-  NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator)
-NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
-
-
-NS_IMETHODIMP nsProgressFrame::Reflow(nsPresContext*           aPresContext,
-                                      nsHTMLReflowMetrics&     aDesiredSize,
-                                      const nsHTMLReflowState& aReflowState,
-                                      nsReflowStatus&          aStatus)
-{
-  DO_GLOBAL_REFLOW_COUNT("nsProgressFrame");
-  DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
-
-  NS_ASSERTION(mBarDiv, "Progress bar div must exist!");
-  NS_ASSERTION(!GetPrevContinuation(),
-               "nsProgressFrame should not have continuations; if it does we "
-               "need to call RegUnregAccessKey only for the first.");
-
-  if (mState & NS_FRAME_FIRST_REFLOW) {
-    nsFormControlFrame::RegUnRegAccessKey(this, PR_TRUE);
-  }
-
-  nsIFrame* barFrame = mBarDiv->GetPrimaryFrame();
-  NS_ASSERTION(barFrame, "The progress frame should have a child with a frame!");
-
-  ReflowBarFrame(barFrame, aPresContext, aReflowState, aStatus);
-
-  aDesiredSize.width = aReflowState.ComputedWidth() +
-                       aReflowState.mComputedBorderPadding.LeftRight();
-  aDesiredSize.height = aReflowState.ComputedHeight() +
-                        aReflowState.mComputedBorderPadding.TopBottom();
-  aDesiredSize.height = NS_CSS_MINMAX(aDesiredSize.height,
-                                      aReflowState.mComputedMinHeight,
-                                      aReflowState.mComputedMaxHeight);
-
-  aDesiredSize.SetOverflowAreasToDesiredBounds();
-  ConsiderChildOverflow(aDesiredSize.mOverflowAreas, barFrame);
-  FinishAndStoreOverflow(&aDesiredSize);
-
-  aStatus = NS_FRAME_COMPLETE;
-
-  NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
-
-  return NS_OK;
-}
-
-void
-nsProgressFrame::ReflowBarFrame(nsIFrame*                aBarFrame,
-                                nsPresContext*           aPresContext,
-                                const nsHTMLReflowState& aReflowState,
-                                nsReflowStatus&          aStatus)
-{
-  nsHTMLReflowState reflowState(aPresContext, aReflowState, aBarFrame,
-                                nsSize(aReflowState.ComputedWidth(),
-                                       NS_UNCONSTRAINEDSIZE));
-  nscoord width = aReflowState.ComputedWidth();
-  nscoord xoffset = aReflowState.mComputedBorderPadding.left;
-  nscoord yoffset = aReflowState.mComputedBorderPadding.top;
-
-  double position;
-  nsCOMPtr<nsIDOMHTMLProgressElement> progressElement =
-    do_QueryInterface(mContent);
-  progressElement->GetPosition(&position);
-
-  // Force the bar's width to match the current progress.
-  // When indeterminate, the progress' width will be 100%.
-  if (position >= 0.0) {
-    width *= position;
-  }
-
-  if (GetStyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL) {
-    xoffset += aReflowState.ComputedWidth() - width;
-  }
-
-  // The bar width is fixed in these cases:
-  // - the progress position is determined: the bar width is fixed according
-  //   to it's value.
-  // - the progress position is indeterminate and the bar appearance should be
-  //   shown as native: the bar width is forced to 100%.
-  // Otherwise (when the progress is indeterminate and the bar appearance isn't
-  // native), the bar width isn't fixed and can be set by the author.
-  if (position != -1 || ShouldUseNativeStyle()) {
-    width -= reflowState.mComputedMargin.LeftRight() +
-             reflowState.mComputedBorderPadding.LeftRight();
-    width = NS_MAX(width, 0);
-    reflowState.SetComputedWidth(width);
-  }
-
-  xoffset += reflowState.mComputedMargin.left;
-  yoffset += reflowState.mComputedMargin.top;
-
-  nsHTMLReflowMetrics barDesiredSize;
-  ReflowChild(aBarFrame, aPresContext, barDesiredSize, reflowState, xoffset,
-              yoffset, 0, aStatus);
-  FinishReflowChild(aBarFrame, aPresContext, &reflowState, barDesiredSize,
-                    xoffset, yoffset, 0);
-}
-
-NS_IMETHODIMP
-nsProgressFrame::AttributeChanged(PRInt32  aNameSpaceID,
-                                  nsIAtom* aAttribute,
-                                  PRInt32  aModType)
-{
-  NS_ASSERTION(mBarDiv, "Progress bar div must exist!");
-
-  if (aNameSpaceID == kNameSpaceID_None &&
-      (aAttribute == nsGkAtoms::value || aAttribute == nsGkAtoms::max)) {
-    nsIFrame* barFrame = mBarDiv->GetPrimaryFrame();
-    NS_ASSERTION(barFrame, "The progress frame should have a child with a frame!");
-    PresContext()->PresShell()->FrameNeedsReflow(barFrame, nsIPresShell::eResize,
-                                                 NS_FRAME_IS_DIRTY);
-  }
-
-  return nsHTMLContainerFrame::AttributeChanged(aNameSpaceID, aAttribute,
-                                                aModType);
-}
-
-nsSize
-nsProgressFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
-                                 nsSize aCBSize, nscoord aAvailableWidth,
-                                 nsSize aMargin, nsSize aBorder,
-                                 nsSize aPadding, PRBool aShrinkWrap)
-{
-  nsRefPtr<nsFontMetrics> fontMet;
-  NS_ENSURE_SUCCESS(nsLayoutUtils::GetFontMetricsForFrame(this,
-                                                          getter_AddRefs(fontMet)),
-                    nsSize(0, 0));
-
-  nsSize autoSize;
-  autoSize.height = autoSize.width = fontMet->Font().size; // 1em
-  autoSize.width *= 10; // 10em
-
-  return autoSize;
-}
-
-bool
-nsProgressFrame::ShouldUseNativeStyle() const
-{
-  // Use the native style if these conditions are satisfied:
-  // - both frames use the native appearance;
-  // - neither frame has author specified rules setting the border or the
-  //   background.
-  return GetStyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR &&
-         mBarDiv->GetPrimaryFrame()->GetStyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR_CHUNK &&
-         !PresContext()->HasAuthorSpecifiedRules(const_cast<nsProgressFrame*>(this),
-                                                 NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND) &&
-         !PresContext()->HasAuthorSpecifiedRules(mBarDiv->GetPrimaryFrame(),
-                                                 NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND);
-}
-
deleted file mode 100644
--- a/layout/forms/nsProgressFrame.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Mozilla Foundation
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Mounir Lamouri <mounir.lamouri@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nsProgressFrame_h___
-#define nsProgressFrame_h___
-
-#include "nsHTMLContainerFrame.h"
-#include "nsIAnonymousContentCreator.h"
-#include "nsCOMPtr.h"
-
-
-class nsProgressFrame : public nsHTMLContainerFrame,
-                        public nsIAnonymousContentCreator
-{
-public:
-  NS_DECL_QUERYFRAME_TARGET(nsProgressFrame)
-  NS_DECL_QUERYFRAME
-  NS_DECL_FRAMEARENA_HELPERS
-
-  nsProgressFrame(nsStyleContext* aContext);
-  virtual ~nsProgressFrame();
-
-  NS_IMETHOD SetInitialChildList(nsIAtom*     aListName,
-                                 nsFrameList& aChildList);
-
-  virtual void DestroyFrom(nsIFrame* aDestructRoot);
-
-  NS_IMETHOD Reflow(nsPresContext*           aCX,
-                    nsHTMLReflowMetrics&     aDesiredSize,
-                    const nsHTMLReflowState& aReflowState,
-                    nsReflowStatus&          aStatus);
-
-#ifdef NS_DEBUG
-  NS_IMETHOD GetFrameName(nsAString& aResult) const {
-    return MakeFrameName(NS_LITERAL_STRING("Progress"), aResult);
-  }
-#endif
-
-  virtual PRBool IsLeaf() const { return PR_TRUE; }
-
-  // nsIAnonymousContentCreator
-  virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements);
-  virtual void AppendAnonymousContentTo(nsBaseContentList& aElements,
-                                        PRUint32 aFilter);
-
-  NS_IMETHOD AttributeChanged(PRInt32  aNameSpaceID,
-                              nsIAtom* aAttribute,
-                              PRInt32  aModType);
-
-  virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,
-                                 nsSize aCBSize, nscoord aAvailableWidth,
-                                 nsSize aMargin, nsSize aBorder,
-                                 nsSize aPadding, PRBool aShrinkWrap);
-
-  virtual PRBool IsFrameOfType(PRUint32 aFlags) const
-  {
-    return nsHTMLContainerFrame::IsFrameOfType(aFlags &
-      ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
-  }
-
-  /**
-   * Returns whether the frame and its child should use the native style.
-   */
-  bool ShouldUseNativeStyle() const;
-
-protected:
-  // Helper function which reflow the anonymous div frame.
-  void ReflowBarFrame(nsIFrame*                aBarFrame,
-                      nsPresContext*           aPresContext,
-                      const nsHTMLReflowState& aReflowState,
-                      nsReflowStatus&          aStatus);
-
-  /**
-   * The div used to show the progress bar.
-   * @see nsProgressFrame::CreateAnonymousContent
-   */
-  nsCOMPtr<nsIContent> mBarDiv;
-};
-
-#endif
-
--- a/layout/generic/nsHTMLParts.h
+++ b/layout/generic/nsHTMLParts.h
@@ -199,18 +199,16 @@ NS_NewNativeRadioControlFrame(nsIPresShe
 nsIFrame*
 NS_NewNativeSelectControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewListControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRUint32 aFlags);
 nsIFrame*
 NS_NewIsIndexFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
-nsIFrame*
-NS_NewProgressFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 // Table frame factories
 nsIFrame*
 NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewTableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewTableCaptionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
--- a/layout/generic/nsQueryFrame.h
+++ b/layout/generic/nsQueryFrame.h
@@ -180,17 +180,16 @@ public:
     nsMenuFrame_id,
     nsMenuPopupFrame_id,
     nsObjectFrame_id,
     nsPageBreakFrame_id,
     nsPageContentFrame_id,
     nsPageFrame_id,
     nsPlaceholderFrame_id,
     nsPopupSetFrame_id,
-    nsProgressFrame_id,
     nsProgressMeterFrame_id,
     nsResizerFrame_id,
     nsRootBoxFrame_id,
     nsScrollbarButtonFrame_id,
     nsScrollbarFrame_id,
     nsSelectsAreaFrame_id,
     nsSimplePageSequenceFrame_id,
     nsSliderFrame_id,
--- a/layout/reftests/bugs/474336-1-ref.xul
+++ b/layout/reftests/bugs/474336-1-ref.xul
@@ -5,17 +5,16 @@
         >
 
 <html:style>
     #prog {
         -moz-appearance: none;
         background-color: blue;
     }
     #prog .progress-bar {
-        -moz-appearance: none;
         border-radius: 3px 3px;
         background-color: red;
     }
 </html:style>
 
 <progressmeter id="prog" value="50" max="200"/>
 
 </window>
--- a/layout/reftests/bugs/474336-1.xul
+++ b/layout/reftests/bugs/474336-1.xul
@@ -5,17 +5,16 @@
         class="reftest-wait">
 
 <html:style>
     #prog {
         -moz-appearance: none;
         background-color: blue;
     }
     #prog .progress-bar {
-        -moz-appearance: none;
         border-radius: 3px 3px;
         background-color: red;
     }
 </html:style>
 
 <progressmeter id="prog" value="50"/>
 
 <script>
deleted file mode 100644
--- a/layout/reftests/forms/progress/bar-pseudo-element-ref.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    body > div:nth-child(1) > .progress-bar { margin: 10px; padding: 0px; }
-    body > div:nth-child(2) > .progress-bar { margin: 0px; padding: 10px; }
-    body > div:nth-child(3) > .progress-bar { margin: 10px; padding: 10px; }
-    body > div:nth-child(4) > .progress-bar { margin: 5px; padding: 5px; }
-    body > div:nth-child(5) > .progress-bar { margin: 50px; padding: 50px; }
-    body > div:nth-child(6) > .progress-bar { margin: 100px; padding: 100px; }
-    body > div:nth-child(7) > .progress-bar { margin: 10px 0px 0px 0px; padding: 0px; }
-    body > div:nth-child(8) > .progress-bar { margin: 0px 10px 0px 0px; padding: 0px; }
-    body > div:nth-child(9) > .progress-bar { margin: 0px 0px 10px 0px; padding: 0px; }
-    body > div:nth-child(10) > .progress-bar { margin: 0px 0px 0px 10px; padding: 0px; }
-    body > div:nth-child(11) > .progress-bar { margin: 0px; padding: 10px 0px 0px 0px; }
-    body > div:nth-child(12) > .progress-bar { margin: 0px; padding: 0px 10px 0px 0px; }
-    body > div:nth-child(13) > .progress-bar { margin: 0px; padding: 0px 0px 10px 0px; }
-    body > div:nth-child(14) > .progress-bar { margin: 0px; padding: 0px 0px 0px 10px; }
-    body > div:nth-child(15) > .progress-bar { margin: 200px; padding: 0px; }
-    body > div:nth-child(16) > .progress-bar { margin: 0px; padding: 200px; }
-    /* 15 - 18 should have 100% width, no need to specify. */
-  </style>
-  <body>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/bar-pseudo-element-rtl-ref.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    body > div:nth-child(1) > .progress-bar { margin: 0px 10px 0px 0px; padding: 0px; }
-    body > div:nth-child(2) > .progress-bar { margin: 0px 0px 0px 10px; padding: 0px; }
-    body > div:nth-child(3) > .progress-bar { margin: 0px; padding: 0px 10px 0px 0px; }
-    body > div:nth-child(4) > .progress-bar { margin: 0px; padding: 0px 0px 0px 10px; }
-    /* 15 - 18 should have 100% width, no need to specify. */
-  </style>
-  <body dir='rtl'>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/bar-pseudo-element-rtl.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    body > progress:nth-child(1)::-moz-progress-bar { margin: 0px 10px 0px 0px; padding: 0px; }
-    body > progress:nth-child(2)::-moz-progress-bar { margin: 0px 0px 0px 10px; padding: 0px; }
-    body > progress:nth-child(3)::-moz-progress-bar { margin: 0px; padding: 0px 10px 0px 0px; }
-    body > progress:nth-child(4)::-moz-progress-bar { margin: 0px; padding: 0px 0px 0px 10px; }
-    body > progress:nth-child(5)::-moz-progress-bar { width: 1000px; }
-    body > progress:nth-child(6)::-moz-progress-bar { width: 10px; }
-    body > progress:nth-child(7)::-moz-progress-bar { width: 10%; }
-    body > progress:nth-child(8)::-moz-progress-bar { width: 200%; }
-  </style>
-  <body dir='rtl'>
-    <!-- Those will be used to change padding/margin on ::-moz-progress-bar -->
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <!-- Those will be used to change width. -->
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/bar-pseudo-element.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    body > progress:nth-child(1)::-moz-progress-bar { margin: 10px; padding: 0px; }
-    body > progress:nth-child(2)::-moz-progress-bar { margin: 0px; padding: 10px; }
-    body > progress:nth-child(3)::-moz-progress-bar { margin: 10px; padding: 10px; }
-    body > progress:nth-child(4)::-moz-progress-bar { margin: 5px; padding: 5px; }
-    body > progress:nth-child(5)::-moz-progress-bar { margin: 50px; padding: 50px; }
-    body > progress:nth-child(6)::-moz-progress-bar { margin: 100px; padding: 100px; }
-    body > progress:nth-child(7)::-moz-progress-bar { margin: 10px 0px 0px 0px; padding: 0px; }
-    body > progress:nth-child(8)::-moz-progress-bar { margin: 0px 10px 0px 0px; padding: 0px; }
-    body > progress:nth-child(9)::-moz-progress-bar { margin: 0px 0px 10px 0px; padding: 0px; }
-    body > progress:nth-child(10)::-moz-progress-bar { margin: 0px 0px 0px 10px; padding: 0px; }
-    body > progress:nth-child(11)::-moz-progress-bar { margin: 0px; padding: 10px 0px 0px 0px; }
-    body > progress:nth-child(12)::-moz-progress-bar { margin: 0px; padding: 0px 10px 0px 0px; }
-    body > progress:nth-child(13)::-moz-progress-bar { margin: 0px; padding: 0px 0px 10px 0px; }
-    body > progress:nth-child(14)::-moz-progress-bar { margin: 0px; padding: 0px 0px 0px 10px; }
-    body > progress:nth-child(15)::-moz-progress-bar { margin: 200px; padding: 0px; }
-    body > progress:nth-child(16)::-moz-progress-bar { margin: 0px; padding: 200px; }
-    body > progress:nth-child(17)::-moz-progress-bar { width: 1000px; }
-    body > progress:nth-child(18)::-moz-progress-bar { width: 10px; }
-    body > progress:nth-child(19)::-moz-progress-bar { width: 10%; }
-    body > progress:nth-child(20)::-moz-progress-bar { width: 200%; }
-  </style>
-  <body>
-    <!-- Those will be used to change padding/margin on ::-moz-progress-bar -->
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <!-- Those will be used to change width. -->
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/indeterminate-style-width-ref.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    div.progress-bar {
-      width:100%;
-    }
-    body > div:nth-child(1) > .progress-bar { width: 20px; }
-    body > div:nth-child(2) > .progress-bar { width: 0px; }
-    body > div:nth-child(3) > .progress-bar { width: 50%; }
-    body > div:nth-child(4) > .progress-bar { width: 1em; }
-    body > div:nth-child(5) > .progress-bar { width: 100%; }
-  </style>
-  <body>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-  </body>
-</html>
-
deleted file mode 100644
--- a/layout/reftests/forms/progress/indeterminate-style-width.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    body > progress:nth-child(1)::-moz-progress-bar { width: 20px; }
-    body > progress:nth-child(2)::-moz-progress-bar { width: 0px; }
-    body > progress:nth-child(3)::-moz-progress-bar { width: 50%; }
-    body > progress:nth-child(4)::-moz-progress-bar { width: 1em; }
-    /* last one is for the default value: width=100%. */
-  </style>
-  <body>
-    <!-- Those will be used to change padding/margin on ::-moz-progress-bar -->
-    <progress></progress>
-    <progress></progress>
-    <progress></progress>
-    <progress></progress>
-    <progress></progress>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/margin-padding-ref.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    body > div:nth-child(1) { margin: 10px; padding: 0px; }
-    body > div:nth-child(2) { margin: 0px; padding: 10px; }
-    body > div:nth-child(3) { margin: 10px; padding: 10px; }
-    body > div:nth-child(4) { margin: 5px; padding: 5px; }
-    body > div:nth-child(5) { margin: 50px; padding: 50px; }
-    body > div:nth-child(6) { margin: 100px; padding: 100px; }
-    body > div:nth-child(7) { margin: 10px 0px 0px 0px; padding: 0px; }
-    body > div:nth-child(8) { margin: 0px 10px 0px 0px; padding: 0px; }
-    body > div:nth-child(9) { margin: 0px 0px 10px 0px; padding: 0px; }
-    body > div:nth-child(10) { margin: 0px 0px 0px 10px; padding: 0px; }
-    body > div:nth-child(11) { margin: 0px; padding: 10px 0px 0px 0px; }
-    body > div:nth-child(12) { margin: 0px; padding: 0px 10px 0px 0px; }
-    body > div:nth-child(13) { margin: 0px; padding: 0px 0px 10px 0px; }
-    body > div:nth-child(14) { margin: 0px; padding: 0px 0px 0px 10px; }
-    body > div:nth-child(15) { margin: 0px; padding: 2px 4px 6px 8px; }
-    body > div:nth-child(16) { margin: 2px 4px 6px 8px; padding: 0px; }
-  </style>
-  <body>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/margin-padding-rtl-ref.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    body > div:nth-child(1) { margin: 10px; padding: 0px; }
-    body > div:nth-child(2) { margin: 0px; padding: 10px; }
-    body > div:nth-child(3) { margin: 10px; padding: 10px; }
-    body > div:nth-child(4) { margin: 5px; padding: 5px; }
-    body > div:nth-child(5) { margin: 50px; padding: 50px; }
-    body > div:nth-child(6) { margin: 100px; padding: 100px; }
-    body > div:nth-child(7) { margin: 10px 0px 0px 0px; padding: 0px; }
-    body > div:nth-child(8) { margin: 0px 10px 0px 0px; padding: 0px; }
-    body > div:nth-child(9) { margin: 0px 0px 10px 0px; padding: 0px; }
-    body > div:nth-child(10) { margin: 0px 0px 0px 10px; padding: 0px; }
-    body > div:nth-child(11) { margin: 0px; padding: 10px 0px 0px 0px; }
-    body > div:nth-child(12) { margin: 0px; padding: 0px 10px 0px 0px; }
-    body > div:nth-child(13) { margin: 0px; padding: 0px 0px 10px 0px; }
-    body > div:nth-child(14) { margin: 0px; padding: 0px 0px 0px 10px; }
-    body > div:nth-child(15) { margin: 0px; padding: 2px 4px 6px 8px; }
-    body > div:nth-child(16) { margin: 2px 4px 6px 8px; padding: 0px; }
-  </style>
-  <body dir='rtl'>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/margin-padding-rtl.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    progress:nth-child(1) { margin: 10px; padding: 0px; }
-    progress:nth-child(2) { margin: 0px; padding: 10px; }
-    progress:nth-child(3) { margin: 10px; padding: 10px; }
-    progress:nth-child(4) { margin: 5px; padding: 5px; }
-    progress:nth-child(5) { margin: 50px; padding: 50px; }
-    progress:nth-child(6) { margin: 100px; padding: 100px; }
-    progress:nth-child(7) { margin: 10px 0px 0px 0px; padding: 0px; }
-    progress:nth-child(8) { margin: 0px 10px 0px 0px; padding: 0px; }
-    progress:nth-child(9) { margin: 0px 0px 10px 0px; padding: 0px; }
-    progress:nth-child(10) { margin: 0px 0px 0px 10px; padding: 0px; }
-    progress:nth-child(11) { margin: 0px; padding: 10px 0px 0px 0px; }
-    progress:nth-child(12) { margin: 0px; padding: 0px 10px 0px 0px; }
-    progress:nth-child(13) { margin: 0px; padding: 0px 0px 10px 0px; }
-    progress:nth-child(14) { margin: 0px; padding: 0px 0px 0px 10px; }
-    progress:nth-child(15) { margin: 0px; padding: 2px 4px 6px 8px; }
-    progress:nth-child(16) { margin: 2px 4px 6px 8px; padding: 0px; }
-  </style>
-  <body dir='rtl'>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/margin-padding.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    progress:nth-child(1) { margin: 10px; padding: 0px; }
-    progress:nth-child(2) { margin: 0px; padding: 10px; }
-    progress:nth-child(3) { margin: 10px; padding: 10px; }
-    progress:nth-child(4) { margin: 5px; padding: 5px; }
-    progress:nth-child(5) { margin: 50px; padding: 50px; }
-    progress:nth-child(6) { margin: 100px; padding: 100px; }
-    progress:nth-child(7) { margin: 10px 0px 0px 0px; padding: 0px; }
-    progress:nth-child(8) { margin: 0px 10px 0px 0px; padding: 0px; }
-    progress:nth-child(9) { margin: 0px 0px 10px 0px; padding: 0px; }
-    progress:nth-child(10) { margin: 0px 0px 0px 10px; padding: 0px; }
-    progress:nth-child(11) { margin: 0px; padding: 10px 0px 0px 0px; }
-    progress:nth-child(12) { margin: 0px; padding: 0px 10px 0px 0px; }
-    progress:nth-child(13) { margin: 0px; padding: 0px 0px 10px 0px; }
-    progress:nth-child(14) { margin: 0px; padding: 0px 0px 0px 10px; }
-    progress:nth-child(15) { margin: 0px; padding: 2px 4px 6px 8px; }
-    progress:nth-child(16) { margin: 2px 4px 6px 8px; padding: 0px; }
-  </style>
-  <body>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/reftest.list
+++ /dev/null
@@ -1,12 +0,0 @@
-== values.html values-ref.html
-== values-rtl.html values-rtl-ref.html
-== margin-padding.html margin-padding-ref.html
-== margin-padding-rtl.html margin-padding-rtl-ref.html
-== bar-pseudo-element.html bar-pseudo-element-ref.html
-== bar-pseudo-element-rtl.html bar-pseudo-element-rtl-ref.html
-== indeterminate-style-width.html indeterminate-style-width-ref.html
-
-# The following test is disabled but kept in the repository because the
-# transformations will not behave exactly the same for <progress> and two divs.
-# However, it would be possible to manually check those.
-# == transformations.html transformations-ref.html
deleted file mode 100644
--- a/layout/reftests/forms/progress/style.css
+++ /dev/null
@@ -1,32 +0,0 @@
-div.progress-element {
-  -moz-appearance: progressbar;
-  display: inline-block;
-  height: 1em;
-  width: 10em;
-  vertical-align: -0.2em;
-
-  /* Default style in case of there is -moz-appearance: none; */
-  border: 2px solid;
-  -moz-border-top-colors: ThreeDShadow -moz-Dialog;
-  -moz-border-right-colors: ThreeDHighlight -moz-Dialog;
-  -moz-border-bottom-colors: ThreeDHighlight -moz-Dialog;
-  -moz-border-left-colors: ThreeDShadow -moz-Dialog;
-  background-color: -moz-Dialog;
-}
-
-div.progress-bar {
-  -moz-appearance: progresschunk;
-  height: 100%;
-  /*
-   * We can't apply the following style to the reference because it will have
-   * underisable effectes:
-   * width: 100%;
-   */
-
-  /* Default style in case of there is -moz-appearance: none; */
-  background-color: ThreeDShadow;
-}
-
-progress, progress::-moz-progress-bar, div.progress-element, div.progress-bar {
-  -moz-appearance: none;
-}
deleted file mode 100644
--- a/layout/reftests/forms/progress/transformations-ref.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    body > div:nth-child(1) { -moz-transform: matrix(1, -0.2, 0, 1, 0, 0); }
-    body > div:nth-child(2) { -moz-transform: matrix(1, 0, 0.6, 1, 15em, 0); }
-    body > div:nth-child(3) { -moz-transform: rotate(30deg); }
-    body > div:nth-child(4) { -moz-transform: scale(2, 4); }
-    body > div:nth-child(5) { -moz-transform: scale(0.1, 0.4); }
-    body > div:nth-child(6) { -moz-transform: scale(1, 0.4); }
-    body > div:nth-child(7) { -moz-transform: scale(0.1, 1); }
-    body > div:nth-child(8) { -moz-transform: skew(30deg, -10deg); }
-    body > div:nth-child(9) { -moz-transform: skew(-30deg, 10deg); }
-    body > div:nth-child(10) { -moz-transform: translate(10px, 30px); }
-    body > div:nth-child(11) { -moz-transform: translate(30px, 10px); }
-    body > div:nth-child(12) { -moz-transform: translate(-10px, 30px); }
-    body > div:nth-child(13) { -moz-transform: translate(30px, -10px); }
-    body > div:nth-child(14) { -moz-transform: scale(0, 0); }
-  </style>
-  <body>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/transformations.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    progress:nth-child(1) { -moz-transform: matrix(1, -0.2, 0, 1, 0, 0); }
-    progress:nth-child(2) { -moz-transform: matrix(1, 0, 0.6, 1, 15em, 0); }
-    progress:nth-child(3) { -moz-transform: rotate(30deg); }
-    progress:nth-child(4) { -moz-transform: scale(2, 4); }
-    progress:nth-child(5) { -moz-transform: scale(0.1, 0.4); }
-    progress:nth-child(6) { -moz-transform: scale(1, 0.4); }
-    progress:nth-child(7) { -moz-transform: scale(0.1, 1); }
-    progress:nth-child(8) { -moz-transform: skew(30deg, -10deg); }
-    progress:nth-child(9) { -moz-transform: skew(-30deg, 10deg); }
-    progress:nth-child(10) { -moz-transform: translate(10px, 30px); }
-    progress:nth-child(11) { -moz-transform: translate(30px, 10px); }
-    progress:nth-child(12) { -moz-transform: translate(-10px, 30px); }
-    progress:nth-child(13) { -moz-transform: translate(30px, -10px); }
-    progress:nth-child(14) { -moz-transform: scale(0, 0); }
-  </style>
-  <body>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-    <progress value='1'></progress>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/values-ref.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    div:nth-child(1) > .progress-bar { width: 100%; }
-    div:nth-child(2) > .progress-bar { width: 0%; }
-    div:nth-child(3) > .progress-bar { width: 10%; }
-    div:nth-child(4) > .progress-bar { width: 50%; }
-    div:nth-child(5) > .progress-bar { width: 0%; }
-    div:nth-child(6) > .progress-bar { width: 100%; }
-    div:nth-child(7) > .progress-bar { width: 42%; }
-    div:nth-child(8) > .progress-bar { width: 100%; }
-    div:nth-child(9) > .progress-bar { width: 100%; }
-    div:nth-child(10) > .progress-bar { width: 10%; }
-  </style>
-  <body>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/values-rtl-ref.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <style>
-    div:nth-child(1) > .progress-bar { width: 100%; }
-    div:nth-child(2) > .progress-bar { width: 0%; }
-    div:nth-child(3) > .progress-bar { width: 10%; }
-    div:nth-child(4) > .progress-bar { width: 50%; }
-    div:nth-child(5) > .progress-bar { width: 0%; }
-    div:nth-child(6) > .progress-bar { width: 100%; }
-    div:nth-child(7) > .progress-bar { width: 42%; }
-    div:nth-child(8) > .progress-bar { width: 100%; }
-    div:nth-child(9) > .progress-bar { width: 100%; }
-    div:nth-child(10) > .progress-bar { width: 10%; }
-  </style>
-  <body dir='rtl'>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar">
-      </div>
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/values-rtl.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <body dir='rtl'>
-    <progress value="1.0"></progress>
-    <progress value="0.0"></progress>
-    <progress value="0.1"></progress>
-    <progress value="0.5"></progress>
-    <progress value="-1"></progress>
-    <progress value="42"></progress>
-    <progress value="42" max="100"></progress>
-    <progress value="42" max="1"></progress>
-    <progress value="42" max="-1"></progress>
-    <progress value="0.1" max="-1"></progress>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/progress/values.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
-  <body>
-    <progress value="1.0"></progress>
-    <progress value="0.0"></progress>
-    <progress value="0.1"></progress>
-    <progress value="0.5"></progress>
-    <progress value="-1"></progress>
-    <progress value="42"></progress>
-    <progress value="42" max="100"></progress>
-    <progress value="42" max="1"></progress>
-    <progress value="42" max="-1"></progress>
-    <progress value="0.1" max="-1"></progress>
-  </body>
-</html>
--- a/layout/reftests/forms/reftest.list
+++ b/layout/reftests/forms/reftest.list
@@ -54,11 +54,8 @@ fails-if(Android) != textarea-rtl.html t
 # placeholder
 include placeholder/reftest.list
 
 # input
 include input/reftest.list
 
 # output element
 include output/reftest.list
-
-# progress element
-include progress/reftest.list
deleted file mode 100644
--- a/layout/reftests/native-theme/progress-nobar.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <body>
-    <div style="-moz-appearance: progressbar; width:180px; height:6px;">
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/native-theme/progress-overflow-ref.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!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>
-
deleted file mode 100644
--- a/layout/reftests/native-theme/progress-overflow-small.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!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>
deleted file mode 100644
--- a/layout/reftests/native-theme/progress-overflow.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!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>
--- a/layout/reftests/native-theme/reftest.list
+++ b/layout/reftests/native-theme/reftest.list
@@ -59,14 +59,8 @@ skip-if(gtk2Widget) random-if(d2d) == re
 
 # Windows-only, depends on native scrollbar metrics
 skip-if(!winWidget) == scroll-thumb-minimum-size-notheme.html scroll-thumb-minimum-size-notheme-ref.html
 # skip-if(!winWidget) == scroll-thumb-minimum-size-theme.html scroll-thumb-minimum-size-theme-ref.html # Bug 512206
 
 == border-radius.html border-radius-ref.html
 
 == checkbox-dynamic-1.html checkbox-dynamic-1-ref.html
-
-# These tests have been written to test the overflow of the window widget
-# (bug 568825) but we can't test it on Windows and Cocoa because they have
-# animated progress bars.
-skip-if(cocoaWidget) skip-if(winWidget) == progress-overflow.html progress-overflow-ref.html
-skip-if(cocoaWidget) skip-if(winWidget) != progress-overflow-small.html progress-nobar.html
--- a/layout/style/forms.css
+++ b/layout/style/forms.css
@@ -663,45 +663,16 @@ output:-moz-ui-invalid {
 @media print {
   input, textarea, select, button {
     -moz-user-input: none !important;
   }
 
   input[type="file"] { height: 2em; }
 }
 
-progress {
-  -moz-appearance: progressbar;
-  display: inline-block;
-  vertical-align: -0.2em;
-
-  /* Default style in case of there is -moz-appearance: none; */
-  border: 2px solid;
-  -moz-border-top-colors: ThreeDShadow -moz-Dialog;
-  -moz-border-right-colors: ThreeDHighlight -moz-Dialog;
-  -moz-border-bottom-colors: ThreeDHighlight -moz-Dialog;
-  -moz-border-left-colors: ThreeDShadow -moz-Dialog;
-  background-color: -moz-Dialog;
-}
-
-::-moz-progress-bar {
-  /* Block styles that would change the type of frame we construct. */
-  display: inline-block ! important;
-  float: none ! important;
-  position: static ! important;
-  overflow: visible ! important;
-
-  -moz-appearance: progresschunk;
-  height: 100%;
-  width: 100%;
-
-  /* Default style in case of there is -moz-appearance: none; */
-  background-color: ThreeDShadow;
-}
-
 %if OSARCH==OS2
 input {
   font: medium serif; font-family: inherit
 }
 
 select {
   font: medium serif; font-family: inherit
 }
--- a/layout/style/html.css
+++ b/layout/style/html.css
@@ -690,85 +690,42 @@ spacer {
   float: none ! important;
 }
 
 canvas {
   -moz-user-select: none;
 }
 
 /* focusable content: anything w/ tabindex >=0 is focusable */
-abbr:-moz-focusring,
-acronym:-moz-focusring,
-address:-moz-focusring,
+abbr:-moz-focusring, acronym:-moz-focusring, address:-moz-focusring,
 applet:-moz-focusring,
-b:-moz-focusring,
-base:-moz-focusring,
-big:-moz-focusring,
-blockquote:-moz-focusring,
-br:-moz-focusring,
-canvas:-moz-focusring,
-caption:-moz-focusring,
-center:-moz-focusring,
-cite:-moz-focusring,
-code:-moz-focusring,
-col:-moz-focusring,
-colgroup:-moz-focusring,
-dd:-moz-focusring,
-del:-moz-focusring,
-dfn:-moz-focusring,
-dir:-moz-focusring,
-div:-moz-focusring,
-dl:-moz-focusring,
-dt:-moz-focusring,
-em:-moz-focusring,
+b:-moz-focusring, base:-moz-focusring, big:-moz-focusring,
+blockquote:-moz-focusring, br:-moz-focusring, canvas:-moz-focusring,
+caption:-moz-focusring, center:-moz-focusring, cite:-moz-focusring,
+code:-moz-focusring, col:-moz-focusring, colgroup:-moz-focusring,
+dd:-moz-focusring, del:-moz-focusring, dfn:-moz-focusring, dir:-moz-focusring,
+div:-moz-focusring, dl:-moz-focusring, dt:-moz-focusring, em:-moz-focusring,
 embed:-moz-focusring,
-fieldset:-moz-focusring,
-font:-moz-focusring,
-form:-moz-focusring,
-h1:-moz-focusring,
-h2:-moz-focusring,
-h3:-moz-focusring,
-h4:-moz-focusring,
-h5:-moz-focusring,
-h6:-moz-focusring,
-hr:-moz-focusring,
-i:-moz-focusring,
-img:-moz-focusring,
-ins:-moz-focusring,
-kbd:-moz-focusring,
-label:-moz-focusring,
-legend:-moz-focusring,
-li:-moz-focusring,
+fieldset:-moz-focusring, font:-moz-focusring, form:-moz-focusring,
+h1:-moz-focusring, h2:-moz-focusring, h3:-moz-focusring, h4:-moz-focusring,
+h5:-moz-focusring, h6:-moz-focusring, hr:-moz-focusring, i:-moz-focusring,
+img:-moz-focusring, ins:-moz-focusring, kbd:-moz-focusring,
+label:-moz-focusring, legend:-moz-focusring, li:-moz-focusring,
 link:-moz-focusring,
 menu:-moz-focusring,
 object:-moz-focusring,
 ol:-moz-focusring,
 p:-moz-focusring,
-pre:-moz-focusring,
-progress:-moz-focusring,
-q:-moz-focusring,
-s:-moz-focusring,
-samp:-moz-focusring,
-small:-moz-focusring,
-span:-moz-focusring,
-strike:-moz-focusring,
-strong:-moz-focusring,
-sub:-moz-focusring,
-sup:-moz-focusring,
-table:-moz-focusring,
-tbody:-moz-focusring,
-td:-moz-focusring,
-tfoot:-moz-focusring,
-th:-moz-focusring,
-thead:-moz-focusring,
-tr:-moz-focusring,
-tt:-moz-focusring,
-u:-moz-focusring,
-ul:-moz-focusring,
-var:-moz-focusring {
+pre:-moz-focusring, q:-moz-focusring, s:-moz-focusring, samp:-moz-focusring,
+small:-moz-focusring, span:-moz-focusring, strike:-moz-focusring,
+strong:-moz-focusring, sub:-moz-focusring, sup:-moz-focusring,
+table:-moz-focusring, tbody:-moz-focusring, td:-moz-focusring,
+tfoot:-moz-focusring, th:-moz-focusring, thead:-moz-focusring, 
+tr:-moz-focusring, tt:-moz-focusring, u:-moz-focusring,
+ul:-moz-focusring, var:-moz-focusring {
   /* Don't specify the outline-color, we should always use initial value. */
    outline: 1px dotted;
 }
 
 /* hidden elements */
 base, basefont, datalist, head, meta, script, style, title,
 noembed, param {
    display: none;
--- a/layout/style/nsCSSPseudoElementList.h
+++ b/layout/style/nsCSSPseudoElementList.h
@@ -81,11 +81,8 @@ CSS_PSEUDO_ELEMENT(mozFocusOuter, ":-moz
 CSS_PSEUDO_ELEMENT(mozListBullet, ":-moz-list-bullet", 0)
 CSS_PSEUDO_ELEMENT(mozListNumber, ":-moz-list-number", 0)
 
 #ifdef MOZ_MATHML
 CSS_PSEUDO_ELEMENT(mozMathStretchy, ":-moz-math-stretchy", 0)
 CSS_PSEUDO_ELEMENT(mozMathAnonymous, ":-moz-math-anonymous", 0)
 #endif
 
-// HTML5 Forms pseudo elements
-CSS_PSEUDO_ELEMENT(mozProgressBar, ":-moz-progress-bar", 0)
-
--- a/layout/style/nsStyleContext.cpp
+++ b/layout/style/nsStyleContext.cpp
@@ -70,17 +70,17 @@ nsStyleContext::nsStyleContext(nsStyleCo
     mEmptyChild(nsnull),
     mPseudoTag(aPseudoTag),
     mRuleNode(aRuleNode),
     mAllocations(nsnull),
     mCachedResetData(nsnull),
     mBits(((PRUint32)aPseudoType) << NS_STYLE_CONTEXT_TYPE_SHIFT),
     mRefCnt(0)
 {
-  PR_STATIC_ASSERT((PR_UINT32_MAX >> NS_STYLE_CONTEXT_TYPE_SHIFT) >=
+  PR_STATIC_ASSERT((PR_UINT32_MAX >> NS_STYLE_CONTEXT_TYPE_SHIFT) >
                    nsCSSPseudoElements::ePseudo_MAX);
 
   mNextSibling = this;
   mPrevSibling = this;
   if (mParent) {
     mParent->AddRef();
     mParent->AddChild(this);
 #ifdef DEBUG
deleted file mode 100644
--- a/widget/reftests/progressbar-fallback-default-style-ref.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <style>
-    div.progress-element {
-      /**
-       * The purpose of this test is to not show the native style.
-       * -moz-appearance: progressbar;
-       */
-      display: inline-block;
-      height: 1em;
-      width: 10em;
-      vertical-align: -0.2em;
-
-      /* Default style in case of there is -moz-appearance: none; */
-      border: 2px solid;
-      -moz-border-top-colors: ThreeDShadow -moz-Dialog;
-      -moz-border-right-colors: ThreeDHighlight -moz-Dialog;
-      -moz-border-bottom-colors: ThreeDHighlight -moz-Dialog;
-      -moz-border-left-colors: ThreeDShadow -moz-Dialog;
-      background-color: -moz-Dialog;
-    }
-
-    div.progress-bar {
-      /**
-       * The purpose of this test is to not show the native style.
-       * -moz-appearance: progresschunk;
-       */
-
-      height: 100%;
-      width: 100%;
-
-      /* Default style in case of there is -moz-appearance: none; */
-      background-color: ThreeDShadow;
-    }
-
-    div.progress-element { padding: 5px; }
-    body > div:nth-child(1)  { -moz-appearance: none; }
-    body > div:nth-child(2) > .progress-bar { -moz-appearance: none; }
-    body > div:nth-child(3)  { background-color: red; }
-    body > div:nth-child(4) > .progress-bar { background-color: red; }
-    body > div:nth-child(5)  { border: 2px solid red; }
-    body > div:nth-child(6) > .progress-bar { border: 5px solid red; }
-  </style>
-  <body>
-    <div class="progress-element">
-      <div class="progress-bar"></div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar"></div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar"></div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar"></div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar"></div>
-    </div>
-    <div class="progress-element">
-      <div class="progress-bar"></div>
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/widget/reftests/progressbar-fallback-default-style.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <style>
-    progress { padding: 5px }
-    body > progress:nth-child(1) { -moz-appearance: none; }
-    body > progress:nth-child(2)::-moz-progress-bar { -moz-appearance: none; }
-    body > progress:nth-child(3) { background-color: red; }
-    body > progress:nth-child(4)::-moz-progress-bar { background-color: red; }
-    body > progress:nth-child(5) { border: 2px solid red; }
-    body > progress:nth-child(6)::-moz-progress-bar { border: 5px solid red; }
-  </style>
-  <body>
-    <progress></progress>
-    <progress></progress>
-    <progress></progress>
-    <progress></progress>
-    <progress></progress>
-    <progress></progress>
-  </body>
-</html>
--- a/widget/reftests/reftest.list
+++ b/widget/reftests/reftest.list
@@ -1,2 +1,1 @@
 skip-if(!cocoaWidget) != 507947.html about:blank
-== progressbar-fallback-default-style.html progressbar-fallback-default-style-ref.html
--- a/widget/src/cocoa/nsNativeThemeCocoa.h
+++ b/widget/src/cocoa/nsNativeThemeCocoa.h
@@ -44,17 +44,16 @@
 #include "nsITheme.h"
 #include "nsCOMPtr.h"
 #include "nsIAtom.h"
 #include "nsILookAndFeel.h"
 #include "nsNativeTheme.h"
 #include "gfxASurface.h"
 
 @class CellDrawView;
-@class NSProgressBarCell;
 class nsDeviceContext;
 
 class nsNativeThemeCocoa : private nsNativeTheme,
                            public nsITheme
 {
 public:
   nsNativeThemeCocoa();
   virtual ~nsNativeThemeCocoa();
@@ -92,27 +91,23 @@ public:
   PRBool ThemeNeedsComboboxDropmarker();
   virtual Transparency GetWidgetTransparency(nsIFrame* aFrame, PRUint8 aWidgetType);
 
 protected:  
 
   nsresult GetSystemColor(PRUint8 aWidgetType, nsILookAndFeel::nsColorID& aColorID);
   nsIntMargin RTLAwareMargin(const nsIntMargin& aMargin, nsIFrame* aFrame);
 
-  // Helpers for progressbar.
-  double GetProgressValue(nsIFrame* aFrame);
-  double GetProgressMaxValue(nsIFrame* aFrame);
-
   // HITheme drawing routines
   void DrawFrame(CGContextRef context, HIThemeFrameKind inKind,
                  const HIRect& inBoxRect, PRBool inReadOnly,
                  nsEventStates inState);
   void DrawProgress(CGContextRef context, const HIRect& inBoxRect,
                     PRBool inIsIndeterminate, PRBool inIsHorizontal,
-                    double inValue, double inMaxValue, nsIFrame* aFrame);
+                    PRInt32 inValue, PRInt32 inMaxValue, nsIFrame* aFrame);
   void DrawTab(CGContextRef context, HIRect inBoxRect, nsEventStates inState,
                nsIFrame* aFrame);
   void DrawTabPanel(CGContextRef context, const HIRect& inBoxRect, nsIFrame* aFrame);
   void DrawScale(CGContextRef context, const HIRect& inBoxRect,
                  nsEventStates inState, PRBool inDirection,
                  PRBool inIsReverse, PRInt32 inCurrentValue, PRInt32 inMinValue,
                  PRInt32 inMaxValue, nsIFrame* aFrame);
   void DrawCheckboxOrRadio(CGContextRef cgContext, PRBool inCheckbox,
@@ -148,13 +143,12 @@ protected:
 
 private:
   NSButtonCell* mPushButtonCell;
   NSButtonCell* mRadioButtonCell;
   NSButtonCell* mCheckboxCell;
   NSSearchFieldCell* mSearchFieldCell;
   NSPopUpButtonCell* mDropdownCell;
   NSComboBoxCell* mComboBoxCell;
-  NSProgressBarCell* mProgressBarCell;
   CellDrawView* mCellDrawView;
 };
 
 #endif // nsNativeThemeCocoa_h_
--- a/widget/src/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/src/cocoa/nsNativeThemeCocoa.mm
@@ -56,17 +56,16 @@
 #include "nsINameSpaceManager.h"
 #include "nsPresContext.h"
 #include "nsILookAndFeel.h"
 #include "nsWidgetAtoms.h"
 #include "nsToolkit.h"
 #include "nsCocoaWindow.h"
 #include "nsNativeThemeColors.h"
 #include "nsIScrollableFrame.h"
-#include "nsIDOMHTMLProgressElement.h"
 
 #include "gfxContext.h"
 #include "gfxQuartzSurface.h"
 #include "gfxQuartzNativeDrawing.h"
 
 #define DRAW_IN_FRAME_DEBUG 0
 #define SCROLLBARS_VISUAL_DEBUG 0
 
@@ -106,118 +105,16 @@ extern "C" {
 
 - (NSText*)currentEditor
 {
   return nil;
 }
 
 @end
 
-/**
- * NSProgressBarCell is used to draw progress bars of any size.
- */
-@interface NSProgressBarCell : NSCell
-{
-    /*All instance variables are private*/
-    double mValue;
-    double mMax;
-    bool   mIsIndeterminate;
-    bool   mIsHorizontal;
-}
-
-- (void)setValue:(double)value;
-- (double)value;
-- (void)setMax:(double)max;
-- (double)max;
-- (void)setIndeterminate:(bool)aIndeterminate;
-- (bool)isIndeterminate;
-- (void)setHorizontal:(bool)aIsHorizontal;
-- (bool)isHorizontal;
-- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
-@end
-
-@implementation NSProgressBarCell
-
-- (void)setMax:(double)aMax
-{
-  mMax = aMax;
-}
-
-- (double)max
-{
-  return mMax;
-}
-
-- (void)setValue:(double)aValue
-{
-  mValue = aValue;
-}
-
-- (double)value
-{
-  return mValue;
-}
-
-- (void)setIndeterminate:(bool)aIndeterminate
-{
-  mIsIndeterminate = aIndeterminate;
-}
-
-- (bool)isIndeterminate
-{
-  return mIsIndeterminate;
-}
-
-- (void)setHorizontal:(bool)aIsHorizontal
-{
-  mIsHorizontal = aIsHorizontal;
-}
-
-- (bool)isHorizontal
-{
-  return mIsHorizontal;
-}
-
-- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
-{
-  CGContext* cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
-
-  HIThemeTrackDrawInfo tdi;
-
-  tdi.version = 0;
-  tdi.min = 0;
-
-  tdi.value = PR_INT32_MAX * (mValue / mMax);
-  tdi.max = PR_INT32_MAX;
-  tdi.bounds = NSRectToCGRect(cellFrame);
-  tdi.attributes = mIsHorizontal ? kThemeTrackHorizontal : 0;
-  tdi.enableState = [self controlTint] == NSClearControlTint ? kThemeTrackInactive
-                                                             : kThemeTrackActive;
-
-  NSControlSize size = [self controlSize];
-  if (size == NSRegularControlSize) {
-    tdi.kind = mIsIndeterminate ? kThemeLargeIndeterminateBar
-                                : kThemeLargeProgressBar;
-  } else {
-    NS_ASSERTION(size == NSSmallControlSize,
-                 "We shouldn't have another size than small and regular for the moment");
-    tdi.kind = mIsIndeterminate ? kThemeMediumIndeterminateBar
-                                : kThemeMediumProgressBar;
-  }
-
-  PRInt32 stepsPerSecond = mIsIndeterminate ? 60 : 30;
-  PRInt32 milliSecondsPerStep = 1000 / stepsPerSecond;
-  tdi.trackInfo.progress.phase = PR_IntervalToMilliseconds(PR_IntervalNow()) /
-                                 milliSecondsPerStep % 32;
-
-  HIThemeDrawTrack(&tdi, NULL, cgContext, kHIThemeOrientationNormal);
-}
-
-@end
-
 // Workaround for Bug 542048
 // On 64-bit, NSSearchFieldCells don't draw focus rings.
 #if defined(__x86_64__)
 
 static void DrawFocusRing(NSRect rect, float radius)
 {
   NSSetFocusRingStyle(NSFocusRingOnly);
   NSBezierPath* path = [NSBezierPath bezierPath];
@@ -363,28 +260,25 @@ nsNativeThemeCocoa::nsNativeThemeCocoa()
 
   mDropdownCell = [[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO];
 
   mComboBoxCell = [[NSComboBoxCell alloc] initTextCell:@""];
   [mComboBoxCell setBezeled:YES];
   [mComboBoxCell setEditable:YES];
   [mComboBoxCell setFocusRingType:NSFocusRingTypeExterior];
 
-  mProgressBarCell = [[NSProgressBarCell alloc] init];
-
   mCellDrawView = [[CellDrawView alloc] init];
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 nsNativeThemeCocoa::~nsNativeThemeCocoa()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
-  [mProgressBarCell release];
   [mPushButtonCell release];
   [mRadioButtonCell release];
   [mCheckboxCell release];
   [mSearchFieldCell release];
   [mDropdownCell release];
   [mComboBoxCell release];
   [mCellDrawView release];
 
@@ -1132,76 +1026,50 @@ nsNativeThemeCocoa::DrawFrame(CGContextR
   CGContextFillRect(cgContext, inBoxRect);
 #endif
 
   HIThemeDrawFrame(&drawRect, &fdi, cgContext, HITHEME_ORIENTATION);
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
-static const CellRenderSettings progressSettings[2] = {
-  // Determined settings.
-  {
-    {
-      NSZeroSize, // mini
-      NSMakeSize(0, 10), // small
-      NSMakeSize(0, 16)  // regular
-    },
-    {
-      NSZeroSize, NSZeroSize, NSZeroSize
-    },
-    {
-      { // Leopard
-        {0, 0, 0, 0},     // mini
-        {1, 1, 1, 1},     // small
-        {1, 1, 1, 1}      // regular
-      }
-    }
-  },
-  // There is no horizontal margin in regular undetermined size.
-  {
-    {
-      NSZeroSize, // mini
-      NSMakeSize(0, 10), // small
-      NSMakeSize(0, 16)  // regular
-    },
-    {
-      NSZeroSize, NSZeroSize, NSZeroSize
-    },
-    {
-      { // Leopard
-        {0, 0, 0, 0},     // mini
-        {1, 1, 1, 1},     // small
-        {0, 1, 0, 1}      // regular
-      }
-    }
-  }
-};
+static void
+RenderProgress(CGContextRef cgContext, const HIRect& aRenderRect, void* aData)
+{
+  HIThemeTrackDrawInfo* tdi = (HIThemeTrackDrawInfo*)aData;
+  tdi->bounds = aRenderRect;
+  HIThemeDrawTrack(tdi, NULL, cgContext, kHIThemeOrientationNormal);
+}
 
 void
 nsNativeThemeCocoa::DrawProgress(CGContextRef cgContext, const HIRect& inBoxRect,
                                  PRBool inIsIndeterminate, PRBool inIsHorizontal,
-                                 double inValue, double inMaxValue,
+                                 PRInt32 inValue, PRInt32 inMaxValue,
                                  nsIFrame* aFrame)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
-  NSProgressBarCell* cell = mProgressBarCell;
+  HIThemeTrackDrawInfo tdi;
+
+  PRInt32 stepsPerSecond = inIsIndeterminate ? 60 : 30;
+  PRInt32 milliSecondsPerStep = 1000 / stepsPerSecond;
 
-  [cell setValue:inValue];
-  [cell setMax:inMaxValue];
-  [cell setIndeterminate:inIsIndeterminate];
-  [cell setHorizontal:inIsHorizontal];
-  [cell setControlTint:(FrameIsInActiveWindow(aFrame) ? [NSColor currentControlTint]
-                                                      : NSClearControlTint)];
+  tdi.version = 0;
+  tdi.kind = inIsIndeterminate ? kThemeMediumIndeterminateBar: kThemeMediumProgressBar;
+  tdi.bounds = inBoxRect;
+  tdi.min = 0;
+  tdi.max = inMaxValue;
+  tdi.value = inValue;
+  tdi.attributes = inIsHorizontal ? kThemeTrackHorizontal : 0;
+  tdi.enableState = FrameIsInActiveWindow(aFrame) ? kThemeTrackActive : kThemeTrackInactive;
+  tdi.trackInfo.progress.phase = PR_IntervalToMilliseconds(PR_IntervalNow()) /
+                                 milliSecondsPerStep % 16;
 
-  DrawCellWithSnapping(cell, cgContext, inBoxRect,
-                       progressSettings[inIsIndeterminate],
-                       VerticalAlignFactor(aFrame), mCellDrawView,
-                       IsFrameRTL(aFrame));
+  RenderTransformedHIThemeControl(cgContext, inBoxRect, RenderProgress, &tdi,
+                                  IsFrameRTL(aFrame));
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 void
 nsNativeThemeCocoa::DrawTabPanel(CGContextRef cgContext, const HIRect& inBoxRect,
                                  nsIFrame* aFrame)
 {
@@ -1886,23 +1754,23 @@ nsNativeThemeCocoa::DrawWidgetBackground
     case NS_THEME_SEARCHFIELD:
       DrawSearchField(cgContext, macRect, aFrame, eventState);
       break;
 
     case NS_THEME_PROGRESSBAR:
       if (!QueueAnimatedContentForRefresh(aFrame->GetContent(), 30)) {
         NS_WARNING("Unable to animate progressbar!");
       }
-      DrawProgress(cgContext, macRect, IsIndeterminateProgress(aFrame, eventState),
+      DrawProgress(cgContext, macRect, IsIndeterminateProgress(aFrame),
                    PR_TRUE, GetProgressValue(aFrame),
                    GetProgressMaxValue(aFrame), aFrame);
       break;
 
     case NS_THEME_PROGRESSBAR_VERTICAL:
-      DrawProgress(cgContext, macRect, IsIndeterminateProgress(aFrame, eventState),
+      DrawProgress(cgContext, macRect, IsIndeterminateProgress(aFrame),
                    PR_FALSE, GetProgressValue(aFrame),
                    GetProgressMaxValue(aFrame), aFrame);
       break;
 
     case NS_THEME_PROGRESSBAR_CHUNK:
     case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL:
       // do nothing, covered by the progress bar cases above
       break;
@@ -2654,44 +2522,8 @@ nsNativeThemeCocoa::GetWidgetTransparenc
     // Knowing that scrollbars and statusbars are opaque improves
     // performance, because we create layers for them.
     return eOpaque;
 
   default:
     return eUnknownTransparency;
   }
 }
-
-double
-nsNativeThemeCocoa::GetProgressValue(nsIFrame* aFrame)
-{
-  // When we are using the HTML progress element,
-  // we can get the value from the IDL property.
-  if (aFrame) {
-    nsCOMPtr<nsIDOMHTMLProgressElement> progress =
-      do_QueryInterface(aFrame->GetContent());
-    if (progress) {
-      double value;
-      progress->GetValue(&value);
-      return value;
-    }
-  }
-
-  return (double)CheckIntAttr(aFrame, nsWidgetAtoms::value, 0);
-}
-
-double
-nsNativeThemeCocoa::GetProgressMaxValue(nsIFrame* aFrame)
-{
-  // When we are using the HTML progress element,
-  // we can get the max from the IDL property.
-  if (aFrame) {
-    nsCOMPtr<nsIDOMHTMLProgressElement> progress =
-      do_QueryInterface(aFrame->GetContent());
-    if (progress) {
-      double max;
-      progress->GetMax(&max);
-      return max;
-    }
-  }
-
-  return (double)PR_MAX(CheckIntAttr(aFrame, nsWidgetAtoms::max, 100), 1);
-}
--- a/widget/src/gtk2/gtk2drawing.c
+++ b/widget/src/gtk2/gtk2drawing.c
@@ -43,17 +43,16 @@
  * Adapted from the gtkdrawing.c, and gtk+2.0 source.
  */
 
 #include <gtk/gtk.h>
 #include <gdk/gdkprivate.h>
 #include <string.h>
 #include "gtkdrawing.h"
 #include "nsDebug.h"
-#include "prinrval.h"
 
 #include <math.h>
 
 #define XTHICKNESS(style) (style->xthickness)
 #define YTHICKNESS(style) (style->ythickness)
 #define WINDOW_IS_MAPPED(window) ((window) && GDK_IS_WINDOW(window) && gdk_window_is_visible(window))
 
 static GtkWidget* gProtoWindow;
@@ -2231,52 +2230,26 @@ moz_gtk_progressbar_paint(GdkDrawable* d
                   cliprect, gProgressWidget, "trough", rect->x, rect->y,
                   rect->width, rect->height);
 
     return MOZ_GTK_SUCCESS;
 }
 
 static gint
 moz_gtk_progress_chunk_paint(GdkDrawable* drawable, GdkRectangle* rect,
-                             GdkRectangle* cliprect, GtkTextDirection direction,
-                             GtkThemeWidgetType widget)
+                             GdkRectangle* cliprect, GtkTextDirection direction)
 {
     GtkStyle* style;
 
     ensure_progress_widget();
     gtk_widget_set_direction(gProgressWidget, direction);
 
     style = gProgressWidget->style;
 
     TSOffsetStyleGCs(style, rect->x, rect->y);
-
-    if (widget == MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE) {
-      /**
-       * The bar's width and the bar speed are set depending of the progress
-       * bar size. These could also be constant for all progress bars easily.
-       */
-
-      /* The bar is using a fifth of the element size, based on GtkProgressBar
-       * activity-blocks property. */
-      const gint barWidth = MAX(1, rect->width / 5);
-
-      /* Represents the travel that has to be done for a complete cycle. */
-      const gint travel = 2 * (rect->width - barWidth);
-
-      /* period equals to travel / pixelsPerMillisecond
-       * where pixelsPerMillisecond equals rect->width / 1000.0.
-       * This is equivalent to 1600. */
-      const guint period = 1600;
-      const gint t = PR_IntervalToMilliseconds(PR_IntervalNow()) % period;
-      const gint dx = travel * t / period;
-
-      rect->x += (dx < travel / 2) ? dx : travel - dx;
-      rect->width = barWidth;
-    }
-
     gtk_paint_box(style, drawable, GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
                   cliprect, gProgressWidget, "bar", rect->x, rect->y,
                   rect->width, rect->height);
 
     return MOZ_GTK_SUCCESS;
 }
 
 gint
@@ -2980,17 +2953,16 @@ moz_gtk_get_widget_border(GtkThemeWidget
     case MOZ_GTK_SCROLLBAR_TRACK_HORIZONTAL:
     case MOZ_GTK_SCROLLBAR_TRACK_VERTICAL:
     case MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL:
     case MOZ_GTK_SCROLLBAR_THUMB_VERTICAL:
     case MOZ_GTK_SCALE_THUMB_HORIZONTAL:
     case MOZ_GTK_SCALE_THUMB_VERTICAL:
     case MOZ_GTK_GRIPPER:
     case MOZ_GTK_PROGRESS_CHUNK:
-    case MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE:
     case MOZ_GTK_EXPANDER:
     case MOZ_GTK_TREEVIEW_EXPANDER:
     case MOZ_GTK_TOOLBAR_SEPARATOR:
     case MOZ_GTK_MENUSEPARATOR:
     /* These widgets have no borders.*/
     case MOZ_GTK_SPINBUTTON:
     case MOZ_GTK_TOOLTIP:
     case MOZ_GTK_WINDOW:
@@ -3327,19 +3299,18 @@ moz_gtk_widget_paint(GtkThemeWidgetType 
     case MOZ_GTK_RESIZER:
         return moz_gtk_resizer_paint(drawable, rect, cliprect, state,
                                      direction);
         break;
     case MOZ_GTK_PROGRESSBAR:
         return moz_gtk_progressbar_paint(drawable, rect, cliprect, direction);
         break;
     case MOZ_GTK_PROGRESS_CHUNK:
-    case MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE:
         return moz_gtk_progress_chunk_paint(drawable, rect, cliprect,
-                                            direction, widget);
+                                            direction);
         break;
     case MOZ_GTK_TAB:
         return moz_gtk_tab_paint(drawable, rect, cliprect, state,
                                  (GtkTabFlags) flags, direction);
         break;
     case MOZ_GTK_TABPANELS:
         return moz_gtk_tabpanels_paint(drawable, rect, cliprect, direction);
         break;
--- a/widget/src/gtk2/gtkdrawing.h
+++ b/widget/src/gtk2/gtkdrawing.h
@@ -173,18 +173,16 @@ typedef enum {
   /* Paints a GtkFrame (e.g. a status bar panel). */
   MOZ_GTK_FRAME,
   /* Paints a resize grip for a GtkWindow */
   MOZ_GTK_RESIZER,
   /* Paints a GtkProgressBar. */
   MOZ_GTK_PROGRESSBAR,
   /* Paints a progress chunk of a GtkProgressBar. */
   MOZ_GTK_PROGRESS_CHUNK,
-  /* Paints a progress chunk of an indeterminated GtkProgressBar. */
-  MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE,
   /* Paints a tab of a GtkNotebook. flags is a GtkTabFlags, defined above. */
   MOZ_GTK_TAB,
   /* Paints the background and border of a GtkNotebook. */
   MOZ_GTK_TABPANELS,
   /* Paints a GtkArrow for a GtkNotebook. flags is a GtkArrowType. */
   MOZ_GTK_TAB_SCROLLARROW,
   /* Paints the background and border of a GtkTreeView */
   MOZ_GTK_TREEVIEW,
--- a/widget/src/gtk2/nsNativeThemeGTK.cpp
+++ b/widget/src/gtk2/nsNativeThemeGTK.cpp
@@ -561,24 +561,17 @@ nsNativeThemeGTK::GetGtkWidgetAndState(P
     aGtkWidgetType = MOZ_GTK_FRAME;
     break;
   case NS_THEME_PROGRESSBAR:
   case NS_THEME_PROGRESSBAR_VERTICAL:
     aGtkWidgetType = MOZ_GTK_PROGRESSBAR;
     break;
   case NS_THEME_PROGRESSBAR_CHUNK:
   case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL:
-    {
-      nsIFrame* stateFrame = aFrame->GetParent();
-      nsEventStates eventStates = GetContentState(stateFrame, aWidgetType);
-
-      aGtkWidgetType = IsIndeterminateProgress(stateFrame, eventStates)
-                         ? MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE
-                         : MOZ_GTK_PROGRESS_CHUNK;
-    }
+    aGtkWidgetType = MOZ_GTK_PROGRESS_CHUNK;
     break;
   case NS_THEME_TAB_SCROLLARROW_BACK:
   case NS_THEME_TAB_SCROLLARROW_FORWARD:
     if (aWidgetFlags)
       *aWidgetFlags = aWidgetType == NS_THEME_TAB_SCROLLARROW_BACK ?
                         GTK_ARROW_LEFT : GTK_ARROW_RIGHT;
     aGtkWidgetType = MOZ_GTK_TAB_SCROLLARROW;
     break;
@@ -875,23 +868,16 @@ nsNativeThemeGTK::DrawWidgetBackground(n
       // force refresh of the window, because the widget was not
       // successfully drawn it must be redrawn using the default look
       RefreshWidgetWindow(aFrame);
     } else {
       SetWidgetStateSafe(mSafeWidgetStates, aWidgetType, &state);
     }
   }
 
-  // Indeterminate progress bar are animated.
-  if (gtkWidgetType == MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE) {
-    if (!QueueAnimatedContentForRefresh(aFrame->GetContent(), 30)) {
-      NS_WARNING("unable to animate widget!");
-    }
-  }
-
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNativeThemeGTK::GetWidgetBorder(nsDeviceContext* aContext, nsIFrame* aFrame,
                                   PRUint8 aWidgetType, nsIntMargin* aResult)
 {
   GtkTextDirection direction = GetTextDirection(aFrame);
--- a/widget/src/windows/nsNativeThemeWin.cpp
+++ b/widget/src/windows/nsNativeThemeWin.cpp
@@ -55,17 +55,16 @@
 #include "nsINameSpaceManager.h"
 #include "nsILookAndFeel.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsIMenuFrame.h"
 #include "nsWidgetAtoms.h"
 #include <malloc.h>
 #include "nsWindow.h"
 #include "nsIComboboxControlFrame.h"
-#include "prinrval.h"
 
 #include "gfxPlatform.h"
 #include "gfxContext.h"
 #include "gfxMatrix.h"
 #include "gfxWindowsPlatform.h"
 #include "gfxWindowsSurface.h"
 #include "gfxWindowsNativeDrawing.h"
 
@@ -339,42 +338,16 @@ static CaptionButtonPadding buttonData[3
   { 
     { { 1, 2, 0, 2 }, { 0, 2, 1, 2 }, { 1, 2, 2, 2 } }
   },
   { 
     { { 0, 2, 0, 2 }, { 0, 2, 1, 2 }, { 1, 2, 2, 2 } }
   }
 };
 
-/**
- * Progress bar related constants.
- * These values are found by experimenting and comparing against native widgets
- * used by the system. They are very unlikely exact but try to not be too wrong.
- */
-// PP_CHUNK is overflowing on the bottom for no appearant reasons.
-// This is a fix around this issue.
-static const PRInt32 kProgressDeterminedXPOverflow = 11;
-// Same thing but for PP_FILL.
-static const PRInt32 kProgressDeterminedVistaOverflow = 4;
-// Same thing but for indeterminate progress bar.
-// The value is the same for PP_CHUNK and PP_MOVEOVERLAY in that case.
-static const PRInt32 kProgressIndeterminateOverflow = 2;
-// The width of the overlay used to animate the progress bar (Vista and later).
-static const PRInt32 kProgressVistaOverlayWidth = 120;
-// The width of the overlay used to for indeterminate progress bars on XP.
-static const PRInt32 kProgressXPOverlayWidth = 55;
-// Speed (px per ms) of the animation for determined Vista and later progress bars.
-static const double kProgressDeterminedVistaSpeed = 0.225;
-// Speed (px per ms) of the animation for indeterminate progress bars.
-static const double kProgressIndeterminateSpeed = 0.175;
-// Delay (in ms) between two indeterminate progress bar cycles.
-static const PRInt32 kProgressIndeterminateDelay = 500;
-// Delay (in ms) between two determinate progress bar animation on Vista/7.
-static const PRInt32 kProgressDeterminedVistaDelay = 1000;
-
 // Adds "hot" caption button padding to minimum widget size.
 static void AddPaddingRect(nsIntSize* aSize, CaptionButton button) {
   if (!aSize)
     return;
   RECT offset;
   if (!nsUXThemeData::IsAppThemed())
     offset = buttonData[CAPTION_CLASSIC].hotPadding[button];
   else if (nsWindow::GetWindowsVersion() == WINXP_VERSION)
@@ -680,22 +653,17 @@ nsNativeThemeWin::GetThemePartAndState(n
       return NS_OK;
     }
     case NS_THEME_PROGRESSBAR: {
       aPart = PP_BAR;
       aState = TS_NORMAL;
       return NS_OK;
     }
     case NS_THEME_PROGRESSBAR_CHUNK: {
-      nsIFrame* stateFrame = aFrame->GetParent();
-      nsEventStates eventStates = GetContentState(stateFrame, aWidgetType);
-      // If the element is indeterminate, we are going to render it ourself so
-      // we have to return aPart = -1.
-      aPart = IsIndeterminateProgress(stateFrame, eventStates)
-                ? -1 : nsUXThemeData::sIsVistaOrLater ? PP_FILL : PP_CHUNK;
+      aPart = PP_CHUNK;
       aState = TS_NORMAL;
       return NS_OK;
     }
     case NS_THEME_PROGRESSBAR_VERTICAL: {
       aPart = PP_BARVERT;
       aState = TS_NORMAL;
       return NS_OK;
     }
@@ -1316,24 +1284,16 @@ RENDER_AGAIN:
     OffsetBackgroundRect(widgetRect, CAPTIONBUTTON_MINIMIZE);
   }
   else if (aWidgetType == NS_THEME_WINDOW_BUTTON_MAXIMIZE ||
            aWidgetType == NS_THEME_WINDOW_BUTTON_RESTORE) {
     OffsetBackgroundRect(widgetRect, CAPTIONBUTTON_RESTORE);
   }
   else if (aWidgetType == NS_THEME_WINDOW_BUTTON_CLOSE) {
     OffsetBackgroundRect(widgetRect, CAPTIONBUTTON_CLOSE);
-  } else if (aWidgetType == NS_THEME_PROGRESSBAR_CHUNK) {
-    nsIFrame* stateFrame = aFrame->GetParent();
-    nsEventStates eventStates = GetContentState(stateFrame, aWidgetType);
-    widgetRect.bottom -= IsIndeterminateProgress(stateFrame, eventStates)
-                           ? kProgressIndeterminateOverflow
-                           : nsUXThemeData::sIsVistaOrLater
-                             ? kProgressDeterminedVistaOverflow
-                             : kProgressDeterminedXPOverflow;
   }
 
   // widgetRect is the bounding box for a widget, yet the scale track is only
   // a small portion of this size, so the edges of the scale need to be
   // adjusted to the real size of the track.
   if (aWidgetType == NS_THEME_SCALE_HORIZONTAL ||
       aWidgetType == NS_THEME_SCALE_VERTICAL) {
     RECT contentRect;
@@ -1558,68 +1518,16 @@ RENDER_AGAIN:
     ctx->Fill();
 
     ctx->NewPath();
     ctx->Rectangle(buttonbox3, PR_TRUE);
     ctx->Fill();
 
     ctx->Restore();
     ctx->SetOperator(currentOp);
-  } else if (aWidgetType == NS_THEME_PROGRESSBAR_CHUNK) {
-    /**
-     * Here, we draw the animated part of the progress bar.
-     * A progress bar has always an animated part on Windows Vista and later.
-     * On Windows XP, a progress bar has an animated part when in an
-     * indeterminated state.
-     * When the progress bar is indeterminated, no background is painted so we
-     * only see the animated part.
-     * When the progress bar is determinated, the animated part is a glow draw
-     * on top of the background (PP_FILL).
-     */
-    nsIFrame* stateFrame = aFrame->GetParent();
-    nsEventStates eventStates = GetContentState(stateFrame, aWidgetType);
-    bool indeterminate = IsIndeterminateProgress(stateFrame, eventStates);
-
-    if (indeterminate || nsUXThemeData::sIsVistaOrLater) {
-      if (!QueueAnimatedContentForRefresh(aFrame->GetContent(), 60)) {
-        NS_WARNING("unable to animate progress widget!");
-      }
-
-      const PRInt32 overlayWidth = nsUXThemeData::sIsVistaOrLater
-                                     ? kProgressVistaOverlayWidth
-                                     : kProgressXPOverlayWidth;
-      const double pixelsPerMillisecond = indeterminate
-                                            ? kProgressIndeterminateSpeed
-                                            : kProgressDeterminedVistaSpeed;
-      const PRInt32 delay = indeterminate ? kProgressIndeterminateDelay
-                                          : kProgressDeterminedVistaDelay;
-
-      const PRInt32 frameWidth = widgetRect.right - widgetRect.left;
-      const PRInt32 animationWidth = frameWidth + overlayWidth +
-                                     static_cast<PRInt32>(pixelsPerMillisecond * delay);
-      const double interval = animationWidth / pixelsPerMillisecond;
-      // We have to pass a double* to modf and we can't pass NULL.
-      double tempValue;
-      double ratio = modf(PR_IntervalToMilliseconds(PR_IntervalNow())/interval,
-                          &tempValue);
-      // If the frame direction is RTL, we want to have the animation going RTL.
-      // ratio is in [0.0; 1.0[ range, inverting it reverse the animation.
-      if (IsFrameRTL(aFrame)) {
-        ratio = 1.0 - ratio;
-      }
-      PRInt32 dx = static_cast<PRInt32>(animationWidth * ratio) - overlayWidth;
-
-      RECT overlayRect = widgetRect;
-      overlayRect.left += dx;
-      overlayRect.right = overlayRect.left + overlayWidth;
-      nsUXThemeData::drawThemeBG(theme, hdc,
-                                 nsUXThemeData::sIsVistaOrLater ? PP_MOVEOVERLAY
-                                                                : PP_CHUNK,
-                                 state, &overlayRect, &clipRect);
-    }
   }
 
 
   nativeDrawing.EndNativeDrawing();
 
   if (nativeDrawing.ShouldRenderAgain())
     goto RENDER_AGAIN;
 
--- a/widget/src/windows/nsUXThemeConstants.h
+++ b/widget/src/windows/nsUXThemeConstants.h
@@ -111,18 +111,16 @@
 #define SPNP_UP            1
 #define SPNP_DOWN          2
 
 // Progress bar constants
 #define PP_BAR             1
 #define PP_BARVERT         2
 #define PP_CHUNK           3
 #define PP_CHUNKVERT       4
-#define PP_FILL            5
-#define PP_MOVEOVERLAY     8
 
 // Tab constants
 #define TABP_TAB             4
 #define TABP_TAB_SELECTED    5
 #define TABP_PANELS          9
 #define TABP_PANEL           10
 
 // Tooltip constants
--- a/widget/src/xpwidgets/Makefile.in
+++ b/widget/src/xpwidgets/Makefile.in
@@ -95,19 +95,16 @@ endif
 SHARED_LIBRARY_LIBS = ../shared/$(LIB_PREFIX)widget_shared.$(LIB_SUFFIX)
 ifdef MOZ_X11
 SHARED_LIBRARY_LIBS += ../shared/x11/$(LIB_PREFIX)widget_shared_x11.$(LIB_SUFFIX)
 endif
 
 LOCAL_INCLUDES	+= \
 		-I$(srcdir)/../$(MOZ_WIDGET_TOOLKIT) \
 		-I$(srcdir)/../shared \
-		-I$(topsrcdir)/layout/forms \
-		-I$(topsrcdir)/layout/generic \
-		-I$(topsrcdir)/layout/xul/base/src \
 		-I$(srcdir) \
 		$(NULL)
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
--- a/widget/src/xpwidgets/nsNativeTheme.cpp
+++ b/widget/src/xpwidgets/nsNativeTheme.cpp
@@ -46,17 +46,16 @@
 #include "nsEventStateManager.h"
 #include "nsString.h"
 #include "nsINameSpaceManager.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsILookAndFeel.h"
 #include "nsThemeConstants.h"
 #include "nsIComponentManager.h"
 #include "nsPIDOMWindow.h"
-#include "nsProgressFrame.h"
 
 nsNativeTheme::nsNativeTheme()
 : mAnimatedContentTimeout(PR_UINT32_MAX)
 {
 }
 
 NS_IMPL_ISUPPORTS1(nsNativeTheme, nsITimerCallback)
 
@@ -247,29 +246,16 @@ nsNativeTheme::IsWidgetStyled(nsPresCont
       parentFrame = parentFrame->GetParent();
       if (parentFrame) {
         return IsWidgetStyled(aPresContext, parentFrame,
                               parentFrame->GetStyleDisplay()->mAppearance);
       }
     }
   }
 
-  /**
-   * Progress bar appearance should be the same for the bar and the container
-   * frame. nsProgressFrame owns the logic and will tell us what we should do.
-   */
-  if (aWidgetType == NS_THEME_PROGRESSBAR_CHUNK ||
-      aWidgetType == NS_THEME_PROGRESSBAR) {
-    nsProgressFrame* progressFrame = do_QueryFrame(aWidgetType == NS_THEME_PROGRESSBAR_CHUNK
-                                       ? aFrame->GetParent() : aFrame);
-    if (progressFrame) {
-      return !progressFrame->ShouldUseNativeStyle();
-    }
-  }
-
   return (aWidgetType == NS_THEME_BUTTON ||
           aWidgetType == NS_THEME_TEXTFIELD ||
           aWidgetType == NS_THEME_TEXTFIELD_MULTILINE ||
           aWidgetType == NS_THEME_LISTBOX ||
           aWidgetType == NS_THEME_DROPDOWN) &&
          aFrame->GetContent()->IsHTML() &&
          aPresContext->HasAuthorSpecifiedRules(aFrame,
                                                NS_AUTHOR_SPECIFIED_BORDER |
@@ -452,26 +438,21 @@ nsNativeTheme::IsNextToSelectedTab(nsIFr
   if (thisTabIndex == -1 || selectedTabIndex == -1)
     return PR_FALSE;
 
   return (thisTabIndex - selectedTabIndex == aOffset);
 }
 
 // progressbar:
 PRBool
-nsNativeTheme::IsIndeterminateProgress(nsIFrame* aFrame,
-                                       nsEventStates aEventStates)
+nsNativeTheme::IsIndeterminateProgress(nsIFrame* aFrame)
 {
   if (!aFrame)
     return PR_FALSE;
 
-  if (aFrame->GetContent()->IsHTML(nsWidgetAtoms::progress)) {
-    return aEventStates.HasState(NS_EVENT_STATE_INDETERMINATE);
-  }
-
   return aFrame->GetContent()->AttrValueIs(kNameSpaceID_None, nsWidgetAtoms::mode,
                                            NS_LITERAL_STRING("undetermined"),
                                            eCaseMatters);
 }
 
 // menupopup:
 PRBool
 nsNativeTheme::IsSubmenu(nsIFrame* aFrame, PRBool* aLeftOfParent)
--- a/widget/src/xpwidgets/nsNativeTheme.h
+++ b/widget/src/xpwidgets/nsNativeTheme.h
@@ -155,17 +155,25 @@ class nsNativeTheme : public nsITimerCal
   // tab:
   PRBool IsBottomTab(nsIFrame* aFrame);
   PRBool IsFirstTab(nsIFrame* aFrame);
   PRBool IsLastTab(nsIFrame* aFrame);
   
   PRBool IsHorizontal(nsIFrame* aFrame);
 
   // progressbar:
-  PRBool IsIndeterminateProgress(nsIFrame* aFrame, nsEventStates aEventStates);
+  PRBool IsIndeterminateProgress(nsIFrame* aFrame);
+
+  PRInt32 GetProgressValue(nsIFrame* aFrame) {
+    return CheckIntAttr(aFrame, nsWidgetAtoms::value, 0);
+  }
+  
+  PRInt32 GetProgressMaxValue(nsIFrame* aFrame) {
+    return PR_MAX(CheckIntAttr(aFrame, nsWidgetAtoms::max, 100), 1);
+  }
 
   // textfield:
   PRBool IsReadOnly(nsIFrame* aFrame) {
       return CheckBooleanAttr(aFrame, nsWidgetAtoms::readonly);
   }
 
   // menupopup:
   PRBool IsSubmenu(nsIFrame* aFrame, PRBool* aLeftOfParent);
--- a/widget/src/xpwidgets/nsWidgetAtomList.h
+++ b/widget/src/xpwidgets/nsWidgetAtomList.h
@@ -99,17 +99,16 @@ WIDGET_ATOM(mode, "mode")
 WIDGET_ATOM(modifiers, "modifiers") // The modifiers attribute
 WIDGET_ATOM(mozmenuactive, "_moz-menuactive")
 WIDGET_ATOM(name, "name")
 WIDGET_ATOM(onAppCommand, "onAppCommand")
 WIDGET_ATOM(open, "open") // Whether or not a menu, tree, etc. is open
 WIDGET_ATOM(orient, "orient")
 WIDGET_ATOM(pageincrement, "pageincrement")
 WIDGET_ATOM(parentfocused, "parentfocused")
-WIDGET_ATOM(progress, "progress")
 WIDGET_ATOM(radio, "radio")
 WIDGET_ATOM(readonly, "readonly")
 WIDGET_ATOM(Reload, "Reload")
 WIDGET_ATOM(richlistitem, "richlistitem")
 WIDGET_ATOM(sbattr, "sbattr")
 WIDGET_ATOM(scrollFrame, "ScrollFrame")
 WIDGET_ATOM(scrollbarFrame, "ScrollbarFrame")
 WIDGET_ATOM(scrollbarDownBottom, "scrollbar-down-bottom")