diff --git a/content/canvas/src/nsCanvasRenderingContext2D.cpp b/content/canvas/src/nsCanvasRenderingContext2D.cpp index 58454631acd..b39644c7d52 100644 --- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -2843,7 +2843,7 @@ nsCanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText, return NS_ERROR_FAILURE; } - nsIPresShell* presShell = GetPresShell(); + nsCOMPtr presShell = GetPresShell(); if (!presShell) return NS_ERROR_FAILURE; diff --git a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp index 045756fcef1..73ec7e8bf01 100644 --- a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp @@ -3188,9 +3188,9 @@ nsCanvasRenderingContext2DAzure::DrawOrMeasureText(const nsAString& aRawText, return NS_ERROR_FAILURE; } - nsIPresShell* presShell = GetPresShell(); + nsCOMPtr presShell = GetPresShell(); if (!presShell) - return NS_ERROR_FAILURE; + return NS_ERROR_FAILURE; nsIDocument* document = presShell->GetDocument(); @@ -3246,15 +3246,15 @@ nsCanvasRenderingContext2DAzure::DrawOrMeasureText(const nsAString& aRawText, // 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; } diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 7d9c632afb4..61472e7490f 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -94,16 +94,6 @@ nsHTMLScrollFrame::DestroyFrom(nsIFrame* 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) @@ -1039,16 +1029,6 @@ nsXULScrollFrame::DestroyFrom(nsIFrame* aDestructRoot) 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) @@ -1643,14 +1623,6 @@ nsGfxScrollFrameInner::~nsGfxScrollFrameInner() } } -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 */ diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index d771b943d26..da3614f8ff3 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -45,8 +45,6 @@ public: nsGfxScrollFrameInner(nsContainerFrame* aOuter, bool aIsRoot); ~nsGfxScrollFrameInner(); - void Init(); - typedef nsIScrollableFrame::ScrollbarStyles ScrollbarStyles; ScrollbarStyles GetScrollbarStylesFromFrame() const; @@ -353,9 +351,6 @@ public: // 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); @@ -591,9 +586,6 @@ public: // 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); diff --git a/layout/reftests/font-inflation/relevant-width-overflow-1-ref.html b/layout/reftests/font-inflation/relevant-width-overflow-1-ref.html index a3028e69406..96f555569cd 100644 --- 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 @@ -
- Text in outer. +
+ Text in middle.
Text in inner.
diff --git a/layout/reftests/font-inflation/relevant-width-overflow-1.html b/layout/reftests/font-inflation/relevant-width-overflow-1.html index 26f4f9a0d85..ca6bf57c718 100644 --- a/layout/reftests/font-inflation/relevant-width-overflow-1.html +++ b/layout/reftests/font-inflation/relevant-width-overflow-1.html @@ -1,16 +1,16 @@
- Text in outer. -
Text in inner.
+
+ Text in middle. +
Text in inner.
+
diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 98ffaf8160b..ea5788c3a7c 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -1980,7 +1980,7 @@ CSS_PROP_POSITION( CSS_PROPERTY_VALUE_NONNEGATIVE | CSS_PROPERTY_STORES_CALC, "", - VARIANT_HLP | VARIANT_CALC, + VARIANT_AHLP | VARIANT_CALC, nsnull, offsetof(nsStylePosition, mMinHeight), eStyleAnimType_Coord) @@ -1992,7 +1992,7 @@ CSS_PROP_POSITION( CSS_PROPERTY_VALUE_NONNEGATIVE | CSS_PROPERTY_STORES_CALC, "", - VARIANT_HKLP | VARIANT_CALC, + VARIANT_AHKLP | VARIANT_CALC, kWidthKTable, offsetof(nsStylePosition, mMinWidth), eStyleAnimType_Coord) diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 066842780ae..a5839ad4220 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -6383,7 +6383,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, 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, @@ -6393,12 +6393,21 @@ nsRuleNode::ComputePositionData(void* aStartStruct, 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, diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 5a4d0c4fcb0..515c2d0ffd5 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -2352,7 +2352,7 @@ var gCSSProperties = { 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%)", @@ -2360,14 +2360,14 @@ var gCSSProperties = { "-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%)", @@ -2375,7 +2375,7 @@ var gCSSProperties = { "-moz-calc(25px*3)", "-moz-calc(3*25px + 50%)", ], - invalid_values: [ "auto", "none" ] + invalid_values: [ "none" ] }, "opacity": { domProp: "opacity", diff --git a/testing/marionette/client/marionette/venv_test.sh b/testing/marionette/client/marionette/venv_test.sh index 1a3850bc58c..ac0a0b675ad 100644 --- a/testing/marionette/client/marionette/venv_test.sh +++ b/testing/marionette/client/marionette/venv_test.sh @@ -42,10 +42,6 @@ else 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 diff --git a/testing/marionette/client/setup.py b/testing/marionette/client/setup.py index 39cd640b16c..393de248081 100644 --- a/testing/marionette/client/setup.py +++ b/testing/marionette/client/setup.py @@ -11,7 +11,7 @@ except (OSError, IOError): description = '' # dependencies -deps = ['manifestdestiny', 'mozhttpd >= 0.3', 'mozprocess'] +deps = ['manifestdestiny', 'mozhttpd >= 0.3', 'mozrunner', 'datazilla'] setup(name='marionette', version=version,