From d5f1d5af7091aeb423dca91ff2a422906d67d01b Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Thu, 2 Aug 2001 00:09:27 +0000 Subject: [PATCH] Fix for 71471. r=blake, sr=hewitt git-svn-id: svn://10.0.0.236/trunk@100159 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsStyleContext.cpp | 8 +- .../html/style/src/nsCSSDeclaration.cpp | 48 +++- .../content/html/style/src/nsCSSParser.cpp | 11 + .../content/html/style/src/nsCSSStruct.cpp | 48 +++- .../content/html/style/src/nsCSSStyleRule.cpp | 16 ++ .../html/style/src/nsICSSDeclaration.h | 4 + mozilla/content/html/style/src/nsRuleNode.cpp | 62 +++- .../content/shared/public/nsCSSKeywordList.h | 24 +- mozilla/content/shared/public/nsCSSPropList.h | 12 +- mozilla/content/shared/public/nsCSSProps.h | 3 + mozilla/content/shared/public/nsStyleStruct.h | 8 +- mozilla/content/shared/public/nsXULAtomList.h | 1 + mozilla/content/shared/src/nsCSSProps.cpp | 53 +++- mozilla/content/shared/src/nsStyleStruct.cpp | 10 +- .../content/extensions/multipanel.css | 8 +- .../inspector/resources/content/inspector.css | 4 +- mozilla/layout/base/nsStyleConsts.h | 17 ++ mozilla/layout/base/public/nsStyleConsts.h | 17 ++ mozilla/layout/html/document/src/html.css | 2 +- mozilla/layout/style/html.css | 2 +- mozilla/layout/style/nsCSSDeclaration.cpp | 48 +++- mozilla/layout/style/nsCSSKeywordList.h | 24 +- mozilla/layout/style/nsCSSParser.cpp | 11 + mozilla/layout/style/nsCSSPropList.h | 12 +- mozilla/layout/style/nsCSSProps.cpp | 53 +++- mozilla/layout/style/nsCSSProps.h | 3 + mozilla/layout/style/nsCSSStruct.cpp | 48 +++- mozilla/layout/style/nsCSSStyleRule.cpp | 16 ++ mozilla/layout/style/nsStyleContext.cpp | 8 +- mozilla/layout/style/nsStyleStruct.cpp | 10 +- mozilla/layout/style/nsStyleStruct.h | 8 +- mozilla/layout/xul/base/src/nsBox.cpp | 10 + mozilla/layout/xul/base/src/nsBoxFrame.cpp | 264 ++++++++++++------ .../bookmarks/bookmarksToolbar.css | 3 - .../classic/communicator/mac/button.css | 3 - .../communicator/mac/dialogOverlay.css | 11 - .../classic/communicator/mac/menubutton.css | 1 - .../classic/communicator/win/button.css | 2 - .../communicator/win/dialogOverlay.css | 1 - .../classic/communicator/win/menubutton.css | 2 - .../themes/classic/editor/EditorDialog.css | 4 - .../themes/classic/editor/EditorToolbars.css | 2 +- .../classic/editor/mac/EditorDialog.css | 4 - .../classic/editor/mac/EditorToolbars.css | 2 +- .../classic/editor/win/EditorDialog.css | 4 - .../classic/editor/win/EditorToolbars.css | 2 +- mozilla/themes/classic/global/mac/button.css | 4 +- mozilla/themes/classic/global/mac/console.css | 2 +- .../classic/global/mac/dialogOverlay.css | 11 - mozilla/themes/classic/global/mac/menu.css | 1 - .../themes/classic/global/mac/menulist.css | 4 - .../classic/global/mac/menulistBindings.xml | 4 +- .../themes/classic/global/mac/outliner.css | 1 - .../themes/classic/global/mac/scrollbars.css | 2 +- .../themes/classic/global/mac/scrollbox.css | 1 - .../themes/classic/global/mac/splitter.css | 1 - mozilla/themes/classic/global/mac/tree.css | 2 - mozilla/themes/classic/global/win/button.css | 1 - mozilla/themes/classic/global/win/console.css | 2 +- .../classic/global/win/dialogOverlay.css | 1 - mozilla/themes/classic/global/win/menu.css | 1 - .../themes/classic/global/win/outliner.css | 2 - .../themes/classic/global/win/scrollbox.css | 1 - .../themes/classic/global/win/splitter.css | 7 +- mozilla/themes/classic/global/win/tree.css | 1 - .../classic/messenger/mac/messenger.css | 2 +- .../messenger/mac/msgHdrViewOverlay.css | 6 +- .../messengercompose/messengercompose.css | 3 +- .../classic/messenger/win/messenger.css | 2 +- .../messenger/win/msgHdrViewOverlay.css | 6 +- .../classic/navigator/win/navigator.css | 1 - mozilla/themes/modern/communicator/brand.css | 2 +- mozilla/themes/modern/communicator/button.css | 5 - .../themes/modern/communicator/menubutton.css | 1 - .../communicator/search/internetresults.css | 1 - mozilla/themes/modern/editor/EditorDialog.css | 4 - mozilla/themes/modern/global/autocomplete.css | 1 - mozilla/themes/modern/global/button.css | 1 - mozilla/themes/modern/global/console.css | 2 +- .../themes/modern/global/globalBindings.xml | 10 +- mozilla/themes/modern/global/menu.css | 2 +- mozilla/themes/modern/global/menulist.css | 4 - mozilla/themes/modern/global/outliner.css | 1 - .../themes/modern/global/scrollbars-mini.css | 2 +- mozilla/themes/modern/global/scrollbars.css | 2 +- mozilla/themes/modern/global/scrollbox.css | 1 - mozilla/themes/modern/global/splitter.css | 1 - mozilla/themes/modern/global/tree.css | 2 - mozilla/themes/modern/messenger/messenger.css | 2 +- .../messengercompose/messengercompose.css | 3 +- .../modern/messenger/msgHdrViewOverlay.css | 4 - mozilla/themes/modern/navigator/navigator.css | 6 +- .../resources/content/autocomplete.css | 2 +- .../resources/content/bindings/menu.xml | 16 +- .../resources/content/bindings/tree.css | 20 +- .../resources/content/bindings/tree.xml | 22 +- mozilla/xpfe/global/resources/content/xul.css | 75 ++--- 97 files changed, 759 insertions(+), 416 deletions(-) diff --git a/mozilla/content/base/src/nsStyleContext.cpp b/mozilla/content/base/src/nsStyleContext.cpp index 7e62deb7992..e773bb5aeb9 100644 --- a/mozilla/content/base/src/nsStyleContext.cpp +++ b/mozilla/content/base/src/nsStyleContext.cpp @@ -1124,8 +1124,12 @@ void nsStyleContext::DumpRegressionData(nsIPresContext* aPresContext, FILE* out, #ifdef INCLUDE_XUL IndentBy(out,aIndent); const nsStyleXUL* xul = (const nsStyleXUL*)GetStyleData(eStyleStruct_XUL); - fprintf(out, "mBoxOrient); + fprintf(out, "mBoxAlign, + (int)xul->mBoxDirection, + (int)xul->mBoxFlex, + (int)xul->mBoxOrient, + (int)xul->mBoxPack); fprintf(out, "\" />\n"); #endif //#insert new style structs here# diff --git a/mozilla/content/html/style/src/nsCSSDeclaration.cpp b/mozilla/content/html/style/src/nsCSSDeclaration.cpp index 6abd0b36d41..0a8079fbc0a 100644 --- a/mozilla/content/html/style/src/nsCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsCSSDeclaration.cpp @@ -985,7 +985,9 @@ nsCSSXUL::nsCSSXUL(void) } nsCSSXUL::nsCSSXUL(const nsCSSXUL& aCopy) - : mBoxOrient(aCopy.mBoxOrient) + : mBoxAlign(aCopy.mBoxAlign), mBoxDirection(aCopy.mBoxDirection), + mBoxFlex(aCopy.mBoxFlex), mBoxOrient(aCopy.mBoxOrient), + mBoxPack(aCopy.mBoxPack) { MOZ_COUNT_CTOR(nsCSSXUL); } @@ -1006,7 +1008,11 @@ void nsCSSXUL::List(FILE* out, PRInt32 aIndent) const nsAutoString buffer; + mBoxAlign.AppendToString(buffer, eCSSProperty_box_align); + mBoxDirection.AppendToString(buffer, eCSSProperty_box_direction); + mBoxFlex.AppendToString(buffer, eCSSProperty_box_flex); mBoxOrient.AppendToString(buffer, eCSSProperty_box_orient); + mBoxPack.AppendToString(buffer, eCSSProperty_box_pack); fputs(buffer, out); } @@ -1746,10 +1752,18 @@ CSSDeclarationImpl::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValu #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: CSS_ENSURE(XUL) { switch (aProperty) { - case eCSSProperty_box_orient: mXUL->mBoxOrient = aValue; break; + case eCSSProperty_box_align: mXUL->mBoxAlign = aValue; break; + case eCSSProperty_box_direction: mXUL->mBoxDirection = aValue; break; + case eCSSProperty_box_flex: mXUL->mBoxFlex = aValue; break; + case eCSSProperty_box_orient: mXUL->mBoxOrient = aValue; break; + case eCSSProperty_box_pack: mXUL->mBoxPack = aValue; break; CSS_BOGUS_DEFAULT; // make compiler happy } } @@ -2493,11 +2507,19 @@ CSSDeclarationImpl::SetValueImportant(nsCSSProperty aProperty) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: if (nsnull != mXUL) { CSS_ENSURE_IMPORTANT(XUL) { switch (aProperty) { - CSS_CASE_IMPORTANT(eCSSProperty_box_orient, mXUL->mBoxOrient); + CSS_CASE_IMPORTANT(eCSSProperty_box_align, mXUL->mBoxAlign); + CSS_CASE_IMPORTANT(eCSSProperty_box_direction, mXUL->mBoxDirection); + CSS_CASE_IMPORTANT(eCSSProperty_box_flex, mXUL->mBoxFlex); + CSS_CASE_IMPORTANT(eCSSProperty_box_orient, mXUL->mBoxOrient); + CSS_CASE_IMPORTANT(eCSSProperty_box_pack, mXUL->mBoxPack); CSS_BOGUS_DEFAULT; // make compiler happy } } @@ -3181,10 +3203,18 @@ CSSDeclarationImpl::RemoveProperty(nsCSSProperty aProperty) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: CSS_CHECK(XUL) { switch(aProperty) { - case eCSSProperty_box_orient: mXUL->mBoxOrient.Reset(); break; + case eCSSProperty_box_align: mXUL->mBoxAlign.Reset(); break; + case eCSSProperty_box_direction: mXUL->mBoxDirection.Reset(); break; + case eCSSProperty_box_flex: mXUL->mBoxFlex.Reset(); break; + case eCSSProperty_box_orient: mXUL->mBoxOrient.Reset(); break; + case eCSSProperty_box_pack: mXUL->mBoxPack.Reset(); break; CSS_BOGUS_DEFAULT; // Make compiler happy } } @@ -3920,10 +3950,18 @@ CSSDeclarationImpl::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: if (nsnull != mXUL) { switch (aProperty) { - case eCSSProperty_box_orient: aValue = mXUL->mBoxOrient; break; + case eCSSProperty_box_align: aValue = mXUL->mBoxAlign; break; + case eCSSProperty_box_direction: aValue = mXUL->mBoxDirection; break; + case eCSSProperty_box_flex: aValue = mXUL->mBoxFlex; break; + case eCSSProperty_box_orient: aValue = mXUL->mBoxOrient; break; + case eCSSProperty_box_pack: aValue = mXUL->mBoxPack; break; CSS_BOGUS_DEFAULT; // make compiler happy } } diff --git a/mozilla/content/html/style/src/nsCSSParser.cpp b/mozilla/content/html/style/src/nsCSSParser.cpp index 2a2a61fc345..08cda008d11 100644 --- a/mozilla/content/html/style/src/nsCSSParser.cpp +++ b/mozilla/content/html/style/src/nsCSSParser.cpp @@ -3458,9 +3458,20 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, case eCSSProperty_right: return ParseVariant(aErrorCode, aValue, VARIANT_AHLP, nsnull); #ifdef INCLUDE_XUL + case eCSSProperty_box_align: + return ParseVariant(aErrorCode, aValue, VARIANT_HK, + nsCSSProps::kBoxAlignKTable); + case eCSSProperty_box_direction: + return ParseVariant(aErrorCode, aValue, VARIANT_HK, + nsCSSProps::kBoxDirectionKTable); + case eCSSProperty_box_flex: + return ParseVariant(aErrorCode, aValue, VARIANT_HN, nsnull); case eCSSProperty_box_orient: return ParseVariant(aErrorCode, aValue, VARIANT_HK, nsCSSProps::kBoxOrientKTable); + case eCSSProperty_box_pack: + return ParseVariant(aErrorCode, aValue, VARIANT_HK, + nsCSSProps::kBoxPackKTable); #endif case eCSSProperty_box_sizing: return ParseVariant(aErrorCode, aValue, VARIANT_HK, diff --git a/mozilla/content/html/style/src/nsCSSStruct.cpp b/mozilla/content/html/style/src/nsCSSStruct.cpp index 6abd0b36d41..0a8079fbc0a 100644 --- a/mozilla/content/html/style/src/nsCSSStruct.cpp +++ b/mozilla/content/html/style/src/nsCSSStruct.cpp @@ -985,7 +985,9 @@ nsCSSXUL::nsCSSXUL(void) } nsCSSXUL::nsCSSXUL(const nsCSSXUL& aCopy) - : mBoxOrient(aCopy.mBoxOrient) + : mBoxAlign(aCopy.mBoxAlign), mBoxDirection(aCopy.mBoxDirection), + mBoxFlex(aCopy.mBoxFlex), mBoxOrient(aCopy.mBoxOrient), + mBoxPack(aCopy.mBoxPack) { MOZ_COUNT_CTOR(nsCSSXUL); } @@ -1006,7 +1008,11 @@ void nsCSSXUL::List(FILE* out, PRInt32 aIndent) const nsAutoString buffer; + mBoxAlign.AppendToString(buffer, eCSSProperty_box_align); + mBoxDirection.AppendToString(buffer, eCSSProperty_box_direction); + mBoxFlex.AppendToString(buffer, eCSSProperty_box_flex); mBoxOrient.AppendToString(buffer, eCSSProperty_box_orient); + mBoxPack.AppendToString(buffer, eCSSProperty_box_pack); fputs(buffer, out); } @@ -1746,10 +1752,18 @@ CSSDeclarationImpl::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValu #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: CSS_ENSURE(XUL) { switch (aProperty) { - case eCSSProperty_box_orient: mXUL->mBoxOrient = aValue; break; + case eCSSProperty_box_align: mXUL->mBoxAlign = aValue; break; + case eCSSProperty_box_direction: mXUL->mBoxDirection = aValue; break; + case eCSSProperty_box_flex: mXUL->mBoxFlex = aValue; break; + case eCSSProperty_box_orient: mXUL->mBoxOrient = aValue; break; + case eCSSProperty_box_pack: mXUL->mBoxPack = aValue; break; CSS_BOGUS_DEFAULT; // make compiler happy } } @@ -2493,11 +2507,19 @@ CSSDeclarationImpl::SetValueImportant(nsCSSProperty aProperty) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: if (nsnull != mXUL) { CSS_ENSURE_IMPORTANT(XUL) { switch (aProperty) { - CSS_CASE_IMPORTANT(eCSSProperty_box_orient, mXUL->mBoxOrient); + CSS_CASE_IMPORTANT(eCSSProperty_box_align, mXUL->mBoxAlign); + CSS_CASE_IMPORTANT(eCSSProperty_box_direction, mXUL->mBoxDirection); + CSS_CASE_IMPORTANT(eCSSProperty_box_flex, mXUL->mBoxFlex); + CSS_CASE_IMPORTANT(eCSSProperty_box_orient, mXUL->mBoxOrient); + CSS_CASE_IMPORTANT(eCSSProperty_box_pack, mXUL->mBoxPack); CSS_BOGUS_DEFAULT; // make compiler happy } } @@ -3181,10 +3203,18 @@ CSSDeclarationImpl::RemoveProperty(nsCSSProperty aProperty) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: CSS_CHECK(XUL) { switch(aProperty) { - case eCSSProperty_box_orient: mXUL->mBoxOrient.Reset(); break; + case eCSSProperty_box_align: mXUL->mBoxAlign.Reset(); break; + case eCSSProperty_box_direction: mXUL->mBoxDirection.Reset(); break; + case eCSSProperty_box_flex: mXUL->mBoxFlex.Reset(); break; + case eCSSProperty_box_orient: mXUL->mBoxOrient.Reset(); break; + case eCSSProperty_box_pack: mXUL->mBoxPack.Reset(); break; CSS_BOGUS_DEFAULT; // Make compiler happy } } @@ -3920,10 +3950,18 @@ CSSDeclarationImpl::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: if (nsnull != mXUL) { switch (aProperty) { - case eCSSProperty_box_orient: aValue = mXUL->mBoxOrient; break; + case eCSSProperty_box_align: aValue = mXUL->mBoxAlign; break; + case eCSSProperty_box_direction: aValue = mXUL->mBoxDirection; break; + case eCSSProperty_box_flex: aValue = mXUL->mBoxFlex; break; + case eCSSProperty_box_orient: aValue = mXUL->mBoxOrient; break; + case eCSSProperty_box_pack: aValue = mXUL->mBoxPack; break; CSS_BOGUS_DEFAULT; // make compiler happy } } diff --git a/mozilla/content/html/style/src/nsCSSStyleRule.cpp b/mozilla/content/html/style/src/nsCSSStyleRule.cpp index 75c7225852b..8e3633db0cb 100644 --- a/mozilla/content/html/style/src/nsCSSStyleRule.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleRule.cpp @@ -1673,10 +1673,26 @@ MapXULForDeclaration(nsICSSDeclaration* aDecl, nsCSSXUL& aXUL) if (!ourXUL) return NS_OK; // We don't have any rules for XUL. + // box-align: enum, inherit + if (aXUL.mBoxAlign.GetUnit() == eCSSUnit_Null && ourXUL->mBoxAlign.GetUnit() != eCSSUnit_Null) + aXUL.mBoxAlign = ourXUL->mBoxAlign; + + // box-direction: enum, inherit + if (aXUL.mBoxDirection.GetUnit() == eCSSUnit_Null && ourXUL->mBoxDirection.GetUnit() != eCSSUnit_Null) + aXUL.mBoxDirection = ourXUL->mBoxDirection; + + // box-flex: enum, inherit + if (aXUL.mBoxFlex.GetUnit() == eCSSUnit_Null && ourXUL->mBoxFlex.GetUnit() != eCSSUnit_Null) + aXUL.mBoxFlex = ourXUL->mBoxFlex; + // box-orient: enum, inherit if (aXUL.mBoxOrient.GetUnit() == eCSSUnit_Null && ourXUL->mBoxOrient.GetUnit() != eCSSUnit_Null) aXUL.mBoxOrient = ourXUL->mBoxOrient; + // box-pack: enum, inherit + if (aXUL.mBoxPack.GetUnit() == eCSSUnit_Null && ourXUL->mBoxPack.GetUnit() != eCSSUnit_Null) + aXUL.mBoxPack = ourXUL->mBoxPack; + return NS_OK; } #endif diff --git a/mozilla/content/html/style/src/nsICSSDeclaration.h b/mozilla/content/html/style/src/nsICSSDeclaration.h index 7f20a9ff66a..e94b32232a4 100644 --- a/mozilla/content/html/style/src/nsICSSDeclaration.h +++ b/mozilla/content/html/style/src/nsICSSDeclaration.h @@ -404,7 +404,11 @@ struct nsCSSXUL : public nsCSSStruct { const nsID& GetID(void); void List(FILE* out = stdout, PRInt32 aIndent = 0) const; + nsCSSValue mBoxAlign; + nsCSSValue mBoxDirection; + nsCSSValue mBoxFlex; nsCSSValue mBoxOrient; + nsCSSValue mBoxPack; }; #endif diff --git a/mozilla/content/html/style/src/nsRuleNode.cpp b/mozilla/content/html/style/src/nsRuleNode.cpp index 357a6de1108..78f9d733099 100644 --- a/mozilla/content/html/style/src/nsRuleNode.cpp +++ b/mozilla/content/html/style/src/nsRuleNode.cpp @@ -3548,6 +3548,33 @@ nsRuleNode::ComputeXULData(nsStyleStruct* aStartStruct, const nsCSSStruct& aData PRBool inherited = aInherited; + // box-align: enum, inherit + if (eCSSUnit_Enumerated == xulData.mBoxAlign.GetUnit()) { + xul->mBoxAlign = xulData.mBoxAlign.GetIntValue(); + } + else if (eCSSUnit_Inherit == xulData.mBoxAlign.GetUnit()) { + inherited = PR_TRUE; + xul->mBoxAlign = parentXUL->mBoxAlign; + } + + // box-direction: enum, inherit + if (eCSSUnit_Enumerated == xulData.mBoxDirection.GetUnit()) { + xul->mBoxDirection = xulData.mBoxDirection.GetIntValue(); + } + else if (eCSSUnit_Inherit == xulData.mBoxDirection.GetUnit()) { + inherited = PR_TRUE; + xul->mBoxDirection = parentXUL->mBoxDirection; + } + + // box-flex: factor, inherit + if (eCSSUnit_Number == xulData.mBoxFlex.GetUnit()) { + xul->mBoxFlex = xulData.mBoxFlex.GetFloatValue(); + } + else if (eCSSUnit_Inherit == xulData.mBoxOrient.GetUnit()) { + inherited = PR_TRUE; + xul->mBoxFlex = parentXUL->mBoxFlex; + } + // box-orient: enum, inherit if (eCSSUnit_Enumerated == xulData.mBoxOrient.GetUnit()) { xul->mBoxOrient = xulData.mBoxOrient.GetIntValue(); @@ -3557,6 +3584,15 @@ nsRuleNode::ComputeXULData(nsStyleStruct* aStartStruct, const nsCSSStruct& aData xul->mBoxOrient = parentXUL->mBoxOrient; } + // box-pack: enum, inherit + if (eCSSUnit_Enumerated == xulData.mBoxPack.GetUnit()) { + xul->mBoxPack = xulData.mBoxPack.GetIntValue(); + } + else if (eCSSUnit_Inherit == xulData.mBoxPack.GetUnit()) { + inherited = PR_TRUE; + xul->mBoxPack = parentXUL->mBoxPack; + } + if (inherited) // We inherited, and therefore can't be cached in the rule node. We have to be put right on the // style context. @@ -4431,16 +4467,40 @@ nsRuleNode::CheckUIResetProperties(const nsCSSUserInterface& aData) inline nsRuleNode::RuleDetail nsRuleNode::CheckXULProperties(const nsCSSXUL& aXULData) { - const PRUint32 numXULProps = 1; + const PRUint32 numXULProps = 5; PRUint32 totalCount=0; PRUint32 inheritCount=0; + if (eCSSUnit_Null != aXULData.mBoxAlign.GetUnit()) { + totalCount++; + if (eCSSUnit_Inherit == aXULData.mBoxAlign.GetUnit()) + inheritCount++; + } + + if (eCSSUnit_Null != aXULData.mBoxDirection.GetUnit()) { + totalCount++; + if (eCSSUnit_Inherit == aXULData.mBoxDirection.GetUnit()) + inheritCount++; + } + + if (eCSSUnit_Null != aXULData.mBoxFlex.GetUnit()) { + totalCount++; + if (eCSSUnit_Inherit == aXULData.mBoxFlex.GetUnit()) + inheritCount++; + } + if (eCSSUnit_Null != aXULData.mBoxOrient.GetUnit()) { totalCount++; if (eCSSUnit_Inherit == aXULData.mBoxOrient.GetUnit()) inheritCount++; } + if (eCSSUnit_Null != aXULData.mBoxPack.GetUnit()) { + totalCount++; + if (eCSSUnit_Inherit == aXULData.mBoxPack.GetUnit()) + inheritCount++; + } + if (inheritCount == numXULProps) return eRuleFullInherited; else if (totalCount == numXULProps) diff --git a/mozilla/content/shared/public/nsCSSKeywordList.h b/mozilla/content/shared/public/nsCSSKeywordList.h index 912819a8614..b8e866892b6 100644 --- a/mozilla/content/shared/public/nsCSSKeywordList.h +++ b/mozilla/content/shared/public/nsCSSKeywordList.h @@ -74,18 +74,18 @@ CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none) CSS_KEY(-moz-scrollbars-horizontal, _moz_scrollbars_horizontal) CSS_KEY(-moz-scrollbars-vertical, _moz_scrollbars_vertical) CSS_KEY(-moz-use-text-color, _moz_use_text_color) -CSS_KEY(-moz-xul-box, _moz_xul_box) -CSS_KEY(-moz-xul-inline-box, _moz_xul_inline_box) -CSS_KEY(-moz-xul-bulletinboard, _moz_xul_bulletinboard) -CSS_KEY(-moz-xul-deck, _moz_xul_deck) -CSS_KEY(-moz-xul-grid, _moz_xul_grid) -CSS_KEY(-moz-xul-inline-grid, _moz_xul_inline_grid) -CSS_KEY(-moz-xul-grid-group, _moz_xul_grid_group) -CSS_KEY(-moz-xul-grid-line, _moz_xul_grid_line) -CSS_KEY(-moz-xul-groupbox, _moz_xul_groupbox) -CSS_KEY(-moz-xul-popup, _moz_xul_popup) -CSS_KEY(-moz-xul-stack, _moz_xul_stack) -CSS_KEY(-moz-xul-inline-stack, _moz_xul_inline_stack) +CSS_KEY(-moz-box, _moz_box) +CSS_KEY(-moz-inline-box, _moz_inline_box) +CSS_KEY(-moz-bulletinboard, _moz_bulletinboard) +CSS_KEY(-moz-deck, _moz_deck) +CSS_KEY(-moz-grid, _moz_grid) +CSS_KEY(-moz-inline-grid, _moz_inline_grid) +CSS_KEY(-moz-grid-group, _moz_grid_group) +CSS_KEY(-moz-grid-line, _moz_grid_line) +CSS_KEY(-moz-groupbox, _moz_groupbox) +CSS_KEY(-moz-popup, _moz_popup) +CSS_KEY(-moz-stack, _moz_stack) +CSS_KEY(-moz-inline-stack, _moz_inline_stack) CSS_KEY(above, above) CSS_KEY(absolute, absolute) CSS_KEY(activeborder, activeborder) diff --git a/mozilla/content/shared/public/nsCSSPropList.h b/mozilla/content/shared/public/nsCSSPropList.h index 379785fe418..8fb828d1752 100644 --- a/mozilla/content/shared/public/nsCSSPropList.h +++ b/mozilla/content/shared/public/nsCSSPropList.h @@ -105,12 +105,12 @@ CSS_PROP(border-width, border_width, REFLOW) CSS_PROP(-x-border-x-spacing, border_x_spacing, REFLOW) // XXX bug 3935 CSS_PROP(-x-border-y-spacing, border_y_spacing, REFLOW) // XXX bug 3935 CSS_PROP(bottom, bottom, REFLOW) -CSS_PROP(-moz-xul-box-align, box_align, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-xul-box-direction, box_direction, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-xul-box-flex, box_flex, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-xul-box-flex-group, box_flex_group, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-xul-box-orient, box_orient, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-xul-box-pack, box_pack, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-align, box_align, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-direction, box_direction, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-flex, box_flex, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-flex-group, box_flex_group, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-orient, box_orient, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-pack, box_pack, REFLOW) // XXX bug 3935 CSS_PROP(-moz-box-sizing, box_sizing, REFLOW) // XXX bug 3935 CSS_PROP(caption-side, caption_side, REFLOW) CSS_PROP(clear, clear, REFLOW) diff --git a/mozilla/content/shared/public/nsCSSProps.h b/mozilla/content/shared/public/nsCSSProps.h index 8f525b6cb2f..69d6c934374 100644 --- a/mozilla/content/shared/public/nsCSSProps.h +++ b/mozilla/content/shared/public/nsCSSProps.h @@ -77,7 +77,10 @@ public: static const PRInt32 kBorderStyleKTable[]; static const PRInt32 kBorderWidthKTable[]; #ifdef INCLUDE_XUL + static const PRInt32 kBoxAlignKTable[]; + static const PRInt32 kBoxDirectionKTable[]; static const PRInt32 kBoxOrientKTable[]; + static const PRInt32 kBoxPackKTable[]; #endif static const PRInt32 kBoxSizingKTable[]; static const PRInt32 kCaptionSideKTable[]; diff --git a/mozilla/content/shared/public/nsStyleStruct.h b/mozilla/content/shared/public/nsStyleStruct.h index c61fa5fdcf2..9de50c40e6a 100644 --- a/mozilla/content/shared/public/nsStyleStruct.h +++ b/mozilla/content/shared/public/nsStyleStruct.h @@ -967,11 +967,11 @@ struct nsStyleXUL : public nsStyleStruct { PRInt32 CalcDifference(const nsStyleXUL& aOther) const; - // There will be seven more properties coming, - // which is why we warrant our own struct. - // box-align, box-direction, box-flex, box-flex-group, box-pack, - // stack-stretch, stack-policy + PRUint8 mBoxAlign; // [reset] see nsStyleConsts.h + PRUint8 mBoxDirection; // [reset] see nsStyleConsts.h + float mBoxFlex; // [reset] see nsStyleConsts.h PRUint8 mBoxOrient; // [reset] see nsStyleConsts.h + PRUint8 mBoxPack; // [reset] see nsStyleConsts.h }; #endif diff --git a/mozilla/content/shared/public/nsXULAtomList.h b/mozilla/content/shared/public/nsXULAtomList.h index 2c44e57c23d..35139950c72 100644 --- a/mozilla/content/shared/public/nsXULAtomList.h +++ b/mozilla/content/shared/public/nsXULAtomList.h @@ -129,6 +129,7 @@ XUL_ATOM(crop, "crop") XUL_ATOM(mode, "mode") XUL_ATOM(equalsize, "equalsize") +XUL_ATOM(pack, "pack") XUL_ATOM(box, "box") XUL_ATOM(hbox, "hbox") XUL_ATOM(vbox, "vbox") diff --git a/mozilla/content/shared/src/nsCSSProps.cpp b/mozilla/content/shared/src/nsCSSProps.cpp index 32dbe6d9550..c6a3cfeeb26 100644 --- a/mozilla/content/shared/src/nsCSSProps.cpp +++ b/mozilla/content/shared/src/nsCSSProps.cpp @@ -308,18 +308,18 @@ const PRInt32 nsCSSProps::kDisplayKTable[] = { eCSSKeyword_table_cell, NS_STYLE_DISPLAY_TABLE_CELL, eCSSKeyword_table_caption, NS_STYLE_DISPLAY_TABLE_CAPTION, eCSSKeyword_menu, NS_STYLE_DISPLAY_MENU, - eCSSKeyword__moz_xul_box, NS_STYLE_DISPLAY_BOX, - eCSSKeyword__moz_xul_inline_box, NS_STYLE_DISPLAY_INLINE_BOX, - eCSSKeyword__moz_xul_grid, NS_STYLE_DISPLAY_GRID, - eCSSKeyword__moz_xul_inline_grid, NS_STYLE_DISPLAY_INLINE_GRID, - eCSSKeyword__moz_xul_grid_group, NS_STYLE_DISPLAY_GRID_GROUP, - eCSSKeyword__moz_xul_grid_line, NS_STYLE_DISPLAY_GRID_LINE, - eCSSKeyword__moz_xul_stack, NS_STYLE_DISPLAY_STACK, - eCSSKeyword__moz_xul_inline_stack, NS_STYLE_DISPLAY_INLINE_STACK, - eCSSKeyword__moz_xul_deck, NS_STYLE_DISPLAY_DECK, - eCSSKeyword__moz_xul_bulletinboard, NS_STYLE_DISPLAY_BULLETINBOARD, - eCSSKeyword__moz_xul_popup, NS_STYLE_DISPLAY_POPUP, - eCSSKeyword__moz_xul_groupbox, NS_STYLE_DISPLAY_GROUPBOX, + eCSSKeyword__moz_box, NS_STYLE_DISPLAY_BOX, + eCSSKeyword__moz_inline_box, NS_STYLE_DISPLAY_INLINE_BOX, + eCSSKeyword__moz_grid, NS_STYLE_DISPLAY_GRID, + eCSSKeyword__moz_inline_grid, NS_STYLE_DISPLAY_INLINE_GRID, + eCSSKeyword__moz_grid_group, NS_STYLE_DISPLAY_GRID_GROUP, + eCSSKeyword__moz_grid_line, NS_STYLE_DISPLAY_GRID_LINE, + eCSSKeyword__moz_stack, NS_STYLE_DISPLAY_STACK, + eCSSKeyword__moz_inline_stack, NS_STYLE_DISPLAY_INLINE_STACK, + eCSSKeyword__moz_deck, NS_STYLE_DISPLAY_DECK, + eCSSKeyword__moz_bulletinboard, NS_STYLE_DISPLAY_BULLETINBOARD, + eCSSKeyword__moz_popup, NS_STYLE_DISPLAY_POPUP, + eCSSKeyword__moz_groupbox, NS_STYLE_DISPLAY_GROUPBOX, -1,-1 }; @@ -689,6 +689,21 @@ const PRInt32 nsCSSProps::kWhitespaceKTable[] = { #ifdef INCLUDE_XUL // Specific keyword tables for XUL.properties +const PRInt32 nsCSSProps::kBoxAlignKTable[] = { + eCSSKeyword_stretch, NS_STYLE_BOX_ALIGN_STRETCH, + eCSSKeyword_start, NS_STYLE_BOX_ALIGN_START, + eCSSKeyword_center, NS_STYLE_BOX_ALIGN_CENTER, + eCSSKeyword_baseline, NS_STYLE_BOX_ALIGN_BASELINE, + eCSSKeyword_end, NS_STYLE_BOX_ALIGN_END, + -1,-1 +}; + +const PRInt32 nsCSSProps::kBoxDirectionKTable[] = { + eCSSKeyword_normal, NS_STYLE_BOX_DIRECTION_NORMAL, + eCSSKeyword_reverse, NS_STYLE_BOX_DIRECTION_REVERSE, + -1,-1 +}; + const PRInt32 nsCSSProps::kBoxOrientKTable[] = { eCSSKeyword_horizontal, NS_STYLE_BOX_ORIENT_HORIZONTAL, eCSSKeyword_vertical, NS_STYLE_BOX_ORIENT_VERTICAL, @@ -696,6 +711,14 @@ const PRInt32 nsCSSProps::kBoxOrientKTable[] = { eCSSKeyword_block_axis, NS_STYLE_BOX_ORIENT_VERTICAL, -1,-1 }; + +const PRInt32 nsCSSProps::kBoxPackKTable[] = { + eCSSKeyword_start, NS_STYLE_BOX_PACK_START, + eCSSKeyword_center, NS_STYLE_BOX_PACK_CENTER, + eCSSKeyword_end, NS_STYLE_BOX_PACK_END, + eCSSKeyword_justify, NS_STYLE_BOX_PACK_JUSTIFY, + -1,-1 +}; #endif PRInt32 @@ -785,8 +808,14 @@ static const PRInt32 kBackgroundYPositionKTable[] = { return SearchKeywordTable(aValue, kBorderCollapseKTable); #ifdef INCLUDE_XUL + case eCSSProperty_box_align: + return SearchKeywordTable(aValue, kBoxAlignKTable); + case eCSSProperty_box_direction: + return SearchKeywordTable(aValue, kBoxDirectionKTable); case eCSSProperty_box_orient: return SearchKeywordTable(aValue, kBoxOrientKTable); + case eCSSProperty_box_pack: + return SearchKeywordTable(aValue, kBoxPackKTable); #endif case eCSSProperty_box_sizing: diff --git a/mozilla/content/shared/src/nsStyleStruct.cpp b/mozilla/content/shared/src/nsStyleStruct.cpp index 96457dd3134..86ee40b2de6 100644 --- a/mozilla/content/shared/src/nsStyleStruct.cpp +++ b/mozilla/content/shared/src/nsStyleStruct.cpp @@ -625,7 +625,11 @@ PRInt32 nsStyleList::CalcDifference(const nsStyleList& aOther) const // nsStyleXUL::nsStyleXUL() { + mBoxAlign = NS_STYLE_BOX_ALIGN_STRETCH; + mBoxDirection = NS_STYLE_BOX_DIRECTION_NORMAL; + mBoxFlex = 0.0f; mBoxOrient = NS_STYLE_BOX_ORIENT_HORIZONTAL; + mBoxPack = NS_STYLE_BOX_PACK_START; } nsStyleXUL::~nsStyleXUL() @@ -640,7 +644,11 @@ nsStyleXUL::nsStyleXUL(const nsStyleXUL& aSource) PRInt32 nsStyleXUL::CalcDifference(const nsStyleXUL& aOther) const { - if (mBoxOrient == aOther.mBoxOrient) + if (mBoxAlign == aOther.mBoxAlign && + mBoxDirection == aOther.mBoxDirection && + mBoxFlex == aOther.mBoxFlex && + mBoxOrient == aOther.mBoxOrient && + mBoxPack == aOther.mBoxPack) return NS_STYLE_HINT_NONE; return NS_STYLE_HINT_REFLOW; } diff --git a/mozilla/extensions/inspector/resources/content/extensions/multipanel.css b/mozilla/extensions/inspector/resources/content/extensions/multipanel.css index d41995f7c53..72b49e7f281 100644 --- a/mozilla/extensions/inspector/resources/content/extensions/multipanel.css +++ b/mozilla/extensions/inspector/resources/content/extensions/multipanel.css @@ -24,12 +24,12 @@ multipanelset { -moz-binding: url("chrome://inspector/content/extensions/multipanel.xml#multipanelset"); - display: -moz-xul-box; - -moz-xul-box-orient: vertical; + display: -moz-box; + -moz-box-orient: vertical; } multipanel { -moz-binding: url("chrome://inspector/content/extensions/multipanel.xml#multipanel"); - display: -moz-xul-box; - -moz-xul-box-orient: vertical; + display: -moz-box; + -moz-box-orient: vertical; } diff --git a/mozilla/extensions/inspector/resources/content/inspector.css b/mozilla/extensions/inspector/resources/content/inspector.css index c6465cd1612..50cf1b0b0e8 100644 --- a/mozilla/extensions/inspector/resources/content/inspector.css +++ b/mozilla/extensions/inspector/resources/content/inspector.css @@ -32,12 +32,12 @@ domi|panelset { -moz-binding: url("chrome://inspector/content/inspector.xml#panelset"); - display: -moz-xul-box; + display: -moz-box; } domi|panel { -moz-binding: url("chrome://inspector/content/inspector.xml#panel"); - display: -moz-xul-box; + display: -moz-box; } #ppsViewerPopupset { diff --git a/mozilla/layout/base/nsStyleConsts.h b/mozilla/layout/base/nsStyleConsts.h index 02e40c215fd..49784a31d34 100644 --- a/mozilla/layout/base/nsStyleConsts.h +++ b/mozilla/layout/base/nsStyleConsts.h @@ -100,6 +100,23 @@ #define NS_STYLE_USER_MODIFY_READ_WRITE 1 #define NS_STYLE_USER_MODIFY_WRITE_ONLY 2 +// box-align +#define NS_STYLE_BOX_ALIGN_STRETCH 0 +#define NS_STYLE_BOX_ALIGN_START 1 +#define NS_STYLE_BOX_ALIGN_CENTER 2 +#define NS_STYLE_BOX_ALIGN_BASELINE 3 +#define NS_STYLE_BOX_ALIGN_END 4 + +// box-pack +#define NS_STYLE_BOX_PACK_START 0 +#define NS_STYLE_BOX_PACK_CENTER 1 +#define NS_STYLE_BOX_PACK_END 2 +#define NS_STYLE_BOX_PACK_JUSTIFY 3 + +// box-direction +#define NS_STYLE_BOX_DIRECTION_NORMAL 0 +#define NS_STYLE_BOX_DIRECTION_REVERSE 1 + // box-orient #define NS_STYLE_BOX_ORIENT_HORIZONTAL 0 #define NS_STYLE_BOX_ORIENT_VERTICAL 1 diff --git a/mozilla/layout/base/public/nsStyleConsts.h b/mozilla/layout/base/public/nsStyleConsts.h index 02e40c215fd..49784a31d34 100644 --- a/mozilla/layout/base/public/nsStyleConsts.h +++ b/mozilla/layout/base/public/nsStyleConsts.h @@ -100,6 +100,23 @@ #define NS_STYLE_USER_MODIFY_READ_WRITE 1 #define NS_STYLE_USER_MODIFY_WRITE_ONLY 2 +// box-align +#define NS_STYLE_BOX_ALIGN_STRETCH 0 +#define NS_STYLE_BOX_ALIGN_START 1 +#define NS_STYLE_BOX_ALIGN_CENTER 2 +#define NS_STYLE_BOX_ALIGN_BASELINE 3 +#define NS_STYLE_BOX_ALIGN_END 4 + +// box-pack +#define NS_STYLE_BOX_PACK_START 0 +#define NS_STYLE_BOX_PACK_CENTER 1 +#define NS_STYLE_BOX_PACK_END 2 +#define NS_STYLE_BOX_PACK_JUSTIFY 3 + +// box-direction +#define NS_STYLE_BOX_DIRECTION_NORMAL 0 +#define NS_STYLE_BOX_DIRECTION_REVERSE 1 + // box-orient #define NS_STYLE_BOX_ORIENT_HORIZONTAL 0 #define NS_STYLE_BOX_ORIENT_VERTICAL 1 diff --git a/mozilla/layout/html/document/src/html.css b/mozilla/layout/html/document/src/html.css index bb42d9a93d6..3a7b8da54e8 100644 --- a/mozilla/layout/html/document/src/html.css +++ b/mozilla/layout/html/document/src/html.css @@ -433,7 +433,7 @@ noembed, noscript, param, *|*:-moz-comment, *|*:-moz-pi { background: inherit; padding: inherit; display: inherit; - -moz-xul-box-orient: inherit; + -moz-box-orient: inherit; } *|*:wrapped-frame { diff --git a/mozilla/layout/style/html.css b/mozilla/layout/style/html.css index bb42d9a93d6..3a7b8da54e8 100644 --- a/mozilla/layout/style/html.css +++ b/mozilla/layout/style/html.css @@ -433,7 +433,7 @@ noembed, noscript, param, *|*:-moz-comment, *|*:-moz-pi { background: inherit; padding: inherit; display: inherit; - -moz-xul-box-orient: inherit; + -moz-box-orient: inherit; } *|*:wrapped-frame { diff --git a/mozilla/layout/style/nsCSSDeclaration.cpp b/mozilla/layout/style/nsCSSDeclaration.cpp index 6abd0b36d41..0a8079fbc0a 100644 --- a/mozilla/layout/style/nsCSSDeclaration.cpp +++ b/mozilla/layout/style/nsCSSDeclaration.cpp @@ -985,7 +985,9 @@ nsCSSXUL::nsCSSXUL(void) } nsCSSXUL::nsCSSXUL(const nsCSSXUL& aCopy) - : mBoxOrient(aCopy.mBoxOrient) + : mBoxAlign(aCopy.mBoxAlign), mBoxDirection(aCopy.mBoxDirection), + mBoxFlex(aCopy.mBoxFlex), mBoxOrient(aCopy.mBoxOrient), + mBoxPack(aCopy.mBoxPack) { MOZ_COUNT_CTOR(nsCSSXUL); } @@ -1006,7 +1008,11 @@ void nsCSSXUL::List(FILE* out, PRInt32 aIndent) const nsAutoString buffer; + mBoxAlign.AppendToString(buffer, eCSSProperty_box_align); + mBoxDirection.AppendToString(buffer, eCSSProperty_box_direction); + mBoxFlex.AppendToString(buffer, eCSSProperty_box_flex); mBoxOrient.AppendToString(buffer, eCSSProperty_box_orient); + mBoxPack.AppendToString(buffer, eCSSProperty_box_pack); fputs(buffer, out); } @@ -1746,10 +1752,18 @@ CSSDeclarationImpl::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValu #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: CSS_ENSURE(XUL) { switch (aProperty) { - case eCSSProperty_box_orient: mXUL->mBoxOrient = aValue; break; + case eCSSProperty_box_align: mXUL->mBoxAlign = aValue; break; + case eCSSProperty_box_direction: mXUL->mBoxDirection = aValue; break; + case eCSSProperty_box_flex: mXUL->mBoxFlex = aValue; break; + case eCSSProperty_box_orient: mXUL->mBoxOrient = aValue; break; + case eCSSProperty_box_pack: mXUL->mBoxPack = aValue; break; CSS_BOGUS_DEFAULT; // make compiler happy } } @@ -2493,11 +2507,19 @@ CSSDeclarationImpl::SetValueImportant(nsCSSProperty aProperty) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: if (nsnull != mXUL) { CSS_ENSURE_IMPORTANT(XUL) { switch (aProperty) { - CSS_CASE_IMPORTANT(eCSSProperty_box_orient, mXUL->mBoxOrient); + CSS_CASE_IMPORTANT(eCSSProperty_box_align, mXUL->mBoxAlign); + CSS_CASE_IMPORTANT(eCSSProperty_box_direction, mXUL->mBoxDirection); + CSS_CASE_IMPORTANT(eCSSProperty_box_flex, mXUL->mBoxFlex); + CSS_CASE_IMPORTANT(eCSSProperty_box_orient, mXUL->mBoxOrient); + CSS_CASE_IMPORTANT(eCSSProperty_box_pack, mXUL->mBoxPack); CSS_BOGUS_DEFAULT; // make compiler happy } } @@ -3181,10 +3203,18 @@ CSSDeclarationImpl::RemoveProperty(nsCSSProperty aProperty) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: CSS_CHECK(XUL) { switch(aProperty) { - case eCSSProperty_box_orient: mXUL->mBoxOrient.Reset(); break; + case eCSSProperty_box_align: mXUL->mBoxAlign.Reset(); break; + case eCSSProperty_box_direction: mXUL->mBoxDirection.Reset(); break; + case eCSSProperty_box_flex: mXUL->mBoxFlex.Reset(); break; + case eCSSProperty_box_orient: mXUL->mBoxOrient.Reset(); break; + case eCSSProperty_box_pack: mXUL->mBoxPack.Reset(); break; CSS_BOGUS_DEFAULT; // Make compiler happy } } @@ -3920,10 +3950,18 @@ CSSDeclarationImpl::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: if (nsnull != mXUL) { switch (aProperty) { - case eCSSProperty_box_orient: aValue = mXUL->mBoxOrient; break; + case eCSSProperty_box_align: aValue = mXUL->mBoxAlign; break; + case eCSSProperty_box_direction: aValue = mXUL->mBoxDirection; break; + case eCSSProperty_box_flex: aValue = mXUL->mBoxFlex; break; + case eCSSProperty_box_orient: aValue = mXUL->mBoxOrient; break; + case eCSSProperty_box_pack: aValue = mXUL->mBoxPack; break; CSS_BOGUS_DEFAULT; // make compiler happy } } diff --git a/mozilla/layout/style/nsCSSKeywordList.h b/mozilla/layout/style/nsCSSKeywordList.h index 912819a8614..b8e866892b6 100644 --- a/mozilla/layout/style/nsCSSKeywordList.h +++ b/mozilla/layout/style/nsCSSKeywordList.h @@ -74,18 +74,18 @@ CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none) CSS_KEY(-moz-scrollbars-horizontal, _moz_scrollbars_horizontal) CSS_KEY(-moz-scrollbars-vertical, _moz_scrollbars_vertical) CSS_KEY(-moz-use-text-color, _moz_use_text_color) -CSS_KEY(-moz-xul-box, _moz_xul_box) -CSS_KEY(-moz-xul-inline-box, _moz_xul_inline_box) -CSS_KEY(-moz-xul-bulletinboard, _moz_xul_bulletinboard) -CSS_KEY(-moz-xul-deck, _moz_xul_deck) -CSS_KEY(-moz-xul-grid, _moz_xul_grid) -CSS_KEY(-moz-xul-inline-grid, _moz_xul_inline_grid) -CSS_KEY(-moz-xul-grid-group, _moz_xul_grid_group) -CSS_KEY(-moz-xul-grid-line, _moz_xul_grid_line) -CSS_KEY(-moz-xul-groupbox, _moz_xul_groupbox) -CSS_KEY(-moz-xul-popup, _moz_xul_popup) -CSS_KEY(-moz-xul-stack, _moz_xul_stack) -CSS_KEY(-moz-xul-inline-stack, _moz_xul_inline_stack) +CSS_KEY(-moz-box, _moz_box) +CSS_KEY(-moz-inline-box, _moz_inline_box) +CSS_KEY(-moz-bulletinboard, _moz_bulletinboard) +CSS_KEY(-moz-deck, _moz_deck) +CSS_KEY(-moz-grid, _moz_grid) +CSS_KEY(-moz-inline-grid, _moz_inline_grid) +CSS_KEY(-moz-grid-group, _moz_grid_group) +CSS_KEY(-moz-grid-line, _moz_grid_line) +CSS_KEY(-moz-groupbox, _moz_groupbox) +CSS_KEY(-moz-popup, _moz_popup) +CSS_KEY(-moz-stack, _moz_stack) +CSS_KEY(-moz-inline-stack, _moz_inline_stack) CSS_KEY(above, above) CSS_KEY(absolute, absolute) CSS_KEY(activeborder, activeborder) diff --git a/mozilla/layout/style/nsCSSParser.cpp b/mozilla/layout/style/nsCSSParser.cpp index 2a2a61fc345..08cda008d11 100644 --- a/mozilla/layout/style/nsCSSParser.cpp +++ b/mozilla/layout/style/nsCSSParser.cpp @@ -3458,9 +3458,20 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, case eCSSProperty_right: return ParseVariant(aErrorCode, aValue, VARIANT_AHLP, nsnull); #ifdef INCLUDE_XUL + case eCSSProperty_box_align: + return ParseVariant(aErrorCode, aValue, VARIANT_HK, + nsCSSProps::kBoxAlignKTable); + case eCSSProperty_box_direction: + return ParseVariant(aErrorCode, aValue, VARIANT_HK, + nsCSSProps::kBoxDirectionKTable); + case eCSSProperty_box_flex: + return ParseVariant(aErrorCode, aValue, VARIANT_HN, nsnull); case eCSSProperty_box_orient: return ParseVariant(aErrorCode, aValue, VARIANT_HK, nsCSSProps::kBoxOrientKTable); + case eCSSProperty_box_pack: + return ParseVariant(aErrorCode, aValue, VARIANT_HK, + nsCSSProps::kBoxPackKTable); #endif case eCSSProperty_box_sizing: return ParseVariant(aErrorCode, aValue, VARIANT_HK, diff --git a/mozilla/layout/style/nsCSSPropList.h b/mozilla/layout/style/nsCSSPropList.h index 379785fe418..8fb828d1752 100644 --- a/mozilla/layout/style/nsCSSPropList.h +++ b/mozilla/layout/style/nsCSSPropList.h @@ -105,12 +105,12 @@ CSS_PROP(border-width, border_width, REFLOW) CSS_PROP(-x-border-x-spacing, border_x_spacing, REFLOW) // XXX bug 3935 CSS_PROP(-x-border-y-spacing, border_y_spacing, REFLOW) // XXX bug 3935 CSS_PROP(bottom, bottom, REFLOW) -CSS_PROP(-moz-xul-box-align, box_align, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-xul-box-direction, box_direction, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-xul-box-flex, box_flex, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-xul-box-flex-group, box_flex_group, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-xul-box-orient, box_orient, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-xul-box-pack, box_pack, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-align, box_align, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-direction, box_direction, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-flex, box_flex, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-flex-group, box_flex_group, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-orient, box_orient, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-pack, box_pack, REFLOW) // XXX bug 3935 CSS_PROP(-moz-box-sizing, box_sizing, REFLOW) // XXX bug 3935 CSS_PROP(caption-side, caption_side, REFLOW) CSS_PROP(clear, clear, REFLOW) diff --git a/mozilla/layout/style/nsCSSProps.cpp b/mozilla/layout/style/nsCSSProps.cpp index 32dbe6d9550..c6a3cfeeb26 100644 --- a/mozilla/layout/style/nsCSSProps.cpp +++ b/mozilla/layout/style/nsCSSProps.cpp @@ -308,18 +308,18 @@ const PRInt32 nsCSSProps::kDisplayKTable[] = { eCSSKeyword_table_cell, NS_STYLE_DISPLAY_TABLE_CELL, eCSSKeyword_table_caption, NS_STYLE_DISPLAY_TABLE_CAPTION, eCSSKeyword_menu, NS_STYLE_DISPLAY_MENU, - eCSSKeyword__moz_xul_box, NS_STYLE_DISPLAY_BOX, - eCSSKeyword__moz_xul_inline_box, NS_STYLE_DISPLAY_INLINE_BOX, - eCSSKeyword__moz_xul_grid, NS_STYLE_DISPLAY_GRID, - eCSSKeyword__moz_xul_inline_grid, NS_STYLE_DISPLAY_INLINE_GRID, - eCSSKeyword__moz_xul_grid_group, NS_STYLE_DISPLAY_GRID_GROUP, - eCSSKeyword__moz_xul_grid_line, NS_STYLE_DISPLAY_GRID_LINE, - eCSSKeyword__moz_xul_stack, NS_STYLE_DISPLAY_STACK, - eCSSKeyword__moz_xul_inline_stack, NS_STYLE_DISPLAY_INLINE_STACK, - eCSSKeyword__moz_xul_deck, NS_STYLE_DISPLAY_DECK, - eCSSKeyword__moz_xul_bulletinboard, NS_STYLE_DISPLAY_BULLETINBOARD, - eCSSKeyword__moz_xul_popup, NS_STYLE_DISPLAY_POPUP, - eCSSKeyword__moz_xul_groupbox, NS_STYLE_DISPLAY_GROUPBOX, + eCSSKeyword__moz_box, NS_STYLE_DISPLAY_BOX, + eCSSKeyword__moz_inline_box, NS_STYLE_DISPLAY_INLINE_BOX, + eCSSKeyword__moz_grid, NS_STYLE_DISPLAY_GRID, + eCSSKeyword__moz_inline_grid, NS_STYLE_DISPLAY_INLINE_GRID, + eCSSKeyword__moz_grid_group, NS_STYLE_DISPLAY_GRID_GROUP, + eCSSKeyword__moz_grid_line, NS_STYLE_DISPLAY_GRID_LINE, + eCSSKeyword__moz_stack, NS_STYLE_DISPLAY_STACK, + eCSSKeyword__moz_inline_stack, NS_STYLE_DISPLAY_INLINE_STACK, + eCSSKeyword__moz_deck, NS_STYLE_DISPLAY_DECK, + eCSSKeyword__moz_bulletinboard, NS_STYLE_DISPLAY_BULLETINBOARD, + eCSSKeyword__moz_popup, NS_STYLE_DISPLAY_POPUP, + eCSSKeyword__moz_groupbox, NS_STYLE_DISPLAY_GROUPBOX, -1,-1 }; @@ -689,6 +689,21 @@ const PRInt32 nsCSSProps::kWhitespaceKTable[] = { #ifdef INCLUDE_XUL // Specific keyword tables for XUL.properties +const PRInt32 nsCSSProps::kBoxAlignKTable[] = { + eCSSKeyword_stretch, NS_STYLE_BOX_ALIGN_STRETCH, + eCSSKeyword_start, NS_STYLE_BOX_ALIGN_START, + eCSSKeyword_center, NS_STYLE_BOX_ALIGN_CENTER, + eCSSKeyword_baseline, NS_STYLE_BOX_ALIGN_BASELINE, + eCSSKeyword_end, NS_STYLE_BOX_ALIGN_END, + -1,-1 +}; + +const PRInt32 nsCSSProps::kBoxDirectionKTable[] = { + eCSSKeyword_normal, NS_STYLE_BOX_DIRECTION_NORMAL, + eCSSKeyword_reverse, NS_STYLE_BOX_DIRECTION_REVERSE, + -1,-1 +}; + const PRInt32 nsCSSProps::kBoxOrientKTable[] = { eCSSKeyword_horizontal, NS_STYLE_BOX_ORIENT_HORIZONTAL, eCSSKeyword_vertical, NS_STYLE_BOX_ORIENT_VERTICAL, @@ -696,6 +711,14 @@ const PRInt32 nsCSSProps::kBoxOrientKTable[] = { eCSSKeyword_block_axis, NS_STYLE_BOX_ORIENT_VERTICAL, -1,-1 }; + +const PRInt32 nsCSSProps::kBoxPackKTable[] = { + eCSSKeyword_start, NS_STYLE_BOX_PACK_START, + eCSSKeyword_center, NS_STYLE_BOX_PACK_CENTER, + eCSSKeyword_end, NS_STYLE_BOX_PACK_END, + eCSSKeyword_justify, NS_STYLE_BOX_PACK_JUSTIFY, + -1,-1 +}; #endif PRInt32 @@ -785,8 +808,14 @@ static const PRInt32 kBackgroundYPositionKTable[] = { return SearchKeywordTable(aValue, kBorderCollapseKTable); #ifdef INCLUDE_XUL + case eCSSProperty_box_align: + return SearchKeywordTable(aValue, kBoxAlignKTable); + case eCSSProperty_box_direction: + return SearchKeywordTable(aValue, kBoxDirectionKTable); case eCSSProperty_box_orient: return SearchKeywordTable(aValue, kBoxOrientKTable); + case eCSSProperty_box_pack: + return SearchKeywordTable(aValue, kBoxPackKTable); #endif case eCSSProperty_box_sizing: diff --git a/mozilla/layout/style/nsCSSProps.h b/mozilla/layout/style/nsCSSProps.h index 8f525b6cb2f..69d6c934374 100644 --- a/mozilla/layout/style/nsCSSProps.h +++ b/mozilla/layout/style/nsCSSProps.h @@ -77,7 +77,10 @@ public: static const PRInt32 kBorderStyleKTable[]; static const PRInt32 kBorderWidthKTable[]; #ifdef INCLUDE_XUL + static const PRInt32 kBoxAlignKTable[]; + static const PRInt32 kBoxDirectionKTable[]; static const PRInt32 kBoxOrientKTable[]; + static const PRInt32 kBoxPackKTable[]; #endif static const PRInt32 kBoxSizingKTable[]; static const PRInt32 kCaptionSideKTable[]; diff --git a/mozilla/layout/style/nsCSSStruct.cpp b/mozilla/layout/style/nsCSSStruct.cpp index 6abd0b36d41..0a8079fbc0a 100644 --- a/mozilla/layout/style/nsCSSStruct.cpp +++ b/mozilla/layout/style/nsCSSStruct.cpp @@ -985,7 +985,9 @@ nsCSSXUL::nsCSSXUL(void) } nsCSSXUL::nsCSSXUL(const nsCSSXUL& aCopy) - : mBoxOrient(aCopy.mBoxOrient) + : mBoxAlign(aCopy.mBoxAlign), mBoxDirection(aCopy.mBoxDirection), + mBoxFlex(aCopy.mBoxFlex), mBoxOrient(aCopy.mBoxOrient), + mBoxPack(aCopy.mBoxPack) { MOZ_COUNT_CTOR(nsCSSXUL); } @@ -1006,7 +1008,11 @@ void nsCSSXUL::List(FILE* out, PRInt32 aIndent) const nsAutoString buffer; + mBoxAlign.AppendToString(buffer, eCSSProperty_box_align); + mBoxDirection.AppendToString(buffer, eCSSProperty_box_direction); + mBoxFlex.AppendToString(buffer, eCSSProperty_box_flex); mBoxOrient.AppendToString(buffer, eCSSProperty_box_orient); + mBoxPack.AppendToString(buffer, eCSSProperty_box_pack); fputs(buffer, out); } @@ -1746,10 +1752,18 @@ CSSDeclarationImpl::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValu #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: CSS_ENSURE(XUL) { switch (aProperty) { - case eCSSProperty_box_orient: mXUL->mBoxOrient = aValue; break; + case eCSSProperty_box_align: mXUL->mBoxAlign = aValue; break; + case eCSSProperty_box_direction: mXUL->mBoxDirection = aValue; break; + case eCSSProperty_box_flex: mXUL->mBoxFlex = aValue; break; + case eCSSProperty_box_orient: mXUL->mBoxOrient = aValue; break; + case eCSSProperty_box_pack: mXUL->mBoxPack = aValue; break; CSS_BOGUS_DEFAULT; // make compiler happy } } @@ -2493,11 +2507,19 @@ CSSDeclarationImpl::SetValueImportant(nsCSSProperty aProperty) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: if (nsnull != mXUL) { CSS_ENSURE_IMPORTANT(XUL) { switch (aProperty) { - CSS_CASE_IMPORTANT(eCSSProperty_box_orient, mXUL->mBoxOrient); + CSS_CASE_IMPORTANT(eCSSProperty_box_align, mXUL->mBoxAlign); + CSS_CASE_IMPORTANT(eCSSProperty_box_direction, mXUL->mBoxDirection); + CSS_CASE_IMPORTANT(eCSSProperty_box_flex, mXUL->mBoxFlex); + CSS_CASE_IMPORTANT(eCSSProperty_box_orient, mXUL->mBoxOrient); + CSS_CASE_IMPORTANT(eCSSProperty_box_pack, mXUL->mBoxPack); CSS_BOGUS_DEFAULT; // make compiler happy } } @@ -3181,10 +3203,18 @@ CSSDeclarationImpl::RemoveProperty(nsCSSProperty aProperty) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: CSS_CHECK(XUL) { switch(aProperty) { - case eCSSProperty_box_orient: mXUL->mBoxOrient.Reset(); break; + case eCSSProperty_box_align: mXUL->mBoxAlign.Reset(); break; + case eCSSProperty_box_direction: mXUL->mBoxDirection.Reset(); break; + case eCSSProperty_box_flex: mXUL->mBoxFlex.Reset(); break; + case eCSSProperty_box_orient: mXUL->mBoxOrient.Reset(); break; + case eCSSProperty_box_pack: mXUL->mBoxPack.Reset(); break; CSS_BOGUS_DEFAULT; // Make compiler happy } } @@ -3920,10 +3950,18 @@ CSSDeclarationImpl::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) #ifdef INCLUDE_XUL // nsCSSXUL + case eCSSProperty_box_align: + case eCSSProperty_box_direction: + case eCSSProperty_box_flex: case eCSSProperty_box_orient: + case eCSSProperty_box_pack: if (nsnull != mXUL) { switch (aProperty) { - case eCSSProperty_box_orient: aValue = mXUL->mBoxOrient; break; + case eCSSProperty_box_align: aValue = mXUL->mBoxAlign; break; + case eCSSProperty_box_direction: aValue = mXUL->mBoxDirection; break; + case eCSSProperty_box_flex: aValue = mXUL->mBoxFlex; break; + case eCSSProperty_box_orient: aValue = mXUL->mBoxOrient; break; + case eCSSProperty_box_pack: aValue = mXUL->mBoxPack; break; CSS_BOGUS_DEFAULT; // make compiler happy } } diff --git a/mozilla/layout/style/nsCSSStyleRule.cpp b/mozilla/layout/style/nsCSSStyleRule.cpp index 75c7225852b..8e3633db0cb 100644 --- a/mozilla/layout/style/nsCSSStyleRule.cpp +++ b/mozilla/layout/style/nsCSSStyleRule.cpp @@ -1673,10 +1673,26 @@ MapXULForDeclaration(nsICSSDeclaration* aDecl, nsCSSXUL& aXUL) if (!ourXUL) return NS_OK; // We don't have any rules for XUL. + // box-align: enum, inherit + if (aXUL.mBoxAlign.GetUnit() == eCSSUnit_Null && ourXUL->mBoxAlign.GetUnit() != eCSSUnit_Null) + aXUL.mBoxAlign = ourXUL->mBoxAlign; + + // box-direction: enum, inherit + if (aXUL.mBoxDirection.GetUnit() == eCSSUnit_Null && ourXUL->mBoxDirection.GetUnit() != eCSSUnit_Null) + aXUL.mBoxDirection = ourXUL->mBoxDirection; + + // box-flex: enum, inherit + if (aXUL.mBoxFlex.GetUnit() == eCSSUnit_Null && ourXUL->mBoxFlex.GetUnit() != eCSSUnit_Null) + aXUL.mBoxFlex = ourXUL->mBoxFlex; + // box-orient: enum, inherit if (aXUL.mBoxOrient.GetUnit() == eCSSUnit_Null && ourXUL->mBoxOrient.GetUnit() != eCSSUnit_Null) aXUL.mBoxOrient = ourXUL->mBoxOrient; + // box-pack: enum, inherit + if (aXUL.mBoxPack.GetUnit() == eCSSUnit_Null && ourXUL->mBoxPack.GetUnit() != eCSSUnit_Null) + aXUL.mBoxPack = ourXUL->mBoxPack; + return NS_OK; } #endif diff --git a/mozilla/layout/style/nsStyleContext.cpp b/mozilla/layout/style/nsStyleContext.cpp index 7e62deb7992..e773bb5aeb9 100644 --- a/mozilla/layout/style/nsStyleContext.cpp +++ b/mozilla/layout/style/nsStyleContext.cpp @@ -1124,8 +1124,12 @@ void nsStyleContext::DumpRegressionData(nsIPresContext* aPresContext, FILE* out, #ifdef INCLUDE_XUL IndentBy(out,aIndent); const nsStyleXUL* xul = (const nsStyleXUL*)GetStyleData(eStyleStruct_XUL); - fprintf(out, "mBoxOrient); + fprintf(out, "mBoxAlign, + (int)xul->mBoxDirection, + (int)xul->mBoxFlex, + (int)xul->mBoxOrient, + (int)xul->mBoxPack); fprintf(out, "\" />\n"); #endif //#insert new style structs here# diff --git a/mozilla/layout/style/nsStyleStruct.cpp b/mozilla/layout/style/nsStyleStruct.cpp index 96457dd3134..86ee40b2de6 100644 --- a/mozilla/layout/style/nsStyleStruct.cpp +++ b/mozilla/layout/style/nsStyleStruct.cpp @@ -625,7 +625,11 @@ PRInt32 nsStyleList::CalcDifference(const nsStyleList& aOther) const // nsStyleXUL::nsStyleXUL() { + mBoxAlign = NS_STYLE_BOX_ALIGN_STRETCH; + mBoxDirection = NS_STYLE_BOX_DIRECTION_NORMAL; + mBoxFlex = 0.0f; mBoxOrient = NS_STYLE_BOX_ORIENT_HORIZONTAL; + mBoxPack = NS_STYLE_BOX_PACK_START; } nsStyleXUL::~nsStyleXUL() @@ -640,7 +644,11 @@ nsStyleXUL::nsStyleXUL(const nsStyleXUL& aSource) PRInt32 nsStyleXUL::CalcDifference(const nsStyleXUL& aOther) const { - if (mBoxOrient == aOther.mBoxOrient) + if (mBoxAlign == aOther.mBoxAlign && + mBoxDirection == aOther.mBoxDirection && + mBoxFlex == aOther.mBoxFlex && + mBoxOrient == aOther.mBoxOrient && + mBoxPack == aOther.mBoxPack) return NS_STYLE_HINT_NONE; return NS_STYLE_HINT_REFLOW; } diff --git a/mozilla/layout/style/nsStyleStruct.h b/mozilla/layout/style/nsStyleStruct.h index c61fa5fdcf2..9de50c40e6a 100644 --- a/mozilla/layout/style/nsStyleStruct.h +++ b/mozilla/layout/style/nsStyleStruct.h @@ -967,11 +967,11 @@ struct nsStyleXUL : public nsStyleStruct { PRInt32 CalcDifference(const nsStyleXUL& aOther) const; - // There will be seven more properties coming, - // which is why we warrant our own struct. - // box-align, box-direction, box-flex, box-flex-group, box-pack, - // stack-stretch, stack-policy + PRUint8 mBoxAlign; // [reset] see nsStyleConsts.h + PRUint8 mBoxDirection; // [reset] see nsStyleConsts.h + float mBoxFlex; // [reset] see nsStyleConsts.h PRUint8 mBoxOrient; // [reset] see nsStyleConsts.h + PRUint8 mBoxPack; // [reset] see nsStyleConsts.h }; #endif diff --git a/mozilla/layout/xul/base/src/nsBox.cpp b/mozilla/layout/xul/base/src/nsBox.cpp index 181b4c8bd16..31d24fba47a 100644 --- a/mozilla/layout/xul/base/src/nsBox.cpp +++ b/mozilla/layout/xul/base/src/nsBox.cpp @@ -1319,6 +1319,16 @@ nsIBox::AddCSSFlex(nsBoxLayoutState& aState, nsIBox* aBox, nscoord& aFlex) aFlex = value.ToInteger(&error); flexSet = PR_TRUE; } + else { + // No attribute value. Check CSS. + const nsStyleXUL* boxInfo; + frame->GetStyleData(eStyleStruct_XUL, (const nsStyleStruct*&)boxInfo); + if (boxInfo->mBoxFlex > 0.0f) { + // The flex was defined in CSS. + aFlex = (nscoord)boxInfo->mBoxFlex; + flexSet = PR_TRUE; + } + } } return flexSet; diff --git a/mozilla/layout/xul/base/src/nsBoxFrame.cpp b/mozilla/layout/xul/base/src/nsBoxFrame.cpp index 7ac8c46701f..19e0659d366 100644 --- a/mozilla/layout/xul/base/src/nsBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsBoxFrame.cpp @@ -360,20 +360,19 @@ nsBoxFrameInner::CacheAttributes() printf("\n"); */ - mValign = nsBoxFrame::vAlign_Top; + mValign = nsBoxFrame::vAlign_Middle; mHalign = nsBoxFrame::hAlign_Left; + PRBool orient = PR_FALSE; + mOuter->GetInitialOrientation(orient); + if (orient) + mOuter->mState |= NS_STATE_IS_HORIZONTAL; + else + mOuter->mState &= ~NS_STATE_IS_HORIZONTAL; mOuter->GetInitialVAlignment(mValign); mOuter->GetInitialHAlignment(mHalign); - PRBool orient = PR_FALSE; - mOuter->GetInitialOrientation(orient); - if (orient) - mOuter->mState |= NS_STATE_IS_HORIZONTAL; - else - mOuter->mState &= ~NS_STATE_IS_HORIZONTAL; - PRBool equalSize = PR_FALSE; mOuter->GetInitialEqualSize(equalSize); if (equalSize) @@ -438,40 +437,76 @@ nsBoxFrame::GetInitialHAlignment(nsBoxFrame::Halignment& aHalign) return PR_FALSE; if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::align, value)) { - if (value.EqualsIgnoreCase("left")) { - aHalign = nsBoxFrame::hAlign_Left; - return PR_TRUE; - } else if (value.EqualsIgnoreCase("center")) { - aHalign = nsBoxFrame::hAlign_Center; - return PR_TRUE; - } else if (value.EqualsIgnoreCase("right")) { - aHalign = nsBoxFrame::hAlign_Right; - return PR_TRUE; - } + // XXXdwh Everything inside this if statement is deprecated code. + if (value.EqualsIgnoreCase("left")) { + aHalign = nsBoxFrame::hAlign_Left; + return PR_TRUE; + } else if (value.EqualsIgnoreCase("center")) { + aHalign = nsBoxFrame::hAlign_Center; + return PR_TRUE; + } else if (value.EqualsIgnoreCase("right")) { + aHalign = nsBoxFrame::hAlign_Right; + return PR_TRUE; + } + } + + // Now that the deprecated stuff is out of the way, we move on to check the appropriate + // attribute. For horizontal boxes, we are checking the PACK attribute. For vertical boxes + // we are checking the ALIGN attribute. + nsresult res; + if (IsHorizontal()) + res = content->GetAttribute(kNameSpaceID_None, nsXULAtoms::pack, value); + else res = content->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::align, value); + if (res == NS_CONTENT_ATTR_HAS_VALUE) { + if (value.EqualsIgnoreCase("start")) { + aHalign = nsBoxFrame::hAlign_Left; + return PR_TRUE; + } else if (value.EqualsIgnoreCase("center")) { + aHalign = nsBoxFrame::hAlign_Center; + return PR_TRUE; + } else if (value.EqualsIgnoreCase("end")) { + aHalign = nsBoxFrame::hAlign_Right; + return PR_TRUE; + } + + // The attr was present but had a nonsensical value. Revert to the default. + return PR_FALSE; } - // look at vertical alignment - const nsStyleText* textStyle = - (const nsStyleText*)mStyleContext->GetStyleData(eStyleStruct_Text); - - switch (textStyle->mTextAlign) - { - - case NS_STYLE_TEXT_ALIGN_RIGHT: - aHalign = nsBoxFrame::hAlign_Right; - return PR_TRUE; - break; - - case NS_STYLE_TEXT_ALIGN_CENTER: - aHalign = nsBoxFrame::hAlign_Center; - return PR_TRUE; - break; - - default: - aHalign = nsBoxFrame::hAlign_Left; - return PR_TRUE; - break; - } + // Now that we've checked for the attribute it's time to check CSS. For + // horizontal boxes we're checking PACK. For vertical boxes we are checking + // ALIGN. + const nsStyleXUL* boxInfo = (const nsStyleXUL*)mStyleContext->GetStyleData(eStyleStruct_XUL); + if (IsHorizontal()) { + switch (boxInfo->mBoxPack) { + case NS_STYLE_BOX_PACK_START: + aHalign = nsBoxFrame::hAlign_Left; + return PR_TRUE; + case NS_STYLE_BOX_PACK_CENTER: + aHalign = nsBoxFrame::hAlign_Center; + return PR_TRUE; + case NS_STYLE_BOX_PACK_END: + aHalign = nsBoxFrame::hAlign_Right; + return PR_TRUE; + default: // Nonsensical value. Just bail. + return PR_FALSE; + } + } + else { + switch (boxInfo->mBoxAlign) { + case NS_STYLE_BOX_ALIGN_START: + aHalign = nsBoxFrame::hAlign_Left; + return PR_TRUE; + case NS_STYLE_BOX_ALIGN_CENTER: + aHalign = nsBoxFrame::hAlign_Center; + return PR_TRUE; + case NS_STYLE_BOX_ALIGN_END: + aHalign = nsBoxFrame::hAlign_Right; + return PR_TRUE; + default: // Nonsensical value. Just bail. + return PR_FALSE; + } + } return PR_FALSE; } @@ -488,54 +523,83 @@ nsBoxFrame::GetInitialVAlignment(nsBoxFrame::Valignment& aValign) return PR_FALSE; if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::valign, value)) { - if (value.EqualsIgnoreCase("top")) { - aValign = nsBoxFrame::vAlign_Top; - return PR_TRUE; - } else if (value.EqualsIgnoreCase("baseline")) { - aValign = nsBoxFrame::vAlign_BaseLine; - return PR_TRUE; - } else if (value.EqualsIgnoreCase("middle")) { - aValign = nsBoxFrame::vAlign_Middle; - return PR_TRUE; - } else if (value.EqualsIgnoreCase("bottom")) { - aValign = nsBoxFrame::vAlign_Bottom; - return PR_TRUE; - } + if (value.EqualsIgnoreCase("top")) { + aValign = nsBoxFrame::vAlign_Top; + return PR_TRUE; + } else if (value.EqualsIgnoreCase("baseline")) { + aValign = nsBoxFrame::vAlign_BaseLine; + return PR_TRUE; + } else if (value.EqualsIgnoreCase("middle")) { + aValign = nsBoxFrame::vAlign_Middle; + return PR_TRUE; + } else if (value.EqualsIgnoreCase("bottom")) { + aValign = nsBoxFrame::vAlign_Bottom; + return PR_TRUE; + } } - - // look at vertical alignment - const nsStyleTextReset* textStyle = - (const nsStyleTextReset*)mStyleContext->GetStyleData(eStyleStruct_TextReset); + // Now that the deprecated stuff is out of the way, we move on to check the appropriate + // attribute. For horizontal boxes, we are checking the ALIGN attribute. For vertical boxes + // we are checking the PACK attribute. + nsresult res; + if (IsHorizontal()) + res = content->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::align, value); + else res = content->GetAttribute(kNameSpaceID_None, nsXULAtoms::pack, value); + if (res == NS_CONTENT_ATTR_HAS_VALUE) { + if (value.EqualsIgnoreCase("start")) { + aValign = nsBoxFrame::vAlign_Top; + return PR_TRUE; + } else if (value.EqualsIgnoreCase("center")) { + aValign = nsBoxFrame::vAlign_Middle; + return PR_TRUE; + } else if (value.EqualsIgnoreCase("baseline")) { + aValign = nsBoxFrame::vAlign_BaseLine; + return PR_TRUE; + } else if (value.EqualsIgnoreCase("end")) { + aValign = nsBoxFrame::vAlign_Bottom; + return PR_TRUE; + } + // The attr was present but had a nonsensical value. Revert to the default. + return PR_FALSE; + } - if (textStyle->mVerticalAlign.GetUnit() == eStyleUnit_Enumerated) { - - PRInt32 type = textStyle->mVerticalAlign.GetIntValue(); - - switch (type) - { - case NS_STYLE_VERTICAL_ALIGN_BASELINE: - aValign = nsBoxFrame::vAlign_BaseLine; - return PR_TRUE; - break; - - case NS_STYLE_VERTICAL_ALIGN_TOP: - aValign = nsBoxFrame::vAlign_Top; - return PR_TRUE; - break; - - case NS_STYLE_VERTICAL_ALIGN_BOTTOM: - aValign = nsBoxFrame::vAlign_Bottom; - return PR_TRUE; - break; - - case NS_STYLE_VERTICAL_ALIGN_MIDDLE: - aValign = nsBoxFrame::vAlign_Middle; - return PR_TRUE; - break; - } - } - + // Now that we've checked for the attribute it's time to check CSS. For + // horizontal boxes we're checking ALIGN. For vertical boxes we are checking + // PACK. + const nsStyleXUL* boxInfo = (const nsStyleXUL*)mStyleContext->GetStyleData(eStyleStruct_XUL); + if (IsHorizontal()) { + switch (boxInfo->mBoxAlign) { + case NS_STYLE_BOX_ALIGN_START: + aValign = nsBoxFrame::vAlign_Top; + return PR_TRUE; + case NS_STYLE_BOX_ALIGN_CENTER: + aValign = nsBoxFrame::vAlign_Middle; + return PR_TRUE; + case NS_STYLE_BOX_ALIGN_BASELINE: + aValign = nsBoxFrame::vAlign_BaseLine; + return PR_TRUE; + case NS_STYLE_BOX_ALIGN_END: + aValign = nsBoxFrame::vAlign_Bottom; + return PR_TRUE; + default: // Nonsensical value. Just bail. + return PR_FALSE; + } + } + else { + switch (boxInfo->mBoxPack) { + case NS_STYLE_BOX_PACK_START: + aValign = nsBoxFrame::vAlign_Top; + return PR_TRUE; + case NS_STYLE_BOX_PACK_CENTER: + aValign = nsBoxFrame::vAlign_Middle; + return PR_TRUE; + case NS_STYLE_BOX_PACK_END: + aValign = nsBoxFrame::vAlign_Bottom; + return PR_TRUE; + default: // Nonsensical value. Just bail. + return PR_FALSE; + } + } return PR_FALSE; } @@ -619,18 +683,34 @@ nsBoxFrame::GetInitialAutoStretch(PRBool& aStretch) if (!content) return PR_FALSE; + PRBool autostretchSet = PR_FALSE; if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttribute(kNameSpaceID_None, nsXULAtoms::autostretch, value)) { if (value.EqualsIgnoreCase("never")) { aStretch = PR_FALSE; + autostretchSet = PR_TRUE; return PR_TRUE; } else if (value.EqualsIgnoreCase("always")) { aStretch = PR_TRUE; + autostretchSet = PR_TRUE; return PR_TRUE; } - } + } - return PR_FALSE; + if (!autostretchSet) { + // Check the align attribute. + if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::align, value)) { + aStretch = value.EqualsIgnoreCase("stretch"); + return PR_TRUE; + } + + // Check the CSS box-align property. + const nsStyleXUL* boxInfo; + GetStyleData(eStyleStruct_XUL, (const nsStyleStruct*&)boxInfo); + aStretch = (boxInfo->mBoxAlign == NS_STYLE_BOX_ALIGN_STRETCH); + } + + return PR_TRUE; } @@ -1154,19 +1234,19 @@ nsBoxFrame::AttributeChanged(nsIPresContext* aPresContext, aAttribute == nsXULAtoms::autostretch) { if (aAttribute == nsXULAtoms::orient || aAttribute == nsXULAtoms::debug || aAttribute == nsHTMLAtoms::align || aAttribute == nsHTMLAtoms::valign) { - mInner->mValign = nsBoxFrame::vAlign_Top; + mInner->mValign = nsBoxFrame::vAlign_Middle; mInner->mHalign = nsBoxFrame::hAlign_Left; - GetInitialVAlignment(mInner->mValign); - GetInitialHAlignment(mInner->mHalign); - PRBool orient = PR_TRUE; GetInitialOrientation(orient); if (orient) mState |= NS_STATE_IS_HORIZONTAL; else mState &= ~NS_STATE_IS_HORIZONTAL; - + + GetInitialVAlignment(mInner->mValign); + GetInitialHAlignment(mInner->mHalign); + PRBool equalSize = PR_FALSE; GetInitialEqualSize(equalSize); if (equalSize) diff --git a/mozilla/themes/classic/communicator/bookmarks/bookmarksToolbar.css b/mozilla/themes/classic/communicator/bookmarks/bookmarksToolbar.css index 1b64b463c5b..cc922dbf261 100644 --- a/mozilla/themes/classic/communicator/bookmarks/bookmarksToolbar.css +++ b/mozilla/themes/classic/communicator/bookmarks/bookmarksToolbar.css @@ -9,7 +9,6 @@ .button-toolbar.bookmark-item:hover:active { border : none !important; - vertical-align : middle; } .button-toolbar.bookmark-item > .button-internal-box, @@ -23,7 +22,6 @@ > .menubutton-toolbar-single-internal-box { border : none !important; - vertical-align : middle; padding : 1px 2px 1px 2px; } @@ -55,7 +53,6 @@ background-color : transparent; color : inherit; text-decoration : none; - vertical-align : middle; } .bookmark-item.button-toolbar[container="true"] diff --git a/mozilla/themes/classic/communicator/mac/button.css b/mozilla/themes/classic/communicator/mac/button.css index 947f408c92b..18217169963 100644 --- a/mozilla/themes/classic/communicator/mac/button.css +++ b/mozilla/themes/classic/communicator/mac/button.css @@ -36,14 +36,12 @@ { border : 1px solid transparent; padding : 1px 3px; - vertical-align : middle; } .button-toolbar-1 > .button-internal-box, .button-toolbar-2 > .button-internal-box { padding : 2px 6px 2px 5px; - vertical-align : middle; text-align : center; border : 1px solid transparent; } @@ -52,7 +50,6 @@ { border : 1px solid transparent; padding : 0px 1px; - vertical-align : middle; text-align : center; } diff --git a/mozilla/themes/classic/communicator/mac/dialogOverlay.css b/mozilla/themes/classic/communicator/mac/dialogOverlay.css index f539593007f..e326020376e 100644 --- a/mozilla/themes/classic/communicator/mac/dialogOverlay.css +++ b/mozilla/themes/classic/communicator/mac/dialogOverlay.css @@ -30,7 +30,6 @@ .box-smallheader > .toolbar-primary { border : 1px solid #000000; - vertical-align : middle; padding-top : 3px; } @@ -51,11 +50,6 @@ padding : 5px; } -.box-header-text-box - { - vertical-align : middle; - } - .box-header-text { color : #000000; @@ -63,11 +57,6 @@ margin-left : 7px; } -.box-header-icon-box - { - vertical-align : middle; - } - .box-header-icon { list-style-image : inherit; diff --git a/mozilla/themes/classic/communicator/mac/menubutton.css b/mozilla/themes/classic/communicator/mac/menubutton.css index 423bc387d51..d72ba0908d6 100644 --- a/mozilla/themes/classic/communicator/mac/menubutton.css +++ b/mozilla/themes/classic/communicator/mac/menubutton.css @@ -207,7 +207,6 @@ { border : 1px solid transparent; padding : 1px 3px 1px 3px; - vertical-align : middle; } menubutton.button-toolbar > .menubutton-toolbar-single-internal-box > .menubutton-toolbar-single-icon diff --git a/mozilla/themes/classic/communicator/win/button.css b/mozilla/themes/classic/communicator/win/button.css index 00d15d05d61..2f558e6f8ae 100644 --- a/mozilla/themes/classic/communicator/win/button.css +++ b/mozilla/themes/classic/communicator/win/button.css @@ -24,7 +24,6 @@ .button-toolbar-2 > .button-internal-box { padding : 2px 7px 2px 6px; - vertical-align : middle; text-align : center; border : 1px solid transparent; color : inherit; @@ -197,7 +196,6 @@ color : inherit; padding : 0px; border : 1px solid transparent; - vertical-align : middle; text-align : center; } diff --git a/mozilla/themes/classic/communicator/win/dialogOverlay.css b/mozilla/themes/classic/communicator/win/dialogOverlay.css index 96c1bf06202..e35f0ea840b 100644 --- a/mozilla/themes/classic/communicator/win/dialogOverlay.css +++ b/mozilla/themes/classic/communicator/win/dialogOverlay.css @@ -33,7 +33,6 @@ .box-smallheader > .toolbar-primary { border : 1px solid ThreeDDarkShadow; - vertical-align : middle; padding-top : 3px; } diff --git a/mozilla/themes/classic/communicator/win/menubutton.css b/mozilla/themes/classic/communicator/win/menubutton.css index f743bd6495a..785462b5067 100644 --- a/mozilla/themes/classic/communicator/win/menubutton.css +++ b/mozilla/themes/classic/communicator/win/menubutton.css @@ -258,7 +258,6 @@ { border : 1px solid transparent; padding : 1px 3px 1px 3px; - vertical-align : middle; } menubutton.button-toolbar > .menubutton-toolbar-single-internal-box > .menubutton-toolbar-single-icon @@ -326,7 +325,6 @@ menubutton.button-toolbar-2 > .menubutton-internal-box { border : 1px solid transparent; padding : 2px 2px 2px 4px; - vertical-align : middle; } menubutton.button-toolbar-2 > .menubutton-internal-box > .menubutton-single-icon diff --git a/mozilla/themes/classic/editor/EditorDialog.css b/mozilla/themes/classic/editor/EditorDialog.css index 5527fa182fb..51b64de25b2 100644 --- a/mozilla/themes/classic/editor/EditorDialog.css +++ b/mozilla/themes/classic/editor/EditorDialog.css @@ -49,10 +49,6 @@ groupbox { margin-left: 10px; } -.middle { - vertical-align: middle: -} - .bold { font-weight: bold; } diff --git a/mozilla/themes/classic/editor/EditorToolbars.css b/mozilla/themes/classic/editor/EditorToolbars.css index ff21670dae3..f7a81a1c3da 100644 --- a/mozilla/themes/classic/editor/EditorToolbars.css +++ b/mozilla/themes/classic/editor/EditorToolbars.css @@ -32,7 +32,7 @@ #EditModeToolbar { padding : 0px; - vertical-align: top; + -moz-box-align : start; border-bottom : 1px solid darkgray; margin-bottom : 0px; min-width : 1px; diff --git a/mozilla/themes/classic/editor/mac/EditorDialog.css b/mozilla/themes/classic/editor/mac/EditorDialog.css index 26f3439472c..f5f9f39b808 100644 --- a/mozilla/themes/classic/editor/mac/EditorDialog.css +++ b/mozilla/themes/classic/editor/mac/EditorDialog.css @@ -49,10 +49,6 @@ groupbox { margin-left: 10px; } -.middle { - vertical-align: middle: -} - .bold { font-weight: bold; } diff --git a/mozilla/themes/classic/editor/mac/EditorToolbars.css b/mozilla/themes/classic/editor/mac/EditorToolbars.css index 0e45f20d8fc..60b44bf8c1d 100644 --- a/mozilla/themes/classic/editor/mac/EditorToolbars.css +++ b/mozilla/themes/classic/editor/mac/EditorToolbars.css @@ -32,7 +32,7 @@ #EditModeToolbar { padding : 0px; - vertical-align: top; + -moz-box-align : start; border-bottom : 1px solid darkgray; margin-bottom : 0px; min-width : 1px; diff --git a/mozilla/themes/classic/editor/win/EditorDialog.css b/mozilla/themes/classic/editor/win/EditorDialog.css index e15d19f349d..8c57e6b98a6 100644 --- a/mozilla/themes/classic/editor/win/EditorDialog.css +++ b/mozilla/themes/classic/editor/win/EditorDialog.css @@ -49,10 +49,6 @@ groupbox { margin-left: 10px; } -.middle { - vertical-align: middle; -} - .bold { font-weight: bold; } diff --git a/mozilla/themes/classic/editor/win/EditorToolbars.css b/mozilla/themes/classic/editor/win/EditorToolbars.css index ada9684e0d9..67abd143b47 100644 --- a/mozilla/themes/classic/editor/win/EditorToolbars.css +++ b/mozilla/themes/classic/editor/win/EditorToolbars.css @@ -32,7 +32,7 @@ #EditModeToolbar { padding : 0px; - vertical-align: top; + -moz-box-align : start; border-bottom : 1px solid darkgray; margin-bottom : 0px; min-width : 1px; diff --git a/mozilla/themes/classic/global/mac/button.css b/mozilla/themes/classic/global/mac/button.css index de4d028bc57..83440ef9c15 100644 --- a/mozilla/themes/classic/global/mac/button.css +++ b/mozilla/themes/classic/global/mac/button.css @@ -132,7 +132,6 @@ button { .button-text-box { text-align : center; - vertical-align : middle; padding : 0px 3px; } @@ -196,8 +195,7 @@ button:hover:active { } .button-text-box { - vertical-align : middle; - text-align : center; + text-align : center; padding : 1px 0px 1px 0px; } diff --git a/mozilla/themes/classic/global/mac/console.css b/mozilla/themes/classic/global/mac/console.css index dc91d9a9c39..0c301b26811 100644 --- a/mozilla/themes/classic/global/mac/console.css +++ b/mozilla/themes/classic/global/mac/console.css @@ -40,7 +40,7 @@ border-right : 1px outset ThreeDFace; padding : 5px; background-color : ThreeDFace; - vertical-align : top !important; + -moz-box-align : start !important; } .console-icon diff --git a/mozilla/themes/classic/global/mac/dialogOverlay.css b/mozilla/themes/classic/global/mac/dialogOverlay.css index de16fbd2a47..f6d737882d9 100644 --- a/mozilla/themes/classic/global/mac/dialogOverlay.css +++ b/mozilla/themes/classic/global/mac/dialogOverlay.css @@ -30,7 +30,6 @@ .box-smallheader > .toolbar-primary { border : 1px solid #000000; - vertical-align : middle; padding-top : 3px; } @@ -48,11 +47,6 @@ min-height : 34px; } -.box-header-text-box - { - vertical-align : middle; - } - .box-header-text { color : white; @@ -61,11 +55,6 @@ text-decoration : underline; } -.box-header-icon-box - { - vertical-align : middle; - } - .box-header-circle { background-image : url("chrome://global/skin/button28-bg.gif"); diff --git a/mozilla/themes/classic/global/mac/menu.css b/mozilla/themes/classic/global/mac/menu.css index 79993b54848..4abd6a1299e 100644 --- a/mozilla/themes/classic/global/mac/menu.css +++ b/mozilla/themes/classic/global/mac/menu.css @@ -2,7 +2,6 @@ menu, menuitem { color : MenuText; - vertical-align : middle; list-style-image : none; } diff --git a/mozilla/themes/classic/global/mac/menulist.css b/mozilla/themes/classic/global/mac/menulist.css index 892291481f5..b09503db545 100644 --- a/mozilla/themes/classic/global/mac/menulist.css +++ b/mozilla/themes/classic/global/mac/menulist.css @@ -68,7 +68,6 @@ .menulist-mid-top { background : url("chrome://global/skin/menulist-mid-top.gif") repeat-x; height : 3px; - vertical-align : top; } .menulist-mid-mid { @@ -78,11 +77,9 @@ .menulist-mid-btm { background : url("chrome://global/skin/menulist-mid-btm.gif") repeat-x; height : 3px; - vertical-align : bottom; } .menulist-text-box { - vertical-align : middle; text-align : left; padding : 1px 0px 2px 0px; } @@ -102,7 +99,6 @@ padding-top : 3px; /** padding-bottom : 1px; **/ text-align : center; - vertical-align : middle; } .menulist-right-btm { diff --git a/mozilla/themes/classic/global/mac/menulistBindings.xml b/mozilla/themes/classic/global/mac/menulistBindings.xml index d41a838fc79..5f564aa8307 100644 --- a/mozilla/themes/classic/global/mac/menulistBindings.xml +++ b/mozilla/themes/classic/global/mac/menulistBindings.xml @@ -28,7 +28,7 @@ - + @@ -40,7 +40,7 @@ - + diff --git a/mozilla/themes/classic/global/mac/outliner.css b/mozilla/themes/classic/global/mac/outliner.css index 092b6fe706b..b51376cc920 100644 --- a/mozilla/themes/classic/global/mac/outliner.css +++ b/mozilla/themes/classic/global/mac/outliner.css @@ -39,7 +39,6 @@ outlinerbody:-moz-outliner-cell { padding: 0px 0px 1px 2px; white-space: nowrap; - vertical-align: middle; } outlinerbody:-moz-outliner-cell(selected) diff --git a/mozilla/themes/classic/global/mac/scrollbars.css b/mozilla/themes/classic/global/mac/scrollbars.css index 29716d54d34..c07219b5388 100644 --- a/mozilla/themes/classic/global/mac/scrollbars.css +++ b/mozilla/themes/classic/global/mac/scrollbars.css @@ -91,7 +91,7 @@ scrollbarbutton { -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbarbutton"); -moz-user-focus: ignore; -moz-user-select: none; - vertical-align: bottom; + -moz-box-align: end; } scrollbarbutton:hover:active { diff --git a/mozilla/themes/classic/global/mac/scrollbox.css b/mozilla/themes/classic/global/mac/scrollbox.css index 41bb4fef570..ef4e231fbf1 100644 --- a/mozilla/themes/classic/global/mac/scrollbox.css +++ b/mozilla/themes/classic/global/mac/scrollbox.css @@ -15,7 +15,6 @@ autorepeatbutton { padding: 1px; height: 1em; text-align: left; - vertical-align: middle; } autorepeatbutton:hover { diff --git a/mozilla/themes/classic/global/mac/splitter.css b/mozilla/themes/classic/global/mac/splitter.css index 42bf8853931..331abb2cb91 100644 --- a/mozilla/themes/classic/global/mac/splitter.css +++ b/mozilla/themes/classic/global/mac/splitter.css @@ -4,7 +4,6 @@ splitter { cursor : e-resize; background-color : #DDDDDD; - vertical-align : middle; text-align : center; border-right : 1px solid #000000; } diff --git a/mozilla/themes/classic/global/mac/tree.css b/mozilla/themes/classic/global/mac/tree.css index 65fe3950b62..7ba1498aa11 100644 --- a/mozilla/themes/classic/global/mac/tree.css +++ b/mozilla/themes/classic/global/mac/tree.css @@ -48,7 +48,6 @@ treeitem[dd-dropon="true"] > treerow { treecell { white-space: nowrap; - vertical-align: middle; padding: 1px 0px 1px 2px; } @@ -60,7 +59,6 @@ treecell { border-bottom: 1px solid #333333 !important; color: black; padding: 0px; - vertical-align: middle; } .treecell-header > .treecell-header-box, diff --git a/mozilla/themes/classic/global/win/button.css b/mozilla/themes/classic/global/win/button.css index 86615be8494..dd7d5944c1f 100644 --- a/mozilla/themes/classic/global/win/button.css +++ b/mozilla/themes/classic/global/win/button.css @@ -83,7 +83,6 @@ button[disabled]:focus > .button-box-1 > .button-box-2 > .button-box-text { text-align : center; - vertical-align : middle; padding : 0px 3px 1px 2px; border : 1px solid ThreeDFace; margin : 1px; diff --git a/mozilla/themes/classic/global/win/console.css b/mozilla/themes/classic/global/win/console.css index ae721e882c3..701905ae3b1 100644 --- a/mozilla/themes/classic/global/win/console.css +++ b/mozilla/themes/classic/global/win/console.css @@ -40,7 +40,7 @@ border-right : 1px outset ThreeDFace; padding : 5px; background-color : -moz-Dialog; - vertical-align : top !important; + -moz-box-align : start; } .console-icon diff --git a/mozilla/themes/classic/global/win/dialogOverlay.css b/mozilla/themes/classic/global/win/dialogOverlay.css index d59ce4530ba..a62e8707705 100644 --- a/mozilla/themes/classic/global/win/dialogOverlay.css +++ b/mozilla/themes/classic/global/win/dialogOverlay.css @@ -33,7 +33,6 @@ .box-smallheader > .toolbar-primary { border : 1px solid ThreeDDarkShadow; - vertical-align : middle; padding-top : 3px; } diff --git a/mozilla/themes/classic/global/win/menu.css b/mozilla/themes/classic/global/win/menu.css index 41424395cf6..44248351a04 100644 --- a/mozilla/themes/classic/global/win/menu.css +++ b/mozilla/themes/classic/global/win/menu.css @@ -2,7 +2,6 @@ menu, menuitem { font : menu; color : MenuText; - vertical-align : middle; list-style-image : none; } diff --git a/mozilla/themes/classic/global/win/outliner.css b/mozilla/themes/classic/global/win/outliner.css index 4e59a670c4a..9891e46d946 100644 --- a/mozilla/themes/classic/global/win/outliner.css +++ b/mozilla/themes/classic/global/win/outliner.css @@ -46,8 +46,6 @@ outlinerbody:-moz-outliner-row(current, focus) { outlinerbody:-moz-outliner-cell { padding: 0px 0px 1px 2px; - white-space: nowrap; - vertical-align: middle; } outlinerbody:-moz-outliner-cell-text { diff --git a/mozilla/themes/classic/global/win/scrollbox.css b/mozilla/themes/classic/global/win/scrollbox.css index 5fb5b518ce5..96279edb9b0 100644 --- a/mozilla/themes/classic/global/win/scrollbox.css +++ b/mozilla/themes/classic/global/win/scrollbox.css @@ -18,7 +18,6 @@ autorepeatbutton padding : 1px; height : 1em; text-align : center; - vertical-align : middle; } autorepeatbutton:hover diff --git a/mozilla/themes/classic/global/win/splitter.css b/mozilla/themes/classic/global/win/splitter.css index 663f1e210c7..94c1660119a 100644 --- a/mozilla/themes/classic/global/win/splitter.css +++ b/mozilla/themes/classic/global/win/splitter.css @@ -10,7 +10,6 @@ { cursor : e-resize; background-color : -moz-Dialog; - vertical-align : middle; text-align : center; } @@ -66,11 +65,7 @@ } /* Grippy alignment */ - splitter[autostretch="never"] - { - vertical-align : middle; - } - + splitter[orient="vertical"][autostretch="never"] { text-align : center; diff --git a/mozilla/themes/classic/global/win/tree.css b/mozilla/themes/classic/global/win/tree.css index c6ab9a6da95..04e663b9ad4 100644 --- a/mozilla/themes/classic/global/win/tree.css +++ b/mozilla/themes/classic/global/win/tree.css @@ -66,7 +66,6 @@ treecell { padding : 0px 0px 1px 2px; white-space : nowrap; - vertical-align : middle; } tree:focus > treechildren treeitem[selected="true"] > treerow, diff --git a/mozilla/themes/classic/messenger/mac/messenger.css b/mozilla/themes/classic/messenger/mac/messenger.css index 85b659f1844..7d946adba7f 100644 --- a/mozilla/themes/classic/messenger/mac/messenger.css +++ b/mozilla/themes/classic/messenger/mac/messenger.css @@ -390,7 +390,7 @@ searchoperator searchvalue { - display: -moz-xul-deck; + display: -moz-deck; -moz-binding : url(chrome://messenger/content/mailWidgets.xml#searchvalue); } diff --git a/mozilla/themes/classic/messenger/mac/msgHdrViewOverlay.css b/mozilla/themes/classic/messenger/mac/msgHdrViewOverlay.css index 8df4c98ca12..82fdaffa86f 100644 --- a/mozilla/themes/classic/messenger/mac/msgHdrViewOverlay.css +++ b/mozilla/themes/classic/messenger/mac/msgHdrViewOverlay.css @@ -37,7 +37,7 @@ Rights Reserved. mail-emailaddress { -moz-binding: url(chrome://messenger/content/mailWidgets.xml#mail-emailaddress); - display: -moz-xul-inline-box; + display: -moz-inline-box; } .buttonTopSpacer { height: .3em; } @@ -132,10 +132,6 @@ text.headerValue /* ::::: collapsed view styles ::::: */ -.collapsedToggleHdrBox -{ - vertical-align: middle; -} #collapsedAttachmentBox { text-align: center; diff --git a/mozilla/themes/classic/messenger/messengercompose/messengercompose.css b/mozilla/themes/classic/messenger/messengercompose/messengercompose.css index 368d9a3c705..9336fb85e22 100644 --- a/mozilla/themes/classic/messenger/messengercompose/messengercompose.css +++ b/mozilla/themes/classic/messenger/messengercompose/messengercompose.css @@ -60,7 +60,6 @@ .treecell-addressingWidget { - vertical-align : middle; border-bottom : 1px solid #CACAFF; padding : 0px !important; } @@ -313,7 +312,7 @@ } #askImageBox { - vertical-align: top; + -moz-box-align: start; } #convertYes { diff --git a/mozilla/themes/classic/messenger/win/messenger.css b/mozilla/themes/classic/messenger/win/messenger.css index 22390f09be9..50801e91103 100644 --- a/mozilla/themes/classic/messenger/win/messenger.css +++ b/mozilla/themes/classic/messenger/win/messenger.css @@ -413,7 +413,7 @@ searchoperator searchvalue { - display: -moz-xul-deck; + display: -moz-deck; -moz-binding : url(chrome://messenger/content/mailWidgets.xml#searchvalue); } diff --git a/mozilla/themes/classic/messenger/win/msgHdrViewOverlay.css b/mozilla/themes/classic/messenger/win/msgHdrViewOverlay.css index 95824fbebca..e21d670722d 100644 --- a/mozilla/themes/classic/messenger/win/msgHdrViewOverlay.css +++ b/mozilla/themes/classic/messenger/win/msgHdrViewOverlay.css @@ -38,7 +38,7 @@ mail-emailaddress { -moz-binding : url(chrome://messenger/content/mailWidgets.xml#mail-emailaddress); - display : -moz-xul-inline-box; + display : -moz-inline-box; } .buttonTopSpacer @@ -162,10 +162,6 @@ text.headerValue /* ::::: collapsed view styles ::::: */ -.collapsedToggleHdrBox -{ - vertical-align: middle; -} #collapsedAttachmentBox { text-align: center; diff --git a/mozilla/themes/classic/navigator/win/navigator.css b/mozilla/themes/classic/navigator/win/navigator.css index 774007827df..06e0c0788d2 100644 --- a/mozilla/themes/classic/navigator/win/navigator.css +++ b/mozilla/themes/classic/navigator/win/navigator.css @@ -31,7 +31,6 @@ { min-width : 0px; margin : 8px 0px 8px 6px; - vertical-align : middle; } #bookmarks-button, diff --git a/mozilla/themes/modern/communicator/brand.css b/mozilla/themes/modern/communicator/brand.css index 4feb5db4c0a..9ae0f95bfb2 100644 --- a/mozilla/themes/modern/communicator/brand.css +++ b/mozilla/themes/modern/communicator/brand.css @@ -46,6 +46,6 @@ #throbber-box, .throbber-internal-box { - vertical-align: top !important; + -moz-box-align: start !important; } diff --git a/mozilla/themes/modern/communicator/button.css b/mozilla/themes/modern/communicator/button.css index 6666a4ebdcb..7d485c604ca 100644 --- a/mozilla/themes/modern/communicator/button.css +++ b/mozilla/themes/modern/communicator/button.css @@ -41,10 +41,6 @@ font: message-box; } -.button-internal-box { - vertical-align: middle; -} - .button-toolbar > .button-internal-box > .button-icon { margin: 0px; padding: 0px 2px 0px 0px; @@ -213,7 +209,6 @@ menubutton.button-toolbar-4 { .button-text-container { text-align: center; - vertical-align: middle; } .button-text { diff --git a/mozilla/themes/modern/communicator/menubutton.css b/mozilla/themes/modern/communicator/menubutton.css index 7ab0a363919..54519772d52 100644 --- a/mozilla/themes/modern/communicator/menubutton.css +++ b/mozilla/themes/modern/communicator/menubutton.css @@ -42,7 +42,6 @@ menubutton.button-toolbar { border: none; padding: 1px 3px 1px 3px; background-color: transparent; - vertical-align: middle; } .button-toolbar > .menubutton-internal-box > .menubutton-single-icon { diff --git a/mozilla/themes/modern/communicator/search/internetresults.css b/mozilla/themes/modern/communicator/search/internetresults.css index b883bfeb2bc..188b2a2a183 100755 --- a/mozilla/themes/modern/communicator/search/internetresults.css +++ b/mozilla/themes/modern/communicator/search/internetresults.css @@ -38,6 +38,5 @@ #engineTabs { border-bottom: 1px outset #D7D9E0; padding: 2px 3px 2px 3px; - vertical-align: middle; } diff --git a/mozilla/themes/modern/editor/EditorDialog.css b/mozilla/themes/modern/editor/EditorDialog.css index 7161fe7ee49..59246397c0c 100644 --- a/mozilla/themes/modern/editor/EditorDialog.css +++ b/mozilla/themes/modern/editor/EditorDialog.css @@ -49,10 +49,6 @@ margin-left: 10px; } -.middle { - vertical-align: middle; -} - .bold { font-weight: bold; } diff --git a/mozilla/themes/modern/global/autocomplete.css b/mozilla/themes/modern/global/autocomplete.css index 2782799a8a2..429e830a8da 100644 --- a/mozilla/themes/modern/global/autocomplete.css +++ b/mozilla/themes/modern/global/autocomplete.css @@ -50,7 +50,6 @@ html|*.textbox-input { -moz-binding: url("chrome://global/skin/globalBindings.xml#autostretch-never"); margin: 1px 3px 3px 0px; list-style-image: url("chrome://global/skin/arrow/arrow-dn.gif"); - vertical-align: middle; } .autocomplete-history-button[open="true"] { diff --git a/mozilla/themes/modern/global/button.css b/mozilla/themes/modern/global/button.css index 563b0962923..da41de1d820 100644 --- a/mozilla/themes/modern/global/button.css +++ b/mozilla/themes/modern/global/button.css @@ -46,7 +46,6 @@ button { .button-text-box { padding: 3px 2px 3px 2px; text-align: center; - vertical-align: middle; } .button-text-mid, diff --git a/mozilla/themes/modern/global/console.css b/mozilla/themes/modern/global/console.css index dce5585720d..0ab15c53c7b 100644 --- a/mozilla/themes/modern/global/console.css +++ b/mozilla/themes/modern/global/console.css @@ -43,7 +43,7 @@ border-right: 1px outset #C7D0D9; padding: 5px; background-color: #C7D0D9; - vertical-align: top !important; + -moz-box-align: start !important; } .console-icon { diff --git a/mozilla/themes/modern/global/globalBindings.xml b/mozilla/themes/modern/global/globalBindings.xml index 68a2a07d09b..2d96b12f345 100644 --- a/mozilla/themes/modern/global/globalBindings.xml +++ b/mozilla/themes/modern/global/globalBindings.xml @@ -39,7 +39,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -102,7 +102,7 @@ - + @@ -116,7 +116,7 @@ - + @@ -126,7 +126,7 @@ - + diff --git a/mozilla/themes/modern/global/menu.css b/mozilla/themes/modern/global/menu.css index 9ea713b33f5..c0143bae62f 100644 --- a/mozilla/themes/modern/global/menu.css +++ b/mozilla/themes/modern/global/menu.css @@ -34,7 +34,7 @@ menuitem { list-style-image: none; color: #000000; font: menu; - vertical-align: middle; + -moz-box-align: center; } menuitem[default="true"] { diff --git a/mozilla/themes/modern/global/menulist.css b/mozilla/themes/modern/global/menulist.css index 99fdad28793..09973e76035 100644 --- a/mozilla/themes/modern/global/menulist.css +++ b/mozilla/themes/modern/global/menulist.css @@ -46,7 +46,6 @@ menulist { .menulist-text-box { padding: 3px 2px 3px 2px; text-align: left; - vertical-align: middle; } .menulist-icon-mid { @@ -94,13 +93,11 @@ menulist:focus { .menulist-mid-top { background: url("chrome://global/skin/menulist/mlist-mid-top.gif") repeat-x; height: 9px; - vertical-align: top; } .menulist-mid-btm { background: url("chrome://global/skin/menulist/mlist-mid-btm.gif") repeat-x; height: 8px; - vertical-align: bottom; } .menulist-box-right { @@ -123,7 +120,6 @@ menulist:focus { .menulist-dropmarker-box { text-align: center; - vertical-align: middle; } /* ..... active state ..... */ diff --git a/mozilla/themes/modern/global/outliner.css b/mozilla/themes/modern/global/outliner.css index 32611775063..c5dcaf8a6b5 100644 --- a/mozilla/themes/modern/global/outliner.css +++ b/mozilla/themes/modern/global/outliner.css @@ -103,7 +103,6 @@ outlinerbody:-moz-outliner-line(selected, focus) { border-top: 1px solid #C7D0D9; border-right: 1px solid #A5ABB0; border-bottom: 1px solid #A5ABB0; - vertical-align: middle; } .outlinercol-box { diff --git a/mozilla/themes/modern/global/scrollbars-mini.css b/mozilla/themes/modern/global/scrollbars-mini.css index 02551783814..6ebb1245cd1 100644 --- a/mozilla/themes/modern/global/scrollbars-mini.css +++ b/mozilla/themes/modern/global/scrollbars-mini.css @@ -146,7 +146,7 @@ thumb:active > .thumb-vert-box-middle > .thumb-vert-grippy { scrollbarbutton { -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbarbutton"); cursor: default; - vertical-align: bottom; + -moz-box-align: end; } /* ..... increment .... */ diff --git a/mozilla/themes/modern/global/scrollbars.css b/mozilla/themes/modern/global/scrollbars.css index 59aa58cf73f..1bfec182a70 100644 --- a/mozilla/themes/modern/global/scrollbars.css +++ b/mozilla/themes/modern/global/scrollbars.css @@ -145,7 +145,7 @@ thumb:active > .thumb-vert-box-middle > .thumb-vert-grippy { scrollbarbutton { -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbarbutton"); cursor: default; - vertical-align: bottom; + -moz-box-align: end; } /* ..... increment .... */ diff --git a/mozilla/themes/modern/global/scrollbox.css b/mozilla/themes/modern/global/scrollbox.css index 59b46669903..d06f02cd62f 100644 --- a/mozilla/themes/modern/global/scrollbox.css +++ b/mozilla/themes/modern/global/scrollbox.css @@ -35,7 +35,6 @@ autorepeatbutton { padding: 3px; height: 1em; text-align: center; - vertical-align: middle; } autorepeatbutton:hover { diff --git a/mozilla/themes/modern/global/splitter.css b/mozilla/themes/modern/global/splitter.css index 143192a0faa..36c3b510b13 100644 --- a/mozilla/themes/modern/global/splitter.css +++ b/mozilla/themes/modern/global/splitter.css @@ -35,7 +35,6 @@ splitter { border-left: 1px solid #000000; min-width: 1px; background-color: #C7D0D9; - vertical-align: middle; } .splitter-internal-box { diff --git a/mozilla/themes/modern/global/tree.css b/mozilla/themes/modern/global/tree.css index 3f357e614bb..e8676cc4bba 100644 --- a/mozilla/themes/modern/global/tree.css +++ b/mozilla/themes/modern/global/tree.css @@ -82,7 +82,6 @@ treecell { border-top: 1px solid transparent; border-bottom: 1px solid transparent; padding: 0px 0px 1px 2px; - vertical-align: middle; white-space: nowrap; } @@ -128,7 +127,6 @@ treeitem[container="true"] > treerow > .treecell-indent > .tree-cell-primary-ico border-top: 1px solid #C7D0D9; border-right: 1px solid #A5ABB0; border-bottom: 1px solid #A5ABB0; - vertical-align: middle; } .treecell-header-box { diff --git a/mozilla/themes/modern/messenger/messenger.css b/mozilla/themes/modern/messenger/messenger.css index 4ca9c496e70..507f6a282ad 100644 --- a/mozilla/themes/modern/messenger/messenger.css +++ b/mozilla/themes/modern/messenger/messenger.css @@ -369,7 +369,7 @@ searchoperator { } searchvalue { - display: -moz-xul-deck; + display: -moz-deck; -moz-binding: url("chrome://messenger/content/mailWidgets.xml#searchvalue"); } diff --git a/mozilla/themes/modern/messenger/messengercompose/messengercompose.css b/mozilla/themes/modern/messenger/messengercompose/messengercompose.css index 1213dd1d12a..b513c868c37 100644 --- a/mozilla/themes/modern/messenger/messengercompose/messengercompose.css +++ b/mozilla/themes/modern/messenger/messengercompose/messengercompose.css @@ -196,7 +196,6 @@ .treecell-addressingWidget { border-bottom: 1px solid #C4CADC; padding: 0px; - vertical-align: middle; } .treecell-addressingWidget:first-child { @@ -238,7 +237,7 @@ statusbarpanel, } #askImageBox { - vertical-align: top; + -moz-box-align: start; } #convertYes { diff --git a/mozilla/themes/modern/messenger/msgHdrViewOverlay.css b/mozilla/themes/modern/messenger/msgHdrViewOverlay.css index d610f88811e..cb9f78799e9 100644 --- a/mozilla/themes/modern/messenger/msgHdrViewOverlay.css +++ b/mozilla/themes/modern/messenger/msgHdrViewOverlay.css @@ -147,10 +147,6 @@ mail-emailaddress { /* ::::: collapsed view styles ::::: */ -.collapsedToggleHdrBox { - vertical-align: middle; -} - #collapsedAttachmentBox { text-align: center; } diff --git a/mozilla/themes/modern/navigator/navigator.css b/mozilla/themes/modern/navigator/navigator.css index 56bbd25c607..1e337545511 100644 --- a/mozilla/themes/modern/navigator/navigator.css +++ b/mozilla/themes/modern/navigator/navigator.css @@ -156,7 +156,7 @@ .toolbar-primary-mid-fg { -moz-binding: url("chrome://global/skin/globalBindings.xml#autostretch-never"); - vertical-align: top; + -moz-box-align: start; } .toolbar-primary-mid-top { @@ -220,10 +220,6 @@ border-bottom: 1px solid #87929E; } -.navbar-inner-border-inner { - vertical-align: middle; -} - .navbar-inner-groove-rit { width: 6px; } diff --git a/mozilla/xpfe/components/autocomplete/resources/content/autocomplete.css b/mozilla/xpfe/components/autocomplete/resources/content/autocomplete.css index 253b9b0d765..39c83ef91b1 100644 --- a/mozilla/xpfe/components/autocomplete/resources/content/autocomplete.css +++ b/mozilla/xpfe/components/autocomplete/resources/content/autocomplete.css @@ -8,5 +8,5 @@ } .autocomplete-result-popup { - display: -moz-xul-popup !important; + display: -moz-popup !important; } \ No newline at end of file diff --git a/mozilla/xpfe/global/resources/content/bindings/menu.xml b/mozilla/xpfe/global/resources/content/bindings/menu.xml index 18b63cfb831..c3a749297df 100644 --- a/mozilla/xpfe/global/resources/content/bindings/menu.xml +++ b/mozilla/xpfe/global/resources/content/bindings/menu.xml @@ -11,10 +11,10 @@ - + - + @@ -27,7 +27,7 @@ - + @@ -55,7 +55,7 @@ - @@ -70,13 +70,13 @@ - - + + - + @@ -89,7 +89,7 @@ - + diff --git a/mozilla/xpfe/global/resources/content/bindings/tree.css b/mozilla/xpfe/global/resources/content/bindings/tree.css index 8607820a3c4..a680254c85c 100644 --- a/mozilla/xpfe/global/resources/content/bindings/tree.css +++ b/mozilla/xpfe/global/resources/content/bindings/tree.css @@ -1,7 +1,7 @@ tree { -moz-user-focus: normal; - display: -moz-xul-grid; + display: -moz-grid; min-width: 0px; min-height: 0px; width: 200px; @@ -13,11 +13,11 @@ tree[rows] { } treehead, treerows, treechildren, treeitem, treecolgroup { - display: -moz-xul-grid-group; + display: -moz-grid-group; } treehead, treerows, treechildren, treeitem { - -moz-xul-box-orient: vertical; + -moz-box-orient: vertical; } treechildren, treehead, treerows { @@ -25,22 +25,22 @@ treechildren, treehead, treerows { } treecol, treerow { - display: -moz-xul-grid-line; + display: -moz-grid-line; } treecol { min-width: 16px; width: 16px; - -moz-xul-box-orient: vertical; + -moz-box-orient: vertical; } treecol[hidden="true"] { - display: -moz-xul-grid-line; + display: -moz-grid-line; visibility: collapse; } treechildren { - display: -moz-xul-grid-group; + display: -moz-grid-group; } tree > treechildren { @@ -53,15 +53,15 @@ treeitem > treechildren { } treeitem[open="true"] > treechildren { - display: -moz-xul-grid-group; + display: -moz-grid-group; } treecell { - vertical-align: middle; + -moz-box-align: center; } treecell[hidden="true"] { - display: -moz-xul-box; + display: -moz-box; visibility: collapse; } diff --git a/mozilla/xpfe/global/resources/content/bindings/tree.xml b/mozilla/xpfe/global/resources/content/bindings/tree.xml index fa714cdf096..f3ff8f87cf5 100644 --- a/mozilla/xpfe/global/resources/content/bindings/tree.xml +++ b/mozilla/xpfe/global/resources/content/bindings/tree.xml @@ -411,14 +411,14 @@ - + - + @@ -426,7 +426,7 @@ - + @@ -434,14 +434,14 @@ - + - + @@ -456,7 +456,7 @@ - + @@ -474,7 +474,7 @@ - + @@ -491,7 +491,7 @@ - + @@ -501,7 +501,7 @@ - + @@ -515,7 +515,7 @@ - + @@ -526,7 +526,7 @@ - + diff --git a/mozilla/xpfe/global/resources/content/xul.css b/mozilla/xpfe/global/resources/content/xul.css index 47f86ed62bd..6313889e7cc 100644 --- a/mozilla/xpfe/global/resources/content/xul.css +++ b/mozilla/xpfe/global/resources/content/xul.css @@ -12,7 +12,7 @@ * { -moz-user-focus: ignore; - display: -moz-xul-box; + display: -moz-box; } /* hide the content and destroy the frame */ @@ -72,39 +72,14 @@ window { /******** box *******/ -hbox[autostretch="never"], -box[autostretch="never"] { - vertical-align: middle; -} - -hbox[autostretch="never"][valign="top"], -box[autostretch="never"][valign="top"] { - vertical-align: top; -} - -hbox[autostretch="never"][valign="bottom"], -box[autostretch="never"][valign="bottom"] { - vertical-align: bottom; -} - -hbox[autostretch="never"][halign="center"], -box[autostretch="never"][halign="center"] { - text-align: center; -} - -hbox[autostretch="never"][halign="right"], -box[autostretch="never"][halign="right"] { - text-align: right; -} - vbox { - -moz-xul-box-orient: vertical; + -moz-box-orient: vertical; } /******** bulletinboard *******/ bulletinboard { - display: -moz-xul-bulletinboard; + display: -moz-bulletinboard; } /********** button **********/ @@ -167,7 +142,7 @@ radio { titledbox, groupbox { -moz-binding: url("chrome://global/content/bindings/titledbox.xml#groupbox"); - display: -moz-xul-groupbox; + display: -moz-groupbox; } label { @@ -175,8 +150,8 @@ label { } .groupbox-body { - text-align: inherit; - vertical-align: inherit; + -moz-box-pack: inherit; + -moz-box-align: inherit; } /******* toolbar *******/ @@ -255,14 +230,14 @@ menuseparator { popup, menupopup { -moz-binding: url("chrome://global/content/bindings/popup.xml#popup"); - -moz-xul-box-orient: vertical; + -moz-box-orient: vertical; display: none; z-index: 2147483647; } menupopup[menugenerated="true"], popup[menugenerated="true"] { - display: -moz-xul-popup; + display: -moz-popup; } popup.tooltip, @@ -303,29 +278,25 @@ button.popupClose { /******** grid **********/ grid { - display: -moz-xul-grid; + display: -moz-grid; } rows, columns { - display: -moz-xul-grid-group; + display: -moz-grid-group; } row, column { - display: -moz-xul-grid-line; + display: -moz-grid-line; } rows { - -moz-xul-box-orient: vertical; -} - -row { - vertical-align: middle; + -moz-box-orient: vertical; } column { - -moz-xul-box-orient: vertical; + -moz-box-orient: vertical; } /******** tree **********/ @@ -429,20 +400,20 @@ outlinercol.outliner-columnpicker { outlinercol[hidden="true"] { visibility: collapse; - display: -moz-xul-box; + display: -moz-box; } /********** deck & stack *********/ deck { - display: -moz-xul-deck; + display: -moz-deck; } stack { - display: -moz-xul-stack; + display: -moz-stack; } -:-moz-xul-deck-hidden { +:-moz-deck-hidden { visibility: hidden; } @@ -462,7 +433,7 @@ tab { tabpanels { -moz-binding: url("chrome://global/content/bindings/tabbox.xml#tabpanels"); - display: -moz-xul-deck; + display: -moz-deck; } /********** progressmeter **********/ @@ -639,7 +610,7 @@ scrollbox { arrowscrollbox { -moz-binding: url("chrome://global/content/bindings/scrollbox.xml#arrowscrollbox"); - display: -moz-xul-stack; + display: -moz-stack; } autorepeatbutton.up { @@ -651,8 +622,8 @@ autorepeatbutton.down { } .scrollbox-innerbox { - text-align: inherit; - vertical-align: inherit; + -moz-box-pack: inherit; + -moz-box-align: inherit; } /********** statusbar **********/ @@ -688,12 +659,12 @@ resourcebundle { wizard { -moz-binding: url("chrome://global/content/bindings/wizard.xml#wizard"); - -moz-xul-box-orient: vertical; + -moz-box-orient: vertical; } wizardpage { -moz-binding: url("chrome://global/content/bindings/wizard.xml#wizardpage"); - -moz-xul-box-orient: vertical; + -moz-box-orient: vertical; overflow: auto; }