From 2e63f4a2c97420af198650f281c70b212cf63a09 Mon Sep 17 00:00:00 2001 From: James Willcox Date: Tue, 12 Jun 2012 09:34:50 -0400 Subject: [PATCH 1/6] Backout a9455a51d543, bug 756253 --- mobile/android/app/mobile.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js index c06510a60de..135673699e4 100644 --- a/mobile/android/app/mobile.js +++ b/mobile/android/app/mobile.js @@ -438,10 +438,7 @@ pref("dom.ipc.plugins.enabled", true); #endif pref("plugins.click_to_play", true); -// Disabled because of thread safety problem -// in getting the bits from the surface. -// Bug 756253 -pref("plugins.use_placeholder", 0); +pref("plugins.use_placeholder", 1); // process priority // higher values give content process less CPU time From a0355de69eca327420dfc9d0abe46253bb825fad Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Tue, 12 Jun 2012 10:48:20 -0700 Subject: [PATCH 2/6] Bug 763689: Add "auto" keyword for min-height and min-width, which for now just computes to 0. r=bz --- layout/style/nsCSSPropList.h | 4 ++-- layout/style/nsRuleNode.cpp | 13 +++++++++++-- layout/style/test/property_database.js | 8 ++++---- 3 files changed, 17 insertions(+), 8 deletions(-) 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", From 9c2f93823a019aaa237c159cb8743e340919cfc0 Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Tue, 12 Jun 2012 10:48:42 -0700 Subject: [PATCH 3/6] Bug 750575; use nsCOMPtr around nsIPresShell in canvas code. r=roc --- .../canvas/src/nsCanvasRenderingContext2D.cpp | 2 +- .../src/nsCanvasRenderingContext2DAzure.cpp | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/canvas/src/nsCanvasRenderingContext2D.cpp b/content/canvas/src/nsCanvasRenderingContext2D.cpp index 05f77b03bf9..30e96b5b588 100644 --- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -2840,7 +2840,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 619213cfd18..8b1243c7e99 100644 --- a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp @@ -3155,9 +3155,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(); @@ -3213,15 +3213,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; } From f495de47b9ad150546be43cbb014a4dcc4955ccd Mon Sep 17 00:00:00 2001 From: Malini Das Date: Tue, 12 Jun 2012 11:57:25 -0700 Subject: [PATCH 4/6] Bug 744902 - Add datazilla and mozrunner to setup.py deps, r=jgriffin, DONTBUILD because NPOTB --- testing/marionette/client/marionette/venv_test.sh | 4 ---- testing/marionette/client/setup.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) 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, From 5c7d223bfc2133b3a0a6c4181325407697866eb8 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Tue, 12 Jun 2012 12:43:09 -0700 Subject: [PATCH 5/6] Make scroll frames (i.e., overflow != visible) no longer be font size inflation flow roots. This fixes phoronix.com/reddit.com/others at the expense of youtube.com. This reverts b64bfa138619890a01826bde8974cc974b45a6f5 (bug 760098) which in turn reverted 9620f50be9fa8be44931decf1e57ce25f51da812 (Bug 747720, patch 7) which in turn reverted part of 9499f6b28addcbcd9c480eb80cfe6c4c63a4a3a1 (Bug 706193, patch 2). (Bug 747720) r=backout --- layout/generic/nsGfxScrollFrame.cpp | 28 ------------------- layout/generic/nsGfxScrollFrame.h | 8 ------ .../relevant-width-overflow-1-ref.html | 8 +++--- .../relevant-width-overflow-1.html | 12 ++++---- 4 files changed, 10 insertions(+), 46 deletions(-) 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.
+
From 1aace3320993c3bf12a69d9c22cbb4311f2936a0 Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Thu, 7 Jun 2012 13:27:15 -0400 Subject: [PATCH 6/6] Bug 756253 - Disable flash placeholder on zooming because of thread safety problems and heap corruption. r=snop --- mobile/android/app/mobile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js index 135673699e4..c06510a60de 100644 --- a/mobile/android/app/mobile.js +++ b/mobile/android/app/mobile.js @@ -438,7 +438,10 @@ pref("dom.ipc.plugins.enabled", true); #endif pref("plugins.click_to_play", true); -pref("plugins.use_placeholder", 1); +// Disabled because of thread safety problem +// in getting the bits from the surface. +// Bug 756253 +pref("plugins.use_placeholder", 0); // process priority // higher values give content process less CPU time