Merge m-c to inbound.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 12 Jun 2012 21:36:40 -0400
changeset 101342 39f97be749d7e6e223ef33b5168f35e1dc277ee9
parent 101341 68cdc1a400a47220fd8419dec3554ad7a262fcf3 (current diff)
parent 101308 964b11fea7f11b310250127cc096ed5798f71280 (diff)
child 101343 1eb234066998d32a74eda974521ecd6a6b388cf3
push id1316
push userakeybl@mozilla.com
push dateMon, 27 Aug 2012 22:37:00 +0000
treeherdermozilla-beta@db4b09302ee2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone16.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
Merge m-c to inbound.
--- a/content/canvas/src/nsCanvasRenderingContext2D.cpp
+++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp
@@ -2838,17 +2838,17 @@ nsCanvasRenderingContext2D::DrawOrMeasur
     if (aMaxWidth < 0)
         return NS_ERROR_INVALID_ARG;
 
     if (!mCanvasElement && !mDocShell) {
         NS_WARNING("Canvas element must be non-null or a docshell must be provided");
         return NS_ERROR_FAILURE;
     }
 
-    nsIPresShell* presShell = GetPresShell();
+    nsCOMPtr<nsIPresShell> presShell = GetPresShell();
     if (!presShell)
         return NS_ERROR_FAILURE;
 
     nsIDocument* document = presShell->GetDocument();
 
     // replace all the whitespace characters with U+0020 SPACE
     nsAutoString textToDraw(aRawText);
     TextReplaceWhitespaceCharacters(textToDraw);
--- a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
+++ b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
@@ -3183,19 +3183,19 @@ nsCanvasRenderingContext2DAzure::DrawOrM
   if (aMaxWidth < 0)
     return NS_ERROR_INVALID_ARG;
 
   if (!mCanvasElement && !mDocShell) {
     NS_WARNING("Canvas element must be non-null or a docshell must be provided");
     return NS_ERROR_FAILURE;
   }
 
-  nsIPresShell* presShell = GetPresShell();
+  nsCOMPtr<nsIPresShell> presShell = GetPresShell();
   if (!presShell)
-      return NS_ERROR_FAILURE;
+    return NS_ERROR_FAILURE;
 
   nsIDocument* document = presShell->GetDocument();
 
   // replace all the whitespace characters with U+0020 SPACE
   nsAutoString textToDraw(aRawText);
   TextReplaceWhitespaceCharacters(textToDraw);
 
   // for now, default to ltr if not in doc
@@ -3241,25 +3241,25 @@ nsCanvasRenderingContext2DAzure::DrawOrM
   NS_ASSERTION(processor.mFontgrp, "font group is null");
 
   nscoord totalWidthCoord;
 
   // calls bidi algo twice since it needs the full text width and the
   // bounding boxes before rendering anything
   nsBidi bidiEngine;
   rv = nsBidiPresUtils::ProcessText(textToDraw.get(),
-                                textToDraw.Length(),
-                                isRTL ? NSBIDI_RTL : NSBIDI_LTR,
-                                presShell->GetPresContext(),
-                                processor,
-                                nsBidiPresUtils::MODE_MEASURE,
-                                nsnull,
-                                0,
-                                &totalWidthCoord,
-                                &bidiEngine);
+                                    textToDraw.Length(),
+                                    isRTL ? NSBIDI_RTL : NSBIDI_LTR,
+                                    presShell->GetPresContext(),
+                                    processor,
+                                    nsBidiPresUtils::MODE_MEASURE,
+                                    nsnull,
+                                    0,
+                                    &totalWidthCoord,
+                                    &bidiEngine);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   float totalWidth = float(totalWidthCoord) / processor.mAppUnitsPerDevPixel;
   if (aWidth) {
     *aWidth = totalWidth;
   }
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -90,26 +90,16 @@ void
 nsHTMLScrollFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
   mInner.Destroy();
   DestroyAbsoluteFrames(aDestructRoot);
   nsContainerFrame::DestroyFrom(aDestructRoot);
 }
 
 NS_IMETHODIMP
-nsHTMLScrollFrame::Init(nsIContent* aContent,
-                        nsIFrame*   aParent,
-                        nsIFrame*   aPrevInFlow)
-{
-  nsresult rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
-  mInner.Init();
-  return rv;
-}
-
-NS_IMETHODIMP
 nsHTMLScrollFrame::SetInitialChildList(ChildListID  aListID,
                                        nsFrameList& aChildList)
 {
   nsresult rv = nsContainerFrame::SetInitialChildList(aListID, aChildList);
   mInner.ReloadChildFrames();
   return rv;
 }
 
@@ -1035,26 +1025,16 @@ nsXULScrollFrame::AppendAnonymousContent
 void
 nsXULScrollFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
   mInner.Destroy();
   nsBoxFrame::DestroyFrom(aDestructRoot);
 }
 
 NS_IMETHODIMP
-nsXULScrollFrame::Init(nsIContent* aContent,
-                       nsIFrame*   aParent,
-                       nsIFrame*   aPrevInFlow)
-{
-  nsresult rv = nsBoxFrame::Init(aContent, aParent, aPrevInFlow);
-  mInner.Init();
-  return rv;
-}
-
-NS_IMETHODIMP
 nsXULScrollFrame::SetInitialChildList(ChildListID     aListID,
                                       nsFrameList&    aChildList)
 {
   nsresult rv = nsBoxFrame::SetInitialChildList(aListID, aChildList);
   mInner.ReloadChildFrames();
   return rv;
 }
 
@@ -1638,24 +1618,16 @@ nsGfxScrollFrameInner::~nsGfxScrollFrame
   }
 
   if (mScrollActivityTimer) {
     mScrollActivityTimer->Cancel();
     mScrollActivityTimer = nsnull;
   }
 }
 
-void
-nsGfxScrollFrameInner::Init()
-{
-  if (mOuter->GetStateBits() & NS_FRAME_FONT_INFLATION_CONTAINER) {
-    mOuter->AddStateBits(NS_FRAME_FONT_INFLATION_FLOW_ROOT);
-  }
-}
-
 /*
  * Callback function from AsyncScroll, used in nsGfxScrollFrameInner::ScrollTo
  */
 void
 nsGfxScrollFrameInner::AsyncScrollCallback(void* anInstance, mozilla::TimeStamp aTime)
 {
   nsGfxScrollFrameInner* self = static_cast<nsGfxScrollFrameInner*>(anInstance);
   if (!self || !self->mAsyncScroll)
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -40,18 +40,16 @@ struct ScrollReflowState;
 
 class nsGfxScrollFrameInner : public nsIReflowCallback {
 public:
   class AsyncScroll;
 
   nsGfxScrollFrameInner(nsContainerFrame* aOuter, bool aIsRoot);
   ~nsGfxScrollFrameInner();
 
-  void Init();
-
   typedef nsIScrollableFrame::ScrollbarStyles ScrollbarStyles;
   ScrollbarStyles GetScrollbarStylesFromFrame() const;
 
   // If a child frame was added or removed on the scrollframe,
   // reload our child frame list.
   // We need this if a scrollbar frame is recreated.
   void ReloadChildFrames();
 
@@ -348,19 +346,16 @@ class nsHTMLScrollFrame : public nsConta
 public:
   friend nsIFrame* NS_NewHTMLScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot);
 
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   // Called to set the child frames. We typically have three: the scroll area,
   // the vertical scrollbar, and the horizontal scrollbar.
-  NS_IMETHOD Init(nsIContent*      aContent,
-                  nsIFrame*        aParent,
-                  nsIFrame*        aPrevInFlow);
   NS_IMETHOD SetInitialChildList(ChildListID     aListID,
                                  nsFrameList&    aChildList);
 
   NS_IMETHOD BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                               const nsRect&           aDirtyRect,
                               const nsDisplayListSet& aLists) {
     return mInner.BuildDisplayList(aBuilder, aDirtyRect, aLists);
   }
@@ -586,19 +581,16 @@ class nsXULScrollFrame : public nsBoxFra
 public:
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   friend nsIFrame* NS_NewXULScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot);
 
   // Called to set the child frames. We typically have three: the scroll area,
   // the vertical scrollbar, and the horizontal scrollbar.
-  NS_IMETHOD Init(nsIContent*      aContent,
-                  nsIFrame*        aParent,
-                  nsIFrame*        aPrevInFlow);
   NS_IMETHOD SetInitialChildList(ChildListID     aListID,
                                  nsFrameList&    aChildList);
 
   NS_IMETHOD BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                               const nsRect&           aDirtyRect,
                               const nsDisplayListSet& aLists) {
     return mInner.BuildDisplayList(aBuilder, aDirtyRect, aLists);
   }
--- a/layout/reftests/font-inflation/relevant-width-overflow-1-ref.html
+++ b/layout/reftests/font-inflation/relevant-width-overflow-1-ref.html
@@ -1,9 +1,9 @@
 <!DOCTYPE HTML>
 <style>
-div { font-size: 44px; width: 600px }
-div.inner { font-size: 34px; width: 450px; overflow: hidden; }
+div { font-size: 34px; width: 450px }
+div.inner { width: 300px; overflow: hidden; }
 </style>
-<div class="outer">
-  Text in outer.
+<div class="middle">
+  Text in middle.
   <div class="inner">Text in inner.</div>
 </div>
--- a/layout/reftests/font-inflation/relevant-width-overflow-1.html
+++ b/layout/reftests/font-inflation/relevant-width-overflow-1.html
@@ -1,16 +1,16 @@
 <!DOCTYPE HTML>
 <style>
 div.outer { font-size: 12px; width: 600px }
-div.inner { width: 450px; overflow: hidden; }
+div.middle { width: 450px; }
+div.inner { width: 300px; overflow: hidden; }
 </style>
 <!--
 In a 450px container, the minimum font size at 15em per line is 30px.
 This means we map 0px-45px into 30px-45px, so 12px gets mapped to 34px.
-
-In a 600px container, the minimum font size at 15em per line is 40px.
-This means we map 0px-60px into 40px-60px, so 12px gets mapped to 44px.
 -->
 <div class="outer">
-  Text in outer.
-  <div class="inner">Text in inner.</div>
+  <div class="middle">
+    Text in middle.
+    <div class="inner">Text in inner.</div>
+  </div>
 </div>
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -1975,29 +1975,29 @@ CSS_PROP_POSITION(
 CSS_PROP_POSITION(
     min-height,
     min_height,
     MinHeight,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_STORES_CALC,
     "",
-    VARIANT_HLP | VARIANT_CALC,
+    VARIANT_AHLP | VARIANT_CALC,
     nsnull,
     offsetof(nsStylePosition, mMinHeight),
     eStyleAnimType_Coord)
 CSS_PROP_POSITION(
     min-width,
     min_width,
     MinWidth,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_STORES_CALC,
     "",
-    VARIANT_HKLP | VARIANT_CALC,
+    VARIANT_AHKLP | VARIANT_CALC,
     kWidthKTable,
     offsetof(nsStylePosition, mMinWidth),
     eStyleAnimType_Coord)
 CSS_PROP_DISPLAY(
     opacity,
     opacity,
     Opacity,
     CSS_PROPERTY_PARSE_VALUE,
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -6378,32 +6378,41 @@ nsRuleNode::ComputePositionData(void* aS
       pos->mOffset.Set(side, coord);
     }
   }
 
   SetCoord(*aRuleData->ValueForWidth(), pos->mWidth, parentPos->mWidth,
            SETCOORD_LPAEH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC,
            aContext, mPresContext, canStoreInRuleTree);
   SetCoord(*aRuleData->ValueForMinWidth(), pos->mMinWidth, parentPos->mMinWidth,
-           SETCOORD_LPEH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC,
+           SETCOORD_LPAEH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC,
            aContext, mPresContext, canStoreInRuleTree);
   SetCoord(*aRuleData->ValueForMaxWidth(), pos->mMaxWidth, parentPos->mMaxWidth,
            SETCOORD_LPOEH | SETCOORD_INITIAL_NONE | SETCOORD_STORE_CALC,
            aContext, mPresContext, canStoreInRuleTree);
 
   SetCoord(*aRuleData->ValueForHeight(), pos->mHeight, parentPos->mHeight,
            SETCOORD_LPAH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC,
            aContext, mPresContext, canStoreInRuleTree);
   SetCoord(*aRuleData->ValueForMinHeight(), pos->mMinHeight, parentPos->mMinHeight,
-           SETCOORD_LPH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC,
+           SETCOORD_LPAH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC,
            aContext, mPresContext, canStoreInRuleTree);
   SetCoord(*aRuleData->ValueForMaxHeight(), pos->mMaxHeight, parentPos->mMaxHeight,
            SETCOORD_LPOH | SETCOORD_INITIAL_NONE | SETCOORD_STORE_CALC,
            aContext, mPresContext, canStoreInRuleTree);
 
+
+  // Handle 'auto' values for min-width / min-height
+  if (pos->mMinWidth.GetUnit() == eStyleUnit_Auto) {
+    pos->mMinWidth.SetCoordValue(0);
+  }
+  if (pos->mMinHeight.GetUnit() == eStyleUnit_Auto) {
+    pos->mMinHeight.SetCoordValue(0);
+  }
+
   // box-sizing: enum, inherit, initial
   SetDiscrete(*aRuleData->ValueForBoxSizing(),
               pos->mBoxSizing, canStoreInRuleTree,
               SETDSC_ENUMERATED, parentPos->mBoxSizing,
               NS_STYLE_BOX_SIZING_CONTENT, 0, 0, 0, 0);
 
   // z-index
   const nsCSSValue* zIndexValue = aRuleData->ValueForZIndex();
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -2347,40 +2347,40 @@ var gCSSProperties = {
 		],
 		invalid_values: [ "auto" ]
 	},
 	"min-height": {
 		domProp: "minHeight",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "display": "block" },
-		initial_values: [ "0", "-moz-calc(0em)", "-moz-calc(-2px)", "-moz-calc(-1%)" ],
+		initial_values: [ "auto", "0", "-moz-calc(0em)", "-moz-calc(-2px)", "-moz-calc(-1%)" ],
 		other_values: [ "30px", "50%",
 			"-moz-calc(2px)",
 			"-moz-calc(50%)",
 			"-moz-calc(3*25px)",
 			"-moz-calc(25px*3)",
 			"-moz-calc(3*25px + 50%)",
 		],
-		invalid_values: [ "auto", "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
+		invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
 	},
 	"min-width": {
 		domProp: "minWidth",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "display": "block" },
-		initial_values: [ "0", "-moz-calc(0em)", "-moz-calc(-2px)", "-moz-calc(-1%)" ],
+		initial_values: [ "auto", "0", "-moz-calc(0em)", "-moz-calc(-2px)", "-moz-calc(-1%)" ],
 		other_values: [ "30px", "50%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
 			"-moz-calc(2px)",
 			"-moz-calc(50%)",
 			"-moz-calc(3*25px)",
 			"-moz-calc(25px*3)",
 			"-moz-calc(3*25px + 50%)",
 		],
-		invalid_values: [ "auto", "none" ]
+		invalid_values: [ "none" ]
 	},
 	"opacity": {
 		domProp: "opacity",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "1", "17", "397.376" ],
 		other_values: [ "0", "0.4", "0.0000", "-3" ],
 		invalid_values: [ "0px", "1px" ]
--- a/testing/marionette/client/marionette/venv_test.sh
+++ b/testing/marionette/client/marionette/venv_test.sh
@@ -37,20 +37,16 @@ else
   echo "Creating a virtual environment in $VENV_DIR"
   curl https://raw.github.com/pypa/virtualenv/develop/virtualenv.py | ${PYTHON} - $VENV_DIR
   cd $VENV_DIR
   . bin/activate
   # set up mozbase
   git clone git://github.com/mozilla/mozbase.git
   cd mozbase
   python setup_development.py
-  cd ..
-  git clone git://github.com/mozilla/datazilla_client.git
-  cd datazilla_client
-  python setup.py develop
 fi
 
 # update the marionette_client
 cd $MARIONETTE_HOME
 python setup.py develop
 cd marionette
 
 # pop off the python parameter
--- a/testing/marionette/client/setup.py
+++ b/testing/marionette/client/setup.py
@@ -6,17 +6,17 @@ version = '0.2'
 # get documentation from the README
 try:
     here = os.path.dirname(os.path.abspath(__file__))
     description = file(os.path.join(here, 'README.md')).read()
 except (OSError, IOError):
     description = ''
 
 # dependencies
-deps = ['manifestdestiny', 'mozhttpd >= 0.3', 'mozprocess']
+deps = ['manifestdestiny', 'mozhttpd >= 0.3', 'mozrunner', 'datazilla']
 
 setup(name='marionette',
       version=version,
       description="Marionette test automation client",
       long_description=description,
       classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla',
       author='Jonathan Griffin',