This commit is contained in:
Ryan VanderMeulen 2012-06-12 21:36:40 -04:00
Родитель bd168f1761 99e40fe0fb
Коммит afc12cf087
11 изменённых файлов: 40 добавлений и 71 удалений

Просмотреть файл

@ -2843,7 +2843,7 @@ nsCanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
return NS_ERROR_FAILURE;
}
nsIPresShell* presShell = GetPresShell();
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
if (!presShell)
return NS_ERROR_FAILURE;

Просмотреть файл

@ -3188,9 +3188,9 @@ nsCanvasRenderingContext2DAzure::DrawOrMeasureText(const nsAString& aRawText,
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();
@ -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;
}

Просмотреть файл

@ -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
*/

Просмотреть файл

@ -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);

Просмотреть файл

@ -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>

Просмотреть файл

@ -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>

Просмотреть файл

@ -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)

Просмотреть файл

@ -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,

Просмотреть файл

@ -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",

Просмотреть файл

@ -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

Просмотреть файл

@ -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,