From 291e04b5f6ec3f5be2226a9283f0286796cb1a47 Mon Sep 17 00:00:00 2001 From: Sebastian Kromp <46b@gulli.com> Date: Thu, 31 Mar 2011 07:32:13 -0400 Subject: [PATCH 01/12] Bug 633066: Remove nsICiter and make nsInternetCiter a static class. r=ehsan --- editor/idl/Makefile.in | 1 - editor/idl/nsICiter.idl | 61 --------------------- editor/libeditor/text/nsInternetCiter.cpp | 17 +----- editor/libeditor/text/nsInternetCiter.h | 26 +++------ editor/libeditor/text/nsPlaintextEditor.cpp | 16 +----- 5 files changed, 15 insertions(+), 106 deletions(-) delete mode 100644 editor/idl/nsICiter.idl diff --git a/editor/idl/Makefile.in b/editor/idl/Makefile.in index e2ac1adc5db..eddf6c7d895 100644 --- a/editor/idl/Makefile.in +++ b/editor/idl/Makefile.in @@ -46,7 +46,6 @@ MODULE = editor GRE_MODULE = 1 XPIDLSRCS = \ - nsICiter.idl \ nsIDocumentStateListener.idl \ nsIEditActionListener.idl \ nsIEditor.idl \ diff --git a/editor/idl/nsICiter.idl b/editor/idl/nsICiter.idl deleted file mode 100644 index 0c15b06f1e1..00000000000 --- a/editor/idl/nsICiter.idl +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "nsISupports.idl" -#include "domstubs.idl" -%{C++ -#include "nsString.h" -%} -/** Handle plaintext citations, as in mail quoting. - * Used by the editor but not dependant on it. - */ - -[scriptable, uuid(a6cf9102-15b3-11d2-932e-00805f8add32)] - -interface nsICiter : nsISupports -{ - - DOMString GetCiteString(in DOMString aInString); - - DOMString StripCites(in DOMString aInString); - - DOMString Rewrap(in DOMString aInString, - in unsigned long aWrapCol, in unsigned long aFirstLineOffset, - in boolean aRespectNewlines); -}; - - diff --git a/editor/libeditor/text/nsInternetCiter.cpp b/editor/libeditor/text/nsInternetCiter.cpp index 50a5ca9b680..bff13373636 100644 --- a/editor/libeditor/text/nsInternetCiter.cpp +++ b/editor/libeditor/text/nsInternetCiter.cpp @@ -58,18 +58,7 @@ const PRUnichar cr('\r'); /** Mail citations using the Internet style: > This is a citation */ - -nsInternetCiter::nsInternetCiter() -{ -} - -nsInternetCiter::~nsInternetCiter() -{ -} - -NS_IMPL_ISUPPORTS1(nsInternetCiter, nsICiter) - -NS_IMETHODIMP +nsresult nsInternetCiter::GetCiteString(const nsAString& aInString, nsAString& aOutString) { aOutString.Truncate(); @@ -155,7 +144,7 @@ nsInternetCiter::StripCitesAndLinebreaks(const nsAString& aInString, return NS_OK; } -NS_IMETHODIMP +nsresult nsInternetCiter::StripCites(const nsAString& aInString, nsAString& aOutString) { return StripCitesAndLinebreaks(aInString, aOutString, PR_FALSE, 0); @@ -188,7 +177,7 @@ static inline PRBool IsSpace(PRUnichar c) return (nsCRT::IsAsciiSpace(c) || (c == nl) || (c == cr) || (c == nbsp)); } -NS_IMETHODIMP +nsresult nsInternetCiter::Rewrap(const nsAString& aInString, PRUint32 aWrapCol, PRUint32 aFirstLineOffset, PRBool aRespectNewlines, diff --git a/editor/libeditor/text/nsInternetCiter.h b/editor/libeditor/text/nsInternetCiter.h index 3738b3f8622..848d99192f7 100644 --- a/editor/libeditor/text/nsInternetCiter.h +++ b/editor/libeditor/text/nsInternetCiter.h @@ -38,33 +38,25 @@ #ifndef nsInternetCiter_h__ #define nsInternetCiter_h__ -#include "nsICiter.h" - #include "nsString.h" /** Mail citations using standard Internet style. */ -class nsInternetCiter : public nsICiter +class nsInternetCiter { public: - nsInternetCiter(); - virtual ~nsInternetCiter(); -//Interfaces for addref and release and queryinterface -//NOTE: Use NS_DECL_ISUPPORTS_INHERITED in any class inherited from nsEditor - NS_DECL_ISUPPORTS + static nsresult GetCiteString(const nsAString & aInString, nsAString & aOutString); - NS_IMETHOD GetCiteString(const nsAString & aInString, nsAString & aOutString); + static nsresult StripCites(const nsAString & aInString, nsAString & aOutString); - NS_IMETHOD StripCites(const nsAString & aInString, nsAString & aOutString); - - NS_IMETHOD Rewrap(const nsAString & aInString, - PRUint32 aWrapCol, PRUint32 aFirstLineOffset, - PRBool aRespectNewlines, - nsAString & aOutString); + static nsresult Rewrap(const nsAString & aInString, + PRUint32 aWrapCol, PRUint32 aFirstLineOffset, + PRBool aRespectNewlines, + nsAString & aOutString); protected: - nsresult StripCitesAndLinebreaks(const nsAString& aInString, nsAString& aOutString, - PRBool aLinebreaksToo, PRInt32* aCiteLevel); + static nsresult StripCitesAndLinebreaks(const nsAString& aInString, nsAString& aOutString, + PRBool aLinebreaksToo, PRInt32* aCiteLevel); }; #endif //nsInternetCiter_h__ diff --git a/editor/libeditor/text/nsPlaintextEditor.cpp b/editor/libeditor/text/nsPlaintextEditor.cpp index aa0968f0ddc..5d4dd431530 100644 --- a/editor/libeditor/text/nsPlaintextEditor.cpp +++ b/editor/libeditor/text/nsPlaintextEditor.cpp @@ -1530,12 +1530,9 @@ nsPlaintextEditor::InsertAsQuotation(const nsAString& aQuotedText, // Protect the edit rules object from dying nsCOMPtr kungFuDeathGrip(mRules); - // We have the text. Cite it appropriately: - nsCOMPtr citer = new nsInternetCiter(); - // Let the citer quote it for us: nsString quotedStuff; - nsresult rv = citer->GetCiteString(aQuotedText, quotedStuff); + nsresult rv = nsInternetCiter::GetCiteString(aQuotedText, quotedStuff); NS_ENSURE_SUCCESS(rv, rv); // It's best to put a blank line after the quoted text so that mails @@ -1630,13 +1627,9 @@ nsPlaintextEditor::Rewrap(PRBool aRespectNewlines) &isCollapsed, current); NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr citer = new nsInternetCiter(); - NS_ENSURE_SUCCESS(rv, rv); - NS_ENSURE_TRUE(citer, NS_ERROR_UNEXPECTED); - nsString wrapped; PRUint32 firstLineOffset = 0; // XXX need to reset this if there is a selection - rv = citer->Rewrap(current, wrapCol, firstLineOffset, aRespectNewlines, + rv = nsInternetCiter::Rewrap(current, wrapCol, firstLineOffset, aRespectNewlines, wrapped); NS_ENSURE_SUCCESS(rv, rv); @@ -1659,11 +1652,8 @@ nsPlaintextEditor::StripCites() &isCollapsed, current); NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr citer = new nsInternetCiter(); - NS_ENSURE_TRUE(citer, NS_ERROR_UNEXPECTED); - nsString stripped; - rv = citer->StripCites(current, stripped); + rv = nsInternetCiter::StripCites(current, stripped); NS_ENSURE_SUCCESS(rv, rv); if (isCollapsed) // rewrap the whole document From d3bdae16245a3fb7f29dcab1eefd71105f31ffdf Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Thu, 31 Mar 2011 07:07:49 -0500 Subject: [PATCH 02/12] 64-bit installer bustage fix, use ';' in comment vs. '//'. a=buildbustage --- browser/installer/windows/nsis/defines.nsi.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/installer/windows/nsis/defines.nsi.in b/browser/installer/windows/nsis/defines.nsi.in index d87a3cb7801..3e92d99cde5 100644 --- a/browser/installer/windows/nsis/defines.nsi.in +++ b/browser/installer/windows/nsis/defines.nsi.in @@ -9,7 +9,7 @@ !define AppName "Firefox" !define AppVersion "@APP_VERSION@" #ifdef HAVE_64BIT_OS -// differentiate 64-bit builds, we do the same in widget. +; differentiate 64-bit builds, we do the same in widget. !define AppUserModelID "${AppVendor}.${AppName}.${AppVersion}.Win64" #else !define AppUserModelID "${AppVendor}.${AppName}.${AppVersion}" From da5dc68d8932f5486f3443941bf6d6bb1a559137 Mon Sep 17 00:00:00 2001 From: Mitchell Field Date: Thu, 31 Mar 2011 23:06:24 +1100 Subject: [PATCH 03/12] Bug 609434 - Don't emit switch statements containing 'default' but no 'case' labels in IPC IPDL files. r=cjones --- ipc/ipdl/ipdl/lower.py | 57 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/ipc/ipdl/ipdl/lower.py b/ipc/ipdl/ipdl/lower.py index 01b490763ab..f2f9739acb3 100644 --- a/ipc/ipdl/ipdl/lower.py +++ b/ipc/ipdl/ipdl/lower.py @@ -3404,35 +3404,36 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor): Decl(listenertype, listenervar.name) ], virtual=1)) - switchontype = StmtSwitch(pvar) - for managee in p.managesStmts: - case = StmtBlock() - actorvar = ExprVar('actor') - manageeipdltype = managee.decl.type - manageecxxtype = _cxxBareType(ipdl.type.ActorType(manageeipdltype), - self.side) - manageearray = p.managedVar(manageeipdltype, self.side) + if not len(p.managesStmts): + removemanagee.addstmts([ _runtimeAbort('unreached'), StmtReturn() ]) + else: + switchontype = StmtSwitch(pvar) + for managee in p.managesStmts: + case = StmtBlock() + actorvar = ExprVar('actor') + manageeipdltype = managee.decl.type + manageecxxtype = _cxxBareType(ipdl.type.ActorType(manageeipdltype), + self.side) + manageearray = p.managedVar(manageeipdltype, self.side) - case.addstmts([ - StmtDecl(Decl(manageecxxtype, actorvar.name), - ExprCast(listenervar, manageecxxtype, static=1)), - _abortIfFalse( - _cxxArrayHasElementSorted(manageearray, actorvar), - "actor not managed by this!"), - Whitespace.NL, - StmtExpr(_callCxxArrayRemoveSorted(manageearray, actorvar)), - StmtExpr(ExprCall(_deallocMethod(manageeipdltype), - args=[ actorvar ])), - StmtReturn() - ]) - switchontype.addcase(CaseLabel(_protocolId(manageeipdltype).name), - case) - - default = StmtBlock() - default.addstmts([ _runtimeAbort('unreached'), StmtReturn() ]) - switchontype.addcase(DefaultLabel(), default) - - removemanagee.addstmt(switchontype) + case.addstmts([ + StmtDecl(Decl(manageecxxtype, actorvar.name), + ExprCast(listenervar, manageecxxtype, static=1)), + _abortIfFalse( + _cxxArrayHasElementSorted(manageearray, actorvar), + "actor not managed by this!"), + Whitespace.NL, + StmtExpr(_callCxxArrayRemoveSorted(manageearray, actorvar)), + StmtExpr(ExprCall(_deallocMethod(manageeipdltype), + args=[ actorvar ])), + StmtReturn() + ]) + switchontype.addcase(CaseLabel(_protocolId(manageeipdltype).name), + case) + default = StmtBlock() + default.addstmts([ _runtimeAbort('unreached'), StmtReturn() ]) + switchontype.addcase(DefaultLabel(), default) + removemanagee.addstmt(switchontype) return [ register, registerid, From a9da7d87b4a330c5adce2bf799f41b56e56fba97 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Thu, 31 Mar 2011 21:26:35 +0900 Subject: [PATCH 04/12] Bug 59109 Part 1: Adding -moz-text-decoration-color and -moz-text-decoration-style r=dbaron, sr=bzbarsky --- dom/interfaces/css/nsIDOMCSS2Properties.idl | 8 +++- layout/base/nsStyleConsts.h | 9 ++++ layout/style/nsCSSKeywordList.h | 1 + layout/style/nsCSSPropList.h | 21 +++++++++ layout/style/nsCSSProps.cpp | 10 ++++ layout/style/nsCSSProps.h | 1 + layout/style/nsComputedDOMStyle.cpp | 33 ++++++++++++- layout/style/nsComputedDOMStyle.h | 2 + layout/style/nsRuleNode.cpp | 46 +++++++++++++++++++ layout/style/nsStyleAnimation.cpp | 21 +++++++++ layout/style/nsStyleContext.cpp | 17 +++++++ layout/style/nsStyleStruct.cpp | 38 ++++++++++++--- layout/style/nsStyleStruct.h | 43 ++++++++++++++++- layout/style/test/property_database.js | 17 +++++++ .../style/test/test_transitions_events.html | 8 ++++ .../test/test_transitions_per_property.html | 2 + 16 files changed, 268 insertions(+), 9 deletions(-) diff --git a/dom/interfaces/css/nsIDOMCSS2Properties.idl b/dom/interfaces/css/nsIDOMCSS2Properties.idl index 46029e5a449..14a5bbd6723 100644 --- a/dom/interfaces/css/nsIDOMCSS2Properties.idl +++ b/dom/interfaces/css/nsIDOMCSS2Properties.idl @@ -50,7 +50,7 @@ * http://www.w3.org/TR/DOM-Level-2-Style */ -[scriptable, uuid(abedfd52-9821-4311-b50c-7ef229b43abf)] +[scriptable, uuid(6b8fda8f-94f6-4d5c-aa77-17c5270f36c7)] interface nsIDOMCSS2Properties : nsISupports { attribute DOMString azimuth; @@ -734,6 +734,12 @@ interface nsIDOMCSS2Properties : nsISupports attribute DOMString backgroundSize; // raises(DOMException) on setting + attribute DOMString MozTextDecorationColor; + // raises(DOMException) on setting + + attribute DOMString MozTextDecorationStyle; + // raises(DOMException) on setting + attribute DOMString MozTransitionProperty; // raises(DOMException) on setting diff --git a/layout/base/nsStyleConsts.h b/layout/base/nsStyleConsts.h index cb59c38ddad..0c12242259c 100644 --- a/layout/base/nsStyleConsts.h +++ b/layout/base/nsStyleConsts.h @@ -626,6 +626,15 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) { #define NS_STYLE_TEXT_DECORATION_OVERRIDE_ALL 0x20 #define NS_STYLE_TEXT_DECORATION_LINES_MASK (NS_STYLE_TEXT_DECORATION_UNDERLINE | NS_STYLE_TEXT_DECORATION_OVERLINE | NS_STYLE_TEXT_DECORATION_LINE_THROUGH) +// See nsStyleText +#define NS_STYLE_TEXT_DECORATION_STYLE_NONE 0 // not in CSS spec, mapped to -moz-none +#define NS_STYLE_TEXT_DECORATION_STYLE_DOTTED 1 +#define NS_STYLE_TEXT_DECORATION_STYLE_DASHED 2 +#define NS_STYLE_TEXT_DECORATION_STYLE_SOLID 3 +#define NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE 4 +#define NS_STYLE_TEXT_DECORATION_STYLE_WAVY 5 +#define NS_STYLE_TEXT_DECORATION_STYLE_MAX NS_STYLE_TEXT_DECORATION_STYLE_WAVY + // See nsStyleText #define NS_STYLE_TEXT_TRANSFORM_NONE 0 #define NS_STYLE_TEXT_TRANSFORM_CAPITALIZE 1 diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index 84b4ac75d86..26883f26d60 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -485,6 +485,7 @@ CSS_KEY(visiblepainted, visiblepainted) CSS_KEY(visiblestroke, visiblestroke) CSS_KEY(w-resize, w_resize) CSS_KEY(wait, wait) +CSS_KEY(wavy, wavy) CSS_KEY(wider, wider) CSS_KEY(window, window) CSS_KEY(windowframe, windowframe) diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 67a23952ec5..ea83a05c5a2 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -2165,6 +2165,27 @@ CSS_PROP_TEXTRESET( kTextDecorationKTable, offsetof(nsStyleTextReset, mTextDecoration), eStyleAnimType_EnumU8) +CSS_PROP_TEXTRESET( + -moz-text-decoration-color, + text_decoration_color, + CSS_PROP_DOMPROP_PREFIXED(TextDecorationColor), + CSS_PROPERTY_PARSE_VALUE | + CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | + CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, + VARIANT_HCK, + kBorderColorKTable, + CSS_PROP_NO_OFFSET, + eStyleAnimType_Custom) +CSS_PROP_TEXTRESET( + -moz-text-decoration-style, + text_decoration_style, + CSS_PROP_DOMPROP_PREFIXED(TextDecorationStyle), + CSS_PROPERTY_PARSE_VALUE | + CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, + VARIANT_HK, + kTextDecorationStyleKTable, + CSS_PROP_NO_OFFSET, + eStyleAnimType_Custom) CSS_PROP_TEXT( text-indent, text_indent, diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 4ade1595460..6e3de9da0a2 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -1238,6 +1238,16 @@ const PRInt32 nsCSSProps::kTextDecorationKTable[] = { eCSSKeyword_UNKNOWN,-1 }; +const PRInt32 nsCSSProps::kTextDecorationStyleKTable[] = { + eCSSKeyword__moz_none, NS_STYLE_TEXT_DECORATION_STYLE_NONE, + eCSSKeyword_solid, NS_STYLE_TEXT_DECORATION_STYLE_SOLID, + eCSSKeyword_double, NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE, + eCSSKeyword_dotted, NS_STYLE_TEXT_DECORATION_STYLE_DOTTED, + eCSSKeyword_dashed, NS_STYLE_TEXT_DECORATION_STYLE_DASHED, + eCSSKeyword_wavy, NS_STYLE_TEXT_DECORATION_STYLE_WAVY, + eCSSKeyword_UNKNOWN,-1 +}; + const PRInt32 nsCSSProps::kTextTransformKTable[] = { eCSSKeyword_none, NS_STYLE_TEXT_TRANSFORM_NONE, eCSSKeyword_capitalize, NS_STYLE_TEXT_TRANSFORM_CAPITALIZE, diff --git a/layout/style/nsCSSProps.h b/layout/style/nsCSSProps.h index 56d1a763aab..889d0491538 100644 --- a/layout/style/nsCSSProps.h +++ b/layout/style/nsCSSProps.h @@ -402,6 +402,7 @@ public: static const PRInt32 kTableLayoutKTable[]; static const PRInt32 kTextAlignKTable[]; static const PRInt32 kTextDecorationKTable[]; + static const PRInt32 kTextDecorationStyleKTable[]; static const PRInt32 kTextTransformKTable[]; static const PRInt32 kTransitionTimingFunctionKTable[]; static const PRInt32 kUnicodeBidiKTable[]; diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 0dc4d817437..c83d1468405 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -2284,6 +2284,35 @@ nsComputedDOMStyle::DoGetTextDecoration() return val; } +nsIDOMCSSValue* +nsComputedDOMStyle::DoGetMozTextDecorationColor() +{ + nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue(); + + nscolor color; + PRBool isForeground; + GetStyleTextReset()->GetDecorationColor(color, isForeground); + if (isForeground) { + color = GetStyleColor()->mColor; + } + + SetToRGBAColor(val, color); + + return val; +} + +nsIDOMCSSValue* +nsComputedDOMStyle::DoGetMozTextDecorationStyle() +{ + nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue(); + + val->SetIdent( + nsCSSProps::ValueToKeywordEnum(GetStyleTextReset()->GetDecorationStyle(), + nsCSSProps::kTextDecorationStyleKTable)); + + return val; +} + nsIDOMCSSValue* nsComputedDOMStyle::DoGetTextIndent() { @@ -4114,7 +4143,9 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength) COMPUTED_STYLE_MAP_ENTRY(stroke_opacity, StrokeOpacity), COMPUTED_STYLE_MAP_ENTRY(stroke_width, StrokeWidth), COMPUTED_STYLE_MAP_ENTRY(text_anchor, TextAnchor), - COMPUTED_STYLE_MAP_ENTRY(text_rendering, TextRendering) + COMPUTED_STYLE_MAP_ENTRY(text_rendering, TextRendering), + COMPUTED_STYLE_MAP_ENTRY(text_decoration_color, MozTextDecorationColor), + COMPUTED_STYLE_MAP_ENTRY(text_decoration_style, MozTextDecorationStyle) }; diff --git a/layout/style/nsComputedDOMStyle.h b/layout/style/nsComputedDOMStyle.h index d1333f8aec6..6be79e04c18 100644 --- a/layout/style/nsComputedDOMStyle.h +++ b/layout/style/nsComputedDOMStyle.h @@ -307,6 +307,8 @@ private: nsIDOMCSSValue* DoGetLineHeight(); nsIDOMCSSValue* DoGetTextAlign(); nsIDOMCSSValue* DoGetTextDecoration(); + nsIDOMCSSValue* DoGetMozTextDecorationColor(); + nsIDOMCSSValue* DoGetMozTextDecorationStyle(); nsIDOMCSSValue* DoGetTextIndent(); nsIDOMCSSValue* DoGetTextTransform(); nsIDOMCSSValue* DoGetTextShadow(); diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 5db62a1ad43..e3ba8974626 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -3397,6 +3397,52 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, text->mTextDecoration = NS_STYLE_TEXT_DECORATION_NONE; } + // text-decoration-color: color, string, enum, inherit, initial + const nsCSSValue* decorationColorValue = + aRuleData->ValueForTextDecorationColor(); + nscolor decorationColor; + if (eCSSUnit_Inherit == decorationColorValue->GetUnit()) { + canStoreInRuleTree = PR_FALSE; + if (parentContext) { + PRBool isForeground; + parentText->GetDecorationColor(decorationColor, isForeground); + if (isForeground) { + text->SetDecorationColor(parentContext->GetStyleColor()->mColor); + } else { + text->SetDecorationColor(decorationColor); + } + } else { + text->SetDecorationColorToForeground(); + } + } + else if (SetColor(*decorationColorValue, 0, mPresContext, aContext, + decorationColor, canStoreInRuleTree)) { + text->SetDecorationColor(decorationColor); + } + else if (eCSSUnit_Initial == decorationColorValue->GetUnit() || + eCSSUnit_Enumerated == decorationColorValue->GetUnit()) { + NS_ABORT_IF_FALSE(eCSSUnit_Enumerated != decorationColorValue->GetUnit() || + decorationColorValue->GetIntValue() == + NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR, + "unexpected enumerated value"); + text->SetDecorationColorToForeground(); + } + else if (eCSSUnit_Initial == decorationColorValue->GetUnit()) { + text->SetDecorationColorToForeground(); + } + + // text-decoration-style: enum, inherit, initial + const nsCSSValue* decorationStyleValue = + aRuleData->ValueForTextDecorationStyle(); + if (eCSSUnit_Enumerated == decorationStyleValue->GetUnit()) { + text->SetDecorationStyle(decorationStyleValue->GetIntValue()); + } else if (eCSSUnit_Inherit == decorationStyleValue->GetUnit()) { + text->SetDecorationStyle(parentText->GetDecorationStyle()); + canStoreInRuleTree = PR_FALSE; + } else if (eCSSUnit_Initial == decorationStyleValue->GetUnit()) { + text->SetDecorationStyle(NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + } + // unicode-bidi: enum, inherit, initial SetDiscrete(*aRuleData->ValueForUnicodeBidi(), text->mUnicodeBidi, canStoreInRuleTree, SETDSC_ENUMERATED, parentText->mUnicodeBidi, diff --git a/layout/style/nsStyleAnimation.cpp b/layout/style/nsStyleAnimation.cpp index 7c09954f45d..48c842f06e9 100644 --- a/layout/style/nsStyleAnimation.cpp +++ b/layout/style/nsStyleAnimation.cpp @@ -2250,6 +2250,27 @@ nsStyleAnimation::ExtractComputedValue(nsCSSProperty aProperty, break; } + case eCSSProperty_text_decoration_color: { + const nsStyleTextReset *styleTextReset = + static_cast(styleStruct); + nscolor color; + PRBool isForeground; + styleTextReset->GetDecorationColor(color, isForeground); + if (isForeground) { + color = aStyleContext->GetStyleColor()->mColor; + } + aComputedValue.SetColorValue(color); + break; + } + + case eCSSProperty_text_decoration_style: { + PRUint8 decorationStyle = + static_cast(styleStruct)-> + GetDecorationStyle(); + aComputedValue.SetIntValue(decorationStyle, eUnit_Enumerated); + break; + } + case eCSSProperty_border_spacing: { const nsStyleTableBorder *styleTableBorder = static_cast(styleStruct); diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp index f5415751790..78561c82b4c 100644 --- a/layout/style/nsStyleContext.cpp +++ b/layout/style/nsStyleContext.cpp @@ -565,6 +565,22 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aOther) } } + // NB: Calling Peek on |this|, not |thisVis| (see above). + if (!change && PeekStyleTextReset()) { + const nsStyleTextReset *thisVisTextReset = thisVis->GetStyleTextReset(); + const nsStyleTextReset *otherVisTextReset = otherVis->GetStyleTextReset(); + nscolor thisVisDecColor, otherVisDecColor; + PRBool thisVisDecColorIsFG, otherVisDecColorIsFG; + thisVisTextReset->GetDecorationColor(thisVisDecColor, + thisVisDecColorIsFG); + otherVisTextReset->GetDecorationColor(otherVisDecColor, + otherVisDecColorIsFG); + if (thisVisDecColorIsFG != otherVisDecColorIsFG || + (!thisVisDecColorIsFG && thisVisDecColor != otherVisDecColor)) { + change = PR_TRUE; + } + } + // NB: Calling Peek on |this|, not |thisVis| (see above). if (!change && PeekStyleSVG()) { const nsStyleSVG *thisVisSVG = thisVis->GetStyleSVG(); @@ -726,6 +742,7 @@ nsStyleContext::GetVisitedDependentColor(nsCSSProperty aProperty) aProperty == eCSSProperty_border_left_color_value || aProperty == eCSSProperty_outline_color || aProperty == eCSSProperty__moz_column_rule_color || + aProperty == eCSSProperty_text_decoration_color || aProperty == eCSSProperty_fill || aProperty == eCSSProperty_stroke, "we need to add to nsStyleContext::CalcStyleDifference"); diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 852cf687ddf..ab09478044c 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -2531,6 +2531,9 @@ nsStyleTextReset::nsStyleTextReset(void) MOZ_COUNT_CTOR(nsStyleTextReset); mVerticalAlign.SetIntValue(NS_STYLE_VERTICAL_ALIGN_BASELINE, eStyleUnit_Enumerated); mTextDecoration = NS_STYLE_TEXT_DECORATION_NONE; + mTextDecorationColor = NS_RGB(0,0,0); + mTextDecorationStyle = + NS_STYLE_TEXT_DECORATION_STYLE_SOLID | BORDER_COLOR_FOREGROUND; mUnicodeBidi = NS_STYLE_UNICODE_BIDI_NORMAL; } @@ -2549,12 +2552,35 @@ nsChangeHint nsStyleTextReset::CalcDifference(const nsStyleTextReset& aOther) co { if (mVerticalAlign == aOther.mVerticalAlign && mUnicodeBidi == aOther.mUnicodeBidi) { - if (mTextDecoration != aOther.mTextDecoration) { - // Reflow for blink changes, repaint for others - return - (mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK) == - (aOther.mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK) ? - NS_STYLE_HINT_VISUAL : NS_STYLE_HINT_REFLOW; + PRUint8 lineStyle = GetDecorationStyle(); + PRUint8 otherLineStyle = aOther.GetDecorationStyle(); + if (mTextDecoration != aOther.mTextDecoration || + lineStyle != otherLineStyle) { + // Reflow for blink changes + if ((mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK) != + (aOther.mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK)) { + return NS_STYLE_HINT_REFLOW; + } + // Reflow for decoration line style changes only to or from double or + // wave because that may cause overflow area changes + if (lineStyle == NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE || + lineStyle == NS_STYLE_TEXT_DECORATION_STYLE_WAVY || + otherLineStyle == NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE || + otherLineStyle == NS_STYLE_TEXT_DECORATION_STYLE_WAVY) { + return NS_STYLE_HINT_REFLOW; + } + // Repaint for other style decoration lines because they must be in + // default overflow rect + return NS_STYLE_HINT_VISUAL; + } + + // Repaint for decoration color changes + nscolor decColor, otherDecColor; + PRBool isFG, otherIsFG; + GetDecorationColor(decColor, isFG); + aOther.GetDecorationColor(otherDecColor, otherIsFG); + if (isFG != otherIsFG || (!isFG && decColor != otherDecColor)) { + return NS_STYLE_HINT_VISUAL; } return NS_STYLE_HINT_NONE; diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index a050c5e7c30..0625ee3668d 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -1165,16 +1165,57 @@ struct nsStyleTextReset { aContext->FreeToShell(sizeof(nsStyleTextReset), this); } + PRUint8 GetDecorationStyle() const + { + return (mTextDecorationStyle & BORDER_STYLE_MASK); + } + + void SetDecorationStyle(PRUint8 aStyle) + { + NS_ABORT_IF_FALSE((aStyle & BORDER_STYLE_MASK) == aStyle, + "style doesn't fit"); + mTextDecorationStyle &= ~BORDER_STYLE_MASK; + mTextDecorationStyle |= (aStyle & BORDER_STYLE_MASK); + } + + void GetDecorationColor(nscolor& aColor, PRBool& aForeground) const + { + aForeground = PR_FALSE; + if ((mTextDecorationStyle & BORDER_COLOR_SPECIAL) == 0) { + aColor = mTextDecorationColor; + } else if (mTextDecorationStyle & BORDER_COLOR_FOREGROUND) { + aForeground = PR_TRUE; + } else { + NS_NOTREACHED("OUTLINE_COLOR_INITIAL should not be set here"); + } + } + + void SetDecorationColor(nscolor aColor) + { + mTextDecorationColor = aColor; + mTextDecorationStyle &= ~BORDER_COLOR_SPECIAL; + } + + void SetDecorationColorToForeground() + { + mTextDecorationStyle &= ~BORDER_COLOR_SPECIAL; + mTextDecorationStyle |= BORDER_COLOR_FOREGROUND; + } + nsChangeHint CalcDifference(const nsStyleTextReset& aOther) const; #ifdef DEBUG static nsChangeHint MaxDifference(); #endif static PRBool ForceCompare() { return PR_FALSE; } + nsStyleCoord mVerticalAlign; // [reset] coord, percent, calc, enum (see nsStyleConsts.h) + PRUint8 mTextDecoration; // [reset] see nsStyleConsts.h PRUint8 mUnicodeBidi; // [reset] see nsStyleConsts.h +protected: + PRUint8 mTextDecorationStyle; // [reset] see nsStyleConsts.h - nsStyleCoord mVerticalAlign; // [reset] coord, percent, calc, enum (see nsStyleConsts.h) + nscolor mTextDecorationColor; // [reset] the colors to use for a decoration lines, not used at currentColor }; struct nsStyleText { diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index f1344cc17ee..7e0fa3fafdd 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -2522,6 +2522,23 @@ var gCSSProperties = { other_values: [ "underline", "overline", "line-through", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ], invalid_values: [ "underline none", "none underline", "line-through blink line-through" ] }, + "-moz-text-decoration-color": { + domProp: "MozTextDecorationColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "black" }, + initial_values: [ "currentColor", "-moz-use-text-color" ], + other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ] + }, + "-moz-text-decoration-style": { + domProp: "MozTextDecorationStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "solid" ], + other_values: [ "double", "dotted", "dashed", "wavy", "-moz-none" ], + invalid_values: [ "none", "groove", "ridge", "inset", "outset", "solid dashed", "wave" ] + }, "text-indent": { domProp: "textIndent", inherited: true, diff --git a/layout/style/test/test_transitions_events.html b/layout/style/test/test_transitions_events.html index 3317a0e1dd9..9835a5e9d70 100644 --- a/layout/style/test/test_transitions_events.html +++ b/layout/style/test/test_transitions_events.html @@ -21,6 +21,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=531585 -moz-transition: 500ms color; border-color: black; /* don't derive from color */ -moz-column-rule-color: black; /* don't derive from color */ + -moz-text-decoration-color: black; /* don't derive from color */ } #four { @@ -71,6 +72,7 @@ var got_one_target_borderright = false; var got_one_target_borderbottom = false; var got_one_target_borderleft = false; var got_one_target_columnrule = false; +var got_one_target_textdecorationcolor = false; var got_two_target = false; var got_three_top = false; var got_three_right = false; @@ -167,6 +169,12 @@ $("one").addEventListener("transitionend", got_one_target_columnrule = true; event.stopPropagation(); break; + case "-moz-text-decoration-color": + ok(!got_one_target_textdecorationcolor, + "transitionend on one on target (-moz-text-decoration-color)"); + got_one_target_textdecorationcolor = true; + event.stopPropagation(); + break; default: ok(false, "unexpected property name " + event.propertyName + " for transitionend on one on target"); diff --git a/layout/style/test/test_transitions_per_property.html b/layout/style/test/test_transitions_per_property.html index 3a1e4cfbb4d..61defdb0b09 100644 --- a/layout/style/test/test_transitions_per_property.html +++ b/layout/style/test/test_transitions_per_property.html @@ -68,6 +68,8 @@ var supported_properties = { "-moz-outline-radius-bottomright": [ test_radius_transition ], "-moz-outline-radius-topleft": [ test_radius_transition ], "-moz-outline-radius-topright": [ test_radius_transition ], + "-moz-text-decoration-color": [ test_color_transition, + test_border_color_transition ], "-moz-transform": [ test_transform_transition ], "-moz-transform-origin": [ test_length_pair_transition, test_length_percent_pair_transition ], From 130f40e0282f419bb0408589ac04a03d15426673 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Thu, 31 Mar 2011 21:26:49 +0900 Subject: [PATCH 05/12] Bug 59109 Part 2: Cleaning up current text decoration implementation r=dbaron --- layout/base/nsCSSRendering.cpp | 33 ++++++++-------- layout/base/nsCSSRendering.h | 17 ++------- layout/generic/nsBlockFrame.cpp | 2 +- layout/generic/nsHTMLContainerFrame.cpp | 8 ++-- layout/generic/nsTextFrameThebes.cpp | 51 +++++-------------------- layout/xul/base/src/nsTextBoxFrame.cpp | 6 +-- widget/public/nsGUIEvent.h | 13 ++++--- widget/public/nsILookAndFeel.h | 14 ------- widget/src/android/nsLookAndFeel.cpp | 3 +- widget/src/cocoa/nsLookAndFeel.mm | 5 ++- widget/src/gtk2/nsLookAndFeel.cpp | 7 ++-- widget/src/os2/nsLookAndFeel.cpp | 9 +++-- widget/src/qt/nsLookAndFeel.cpp | 3 +- widget/src/windows/nsLookAndFeel.cpp | 7 ++-- 14 files changed, 65 insertions(+), 113 deletions(-) diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index a8ebbfe3904..20e49e26a3c 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -3415,7 +3415,7 @@ nsCSSRendering::PaintDecorationLine(gfxContext* aGfxContext, const PRUint8 aStyle, const gfxFloat aDescentLimit) { - NS_ASSERTION(aStyle != DECORATION_STYLE_NONE, "aStyle is none"); + NS_ASSERTION(aStyle != NS_STYLE_TEXT_DECORATION_STYLE_NONE, "aStyle is none"); gfxRect rect = GetTextDecorationRectInternal(aPt, aLineSize, aAscent, aOffset, @@ -3438,12 +3438,12 @@ nsCSSRendering::PaintDecorationLine(gfxContext* aGfxContext, nsRefPtr oldPattern; switch (aStyle) { - case DECORATION_STYLE_SOLID: - case DECORATION_STYLE_DOUBLE: + case NS_STYLE_TEXT_DECORATION_STYLE_SOLID: + case NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE: oldLineWidth = aGfxContext->CurrentLineWidth(); oldPattern = aGfxContext->GetPattern(); break; - case DECORATION_STYLE_DASHED: { + case NS_STYLE_TEXT_DECORATION_STYLE_DASHED: { aGfxContext->Save(); contextIsSaved = PR_TRUE; aGfxContext->Clip(rect); @@ -3455,7 +3455,7 @@ nsCSSRendering::PaintDecorationLine(gfxContext* aGfxContext, rect.size.width += dashWidth; break; } - case DECORATION_STYLE_DOTTED: { + case NS_STYLE_TEXT_DECORATION_STYLE_DOTTED: { aGfxContext->Save(); contextIsSaved = PR_TRUE; aGfxContext->Clip(rect); @@ -3474,7 +3474,7 @@ nsCSSRendering::PaintDecorationLine(gfxContext* aGfxContext, rect.size.width += dashWidth; break; } - case DECORATION_STYLE_WAVY: + case NS_STYLE_TEXT_DECORATION_STYLE_WAVY: aGfxContext->Save(); contextIsSaved = PR_TRUE; aGfxContext->Clip(rect); @@ -3498,13 +3498,13 @@ nsCSSRendering::PaintDecorationLine(gfxContext* aGfxContext, aGfxContext->SetColor(gfxRGBA(aColor)); aGfxContext->SetLineWidth(lineHeight); switch (aStyle) { - case DECORATION_STYLE_SOLID: + case NS_STYLE_TEXT_DECORATION_STYLE_SOLID: aGfxContext->NewPath(); aGfxContext->MoveTo(rect.TopLeft()); aGfxContext->LineTo(rect.TopRight()); aGfxContext->Stroke(); break; - case DECORATION_STYLE_DOUBLE: + case NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE: /** * We are drawing double line as: * @@ -3527,14 +3527,14 @@ nsCSSRendering::PaintDecorationLine(gfxContext* aGfxContext, aGfxContext->LineTo(rect.BottomRight()); aGfxContext->Stroke(); break; - case DECORATION_STYLE_DOTTED: - case DECORATION_STYLE_DASHED: + case NS_STYLE_TEXT_DECORATION_STYLE_DOTTED: + case NS_STYLE_TEXT_DECORATION_STYLE_DASHED: aGfxContext->NewPath(); aGfxContext->MoveTo(rect.TopLeft()); aGfxContext->LineTo(rect.TopRight()); aGfxContext->Stroke(); break; - case DECORATION_STYLE_WAVY: { + case NS_STYLE_TEXT_DECORATION_STYLE_WAVY: { /** * We are drawing wavy line as: * @@ -3616,7 +3616,7 @@ nsCSSRendering::GetTextDecorationRect(nsPresContext* aPresContext, const gfxFloat aDescentLimit) { NS_ASSERTION(aPresContext, "aPresContext is null"); - NS_ASSERTION(aStyle != DECORATION_STYLE_NONE, "aStyle is none"); + NS_ASSERTION(aStyle != NS_STYLE_TEXT_DECORATION_STYLE_NONE, "aStyle is none"); gfxRect rect = GetTextDecorationRectInternal(gfxPoint(0, 0), aLineSize, aAscent, aOffset, @@ -3639,9 +3639,10 @@ nsCSSRendering::GetTextDecorationRectInternal(const gfxPoint& aPt, const PRUint8 aStyle, const gfxFloat aDescentLimit) { - NS_ASSERTION(aStyle <= DECORATION_STYLE_WAVY, "Invalid aStyle value"); + NS_ASSERTION(aStyle <= NS_STYLE_TEXT_DECORATION_STYLE_WAVY, + "Invalid aStyle value"); - if (aStyle == DECORATION_STYLE_NONE) + if (aStyle == NS_STYLE_TEXT_DECORATION_STYLE_NONE) return gfxRect(0, 0, 0, 0); PRBool canLiftUnderline = aDescentLimit >= 0.0; @@ -3658,7 +3659,7 @@ nsCSSRendering::GetTextDecorationRectInternal(const gfxPoint& aPt, gfxFloat suggestedMaxRectHeight = NS_MAX(NS_MIN(ascent, descentLimit), 1.0); r.size.height = lineHeight; - if (aStyle == DECORATION_STYLE_DOUBLE) { + if (aStyle == NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE) { /** * We will draw double line as: * @@ -3684,7 +3685,7 @@ nsCSSRendering::GetTextDecorationRectInternal(const gfxPoint& aPt, r.size.height = NS_MAX(suggestedMaxRectHeight, lineHeight * 2.0 + 1.0); } } - } else if (aStyle == DECORATION_STYLE_WAVY) { + } else if (aStyle == NS_STYLE_TEXT_DECORATION_STYLE_WAVY) { /** * We will draw wavy line as: * diff --git a/layout/base/nsCSSRendering.h b/layout/base/nsCSSRendering.h index ff7718187af..37112cf7059 100644 --- a/layout/base/nsCSSRendering.h +++ b/layout/base/nsCSSRendering.h @@ -286,15 +286,6 @@ struct nsCSSRendering { PRUint8 aEndBevelSide = 0, nscoord aEndBevelOffset = 0); - enum { - DECORATION_STYLE_NONE = 0, - DECORATION_STYLE_SOLID = 1, - DECORATION_STYLE_DOTTED = 2, - DECORATION_STYLE_DASHED = 3, - DECORATION_STYLE_DOUBLE = 4, - DECORATION_STYLE_WAVY = 5 - }; - /** * Function for painting the decoration lines for the text. * NOTE: aPt, aLineSize, aAscent and aOffset are non-rounded device pixels, @@ -313,8 +304,8 @@ struct nsCSSRendering { * NS_STYLE_TEXT_DECORATION_UNDERLINE or * NS_STYLE_TEXT_DECORATION_OVERLINE or * NS_STYLE_TEXT_DECORATION_LINE_THROUGH. - * @param aStyle the style of the decoration line (See above - * enum names). + * @param aStyle the style of the decoration line such as + * NS_STYLE_TEXT_DECORATION_STYLE_*. * @param aDescentLimit If aDescentLimit is zero or larger and the * underline overflows from the descent space, * the underline should be lifted up as far as @@ -353,8 +344,8 @@ struct nsCSSRendering { * NS_STYLE_TEXT_DECORATION_UNDERLINE or * NS_STYLE_TEXT_DECORATION_OVERLINE or * NS_STYLE_TEXT_DECORATION_LINE_THROUGH. - * @param aStyle the style of the decoration line (See above - * enum names). + * @param aStyle the style of the decoration line such as + * NS_STYLE_TEXT_DECORATION_STYLE_*. * @param aDescentLimit If aDescentLimit is zero or larger and the * underline overflows from the descent space, * the underline should be lifted up as far as diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 04d1437ce6f..2f35f296630 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -6096,7 +6096,7 @@ nsBlockFrame::PaintTextDecorationLine(gfxContext* aCtx, nsCSSRendering::PaintDecorationLine( aCtx, aColor, pt, size, PresContext()->AppUnitsToGfxUnits(aLine->GetAscent()), - aOffset, aDecoration, nsCSSRendering::DECORATION_STYLE_SOLID); + aOffset, aDecoration, NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } } diff --git a/layout/generic/nsHTMLContainerFrame.cpp b/layout/generic/nsHTMLContainerFrame.cpp index dc73723bd19..361f1d5b426 100644 --- a/layout/generic/nsHTMLContainerFrame.cpp +++ b/layout/generic/nsHTMLContainerFrame.cpp @@ -244,21 +244,21 @@ nsDisplayTextShadow::Paint(nsDisplayListBuilder* aBuilder, underlineRect = nsCSSRendering::GetTextDecorationRect(presContext, size, ascent, underlineOffset, NS_STYLE_TEXT_DECORATION_UNDERLINE, - nsCSSRendering::DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } if (mDecorationFlags & NS_STYLE_TEXT_DECORATION_OVERLINE) { gfxSize size(lineWidth, metrics.underlineSize); overlineRect = nsCSSRendering::GetTextDecorationRect(presContext, size, ascent, metrics.maxAscent, NS_STYLE_TEXT_DECORATION_OVERLINE, - nsCSSRendering::DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } if (mDecorationFlags & NS_STYLE_TEXT_DECORATION_LINE_THROUGH) { gfxSize size(lineWidth, metrics.strikeoutSize); lineThroughRect = nsCSSRendering::GetTextDecorationRect(presContext, size, ascent, metrics.strikeoutOffset, NS_STYLE_TEXT_DECORATION_LINE_THROUGH, - nsCSSRendering::DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } for (PRUint32 i = shadowList->Length(); i > 0; --i) { @@ -442,7 +442,7 @@ nsHTMLContainerFrame::PaintTextDecorationLine( PresContext()->AppUnitsToGfxUnits(bp.top + aPt.y)); gfxSize size(PresContext()->AppUnitsToGfxUnits(innerWidth), aSize); nsCSSRendering::PaintDecorationLine(aCtx, aColor, pt, size, aAscent, aOffset, - aDecoration, nsCSSRendering::DECORATION_STYLE_SOLID); + aDecoration, NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } /*virtual*/ void diff --git a/layout/generic/nsTextFrameThebes.cpp b/layout/generic/nsTextFrameThebes.cpp index 34d2a6a9ecf..2b38ee6daf0 100644 --- a/layout/generic/nsTextFrameThebes.cpp +++ b/layout/generic/nsTextFrameThebes.cpp @@ -3465,15 +3465,6 @@ static StyleIDs SelectionStyleIDs[] = { nsILookAndFeel::eMetricFloat_SpellCheckerUnderlineRelativeSize } }; -static PRUint8 sUnderlineStyles[] = { - nsCSSRendering::DECORATION_STYLE_NONE, // NS_UNDERLINE_STYLE_NONE 0 - nsCSSRendering::DECORATION_STYLE_DOTTED, // NS_UNDERLINE_STYLE_DOTTED 1 - nsCSSRendering::DECORATION_STYLE_DASHED, // NS_UNDERLINE_STYLE_DASHED 2 - nsCSSRendering::DECORATION_STYLE_SOLID, // NS_UNDERLINE_STYLE_SOLID 3 - nsCSSRendering::DECORATION_STYLE_DOUBLE, // NS_UNDERLINE_STYLE_DOUBLE 4 - nsCSSRendering::DECORATION_STYLE_WAVY // NS_UNDERLINE_STYLE_WAVY 5 -}; - void nsTextPaintStyle::InitSelectionStyle(PRInt32 aIndex) { @@ -3546,9 +3537,9 @@ nsTextPaintStyle::GetSelectionUnderline(nsPresContext* aPresContext, look->GetColor(styleID.mLine, color); look->GetMetric(styleID.mLineStyle, style); - if (!NS_IS_VALID_UNDERLINE_STYLE(style)) { + if (style > NS_STYLE_TEXT_DECORATION_STYLE_MAX) { NS_ERROR("Invalid underline style value is specified"); - style = NS_UNDERLINE_STYLE_SOLID; + style = NS_STYLE_TEXT_DECORATION_STYLE_SOLID; } look->GetMetric(styleID.mLineRelativeSize, size); @@ -3558,9 +3549,9 @@ nsTextPaintStyle::GetSelectionUnderline(nsPresContext* aPresContext, *aLineColor = color; } *aRelativeSize = size; - *aStyle = sUnderlineStyles[style]; + *aStyle = style; - return sUnderlineStyles[style] != nsCSSRendering::DECORATION_STYLE_NONE && + return style != NS_STYLE_TEXT_DECORATION_STYLE_NONE && color != NS_TRANSPARENT && size > 0.0f; } @@ -4394,7 +4385,7 @@ nsTextFrame::PaintTextDecorations(gfxContext* aCtx, const gfxRect& aDirtyRect, nsCSSRendering::PaintDecorationLine( aCtx, lineColor, pt, size, ascent, fontMetrics.maxAscent, NS_STYLE_TEXT_DECORATION_OVERLINE, - nsCSSRendering::DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } if (decorations.HasUnderline()) { lineColor = aOverrideColor ? *aOverrideColor : decorations.mUnderColor; @@ -4403,7 +4394,7 @@ nsTextFrame::PaintTextDecorations(gfxContext* aCtx, const gfxRect& aDirtyRect, nsCSSRendering::PaintDecorationLine( aCtx, lineColor, pt, size, ascent, offset, NS_STYLE_TEXT_DECORATION_UNDERLINE, - nsCSSRendering::DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } if (decorations.HasStrikeout()) { lineColor = aOverrideColor ? *aOverrideColor : decorations.mStrikeColor; @@ -4412,7 +4403,7 @@ nsTextFrame::PaintTextDecorations(gfxContext* aCtx, const gfxRect& aDirtyRect, nsCSSRendering::PaintDecorationLine( aCtx, lineColor, pt, size, ascent, offset, NS_STYLE_TEXT_DECORATION_LINE_THROUGH, - nsCSSRendering::DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } } @@ -4440,30 +4431,6 @@ static const SelectionType SelectionTypesWithDecorations = nsISelectionController::SELECTION_IME_CONVERTEDTEXT | nsISelectionController::SELECTION_IME_SELECTEDCONVERTEDTEXT; -static PRUint8 -GetTextDecorationStyle(const nsTextRangeStyle &aRangeStyle) -{ - NS_PRECONDITION(aRangeStyle.IsLineStyleDefined(), - "aRangeStyle.mLineStyle have to be defined"); - switch (aRangeStyle.mLineStyle) { - case nsTextRangeStyle::LINESTYLE_NONE: - return nsCSSRendering::DECORATION_STYLE_NONE; - case nsTextRangeStyle::LINESTYLE_SOLID: - return nsCSSRendering::DECORATION_STYLE_SOLID; - case nsTextRangeStyle::LINESTYLE_DOTTED: - return nsCSSRendering::DECORATION_STYLE_DOTTED; - case nsTextRangeStyle::LINESTYLE_DASHED: - return nsCSSRendering::DECORATION_STYLE_DASHED; - case nsTextRangeStyle::LINESTYLE_DOUBLE: - return nsCSSRendering::DECORATION_STYLE_DOUBLE; - case nsTextRangeStyle::LINESTYLE_WAVY: - return nsCSSRendering::DECORATION_STYLE_WAVY; - default: - NS_WARNING("Requested underline style is not valid"); - return nsCSSRendering::DECORATION_STYLE_SOLID; - } -} - static gfxFloat ComputeSelectionUnderlineHeight(nsPresContext* aPresContext, const gfxFont::Metrics& aFontMetrics, @@ -4549,7 +4516,7 @@ static void DrawSelectionDecorations(gfxContext* aContext, SelectionType aType, if (aRangeStyle.mLineStyle == nsTextRangeStyle::LINESTYLE_NONE) { return; } - style = GetTextDecorationStyle(aRangeStyle); + style = aRangeStyle.mLineStyle; relativeSize = aRangeStyle.mIsBoldLine ? 2.0f : 1.0f; } else if (!weDefineSelectionUnderline) { // There is no underline style definition. @@ -5358,7 +5325,7 @@ nsTextFrame::CombineSelectionUnderlineRect(nsPresContext* aPresContext, rangeStyle.mLineStyle == nsTextRangeStyle::LINESTYLE_NONE) { continue; } - style = GetTextDecorationStyle(rangeStyle); + style = rangeStyle.mLineStyle; relativeSize = rangeStyle.mIsBoldLine ? 2.0f : 1.0f; } else if (!nsTextPaintStyle::GetSelectionUnderline(aPresContext, index, nsnull, &relativeSize, diff --git a/layout/xul/base/src/nsTextBoxFrame.cpp b/layout/xul/base/src/nsTextBoxFrame.cpp index 1b151f5eed3..3145bff3a9e 100644 --- a/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/layout/xul/base/src/nsTextBoxFrame.cpp @@ -493,14 +493,14 @@ nsTextBoxFrame::DrawText(nsIRenderingContext& aRenderingContext, pt, gfxSize(width, sizePixel), ascentPixel, offsetPixel, NS_STYLE_TEXT_DECORATION_UNDERLINE, - nsCSSRendering::DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } if (decorations & NS_FONT_DECORATION_OVERLINE) { nsCSSRendering::PaintDecorationLine(ctx, overColor, pt, gfxSize(width, sizePixel), ascentPixel, ascentPixel, NS_STYLE_TEXT_DECORATION_OVERLINE, - nsCSSRendering::DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } } @@ -584,7 +584,7 @@ nsTextBoxFrame::DrawText(nsIRenderingContext& aRenderingContext, nsCSSRendering::PaintDecorationLine(ctx, strikeColor, pt, gfxSize(width, sizePixel), ascentPixel, offsetPixel, NS_STYLE_TEXT_DECORATION_LINE_THROUGH, - nsCSSRendering::DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_STYLE_SOLID); } } diff --git a/widget/public/nsGUIEvent.h b/widget/public/nsGUIEvent.h index d834f3f2096..95add4b0d09 100644 --- a/widget/public/nsGUIEvent.h +++ b/widget/public/nsGUIEvent.h @@ -59,6 +59,7 @@ #include "nsTraceRefcnt.h" #include "nsITransferable.h" #include "nsIVariant.h" +#include "nsStyleConsts.h" namespace mozilla { namespace dom { @@ -949,12 +950,12 @@ public: struct nsTextRangeStyle { enum { - LINESTYLE_NONE = 0, - LINESTYLE_SOLID = 1, - LINESTYLE_DOTTED = 2, - LINESTYLE_DASHED = 3, - LINESTYLE_DOUBLE = 4, - LINESTYLE_WAVY = 5 + LINESTYLE_NONE = NS_STYLE_TEXT_DECORATION_STYLE_NONE, + LINESTYLE_SOLID = NS_STYLE_TEXT_DECORATION_STYLE_SOLID, + LINESTYLE_DOTTED = NS_STYLE_TEXT_DECORATION_STYLE_DOTTED, + LINESTYLE_DASHED = NS_STYLE_TEXT_DECORATION_STYLE_DASHED, + LINESTYLE_DOUBLE = NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE, + LINESTYLE_WAVY = NS_STYLE_TEXT_DECORATION_STYLE_WAVY }; enum { diff --git a/widget/public/nsILookAndFeel.h b/widget/public/nsILookAndFeel.h index 44c542c43c6..5d79c3f77ef 100644 --- a/widget/public/nsILookAndFeel.h +++ b/widget/public/nsILookAndFeel.h @@ -426,20 +426,6 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsILookAndFeel, NS_ILOOKANDFEEL_IID) (c) == NS_SAME_AS_FOREGROUND_COLOR || \ (c) == NS_40PERCENT_FOREGROUND_COLOR) -// ------------------------------------------------- -// Underline styles for eMetric_IME*UnderlineStyle -// ------------------------------------------------- - -#define NS_UNDERLINE_STYLE_NONE 0 -#define NS_UNDERLINE_STYLE_DOTTED 1 -#define NS_UNDERLINE_STYLE_DASHED 2 -#define NS_UNDERLINE_STYLE_SOLID 3 -#define NS_UNDERLINE_STYLE_DOUBLE 4 -#define NS_UNDERLINE_STYLE_WAVY 5 - -#define NS_IS_VALID_UNDERLINE_STYLE(s) \ - (NS_UNDERLINE_STYLE_NONE <= (s) && (s) <= NS_UNDERLINE_STYLE_WAVY) - // ------------------------------------------ // Bits for eMetric_AlertNotificationOrigin // ------------------------------------------ diff --git a/widget/src/android/nsLookAndFeel.cpp b/widget/src/android/nsLookAndFeel.cpp index 217ffce64c8..7fd97566dc7 100644 --- a/widget/src/android/nsLookAndFeel.cpp +++ b/widget/src/android/nsLookAndFeel.cpp @@ -37,6 +37,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsLookAndFeel.h" +#include "nsStyleConsts.h" nsLookAndFeel::nsLookAndFeel() : nsXPLookAndFeel() @@ -374,7 +375,7 @@ nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 &aMetric) break; case eMetric_SpellCheckerUnderlineStyle: - aMetric = NS_UNDERLINE_STYLE_WAVY; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_WAVY; break; default: diff --git a/widget/src/cocoa/nsLookAndFeel.mm b/widget/src/cocoa/nsLookAndFeel.mm index 8b275f3d19c..f4e49f2e517 100644 --- a/widget/src/cocoa/nsLookAndFeel.mm +++ b/widget/src/cocoa/nsLookAndFeel.mm @@ -40,6 +40,7 @@ #include "nsObjCExceptions.h" #include "nsIServiceManager.h" #include "nsNativeThemeColors.h" +#include "nsStyleConsts.h" #import @@ -417,10 +418,10 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric) case eMetric_IMEConvertedTextUnderlineStyle: case eMetric_IMESelectedRawTextUnderlineStyle: case eMetric_IMESelectedConvertedTextUnderline: - aMetric = NS_UNDERLINE_STYLE_SOLID; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_SOLID; break; case eMetric_SpellCheckerUnderlineStyle: - aMetric = NS_UNDERLINE_STYLE_DOTTED; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_DOTTED; break; default: aMetric = 0; diff --git a/widget/src/gtk2/nsLookAndFeel.cpp b/widget/src/gtk2/nsLookAndFeel.cpp index 87b6c09ee63..90f08a02754 100644 --- a/widget/src/gtk2/nsLookAndFeel.cpp +++ b/widget/src/gtk2/nsLookAndFeel.cpp @@ -42,6 +42,7 @@ #include #include "gtkdrawing.h" +#include "nsStyleConsts.h" #ifdef MOZ_PLATFORM_MAEMO #include "nsIServiceManager.h" @@ -553,14 +554,14 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric) break; case eMetric_IMERawInputUnderlineStyle: case eMetric_IMEConvertedTextUnderlineStyle: - aMetric = NS_UNDERLINE_STYLE_SOLID; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_SOLID; break; case eMetric_IMESelectedRawTextUnderlineStyle: case eMetric_IMESelectedConvertedTextUnderline: - aMetric = NS_UNDERLINE_STYLE_NONE; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_NONE; break; case eMetric_SpellCheckerUnderlineStyle: - aMetric = NS_UNDERLINE_STYLE_WAVY; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_WAVY; break; case eMetric_ImagesInMenus: aMetric = moz_gtk_images_in_menus(); diff --git a/widget/src/os2/nsLookAndFeel.cpp b/widget/src/os2/nsLookAndFeel.cpp index 28f44b43130..c0b8ea8fbd1 100644 --- a/widget/src/os2/nsLookAndFeel.cpp +++ b/widget/src/os2/nsLookAndFeel.cpp @@ -43,7 +43,8 @@ #include "nsLookAndFeel.h" #include "nsFont.h" #include "nsSize.h" - +#include "nsStyleConsts.h" + nsLookAndFeel::nsLookAndFeel() : nsXPLookAndFeel() { } @@ -336,14 +337,14 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric) break; case eMetric_IMERawInputUnderlineStyle: case eMetric_IMEConvertedTextUnderlineStyle: - aMetric = NS_UNDERLINE_STYLE_SOLID; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_SOLID; break; case eMetric_IMESelectedRawTextUnderlineStyle: case eMetric_IMESelectedConvertedTextUnderline: - aMetric = NS_UNDERLINE_STYLE_NONE; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_NONE; break; case eMetric_SpellCheckerUnderlineStyle: - aMetric = NS_UNDERLINE_STYLE_WAVY; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_WAVY; break; default: diff --git a/widget/src/qt/nsLookAndFeel.cpp b/widget/src/qt/nsLookAndFeel.cpp index fde2f4cd4f3..5a058b60439 100644 --- a/widget/src/qt/nsLookAndFeel.cpp +++ b/widget/src/qt/nsLookAndFeel.cpp @@ -43,6 +43,7 @@ #include #include "nsLookAndFeel.h" +#include "nsStyleConsts.h" #include @@ -402,7 +403,7 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID,PRInt32 &aMetric) break; case eMetric_SpellCheckerUnderlineStyle: - aMetric = NS_UNDERLINE_STYLE_WAVY; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_WAVY; break; default: diff --git a/widget/src/windows/nsLookAndFeel.cpp b/widget/src/windows/nsLookAndFeel.cpp index af14ecabebb..3a59864efa6 100644 --- a/widget/src/windows/nsLookAndFeel.cpp +++ b/widget/src/windows/nsLookAndFeel.cpp @@ -44,6 +44,7 @@ #include #include #include "nsWindow.h" +#include "nsStyleConsts.h" #ifndef WINCE #include "nsUXThemeData.h" @@ -511,14 +512,14 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric) break; case eMetric_IMERawInputUnderlineStyle: case eMetric_IMEConvertedTextUnderlineStyle: - aMetric = NS_UNDERLINE_STYLE_DASHED; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_DASHED; break; case eMetric_IMESelectedRawTextUnderlineStyle: case eMetric_IMESelectedConvertedTextUnderline: - aMetric = NS_UNDERLINE_STYLE_NONE; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_NONE; break; case eMetric_SpellCheckerUnderlineStyle: - aMetric = NS_UNDERLINE_STYLE_WAVY; + aMetric = NS_STYLE_TEXT_DECORATION_STYLE_WAVY; break; default: aMetric = 0; From 8bebd6ed5a4321d4fe897905d6475b4c727f3be7 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Thu, 31 Mar 2011 21:27:03 +0900 Subject: [PATCH 06/12] Bug 59109 Part 3: Implement text-decoration-color and text-decoration-style rendering r=dbaron --- layout/forms/resources/content/xbl-forms.css | 2 + layout/generic/nsBlockFrame.cpp | 3 +- layout/generic/nsBlockFrame.h | 1 + layout/generic/nsHTMLContainerFrame.cpp | 82 ++++++++++++-------- layout/generic/nsHTMLContainerFrame.h | 20 ++++- layout/generic/nsTextFrame.h | 10 ++- layout/generic/nsTextFrameThebes.cpp | 18 +++-- layout/style/forms.css | 2 + layout/xul/base/src/nsTextBoxFrame.cpp | 29 +++++-- 9 files changed, 116 insertions(+), 51 deletions(-) diff --git a/layout/forms/resources/content/xbl-forms.css b/layout/forms/resources/content/xbl-forms.css index 6385125c95c..89deb2ce2f8 100644 --- a/layout/forms/resources/content/xbl-forms.css +++ b/layout/forms/resources/content/xbl-forms.css @@ -239,6 +239,8 @@ input > .anonymous-div { /* XXXldb I'm not sure if we really want the 'text-decoration: inherit', but it's needed to make 'text-decoration' "work" on text inputs. */ text-decoration: inherit; + -moz-text-decoration-color: inherit; + -moz-text-decoration-style: inherit; } input:disabled, diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 2f35f296630..567c4e73160 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -6076,6 +6076,7 @@ nsBlockFrame::PaintTextDecorationLine(gfxContext* aCtx, const nsPoint& aPt, nsLineBox* aLine, nscolor aColor, + PRUint8 aStyle, gfxFloat aOffset, gfxFloat aAscent, gfxFloat aSize, @@ -6096,7 +6097,7 @@ nsBlockFrame::PaintTextDecorationLine(gfxContext* aCtx, nsCSSRendering::PaintDecorationLine( aCtx, aColor, pt, size, PresContext()->AppUnitsToGfxUnits(aLine->GetAscent()), - aOffset, aDecoration, NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + aOffset, aDecoration, aStyle); } } diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h index 5c046e2eea2..58b65392bca 100644 --- a/layout/generic/nsBlockFrame.h +++ b/layout/generic/nsBlockFrame.h @@ -369,6 +369,7 @@ protected: const nsPoint& aPt, nsLineBox* aLine, nscolor aColor, + PRUint8 aStyle, gfxFloat aOffset, gfxFloat aAscent, gfxFloat aSize, diff --git a/layout/generic/nsHTMLContainerFrame.cpp b/layout/generic/nsHTMLContainerFrame.cpp index 361f1d5b426..387361d287e 100644 --- a/layout/generic/nsHTMLContainerFrame.cpp +++ b/layout/generic/nsHTMLContainerFrame.cpp @@ -75,9 +75,9 @@ class nsDisplayTextDecoration : public nsDisplayItem { public: nsDisplayTextDecoration(nsDisplayListBuilder* aBuilder, nsHTMLContainerFrame* aFrame, PRUint8 aDecoration, - nscolor aColor, nsLineBox* aLine) + nscolor aColor, PRUint8 aStyle, nsLineBox* aLine) : nsDisplayItem(aBuilder, aFrame), mLine(aLine), mColor(aColor), - mDecoration(aDecoration) { + mDecoration(aDecoration), mStyle(aStyle) { MOZ_COUNT_CTOR(nsDisplayTextDecoration); } #ifdef NS_BUILD_REFCNT_LOGGING @@ -100,6 +100,7 @@ private: nsLineBox* mLine; nscolor mColor; PRUint8 mDecoration; + PRUint8 mStyle; }; void @@ -136,16 +137,16 @@ nsDisplayTextDecoration::Paint(nsDisplayListBuilder* aBuilder, if (mDecoration == NS_STYLE_TEXT_DECORATION_UNDERLINE) { gfxFloat underlineOffset = fontGroup->GetUnderlineOffset(); f->PaintTextDecorationLine(aCtx->ThebesContext(), pt, mLine, mColor, - underlineOffset, ascent, + mStyle, underlineOffset, ascent, metrics.underlineSize, mDecoration); } else if (mDecoration == NS_STYLE_TEXT_DECORATION_OVERLINE) { f->PaintTextDecorationLine(aCtx->ThebesContext(), pt, mLine, mColor, - metrics.maxAscent, ascent, + mStyle, metrics.maxAscent, ascent, metrics.underlineSize, mDecoration); } else { f->PaintTextDecorationLine(aCtx->ThebesContext(), pt, mLine, mColor, - metrics.strikeoutOffset, ascent, - metrics.strikeoutSize, mDecoration); + mStyle, metrics.strikeoutOffset, + ascent, metrics.strikeoutSize, mDecoration); } } @@ -159,10 +160,12 @@ class nsDisplayTextShadow : public nsDisplayItem { public: nsDisplayTextShadow(nsDisplayListBuilder* aBuilder, nsHTMLContainerFrame* aFrame, - const PRUint8 aDecoration, + const PRUint8 aDecoration, PRUint8 aUnderlineStyle, + PRUint8 aOverlineStyle, PRUint8 aStrikeThroughStyle, nsLineBox* aLine) : nsDisplayItem(aBuilder, aFrame), mLine(aLine), - mDecorationFlags(aDecoration) { + mDecorationFlags(aDecoration), mUnderlineStyle(aUnderlineStyle), + mOverlineStyle(aOverlineStyle), mStrikeThroughStyle(aStrikeThroughStyle) { MOZ_COUNT_CTOR(nsDisplayTextShadow); } virtual ~nsDisplayTextShadow() { @@ -176,6 +179,9 @@ public: private: nsLineBox* mLine; PRUint8 mDecorationFlags; + PRUint8 mUnderlineStyle; + PRUint8 mOverlineStyle; + PRUint8 mStrikeThroughStyle; }; void @@ -243,22 +249,20 @@ nsDisplayTextShadow::Paint(nsDisplayListBuilder* aBuilder, gfxSize size(lineWidth, metrics.underlineSize); underlineRect = nsCSSRendering::GetTextDecorationRect(presContext, size, ascent, underlineOffset, - NS_STYLE_TEXT_DECORATION_UNDERLINE, - NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_UNDERLINE, mUnderlineStyle); } if (mDecorationFlags & NS_STYLE_TEXT_DECORATION_OVERLINE) { gfxSize size(lineWidth, metrics.underlineSize); overlineRect = nsCSSRendering::GetTextDecorationRect(presContext, size, ascent, metrics.maxAscent, - NS_STYLE_TEXT_DECORATION_OVERLINE, - NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_OVERLINE, mOverlineStyle); } if (mDecorationFlags & NS_STYLE_TEXT_DECORATION_LINE_THROUGH) { gfxSize size(lineWidth, metrics.strikeoutSize); lineThroughRect = nsCSSRendering::GetTextDecorationRect(presContext, size, ascent, metrics.strikeoutOffset, NS_STYLE_TEXT_DECORATION_LINE_THROUGH, - NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + mStrikeThroughStyle); } for (PRUint32 i = shadowList->Length(); i > 0; --i) { @@ -302,18 +306,19 @@ nsDisplayTextShadow::Paint(nsDisplayListBuilder* aBuilder, if (mDecorationFlags & NS_STYLE_TEXT_DECORATION_UNDERLINE) { f->PaintTextDecorationLine(shadowCtx, pt, mLine, shadowColor, - underlineOffset, ascent, + mUnderlineStyle, underlineOffset, ascent, metrics.underlineSize, NS_STYLE_TEXT_DECORATION_UNDERLINE); } if (mDecorationFlags & NS_STYLE_TEXT_DECORATION_OVERLINE) { f->PaintTextDecorationLine(shadowCtx, pt, mLine, shadowColor, - metrics.maxAscent, ascent, + mOverlineStyle, metrics.maxAscent, ascent, metrics.underlineSize, NS_STYLE_TEXT_DECORATION_OVERLINE); } if (mDecorationFlags & NS_STYLE_TEXT_DECORATION_LINE_THROUGH) { f->PaintTextDecorationLine(shadowCtx, pt, mLine, shadowColor, - metrics.strikeoutOffset, ascent, - metrics.strikeoutSize, NS_STYLE_TEXT_DECORATION_LINE_THROUGH); + mStrikeThroughStyle, metrics.strikeoutOffset, + ascent, metrics.strikeoutSize, + NS_STYLE_TEXT_DECORATION_LINE_THROUGH); } contextBoxBlur.DoPaint(); @@ -350,9 +355,11 @@ nsHTMLContainerFrame::DisplayTextDecorations(nsDisplayListBuilder* aBuilder, // behind children, line-through in front. For Quirks mode, see // nsTextFrame::PaintTextDecorations. (See bug 1777.) nscolor underColor, overColor, strikeColor; + PRUint8 underStyle, overStyle, strikeStyle; PRUint8 decorations = NS_STYLE_TEXT_DECORATION_NONE; GetTextDecorations(PresContext(), aLine != nsnull, decorations, underColor, - overColor, strikeColor); + overColor, strikeColor, underStyle, overStyle, + strikeStyle); if (decorations == NS_STYLE_TEXT_DECORATION_NONE) return NS_OK; @@ -362,26 +369,27 @@ nsHTMLContainerFrame::DisplayTextDecorations(nsDisplayListBuilder* aBuilder, // list, underneath the text and all decorations. if (GetStyleText()->mTextShadow) { rv = aBelowTextDecorations->AppendNewToTop(new (aBuilder) - nsDisplayTextShadow(aBuilder, this, decorations, aLine)); + nsDisplayTextShadow(aBuilder, this, decorations, underStyle, overStyle, + strikeStyle, aLine)); NS_ENSURE_SUCCESS(rv, rv); } if (decorations & NS_STYLE_TEXT_DECORATION_UNDERLINE) { rv = aBelowTextDecorations->AppendNewToTop(new (aBuilder) nsDisplayTextDecoration(aBuilder, this, NS_STYLE_TEXT_DECORATION_UNDERLINE, - underColor, aLine)); + underColor, underStyle, aLine)); NS_ENSURE_SUCCESS(rv, rv); } if (decorations & NS_STYLE_TEXT_DECORATION_OVERLINE) { rv = aBelowTextDecorations->AppendNewToTop(new (aBuilder) nsDisplayTextDecoration(aBuilder, this, NS_STYLE_TEXT_DECORATION_OVERLINE, - overColor, aLine)); + overColor, overStyle, aLine)); NS_ENSURE_SUCCESS(rv, rv); } if (decorations & NS_STYLE_TEXT_DECORATION_LINE_THROUGH) { rv = aAboveTextDecorations->AppendNewToTop(new (aBuilder) nsDisplayTextDecoration(aBuilder, this, NS_STYLE_TEXT_DECORATION_LINE_THROUGH, - strikeColor, aLine)); + strikeColor, strikeStyle, aLine)); NS_ENSURE_SUCCESS(rv, rv); } return NS_OK; @@ -424,6 +432,7 @@ nsHTMLContainerFrame::PaintTextDecorationLine( const nsPoint& aPt, nsLineBox* aLine, nscolor aColor, + PRUint8 aStyle, gfxFloat aOffset, gfxFloat aAscent, gfxFloat aSize, @@ -442,7 +451,7 @@ nsHTMLContainerFrame::PaintTextDecorationLine( PresContext()->AppUnitsToGfxUnits(bp.top + aPt.y)); gfxSize size(PresContext()->AppUnitsToGfxUnits(innerWidth), aSize); nsCSSRendering::PaintDecorationLine(aCtx, aColor, pt, size, aAscent, aOffset, - aDecoration, NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + aDecoration, aStyle); } /*virtual*/ void @@ -461,7 +470,10 @@ nsHTMLContainerFrame::GetTextDecorations(nsPresContext* aPresContext, PRUint8& aDecorations, nscolor& aUnderColor, nscolor& aOverColor, - nscolor& aStrikeColor) + nscolor& aStrikeColor, + PRUint8& aUnderStyle, + PRUint8& aOverStyle, + PRUint8& aStrikeStyle) { aDecorations = NS_STYLE_TEXT_DECORATION_NONE; if (!mStyleContext->HasTextDecorations()) { @@ -471,13 +483,15 @@ nsHTMLContainerFrame::GetTextDecorations(nsPresContext* aPresContext, } if (!aIsBlock) { - aDecorations = this->GetStyleTextReset()->mTextDecoration & + const nsStyleTextReset* styleTextReset = this->GetStyleTextReset(); + aDecorations = styleTextReset->mTextDecoration & NS_STYLE_TEXT_DECORATION_LINES_MASK; if (aDecorations) { - nscolor color = this->GetVisitedDependentColor(eCSSProperty_color); - aUnderColor = color; - aOverColor = color; - aStrikeColor = color; + nscolor color = + this->GetVisitedDependentColor(eCSSProperty_text_decoration_color); + aUnderColor = aOverColor = aStrikeColor = color; + aUnderStyle = aOverStyle = aStrikeStyle = + styleTextReset->GetDecorationStyle(); } } else { @@ -491,23 +505,29 @@ nsHTMLContainerFrame::GetTextDecorations(nsPresContext* aPresContext, // walk tree for (nsIFrame* frame = this; frame; frame = frame->GetParent()) { - PRUint8 decors = frame->GetStyleTextReset()->mTextDecoration & decorMask; + const nsStyleTextReset* styleTextReset = frame->GetStyleTextReset(); + PRUint8 decors = styleTextReset->mTextDecoration & decorMask; if (decors) { // A *new* text-decoration is found. - nscolor color = frame->GetVisitedDependentColor(eCSSProperty_color); + nscolor color = frame->GetVisitedDependentColor( + eCSSProperty_text_decoration_color); + PRUint8 style = styleTextReset->GetDecorationStyle(); if (NS_STYLE_TEXT_DECORATION_UNDERLINE & decors) { aUnderColor = color; + aUnderStyle = style; decorMask &= ~NS_STYLE_TEXT_DECORATION_UNDERLINE; aDecorations |= NS_STYLE_TEXT_DECORATION_UNDERLINE; } if (NS_STYLE_TEXT_DECORATION_OVERLINE & decors) { aOverColor = color; + aOverStyle = style; decorMask &= ~NS_STYLE_TEXT_DECORATION_OVERLINE; aDecorations |= NS_STYLE_TEXT_DECORATION_OVERLINE; } if (NS_STYLE_TEXT_DECORATION_LINE_THROUGH & decors) { aStrikeColor = color; + aStrikeStyle = style; decorMask &= ~NS_STYLE_TEXT_DECORATION_LINE_THROUGH; aDecorations |= NS_STYLE_TEXT_DECORATION_LINE_THROUGH; } diff --git a/layout/generic/nsHTMLContainerFrame.h b/layout/generic/nsHTMLContainerFrame.h index f40a5cba250..a3b7f453f28 100644 --- a/layout/generic/nsHTMLContainerFrame.h +++ b/layout/generic/nsHTMLContainerFrame.h @@ -144,6 +144,18 @@ protected: * in aDecoration is set. It is undefined otherwise. * @param aStrikeColor The color of strike-through if the appropriate bit * in aDecoration is set. It is undefined otherwise. + * @param aUnderStyle The style of underline if the appropriate bit + * in aDecoration is set. It is undefined otherwise. + * The style is one of + * NS_STYLE_TEXT_DECORATION_STYLE_* consts. + * @param aOverStyle The style of overline if the appropriate bit + * in aDecoration is set. It is undefined otherwise. + * The style is one of + * NS_STYLE_TEXT_DECORATION_STYLE_* consts. + * @param aStrikeStyle The style of strike-through if the appropriate bit + * in aDecoration is set. It is undefined otherwise. + * The style is one of + * NS_STYLE_TEXT_DECORATION_STYLE_* consts. * NOTE: This function assigns NS_STYLE_TEXT_DECORATION_NONE to * aDecorations for text-less frames. See bug 20163 for * details. @@ -153,7 +165,10 @@ protected: PRUint8& aDecorations, nscolor& aUnderColor, nscolor& aOverColor, - nscolor& aStrikeColor); + nscolor& aStrikeColor, + PRUint8& aUnderStyle, + PRUint8& aOverStyle, + PRUint8& aStrikeStyle); /** * Function that does the actual drawing of the textdecoration. @@ -161,6 +176,8 @@ protected: * @param aCtx the Thebes graphics context to draw on * @param aLine the line, or nsnull if this is an inline frame * @param aColor the color of the text-decoration + * @param aStyle the style of the text-decoration, i.e., one of + * NS_STYLE_TEXT_DECORATION_STYLE_* consts. * @param aAscent ascent of the font from which the * text-decoration was derived. * @param aOffset distance *above* baseline where the @@ -177,6 +194,7 @@ protected: const nsPoint& aPt, nsLineBox* aLine, nscolor aColor, + PRUint8 aStyle, gfxFloat aOffset, gfxFloat aAscent, gfxFloat aSize, diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index ae62f153ada..6bc88d9307b 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -432,13 +432,19 @@ protected: struct TextDecorations { PRUint8 mDecorations; + PRUint8 mOverStyle; + PRUint8 mUnderStyle; + PRUint8 mStrikeStyle; nscolor mOverColor; nscolor mUnderColor; nscolor mStrikeColor; TextDecorations() : - mDecorations(0), mOverColor(NS_RGB(0, 0, 0)), - mUnderColor(NS_RGB(0, 0, 0)), mStrikeColor(NS_RGB(0, 0, 0)) + mDecorations(0), mOverStyle(NS_STYLE_TEXT_DECORATION_STYLE_SOLID), + mUnderStyle(NS_STYLE_TEXT_DECORATION_STYLE_SOLID), + mStrikeStyle(NS_STYLE_TEXT_DECORATION_STYLE_SOLID), + mOverColor(NS_RGB(0, 0, 0)), mUnderColor(NS_RGB(0, 0, 0)), + mStrikeColor(NS_RGB(0, 0, 0)) { } PRBool HasDecorationlines() { diff --git a/layout/generic/nsTextFrameThebes.cpp b/layout/generic/nsTextFrameThebes.cpp index 2b38ee6daf0..0fb9be118f8 100644 --- a/layout/generic/nsTextFrameThebes.cpp +++ b/layout/generic/nsTextFrameThebes.cpp @@ -4261,13 +4261,15 @@ nsTextFrame::GetTextDecorations(nsPresContext* aPresContext) // This handles the La // la la case. The link underline should be green. useOverride = PR_TRUE; - overrideColor = context->GetVisitedDependentColor(eCSSProperty_color); + overrideColor = context->GetVisitedDependentColor( + eCSSProperty_text_decoration_color); } // FIXME: see above (remove this check) PRUint8 useDecorations = decorMask & styleText->mTextDecoration; if (useDecorations) {// a decoration defined here - nscolor color = context->GetVisitedDependentColor(eCSSProperty_color); + nscolor color = context->GetVisitedDependentColor( + eCSSProperty_text_decoration_color); // FIXME: We also need to record the thickness and position // metrics appropriate to this element (at least in standards @@ -4280,16 +4282,19 @@ nsTextFrame::GetTextDecorations(nsPresContext* aPresContext) // This way we move the decorations for relative positioning. if (NS_STYLE_TEXT_DECORATION_UNDERLINE & useDecorations) { decorations.mUnderColor = useOverride ? overrideColor : color; + decorations.mUnderStyle = styleText->GetDecorationStyle(); decorMask &= ~NS_STYLE_TEXT_DECORATION_UNDERLINE; decorations.mDecorations |= NS_STYLE_TEXT_DECORATION_UNDERLINE; } if (NS_STYLE_TEXT_DECORATION_OVERLINE & useDecorations) { decorations.mOverColor = useOverride ? overrideColor : color; + decorations.mOverStyle = styleText->GetDecorationStyle(); decorMask &= ~NS_STYLE_TEXT_DECORATION_OVERLINE; decorations.mDecorations |= NS_STYLE_TEXT_DECORATION_OVERLINE; } if (NS_STYLE_TEXT_DECORATION_LINE_THROUGH & useDecorations) { decorations.mStrikeColor = useOverride ? overrideColor : color; + decorations.mStrikeStyle = styleText->GetDecorationStyle(); decorMask &= ~NS_STYLE_TEXT_DECORATION_LINE_THROUGH; decorations.mDecorations |= NS_STYLE_TEXT_DECORATION_LINE_THROUGH; } @@ -4384,8 +4389,7 @@ nsTextFrame::PaintTextDecorations(gfxContext* aCtx, const gfxRect& aDirtyRect, size.height = fontMetrics.underlineSize; nsCSSRendering::PaintDecorationLine( aCtx, lineColor, pt, size, ascent, fontMetrics.maxAscent, - NS_STYLE_TEXT_DECORATION_OVERLINE, - NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_OVERLINE, decorations.mOverStyle); } if (decorations.HasUnderline()) { lineColor = aOverrideColor ? *aOverrideColor : decorations.mUnderColor; @@ -4393,8 +4397,7 @@ nsTextFrame::PaintTextDecorations(gfxContext* aCtx, const gfxRect& aDirtyRect, gfxFloat offset = aProvider.GetFontGroup()->GetUnderlineOffset(); nsCSSRendering::PaintDecorationLine( aCtx, lineColor, pt, size, ascent, offset, - NS_STYLE_TEXT_DECORATION_UNDERLINE, - NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_UNDERLINE, decorations.mUnderStyle); } if (decorations.HasStrikeout()) { lineColor = aOverrideColor ? *aOverrideColor : decorations.mStrikeColor; @@ -4402,8 +4405,7 @@ nsTextFrame::PaintTextDecorations(gfxContext* aCtx, const gfxRect& aDirtyRect, gfxFloat offset = fontMetrics.strikeoutOffset; nsCSSRendering::PaintDecorationLine( aCtx, lineColor, pt, size, ascent, offset, - NS_STYLE_TEXT_DECORATION_LINE_THROUGH, - NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_LINE_THROUGH, decorations.mStrikeStyle); } } diff --git a/layout/style/forms.css b/layout/style/forms.css index 3b4d05219ad..91d28e14194 100644 --- a/layout/style/forms.css +++ b/layout/style/forms.css @@ -165,6 +165,8 @@ input > .anonymous-div { /* XXXldb I'm not sure if we really want the 'text-decoration: inherit', but it's needed to make 'text-decoration' "work" on text inputs. */ text-decoration: inherit; + -moz-text-decoration-color: inherit; + -moz-text-decoration-style: inherit; ime-mode: inherit; resize: inherit; } diff --git a/layout/xul/base/src/nsTextBoxFrame.cpp b/layout/xul/base/src/nsTextBoxFrame.cpp index 3145bff3a9e..1c97b1b68b0 100644 --- a/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/layout/xul/base/src/nsTextBoxFrame.cpp @@ -425,6 +425,9 @@ nsTextBoxFrame::DrawText(nsIRenderingContext& aRenderingContext, nscolor overColor; nscolor underColor; nscolor strikeColor; + PRUint8 overStyle; + PRUint8 underStyle; + PRUint8 strikeStyle; nsStyleContext* context = mStyleContext; PRUint8 decorations = NS_STYLE_TEXT_DECORATION_NONE; // Begin with no decorations @@ -436,20 +439,33 @@ nsTextBoxFrame::DrawText(nsIRenderingContext& aRenderingContext, const nsStyleTextReset* styleText = context->GetStyleTextReset(); if (decorMask & styleText->mTextDecoration) { // a decoration defined here - nscolor color = aOverrideColor ? *aOverrideColor : context->GetStyleColor()->mColor; - + nscolor color; + if (aOverrideColor) { + color = *aOverrideColor; + } else { + PRBool isForeground; + styleText->GetDecorationColor(color, isForeground); + if (isForeground) { + color = context->GetVisitedDependentColor(eCSSProperty_color); + } + } + PRUint8 style = styleText->GetDecorationStyle(); + if (NS_STYLE_TEXT_DECORATION_UNDERLINE & decorMask & styleText->mTextDecoration) { underColor = color; + underStyle = style; decorMask &= ~NS_STYLE_TEXT_DECORATION_UNDERLINE; decorations |= NS_STYLE_TEXT_DECORATION_UNDERLINE; } if (NS_STYLE_TEXT_DECORATION_OVERLINE & decorMask & styleText->mTextDecoration) { overColor = color; + overStyle = style; decorMask &= ~NS_STYLE_TEXT_DECORATION_OVERLINE; decorations |= NS_STYLE_TEXT_DECORATION_OVERLINE; } if (NS_STYLE_TEXT_DECORATION_LINE_THROUGH & decorMask & styleText->mTextDecoration) { strikeColor = color; + strikeStyle = style; decorMask &= ~NS_STYLE_TEXT_DECORATION_LINE_THROUGH; decorations |= NS_STYLE_TEXT_DECORATION_LINE_THROUGH; } @@ -492,15 +508,13 @@ nsTextBoxFrame::DrawText(nsIRenderingContext& aRenderingContext, nsCSSRendering::PaintDecorationLine(ctx, underColor, pt, gfxSize(width, sizePixel), ascentPixel, offsetPixel, - NS_STYLE_TEXT_DECORATION_UNDERLINE, - NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_UNDERLINE, underStyle); } if (decorations & NS_FONT_DECORATION_OVERLINE) { nsCSSRendering::PaintDecorationLine(ctx, overColor, pt, gfxSize(width, sizePixel), ascentPixel, ascentPixel, - NS_STYLE_TEXT_DECORATION_OVERLINE, - NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_OVERLINE, overStyle); } } @@ -583,8 +597,7 @@ nsTextBoxFrame::DrawText(nsIRenderingContext& aRenderingContext, gfxFloat sizePixel = presContext->AppUnitsToGfxUnits(size); nsCSSRendering::PaintDecorationLine(ctx, strikeColor, pt, gfxSize(width, sizePixel), ascentPixel, offsetPixel, - NS_STYLE_TEXT_DECORATION_LINE_THROUGH, - NS_STYLE_TEXT_DECORATION_STYLE_SOLID); + NS_STYLE_TEXT_DECORATION_LINE_THROUGH, strikeStyle); } } From 750e932545ad7a99e4d2998df8f761174394d97e Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Thu, 31 Mar 2011 21:27:12 +0900 Subject: [PATCH 07/12] Bug 59109 part 4: reftests for text-decoration-color and text-decoration-style r=dbaron --- .../decoration-color-quirks-ref.html | 65 +++++++++++++++++ .../decoration-color-quirks.html | 73 +++++++++++++++++++ .../decoration-color-standards-ref.html | 67 +++++++++++++++++ .../decoration-color-standards.html | 72 ++++++++++++++++++ .../decoration-style-quirks-ref.html | 42 +++++++++++ .../decoration-style-quirks.html | 33 +++++++++ .../decoration-style-standards-ref.html | 27 +++++++ .../decoration-style-standards.html | 25 +++++++ ...ine-through-style-block-dashed-quirks.html | 1 + ...-through-style-block-dashed-standards.html | 2 + ...ine-through-style-block-dotted-quirks.html | 1 + ...-through-style-block-dotted-standards.html | 2 + ...ine-through-style-block-double-quirks.html | 1 + ...-through-style-block-double-standards.html | 2 + .../line-through-style-block-quirks-ref.html | 1 + ...line-through-style-block-solid-quirks.html | 1 + ...e-through-style-block-solid-standards.html | 2 + ...ine-through-style-block-standards-ref.html | 2 + .../line-through-style-block-wavy-quirks.html | 1 + ...ne-through-style-block-wavy-standards.html | 2 + ...ne-through-style-inline-dashed-quirks.html | 1 + ...through-style-inline-dashed-standards.html | 2 + ...ne-through-style-inline-dotted-quirks.html | 1 + ...through-style-inline-dotted-standards.html | 2 + ...ne-through-style-inline-double-quirks.html | 1 + ...through-style-inline-double-standards.html | 2 + .../line-through-style-inline-quirks-ref.html | 1 + ...ine-through-style-inline-solid-quirks.html | 1 + ...-through-style-inline-solid-standards.html | 2 + ...ne-through-style-inline-standards-ref.html | 2 + ...line-through-style-inline-wavy-quirks.html | 1 + ...e-through-style-inline-wavy-standards.html | 2 + .../overline-style-block-dashed-quirks.html | 1 + ...overline-style-block-dashed-standards.html | 2 + .../overline-style-block-dotted-quirks.html | 1 + ...overline-style-block-dotted-standards.html | 2 + .../overline-style-block-double-quirks.html | 1 + ...overline-style-block-double-standards.html | 2 + .../overline-style-block-quirks-ref.html | 1 + .../overline-style-block-solid-quirks.html | 1 + .../overline-style-block-solid-standards.html | 2 + .../overline-style-block-standards-ref.html | 2 + .../overline-style-block-wavy-quirks.html | 1 + .../overline-style-block-wavy-standards.html | 2 + .../overline-style-inline-dashed-quirks.html | 1 + ...verline-style-inline-dashed-standards.html | 2 + .../overline-style-inline-dotted-quirks.html | 1 + ...verline-style-inline-dotted-standards.html | 2 + .../overline-style-inline-double-quirks.html | 1 + ...verline-style-inline-double-standards.html | 2 + .../overline-style-inline-quirks-ref.html | 1 + .../overline-style-inline-solid-quirks.html | 1 + ...overline-style-inline-solid-standards.html | 2 + .../overline-style-inline-standards-ref.html | 2 + .../overline-style-inline-wavy-quirks.html | 1 + .../overline-style-inline-wavy-standards.html | 2 + layout/reftests/text-decoration/reftest.list | 64 ++++++++++++++++ .../underline-style-block-dashed-quirks.html | 1 + ...nderline-style-block-dashed-standards.html | 2 + .../underline-style-block-dotted-quirks.html | 1 + ...nderline-style-block-dotted-standards.html | 2 + .../underline-style-block-double-quirks.html | 1 + ...nderline-style-block-double-standards.html | 2 + .../underline-style-block-quirks-ref.html | 1 + .../underline-style-block-solid-quirks.html | 1 + ...underline-style-block-solid-standards.html | 2 + .../underline-style-block-standards-ref.html | 2 + .../underline-style-block-wavy-quirks.html | 1 + .../underline-style-block-wavy-standards.html | 2 + .../underline-style-inline-dashed-quirks.html | 1 + ...derline-style-inline-dashed-standards.html | 2 + .../underline-style-inline-dotted-quirks.html | 1 + ...derline-style-inline-dotted-standards.html | 2 + .../underline-style-inline-double-quirks.html | 1 + ...derline-style-inline-double-standards.html | 2 + .../underline-style-inline-quirks-ref.html | 1 + .../underline-style-inline-solid-quirks.html | 1 + ...nderline-style-inline-solid-standards.html | 2 + .../underline-style-inline-standards-ref.html | 2 + .../underline-style-inline-wavy-quirks.html | 1 + ...underline-style-inline-wavy-standards.html | 2 + 81 files changed, 576 insertions(+) create mode 100644 layout/reftests/text-decoration/decoration-color-quirks-ref.html create mode 100644 layout/reftests/text-decoration/decoration-color-quirks.html create mode 100644 layout/reftests/text-decoration/decoration-color-standards-ref.html create mode 100644 layout/reftests/text-decoration/decoration-color-standards.html create mode 100644 layout/reftests/text-decoration/decoration-style-quirks-ref.html create mode 100644 layout/reftests/text-decoration/decoration-style-quirks.html create mode 100644 layout/reftests/text-decoration/decoration-style-standards-ref.html create mode 100644 layout/reftests/text-decoration/decoration-style-standards.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-dashed-quirks.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-dashed-standards.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-dotted-quirks.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-dotted-standards.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-double-quirks.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-double-standards.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-quirks-ref.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-solid-quirks.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-solid-standards.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-standards-ref.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-wavy-quirks.html create mode 100644 layout/reftests/text-decoration/line-through-style-block-wavy-standards.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-dashed-quirks.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-dashed-standards.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-dotted-quirks.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-dotted-standards.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-double-quirks.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-double-standards.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-quirks-ref.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-solid-quirks.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-solid-standards.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-standards-ref.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-wavy-quirks.html create mode 100644 layout/reftests/text-decoration/line-through-style-inline-wavy-standards.html create mode 100644 layout/reftests/text-decoration/overline-style-block-dashed-quirks.html create mode 100644 layout/reftests/text-decoration/overline-style-block-dashed-standards.html create mode 100644 layout/reftests/text-decoration/overline-style-block-dotted-quirks.html create mode 100644 layout/reftests/text-decoration/overline-style-block-dotted-standards.html create mode 100644 layout/reftests/text-decoration/overline-style-block-double-quirks.html create mode 100644 layout/reftests/text-decoration/overline-style-block-double-standards.html create mode 100644 layout/reftests/text-decoration/overline-style-block-quirks-ref.html create mode 100644 layout/reftests/text-decoration/overline-style-block-solid-quirks.html create mode 100644 layout/reftests/text-decoration/overline-style-block-solid-standards.html create mode 100644 layout/reftests/text-decoration/overline-style-block-standards-ref.html create mode 100644 layout/reftests/text-decoration/overline-style-block-wavy-quirks.html create mode 100644 layout/reftests/text-decoration/overline-style-block-wavy-standards.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-dashed-quirks.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-dashed-standards.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-dotted-quirks.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-dotted-standards.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-double-quirks.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-double-standards.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-quirks-ref.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-solid-quirks.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-solid-standards.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-standards-ref.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-wavy-quirks.html create mode 100644 layout/reftests/text-decoration/overline-style-inline-wavy-standards.html create mode 100644 layout/reftests/text-decoration/underline-style-block-dashed-quirks.html create mode 100644 layout/reftests/text-decoration/underline-style-block-dashed-standards.html create mode 100644 layout/reftests/text-decoration/underline-style-block-dotted-quirks.html create mode 100644 layout/reftests/text-decoration/underline-style-block-dotted-standards.html create mode 100644 layout/reftests/text-decoration/underline-style-block-double-quirks.html create mode 100644 layout/reftests/text-decoration/underline-style-block-double-standards.html create mode 100644 layout/reftests/text-decoration/underline-style-block-quirks-ref.html create mode 100644 layout/reftests/text-decoration/underline-style-block-solid-quirks.html create mode 100644 layout/reftests/text-decoration/underline-style-block-solid-standards.html create mode 100644 layout/reftests/text-decoration/underline-style-block-standards-ref.html create mode 100644 layout/reftests/text-decoration/underline-style-block-wavy-quirks.html create mode 100644 layout/reftests/text-decoration/underline-style-block-wavy-standards.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-dashed-quirks.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-dashed-standards.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-dotted-quirks.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-dotted-standards.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-double-quirks.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-double-standards.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-quirks-ref.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-solid-quirks.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-solid-standards.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-standards-ref.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-wavy-quirks.html create mode 100644 layout/reftests/text-decoration/underline-style-inline-wavy-standards.html diff --git a/layout/reftests/text-decoration/decoration-color-quirks-ref.html b/layout/reftests/text-decoration/decoration-color-quirks-ref.html new file mode 100644 index 00000000000..c322a765084 --- /dev/null +++ b/layout/reftests/text-decoration/decoration-color-quirks-ref.html @@ -0,0 +1,65 @@ +

+ This blue text has green decoration lines +

+

+ This red text has yellow decoration lines +

+

+ This blue text has red lines +

+

+ This orange text has transparent lines +

+

+ Here is no decoration lines, but + + + this blue text has green decoration lines, + and here is no decoration lines too. +

+

+ This is red paragraph and here is no decoration lines, but + + here are green decoration lines, + and here is no decoration lines too. +

+

+ This is purple paragraph and here are decoration lines of current color, but + + here are red decoration lines, + and here are current color decoration lines. +

+

+ This is green paragraph and here are decoration lines of current color, and + + here is specified red decoration color but has current color lines, + and here are current color decoration lines. +

+

+ This is blue paragraph, + + here is red text with blue decoration lines, + and here is blue text without decoration lines. +

+

+ This is blue paragraph and decoration color is specified as green, + + here is red text with green decoration lines, + and here is blue text without decoration lines. +

diff --git a/layout/reftests/text-decoration/decoration-color-quirks.html b/layout/reftests/text-decoration/decoration-color-quirks.html new file mode 100644 index 00000000000..a6096988098 --- /dev/null +++ b/layout/reftests/text-decoration/decoration-color-quirks.html @@ -0,0 +1,73 @@ +

+ This blue text has green decoration lines +

+

+ This red text has yellow decoration lines +

+

+ This blue text has red lines +

+

+ This orange text has transparent lines +

+

+ Here is no decoration lines, but + + this blue text has green decoration lines, + and here is no decoration lines too. +

+

+ This is red paragraph and here is no decoration lines, but + + here are green decoration lines, + and here is no decoration lines too. +

+

+ This is purple paragraph and here are decoration lines of current color, but + + here are red decoration lines, + and here are current color decoration lines. +

+

+ This is green paragraph and here are decoration lines of current color, and + + here is specified red decoration color but has current color lines, + and here are current color decoration lines. +

+

+ This is blue paragraph, + + here is red text with blue decoration lines, + and here is blue text without decoration lines. +

+

+ This is blue paragraph and decoration color is specified as green, + + here is red text with green decoration lines, + and here is blue text without decoration lines. +

diff --git a/layout/reftests/text-decoration/decoration-color-standards-ref.html b/layout/reftests/text-decoration/decoration-color-standards-ref.html new file mode 100644 index 00000000000..c59c066be99 --- /dev/null +++ b/layout/reftests/text-decoration/decoration-color-standards-ref.html @@ -0,0 +1,67 @@ + +

+ This blue text has green decoration lines +

+

+ This red text has yellow decoration lines +

+

+ This blue text has red lines +

+

+ This orange text has transparent lines +

+

+ Here is no decoration lines, but + + + this blue text has green decoration lines, + and here is no decoration lines too. +

+

+ This is red paragraph and here is no decoration lines, but + + here are green decoration lines, + and here is no decoration lines too. +

+

+ This is purple paragraph and here are decoration lines of current color, but + + here are red decoration lines, + and here are current color decoration lines. +

+

+ This is green paragraph and here are decoration lines of current color, and + + here is specified red decoration color but has current color lines, + and here are current color decoration lines. +

+

+ This is blue paragraph, + + here is red text with blue decoration lines, + and here is blue text without decoration lines. +

+

+ This is blue paragraph and decoration color is specified as green, + + here is red text with green decoration lines, + and here is blue text without decoration lines. +

diff --git a/layout/reftests/text-decoration/decoration-color-standards.html b/layout/reftests/text-decoration/decoration-color-standards.html new file mode 100644 index 00000000000..8c273a230ed --- /dev/null +++ b/layout/reftests/text-decoration/decoration-color-standards.html @@ -0,0 +1,72 @@ + +

+ This blue text has green decoration lines +

+

+ This red text has yellow decoration lines +

+

+ This blue text has red lines +

+

+ This orange text has transparent lines +

+

+ Here is no decoration lines, but + + this blue text has green decoration lines, + and here is no decoration lines too. +

+

+ This is red paragraph and here is no decoration lines, but + + here are green decoration lines, + and here is no decoration lines too.

+

+ This is purple paragraph and here are decoration lines of current color, but + + here are red decoration lines, + and here are current color decoration lines. +

+

+ This is green paragraph and here are decoration lines of current color, and + + here is specified red decoration color but has current color lines, + and here are current color decoration lines. +

+

+ This is blue paragraph, + + here is red text with blue decoration lines, + and here is blue text without decoration lines. +

+

+ This is blue paragraph and decoration color is specified as green, + + here is red text with green decoration lines, + and here is blue text without decoration lines. +

diff --git a/layout/reftests/text-decoration/decoration-style-quirks-ref.html b/layout/reftests/text-decoration/decoration-style-quirks-ref.html new file mode 100644 index 00000000000..4a7c41a4ed6 --- /dev/null +++ b/layout/reftests/text-decoration/decoration-style-quirks-ref.html @@ -0,0 +1,42 @@ +

+ Here is specified the decoration style as dotted but no decoration lines, + however, + + here has solid decoration lines, + and here has no decoration lines. +

+

+ Here is specified the decoration style as dashed but no decoration lines, + however, + + here has inherited decoration lines, + and here has no decoration lines. +

+

+ + Here has dotted decoration lines, + + here has wavy decoration + lines, + and here has dotted decoration lines. +

+

+ + Here has double decoration lines, + + here is specified as dashed decoration lines but should be + ignored, + and here has double decoration lines. +

diff --git a/layout/reftests/text-decoration/decoration-style-quirks.html b/layout/reftests/text-decoration/decoration-style-quirks.html new file mode 100644 index 00000000000..07b6e992d42 --- /dev/null +++ b/layout/reftests/text-decoration/decoration-style-quirks.html @@ -0,0 +1,33 @@ +

+ Here is specified the decoration style as dotted but no decoration lines, however, + + here has solid decoration lines, + and here has no decoration lines. +

+

+ Here is specified the decoration style as dashed but no decoration lines, + however, + + here has inherited decoration lines, + and here has no decoration lines. +

+

+ Here has dotted decoration lines, + + here has wavy decoration lines, + and here has dotted decoration lines. +

+

+ Here has double decoration lines, + + here is specified as dashed decoration lines but should be ignored, + and here has double decoration lines. +

diff --git a/layout/reftests/text-decoration/decoration-style-standards-ref.html b/layout/reftests/text-decoration/decoration-style-standards-ref.html new file mode 100644 index 00000000000..5eae6b7998a --- /dev/null +++ b/layout/reftests/text-decoration/decoration-style-standards-ref.html @@ -0,0 +1,27 @@ + +

+ Here is specified the decoration style as dotted but no decoration lines, + however, + + here has solid decoration lines, + and here has no decoration lines. +

+

+ Here is specified the decoration style as dashed but no decoration lines, + however, + + here has inherited decoration lines, + and here has no decoration lines. +

+

+ Here has double decoration lines, + + here is specified as dashed decoration lines but should be ignored, + and here has double decoration lines. +

diff --git a/layout/reftests/text-decoration/decoration-style-standards.html b/layout/reftests/text-decoration/decoration-style-standards.html new file mode 100644 index 00000000000..8752ba83f50 --- /dev/null +++ b/layout/reftests/text-decoration/decoration-style-standards.html @@ -0,0 +1,25 @@ + +

+ Here is specified the decoration style as dotted but no decoration lines, + however, + + here has solid decoration lines, and here has no decoration lines. +

+

+ Here is specified the decoration style as dashed but no decoration lines, + however, + + here has inherited decoration lines, + and here has no decoration lines. +

+

+ Here has double decoration lines, + + here is specified as dashed decoration lines but should be ignored, + and here has double decoration lines. +

diff --git a/layout/reftests/text-decoration/line-through-style-block-dashed-quirks.html b/layout/reftests/text-decoration/line-through-style-block-dashed-quirks.html new file mode 100644 index 00000000000..1f4bdceccb9 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-dashed-quirks.html @@ -0,0 +1 @@ +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-dashed-standards.html b/layout/reftests/text-decoration/line-through-style-block-dashed-standards.html new file mode 100644 index 00000000000..aa487dcbdfb --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-dashed-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-dotted-quirks.html b/layout/reftests/text-decoration/line-through-style-block-dotted-quirks.html new file mode 100644 index 00000000000..9e9492e78c7 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-dotted-quirks.html @@ -0,0 +1 @@ +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-dotted-standards.html b/layout/reftests/text-decoration/line-through-style-block-dotted-standards.html new file mode 100644 index 00000000000..f8ab2289e71 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-dotted-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-double-quirks.html b/layout/reftests/text-decoration/line-through-style-block-double-quirks.html new file mode 100644 index 00000000000..066b4c6e74e --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-double-quirks.html @@ -0,0 +1 @@ +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-double-standards.html b/layout/reftests/text-decoration/line-through-style-block-double-standards.html new file mode 100644 index 00000000000..723df7fb401 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-double-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-quirks-ref.html b/layout/reftests/text-decoration/line-through-style-block-quirks-ref.html new file mode 100644 index 00000000000..53c4a2fd4a3 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-quirks-ref.html @@ -0,0 +1 @@ +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-solid-quirks.html b/layout/reftests/text-decoration/line-through-style-block-solid-quirks.html new file mode 100644 index 00000000000..0d610d2e779 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-solid-quirks.html @@ -0,0 +1 @@ +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-solid-standards.html b/layout/reftests/text-decoration/line-through-style-block-solid-standards.html new file mode 100644 index 00000000000..953c5c7ac83 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-solid-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-standards-ref.html b/layout/reftests/text-decoration/line-through-style-block-standards-ref.html new file mode 100644 index 00000000000..cea0d3718ba --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-standards-ref.html @@ -0,0 +1,2 @@ + +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-wavy-quirks.html b/layout/reftests/text-decoration/line-through-style-block-wavy-quirks.html new file mode 100644 index 00000000000..11bc23063e9 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-wavy-quirks.html @@ -0,0 +1 @@ +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-block-wavy-standards.html b/layout/reftests/text-decoration/line-through-style-block-wavy-standards.html new file mode 100644 index 00000000000..50af612ea4e --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-block-wavy-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has line-through

diff --git a/layout/reftests/text-decoration/line-through-style-inline-dashed-quirks.html b/layout/reftests/text-decoration/line-through-style-inline-dashed-quirks.html new file mode 100644 index 00000000000..39b29e2da52 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-dashed-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-dashed-standards.html b/layout/reftests/text-decoration/line-through-style-inline-dashed-standards.html new file mode 100644 index 00000000000..68ff8f825e5 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-dashed-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-dotted-quirks.html b/layout/reftests/text-decoration/line-through-style-inline-dotted-quirks.html new file mode 100644 index 00000000000..fd1b4275522 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-dotted-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-dotted-standards.html b/layout/reftests/text-decoration/line-through-style-inline-dotted-standards.html new file mode 100644 index 00000000000..bc6f492ae1a --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-dotted-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-double-quirks.html b/layout/reftests/text-decoration/line-through-style-inline-double-quirks.html new file mode 100644 index 00000000000..a141b1b0f12 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-double-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-double-standards.html b/layout/reftests/text-decoration/line-through-style-inline-double-standards.html new file mode 100644 index 00000000000..63918c4f3a9 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-double-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-quirks-ref.html b/layout/reftests/text-decoration/line-through-style-inline-quirks-ref.html new file mode 100644 index 00000000000..789426b018b --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-quirks-ref.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-solid-quirks.html b/layout/reftests/text-decoration/line-through-style-inline-solid-quirks.html new file mode 100644 index 00000000000..881cc564f4d --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-solid-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-solid-standards.html b/layout/reftests/text-decoration/line-through-style-inline-solid-standards.html new file mode 100644 index 00000000000..0349446fced --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-solid-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-standards-ref.html b/layout/reftests/text-decoration/line-through-style-inline-standards-ref.html new file mode 100644 index 00000000000..8b401685f88 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-standards-ref.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-wavy-quirks.html b/layout/reftests/text-decoration/line-through-style-inline-wavy-quirks.html new file mode 100644 index 00000000000..670b4984292 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-wavy-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/line-through-style-inline-wavy-standards.html b/layout/reftests/text-decoration/line-through-style-inline-wavy-standards.html new file mode 100644 index 00000000000..ce401250179 --- /dev/null +++ b/layout/reftests/text-decoration/line-through-style-inline-wavy-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has line-through, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-block-dashed-quirks.html b/layout/reftests/text-decoration/overline-style-block-dashed-quirks.html new file mode 100644 index 00000000000..f0f384ee371 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-dashed-quirks.html @@ -0,0 +1 @@ +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-dashed-standards.html b/layout/reftests/text-decoration/overline-style-block-dashed-standards.html new file mode 100644 index 00000000000..0635808ea66 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-dashed-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-dotted-quirks.html b/layout/reftests/text-decoration/overline-style-block-dotted-quirks.html new file mode 100644 index 00000000000..e723fecca23 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-dotted-quirks.html @@ -0,0 +1 @@ +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-dotted-standards.html b/layout/reftests/text-decoration/overline-style-block-dotted-standards.html new file mode 100644 index 00000000000..4cfd6017748 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-dotted-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-double-quirks.html b/layout/reftests/text-decoration/overline-style-block-double-quirks.html new file mode 100644 index 00000000000..83041daec2d --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-double-quirks.html @@ -0,0 +1 @@ +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-double-standards.html b/layout/reftests/text-decoration/overline-style-block-double-standards.html new file mode 100644 index 00000000000..e0703f833a8 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-double-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-quirks-ref.html b/layout/reftests/text-decoration/overline-style-block-quirks-ref.html new file mode 100644 index 00000000000..07353927d9d --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-quirks-ref.html @@ -0,0 +1 @@ +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-solid-quirks.html b/layout/reftests/text-decoration/overline-style-block-solid-quirks.html new file mode 100644 index 00000000000..ab36e02582e --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-solid-quirks.html @@ -0,0 +1 @@ +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-solid-standards.html b/layout/reftests/text-decoration/overline-style-block-solid-standards.html new file mode 100644 index 00000000000..2c599f41121 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-solid-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-standards-ref.html b/layout/reftests/text-decoration/overline-style-block-standards-ref.html new file mode 100644 index 00000000000..c349ca362fb --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-standards-ref.html @@ -0,0 +1,2 @@ + +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-wavy-quirks.html b/layout/reftests/text-decoration/overline-style-block-wavy-quirks.html new file mode 100644 index 00000000000..55af791b5fd --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-wavy-quirks.html @@ -0,0 +1 @@ +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-block-wavy-standards.html b/layout/reftests/text-decoration/overline-style-block-wavy-standards.html new file mode 100644 index 00000000000..1e428527b9c --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-block-wavy-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has overline

diff --git a/layout/reftests/text-decoration/overline-style-inline-dashed-quirks.html b/layout/reftests/text-decoration/overline-style-inline-dashed-quirks.html new file mode 100644 index 00000000000..ef69b77924a --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-dashed-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-dashed-standards.html b/layout/reftests/text-decoration/overline-style-inline-dashed-standards.html new file mode 100644 index 00000000000..d78340a14b4 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-dashed-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-dotted-quirks.html b/layout/reftests/text-decoration/overline-style-inline-dotted-quirks.html new file mode 100644 index 00000000000..98bb770582c --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-dotted-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-dotted-standards.html b/layout/reftests/text-decoration/overline-style-inline-dotted-standards.html new file mode 100644 index 00000000000..c7c83d221d3 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-dotted-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-double-quirks.html b/layout/reftests/text-decoration/overline-style-inline-double-quirks.html new file mode 100644 index 00000000000..d90818ef43a --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-double-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-double-standards.html b/layout/reftests/text-decoration/overline-style-inline-double-standards.html new file mode 100644 index 00000000000..8de5ba9a888 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-double-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-quirks-ref.html b/layout/reftests/text-decoration/overline-style-inline-quirks-ref.html new file mode 100644 index 00000000000..a0a2c6c3f7e --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-quirks-ref.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-solid-quirks.html b/layout/reftests/text-decoration/overline-style-inline-solid-quirks.html new file mode 100644 index 00000000000..99c545e938a --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-solid-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-solid-standards.html b/layout/reftests/text-decoration/overline-style-inline-solid-standards.html new file mode 100644 index 00000000000..70117cfa6b9 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-solid-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-standards-ref.html b/layout/reftests/text-decoration/overline-style-inline-standards-ref.html new file mode 100644 index 00000000000..c4890983a8e --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-standards-ref.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-wavy-quirks.html b/layout/reftests/text-decoration/overline-style-inline-wavy-quirks.html new file mode 100644 index 00000000000..c582a9df931 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-wavy-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/overline-style-inline-wavy-standards.html b/layout/reftests/text-decoration/overline-style-inline-wavy-standards.html new file mode 100644 index 00000000000..e2bfac1b175 --- /dev/null +++ b/layout/reftests/text-decoration/overline-style-inline-wavy-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has overline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/reftest.list b/layout/reftests/text-decoration/reftest.list index 666400779e3..1efdb8b666c 100644 --- a/layout/reftests/text-decoration/reftest.list +++ b/layout/reftests/text-decoration/reftest.list @@ -1,3 +1,67 @@ +== decoration-color-quirks.html decoration-color-quirks-ref.html +== decoration-color-standards.html decoration-color-standards-ref.html +== decoration-style-quirks.html decoration-style-quirks-ref.html +== decoration-style-standards.html decoration-style-standards-ref.html +== line-through-style-block-solid-quirks.html line-through-style-block-quirks-ref.html +!= line-through-style-block-dotted-quirks.html line-through-style-block-quirks-ref.html +!= line-through-style-block-dashed-quirks.html line-through-style-block-quirks-ref.html +!= line-through-style-block-double-quirks.html line-through-style-block-quirks-ref.html +!= line-through-style-block-wavy-quirks.html line-through-style-block-quirks-ref.html +== line-through-style-inline-solid-quirks.html line-through-style-inline-quirks-ref.html +!= line-through-style-inline-dotted-quirks.html line-through-style-inline-quirks-ref.html +!= line-through-style-inline-dashed-quirks.html line-through-style-inline-quirks-ref.html +!= line-through-style-inline-double-quirks.html line-through-style-inline-quirks-ref.html +!= line-through-style-inline-wavy-quirks.html line-through-style-inline-quirks-ref.html +== line-through-style-block-solid-standards.html line-through-style-block-standards-ref.html +!= line-through-style-block-dotted-standards.html line-through-style-block-standards-ref.html +!= line-through-style-block-dashed-standards.html line-through-style-block-standards-ref.html +!= line-through-style-block-double-standards.html line-through-style-block-standards-ref.html +!= line-through-style-block-wavy-standards.html line-through-style-block-standards-ref.html +== line-through-style-inline-solid-standards.html line-through-style-inline-standards-ref.html +!= line-through-style-inline-dotted-standards.html line-through-style-inline-standards-ref.html +!= line-through-style-inline-dashed-standards.html line-through-style-inline-standards-ref.html +!= line-through-style-inline-double-standards.html line-through-style-inline-standards-ref.html +!= line-through-style-inline-wavy-standards.html line-through-style-inline-standards-ref.html +== overline-style-block-solid-quirks.html overline-style-block-quirks-ref.html +!= overline-style-block-dotted-quirks.html overline-style-block-quirks-ref.html +!= overline-style-block-dashed-quirks.html overline-style-block-quirks-ref.html +!= overline-style-block-double-quirks.html overline-style-block-quirks-ref.html +!= overline-style-block-wavy-quirks.html overline-style-block-quirks-ref.html +== overline-style-inline-solid-quirks.html overline-style-inline-quirks-ref.html +!= overline-style-inline-dotted-quirks.html overline-style-inline-quirks-ref.html +!= overline-style-inline-dashed-quirks.html overline-style-inline-quirks-ref.html +!= overline-style-inline-double-quirks.html overline-style-inline-quirks-ref.html +!= overline-style-inline-wavy-quirks.html overline-style-inline-quirks-ref.html +== overline-style-block-solid-standards.html overline-style-block-standards-ref.html +!= overline-style-block-dotted-standards.html overline-style-block-standards-ref.html +!= overline-style-block-dashed-standards.html overline-style-block-standards-ref.html +!= overline-style-block-double-standards.html overline-style-block-standards-ref.html +!= overline-style-block-wavy-standards.html overline-style-block-standards-ref.html +== overline-style-inline-solid-standards.html overline-style-inline-standards-ref.html +!= overline-style-inline-dotted-standards.html overline-style-inline-standards-ref.html +!= overline-style-inline-dashed-standards.html overline-style-inline-standards-ref.html +!= overline-style-inline-double-standards.html overline-style-inline-standards-ref.html +!= overline-style-inline-wavy-standards.html overline-style-inline-standards-ref.html +== underline-style-block-solid-quirks.html underline-style-block-quirks-ref.html +!= underline-style-block-dotted-quirks.html underline-style-block-quirks-ref.html +!= underline-style-block-dashed-quirks.html underline-style-block-quirks-ref.html +!= underline-style-block-double-quirks.html underline-style-block-quirks-ref.html +!= underline-style-block-wavy-quirks.html underline-style-block-quirks-ref.html +== underline-style-inline-solid-quirks.html underline-style-inline-quirks-ref.html +!= underline-style-inline-dotted-quirks.html underline-style-inline-quirks-ref.html +!= underline-style-inline-dashed-quirks.html underline-style-inline-quirks-ref.html +!= underline-style-inline-double-quirks.html underline-style-inline-quirks-ref.html +!= underline-style-inline-wavy-quirks.html underline-style-inline-quirks-ref.html +== underline-style-block-solid-standards.html underline-style-block-standards-ref.html +!= underline-style-block-dotted-standards.html underline-style-block-standards-ref.html +!= underline-style-block-dashed-standards.html underline-style-block-standards-ref.html +!= underline-style-block-double-standards.html underline-style-block-standards-ref.html +!= underline-style-block-wavy-standards.html underline-style-block-standards-ref.html +== underline-style-inline-solid-standards.html underline-style-inline-standards-ref.html +!= underline-style-inline-dotted-standards.html underline-style-inline-standards-ref.html +!= underline-style-inline-dashed-standards.html underline-style-inline-standards-ref.html +!= underline-style-inline-double-standards.html underline-style-inline-standards-ref.html +!= underline-style-inline-wavy-standards.html underline-style-inline-standards-ref.html == underline-block-quirks.html underline-block-quirks-ref.html != underline-block-quirks.html underline-block-quirks-notref.html == underline-inline-block-quirks.html underline-inline-block-quirks-ref.html diff --git a/layout/reftests/text-decoration/underline-style-block-dashed-quirks.html b/layout/reftests/text-decoration/underline-style-block-dashed-quirks.html new file mode 100644 index 00000000000..26100073fb7 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-dashed-quirks.html @@ -0,0 +1 @@ +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-dashed-standards.html b/layout/reftests/text-decoration/underline-style-block-dashed-standards.html new file mode 100644 index 00000000000..9f55e1241d6 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-dashed-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-dotted-quirks.html b/layout/reftests/text-decoration/underline-style-block-dotted-quirks.html new file mode 100644 index 00000000000..5f1b460c366 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-dotted-quirks.html @@ -0,0 +1 @@ +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-dotted-standards.html b/layout/reftests/text-decoration/underline-style-block-dotted-standards.html new file mode 100644 index 00000000000..f879926bbba --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-dotted-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-double-quirks.html b/layout/reftests/text-decoration/underline-style-block-double-quirks.html new file mode 100644 index 00000000000..f3c5e5d1a67 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-double-quirks.html @@ -0,0 +1 @@ +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-double-standards.html b/layout/reftests/text-decoration/underline-style-block-double-standards.html new file mode 100644 index 00000000000..69133fc5257 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-double-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-quirks-ref.html b/layout/reftests/text-decoration/underline-style-block-quirks-ref.html new file mode 100644 index 00000000000..65d66622f1d --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-quirks-ref.html @@ -0,0 +1 @@ +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-solid-quirks.html b/layout/reftests/text-decoration/underline-style-block-solid-quirks.html new file mode 100644 index 00000000000..7acf86e3ee9 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-solid-quirks.html @@ -0,0 +1 @@ +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-solid-standards.html b/layout/reftests/text-decoration/underline-style-block-solid-standards.html new file mode 100644 index 00000000000..25eddbdd0c3 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-solid-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-standards-ref.html b/layout/reftests/text-decoration/underline-style-block-standards-ref.html new file mode 100644 index 00000000000..4e03e4f07b5 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-standards-ref.html @@ -0,0 +1,2 @@ + +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-wavy-quirks.html b/layout/reftests/text-decoration/underline-style-block-wavy-quirks.html new file mode 100644 index 00000000000..565e643c611 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-wavy-quirks.html @@ -0,0 +1 @@ +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-block-wavy-standards.html b/layout/reftests/text-decoration/underline-style-block-wavy-standards.html new file mode 100644 index 00000000000..a19adf79fe4 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-block-wavy-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has underline

diff --git a/layout/reftests/text-decoration/underline-style-inline-dashed-quirks.html b/layout/reftests/text-decoration/underline-style-inline-dashed-quirks.html new file mode 100644 index 00000000000..6ac4ecee850 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-dashed-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-dashed-standards.html b/layout/reftests/text-decoration/underline-style-inline-dashed-standards.html new file mode 100644 index 00000000000..a5cec08f286 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-dashed-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-dotted-quirks.html b/layout/reftests/text-decoration/underline-style-inline-dotted-quirks.html new file mode 100644 index 00000000000..2a4bb270e1c --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-dotted-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-dotted-standards.html b/layout/reftests/text-decoration/underline-style-inline-dotted-standards.html new file mode 100644 index 00000000000..bcd18e9beb7 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-dotted-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-double-quirks.html b/layout/reftests/text-decoration/underline-style-inline-double-quirks.html new file mode 100644 index 00000000000..2545db56e5c --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-double-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-double-standards.html b/layout/reftests/text-decoration/underline-style-inline-double-standards.html new file mode 100644 index 00000000000..347d7fac6d7 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-double-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-quirks-ref.html b/layout/reftests/text-decoration/underline-style-inline-quirks-ref.html new file mode 100644 index 00000000000..d8a1b40b86c --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-quirks-ref.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-solid-quirks.html b/layout/reftests/text-decoration/underline-style-inline-solid-quirks.html new file mode 100644 index 00000000000..9cee5809484 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-solid-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-solid-standards.html b/layout/reftests/text-decoration/underline-style-inline-solid-standards.html new file mode 100644 index 00000000000..a878a438585 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-solid-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-standards-ref.html b/layout/reftests/text-decoration/underline-style-inline-standards-ref.html new file mode 100644 index 00000000000..7cc4eec7e2b --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-standards-ref.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-wavy-quirks.html b/layout/reftests/text-decoration/underline-style-inline-wavy-quirks.html new file mode 100644 index 00000000000..c0792822679 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-wavy-quirks.html @@ -0,0 +1 @@ +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

diff --git a/layout/reftests/text-decoration/underline-style-inline-wavy-standards.html b/layout/reftests/text-decoration/underline-style-inline-wavy-standards.html new file mode 100644 index 00000000000..32bdeb24da0 --- /dev/null +++ b/layout/reftests/text-decoration/underline-style-inline-wavy-standards.html @@ -0,0 +1,2 @@ + +

This paragraph has no decoration lines, but here has underline, and here has no decoration lines.

From c7849fae15ba073c1dbf58bc2336858389b1c2a9 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Wed, 9 Feb 2011 13:04:58 +0900 Subject: [PATCH 08/12] Bug 630817 Should compute modifier key state for DOM keydown event from native keypress event's state and its keyval r=karlt --- widget/src/gtk2/nsWindow.cpp | 48 ++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp index d3343dbb1ae..9e27b9af308 100644 --- a/widget/src/gtk2/nsWindow.cpp +++ b/widget/src/gtk2/nsWindow.cpp @@ -488,14 +488,46 @@ void nsWindow::InitKeyEvent(nsKeyEvent &aEvent, GdkEventKey *aGdkEvent) { aEvent.keyCode = GdkKeyCodeToDOMKeyCode(aGdkEvent->keyval); - aEvent.isShift = (aGdkEvent->state & GDK_SHIFT_MASK) - ? PR_TRUE : PR_FALSE; - aEvent.isControl = (aGdkEvent->state & GDK_CONTROL_MASK) - ? PR_TRUE : PR_FALSE; - aEvent.isAlt = (aGdkEvent->state & GDK_MOD1_MASK) - ? PR_TRUE : PR_FALSE; - aEvent.isMeta = (aGdkEvent->state & GDK_MOD4_MASK) - ? PR_TRUE : PR_FALSE; + // NOTE: The state of given key event indicates adjacent state of + // modifier keys. E.g., even if the event is Shift key press event, + // the bit for Shift is still false. By the same token, even if the + // event is Shift key release event, the bit for Shift is still true. + // Unfortunately, gdk_keyboard_get_modifiers() returns current modifier + // state. It means if there're some pending modifier key press or + // key release events, the result isn't what we want. + // Temporarily, we should compute the state only when the key event + // is GDK_KEY_PRESS. + guint modifierState = aGdkEvent->state; + guint changingMask = 0; + switch (aEvent.keyCode) { + case NS_VK_SHIFT: + changingMask = GDK_SHIFT_MASK; + break; + case NS_VK_CONTROL: + changingMask = GDK_CONTROL_MASK; + break; + case NS_VK_ALT: + changingMask = GDK_MOD1_MASK; + break; + case NS_VK_META: + changingMask = GDK_MOD4_MASK; + break; + } + if (changingMask != 0) { + // This key event is caused by pressing or releasing a modifier key. + if (aGdkEvent->type == GDK_KEY_PRESS) { + // If new modifier key is pressed, add the pressed mod mask. + modifierState |= changingMask; + } else { + // XXX If we could know the modifier keys state at the key release + // event, we should cut out changingMask from modifierState. + } + } + aEvent.isShift = (modifierState & GDK_SHIFT_MASK) != 0; + aEvent.isControl = (modifierState & GDK_CONTROL_MASK) != 0; + aEvent.isAlt = (modifierState & GDK_MOD1_MASK) != 0; + aEvent.isMeta = (modifierState & GDK_MOD4_MASK) != 0; + // The transformations above and in gdk for the keyval are not invertible // so link to the GdkEvent (which will vanish soon after return from the // event callback) to give plugins access to hardware_keycode and state. From ab3a694f591c29e352b77685b5b44bc43876c838 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Thu, 31 Mar 2011 21:28:19 +0900 Subject: [PATCH 09/12] Bug 645662 Should not consume mouse down event at the sub menu of splitmenu or toolbarbutton rolled up r=enndeakin --- content/base/src/nsGkAtomList.h | 2 ++ layout/xul/base/src/nsMenuPopupFrame.cpp | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/content/base/src/nsGkAtomList.h b/content/base/src/nsGkAtomList.h index ebbf4d9db36..6fc33a36136 100644 --- a/content/base/src/nsGkAtomList.h +++ b/content/base/src/nsGkAtomList.h @@ -560,6 +560,7 @@ GK_ATOM(member, "member") GK_ATOM(menu, "menu") GK_ATOM(menubar, "menubar") GK_ATOM(menubutton, "menubutton") +GK_ATOM(menuButton, "menu-button") GK_ATOM(menugenerated, "menugenerated") GK_ATOM(menuitem, "menuitem") GK_ATOM(menulist, "menulist") @@ -915,6 +916,7 @@ GK_ATOM(span, "span") GK_ATOM(spellcheck, "spellcheck") GK_ATOM(spinner, "spinner") GK_ATOM(split, "split") +GK_ATOM(splitmenu, "splitmenu") GK_ATOM(splitter, "splitter") GK_ATOM(spring, "spring") GK_ATOM(src, "src") diff --git a/layout/xul/base/src/nsMenuPopupFrame.cpp b/layout/xul/base/src/nsMenuPopupFrame.cpp index 96e16d5fba0..d8558e53eea 100644 --- a/layout/xul/base/src/nsMenuPopupFrame.cpp +++ b/layout/xul/base/src/nsMenuPopupFrame.cpp @@ -1413,10 +1413,14 @@ PRBool nsMenuPopupFrame::ConsumeOutsideClicks() #if defined(XP_WIN) || defined(XP_OS2) // Don't consume outside clicks for menus in Windows if (ni->Equals(nsGkAtoms::menu, kNameSpaceID_XUL) || + ni->Equals(nsGkAtoms::splitmenu, kNameSpaceID_XUL) || ni->Equals(nsGkAtoms::popupset, kNameSpaceID_XUL) || - (ni->Equals(nsGkAtoms::button, kNameSpaceID_XUL) && - parentContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type, - nsGkAtoms::menu, eCaseMatters))) { + ((ni->Equals(nsGkAtoms::button, kNameSpaceID_XUL) || + ni->Equals(nsGkAtoms::toolbarbutton, kNameSpaceID_XUL)) && + (parentContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type, + nsGkAtoms::menu, eCaseMatters) || + parentContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type, + nsGkAtoms::menuButton, eCaseMatters)))) { return PR_FALSE; } #endif From 8707611437c08384dc93198dba89ecd5dbf2f5e5 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Thu, 31 Mar 2011 09:11:21 -0400 Subject: [PATCH 10/12] Backed out changeset a5dbece71e4a due to test failures --- browser/app/profile/firefox.js | 4 +- browser/installer/Makefile.in | 1 + browser/installer/package-manifest.in | 2 + chrome/src/Makefile.in | 5 +- chrome/src/nsChromeRegistry.cpp | 4 + chrome/src/nsChromeRegistryChrome.cpp | 4 + chrome/src/nsChromeRegistryChrome.h | 4 + chrome/test/Makefile.in | 2 + config/autoconf.mk.in | 1 + configure.in | 16 ++++ content/base/src/Makefile.in | 5 ++ content/base/src/nsDocument.cpp | 2 + content/base/src/nsFrameLoader.cpp | 80 ++++++++++++++++++- content/base/src/nsFrameLoader.h | 12 +++ content/base/src/nsFrameMessageManager.cpp | 13 +++ content/canvas/src/Makefile.in | 5 ++ .../canvas/src/nsCanvasRenderingContext2D.cpp | 17 ++++ content/events/src/nsDOMEvent.cpp | 8 ++ content/events/src/nsDOMNotifyPaintEvent.cpp | 4 + content/events/src/nsDOMNotifyPaintEvent.h | 2 + content/events/src/nsDOMScrollAreaEvent.cpp | 4 + content/events/src/nsDOMScrollAreaEvent.h | 2 + content/events/src/nsDOMUIEvent.cpp | 4 + content/events/src/nsDOMUIEvent.h | 2 + content/events/src/nsEventStateManager.cpp | 14 ++++ content/events/src/nsEventStateManager.h | 2 + content/html/content/src/Makefile.in | 7 +- .../html/content/src/nsHTMLCanvasElement.cpp | 4 + .../html/content/src/nsHTMLDNSPrefetch.cpp | 8 ++ content/html/content/src/nsHTMLDNSPrefetch.h | 2 + content/media/nsAudioStream.cpp | 10 ++- content/media/nsAudioStream.h | 7 +- docshell/base/IHistory.h | 2 +- docshell/base/nsDocShell.cpp | 6 ++ dom/Makefile.in | 5 ++ dom/base/Makefile.in | 13 ++- dom/base/nsGlobalWindow.cpp | 2 + dom/plugins/Makefile.in | 3 + dom/src/geolocation/Makefile.in | 2 + dom/src/geolocation/nsGeolocation.cpp | 10 +++ dom/src/geolocation/nsGeolocation.h | 8 ++ .../notification/nsDesktopNotification.cpp | 4 + dom/src/notification/nsDesktopNotification.h | 12 ++- dom/src/offline/nsDOMOfflineResourceList.cpp | 5 ++ dom/src/storage/Makefile.in | 2 + dom/src/storage/nsDOMStorage.cpp | 13 ++- embedding/browser/webBrowser/nsWebBrowser.cpp | 5 +- extensions/cookie/nsPermissionManager.cpp | 26 ++++++ extensions/cookie/nsPermissionManager.h | 2 + extensions/cookie/test/Makefile.in | 2 + gfx/Makefile.in | 6 +- gfx/ipc/Makefile.in | 4 + gfx/layers/Layers.cpp | 21 ++++- gfx/layers/Makefile.in | 10 ++- gfx/layers/basic/BasicLayers.cpp | 15 ++-- gfx/layers/basic/BasicLayers.h | 8 ++ gfx/layers/opengl/CanvasLayerOGL.cpp | 6 ++ gfx/layers/opengl/CanvasLayerOGL.h | 4 + gfx/layers/opengl/ColorLayerOGL.cpp | 2 + gfx/layers/opengl/ColorLayerOGL.h | 4 + gfx/layers/opengl/ContainerLayerOGL.cpp | 4 + gfx/layers/opengl/ContainerLayerOGL.h | 4 + gfx/layers/opengl/ImageLayerOGL.cpp | 6 ++ gfx/layers/opengl/ImageLayerOGL.h | 4 + gfx/layers/opengl/LayerManagerOGL.cpp | 18 +++++ gfx/layers/opengl/LayerManagerOGL.h | 6 ++ gfx/layers/opengl/ThebesLayerOGL.cpp | 6 ++ gfx/layers/opengl/ThebesLayerOGL.h | 8 +- gfx/thebes/Makefile.in | 12 ++- gfx/thebes/gfxAndroidPlatform.cpp | 4 + ipc/chromium/chromium-config.mk | 3 + js/src/xpconnect/shell/xpcshell.cpp | 8 ++ layout/Makefile.in | 5 +- layout/base/Makefile.in | 2 + layout/base/nsDisplayList.cpp | 4 + layout/base/nsDisplayList.h | 2 + layout/build/Makefile.in | 10 ++- layout/build/nsLayoutModule.cpp | 2 + layout/generic/nsObjectFrame.cpp | 6 ++ layout/generic/nsSubDocumentFrame.cpp | 4 + modules/libpref/src/nsPrefBranch.cpp | 26 ++++++ modules/libpref/src/nsPrefService.cpp | 14 ++++ modules/libpref/test/Makefile.in | 2 + modules/plugin/base/src/Makefile.in | 2 + modules/plugin/base/src/nsJSNPRuntime.cpp | 10 +++ modules/plugin/base/src/nsNPAPIPlugin.cpp | 12 +++ modules/plugin/base/src/nsNPAPIPlugin.h | 2 + modules/plugin/base/src/nsPluginHost.cpp | 6 ++ modules/plugin/base/src/nsPluginHost.h | 2 + .../base/src/nsPluginNativeWindowWin.cpp | 4 + .../plugin/base/src/nsPluginsDirDarwin.cpp | 6 ++ netwerk/Makefile.in | 14 +++- netwerk/base/public/Makefile.in | 8 +- netwerk/base/public/nsNetUtil.h | 4 + netwerk/base/src/Makefile.in | 9 ++- netwerk/base/src/nsBufferedStreams.cpp | 8 ++ netwerk/base/src/nsFileStreams.cpp | 8 ++ netwerk/base/src/nsIOService.cpp | 4 + netwerk/base/src/nsMIMEInputStream.cpp | 8 ++ netwerk/base/src/nsSimpleNestedURI.cpp | 7 ++ netwerk/base/src/nsSimpleURI.cpp | 8 ++ netwerk/base/src/nsStandardURL.cpp | 10 +++ netwerk/base/src/nsStandardURL.h | 2 + netwerk/build/Makefile.in | 5 +- netwerk/build/nsNetModule.cpp | 10 +++ netwerk/cache/nsCacheService.cpp | 4 + netwerk/cookie/Makefile.in | 2 + netwerk/cookie/nsCookieService.cpp | 6 ++ netwerk/cookie/nsCookieService.h | 4 + .../protocol/about/nsAboutProtocolHandler.cpp | 7 ++ netwerk/protocol/ftp/Makefile.in | 7 ++ netwerk/protocol/ftp/nsFtpProtocolHandler.cpp | 6 ++ netwerk/protocol/http/HttpBaseChannel.cpp | 4 + netwerk/protocol/http/Makefile.in | 7 ++ netwerk/protocol/http/nsHttp.h | 2 + netwerk/protocol/http/nsHttpChannel.cpp | 2 + netwerk/protocol/http/nsHttpHandler.cpp | 16 +++- netwerk/protocol/http/nsHttpResponseHead.h | 2 + netwerk/protocol/http/nsHttpTransaction.cpp | 2 + netwerk/protocol/res/nsResProtocolHandler.cpp | 4 + netwerk/protocol/res/nsResProtocolHandler.h | 2 + netwerk/protocol/wyciwyg/Makefile.in | 13 ++- netwerk/protocol/wyciwyg/nsWyciwyg.h | 2 + netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp | 8 ++ .../wyciwyg/nsWyciwygProtocolHandler.cpp | 8 ++ netwerk/test/Makefile.in | 2 + security/manager/ssl/src/Makefile.in | 5 +- security/manager/ssl/src/nsNSSCertificate.cpp | 10 ++- security/manager/ssl/src/nsNSSComponent.cpp | 4 + security/manager/ssl/src/nsNSSIOLayer.cpp | 2 + security/manager/ssl/src/nsNSSModule.cpp | 9 +++ .../components/contentprefs/tests/Makefile.in | 2 + .../places/tests/cpp/test_IHistory.cpp | 4 + toolkit/crashreporter/nsExceptionHandler.cpp | 31 +++++-- toolkit/crashreporter/nsExceptionHandler.h | 4 + toolkit/library/dlldeps-xul.cpp | 2 + toolkit/library/libxul-config.mk | 12 ++- toolkit/library/nsStaticXULComponents.cpp | 2 +- toolkit/mozapps/installer/packager.mk | 2 + toolkit/toolkit-tiers.mk | 2 + toolkit/xre/nsAppRunner.cpp | 17 ++++ toolkit/xre/nsAppRunner.h | 2 + toolkit/xre/nsEmbedFunctions.cpp | 8 ++ toolkit/xre/nsSigHandlers.cpp | 10 ++- toolkit/xre/nsX11ErrorHandler.cpp | 4 + uriloader/exthandler/Makefile.in | 10 ++- .../exthandler/nsExternalHelperAppService.cpp | 15 +++- uriloader/exthandler/tests/Makefile.in | 2 + uriloader/prefetch/Makefile.in | 10 ++- .../prefetch/OfflineCacheUpdateChild.cpp | 2 + uriloader/prefetch/nsOfflineCacheUpdate.cpp | 4 + .../prefetch/nsOfflineCacheUpdateService.cpp | 9 ++- widget/public/nsGUIEvent.h | 16 ++++ widget/public/nsIWidget.h | 10 +++ widget/src/android/AndroidBridge.cpp | 2 + widget/src/android/nsWidgetFactory.cpp | 16 ++-- widget/src/android/nsWindow.cpp | 8 ++ widget/src/gtk2/nsWindow.h | 4 +- widget/src/qt/nsWidgetFactory.cpp | 4 + widget/src/shared/nsShmImage.h | 4 +- widget/src/windows/Makefile.in | 2 + widget/src/windows/nsWindow.cpp | 18 +++++ widget/src/windows/nsWindow.h | 4 + widget/src/windows/nsWindowGfx.cpp | 6 ++ widget/src/xpwidgets/Makefile.in | 7 ++ widget/src/xpwidgets/nsBaseAppShell.cpp | 9 +++ widget/src/xpwidgets/nsBaseWidget.cpp | 4 + xpcom/base/nsTraceRefcntImpl.cpp | 8 ++ xpcom/build/nsXPComInit.cpp | 10 +++ xpcom/components/ManifestParser.cpp | 2 + xpcom/io/nsMultiplexInputStream.cpp | 8 ++ xpcom/io/nsStringStream.cpp | 8 ++ xpcom/threads/nsThread.cpp | 6 +- 173 files changed, 1151 insertions(+), 67 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 7cdde5cc8f3..77c305bc6f9 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -948,8 +948,10 @@ pref("dom.ipc.plugins.enabled.i386.flash player.plugin", true); pref("dom.ipc.plugins.enabled.i386.javaplugin2_npapi.plugin", true); // x86_64 ipc preferences pref("dom.ipc.plugins.enabled.x86_64", true); -#else +#elifdef MOZ_IPC pref("dom.ipc.plugins.enabled", true); +#else +pref("dom.ipc.plugins.enabled", false); #endif #ifdef XP_WIN diff --git a/browser/installer/Makefile.in b/browser/installer/Makefile.in index acea03715aa..376e3e04a08 100644 --- a/browser/installer/Makefile.in +++ b/browser/installer/Makefile.in @@ -94,6 +94,7 @@ DEFINES += -DMOZ_D3DX9_DLL=$(MOZ_D3DX9_DLL) DEFINES += -DMOZ_D3DCOMPILER_DLL=$(MOZ_D3DCOMPILER_DLL) endif +# Don't ifdef MOZ_IPC this because mac ppc needs it too. include $(topsrcdir)/ipc/app/defs.mk DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 769bdac37db..91d9b44b780 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -51,11 +51,13 @@ #else @BINPATH@/@DLL_PREFIX@xul@DLL_SUFFIX@ #endif +#ifdef MOZ_IPC #ifdef XP_MACOSX @BINPATH@/@MOZ_CHILD_PROCESS_NAME@.app/ #else @BINPATH@/@MOZ_CHILD_PROCESS_NAME@ #endif +#endif #ifdef WINCE @BINPATH@/mozce_shunt.dll #elifdef XP_WIN32 diff --git a/chrome/src/Makefile.in b/chrome/src/Makefile.in index b1b0d1a7fd8..8d6426641c4 100644 --- a/chrome/src/Makefile.in +++ b/chrome/src/Makefile.in @@ -58,9 +58,12 @@ CPPSRCS = \ nsChromeRegistry.cpp \ nsChromeRegistryChrome.cpp \ nsChromeProtocolHandler.cpp \ - nsChromeRegistryContent.cpp \ $(NULL) +ifdef MOZ_IPC +CPPSRCS += nsChromeRegistryContent.cpp +endif + EXTRA_DSO_LDOPTS = \ $(MOZ_UNICHARUTIL_LIBS) \ $(MOZ_COMPONENT_LIBS) \ diff --git a/chrome/src/nsChromeRegistry.cpp b/chrome/src/nsChromeRegistry.cpp index 254253ed558..76f9da9b36a 100644 --- a/chrome/src/nsChromeRegistry.cpp +++ b/chrome/src/nsChromeRegistry.cpp @@ -41,7 +41,9 @@ #include "nsChromeRegistry.h" #include "nsChromeRegistryChrome.h" +#ifdef MOZ_IPC #include "nsChromeRegistryContent.h" +#endif #include @@ -675,9 +677,11 @@ nsChromeRegistry::GetSingleton() } nsRefPtr cr; +#ifdef MOZ_IPC if (GeckoProcessType_Content == XRE_GetProcessType()) cr = new nsChromeRegistryContent(); else +#endif cr = new nsChromeRegistryChrome(); if (NS_FAILED(cr->Init())) diff --git a/chrome/src/nsChromeRegistryChrome.cpp b/chrome/src/nsChromeRegistryChrome.cpp index d98ac7b96bd..bc6dc60c341 100644 --- a/chrome/src/nsChromeRegistryChrome.cpp +++ b/chrome/src/nsChromeRegistryChrome.cpp @@ -36,9 +36,11 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "mozilla/dom/PContentParent.h" #include "RegistryMessageUtils.h" #include "nsResProtocolHandler.h" +#endif #include "nsChromeRegistryChrome.h" @@ -441,6 +443,7 @@ void nsChromeRegistryChrome::UpdateSelectedLocale() } } +#ifdef MOZ_IPC static void SerializeURI(nsIURI* aURI, SerializedURI& aSerializedURI) @@ -538,6 +541,7 @@ nsChromeRegistryChrome::CollectPackages(PLDHashTable *table, args->packages.AppendElement(chromePackage); return (PLDHashOperator)PL_DHASH_NEXT; } +#endif static PRBool CanLoadResource(nsIURI* aResourceURI) diff --git a/chrome/src/nsChromeRegistryChrome.h b/chrome/src/nsChromeRegistryChrome.h index 44bd07c7f0a..daee848d5dc 100644 --- a/chrome/src/nsChromeRegistryChrome.h +++ b/chrome/src/nsChromeRegistryChrome.h @@ -75,12 +75,16 @@ class nsChromeRegistryChrome : public nsChromeRegistry nsISimpleEnumerator **_retval); #endif +#ifdef MOZ_IPC void SendRegisteredChrome(mozilla::dom::PContentParent* aChild); +#endif private: +#ifdef MOZ_IPC static PLDHashOperator CollectPackages(PLDHashTable *table, PLDHashEntryHdr *entry, PRUint32 number, void *arg); +#endif nsresult SelectLocaleFromPref(nsIPrefBranch* prefs); NS_OVERRIDE void UpdateSelectedLocale(); diff --git a/chrome/test/Makefile.in b/chrome/test/Makefile.in index 73ba8839e39..6936444d6a4 100644 --- a/chrome/test/Makefile.in +++ b/chrome/test/Makefile.in @@ -47,9 +47,11 @@ MODULE = test_chrome XPCSHELL_TESTS = unit \ $(NULL) +ifdef MOZ_IPC # FIXME/bug 575918: out-of-process xpcshell is broken on OS X ifneq ($(OS_ARCH),Darwin) XPCSHELL_TESTS += unit_ipc endif +endif include $(topsrcdir)/config/rules.mk diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 19fafa6d0d9..0a356a78d23 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -102,6 +102,7 @@ MOZ_DEBUG_FLAGS = @MOZ_DEBUG_FLAGS@ MOZ_DEBUG_LDFLAGS=@MOZ_DEBUG_LDFLAGS@ MOZ_EXTENSIONS = @MOZ_EXTENSIONS@ MOZ_JSDEBUGGER = @MOZ_JSDEBUGGER@ +MOZ_IPC = @MOZ_IPC@ MOZ_IPDL_TESTS = @MOZ_IPDL_TESTS@ MOZ_LEAKY = @MOZ_LEAKY@ MOZ_MEMORY = @MOZ_MEMORY@ diff --git a/configure.in b/configure.in index fd5fb9a1e50..e2c65f0d901 100644 --- a/configure.in +++ b/configure.in @@ -4950,6 +4950,7 @@ MOZ_BRANDING_DIRECTORY= MOZ_OFFICIAL_BRANDING= MOZ_FEEDS=1 MOZ_INSTALLER=1 +MOZ_IPC=1 MOZ_JAVAXPCOM= MOZ_JSDEBUGGER=1 MOZ_MATHML=1 @@ -5821,6 +5822,21 @@ MOZ_ARG_DISABLE_BOOL(jsd, MOZ_JSDEBUGGER=1) +dnl ======================================================== +dnl = Disable IPC support for tabs and plugins +dnl ======================================================== +MOZ_ARG_DISABLE_BOOL(ipc, +[ --disable-ipc Disable IPC for tabs and plugins (not supported)], + MOZ_IPC=, + MOZ_IPC=1) + +if test -z "$MOZ_IPC"; then + AC_MSG_ERROR([--disable-ipc is no longer supported.]) +fi + +AC_DEFINE(MOZ_IPC) +AC_SUBST(MOZ_IPC) + dnl ======================================================== dnl = Enable IPDL's "expensive" unit tests dnl ======================================================== diff --git a/content/base/src/Makefile.in b/content/base/src/Makefile.in index fc7010cf669..b8b9e5bd9d6 100644 --- a/content/base/src/Makefile.in +++ b/content/base/src/Makefile.in @@ -178,9 +178,14 @@ EXTRA_COMPONENTS = \ contentSecurityPolicy.manifest \ contentAreaDropListener.js \ contentAreaDropListener.manifest \ + $(NULL) + +ifdef MOZ_IPC +EXTRA_COMPONENTS += \ messageWakeupService.js \ messageWakeupService.manifest \ $(NULL) +endif EXTRA_JS_MODULES = \ CSPUtils.jsm \ diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 80aaa4e0fe6..e416efa1ee1 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -8350,10 +8350,12 @@ PLDHashOperator UnlockEnumerator(imgIRequest* aKey, nsresult nsDocument::SetImageLockingState(PRBool aLocked) { +#ifdef MOZ_IPC if (XRE_GetProcessType() == GeckoProcessType_Content && !nsContentUtils::GetBoolPref("content.image.allow_locking", PR_TRUE)) { return NS_OK; } +#endif // MOZ_IPC // If there's no change, there's nothing to do. if (mLockingImages == aLocked) diff --git a/content/base/src/nsFrameLoader.cpp b/content/base/src/nsFrameLoader.cpp index e8ef29c8b2b..f10ab414b47 100644 --- a/content/base/src/nsFrameLoader.cpp +++ b/content/base/src/nsFrameLoader.cpp @@ -44,7 +44,9 @@ * handling of loads in it, recursion-checking). */ -#include "base/basictypes.h" +#ifdef MOZ_IPC +# include "base/basictypes.h" +#endif #include "prenv.h" @@ -110,12 +112,15 @@ #include "Layers.h" +#ifdef MOZ_IPC #include "ContentParent.h" #include "TabParent.h" #include "mozilla/layout/RenderFrameParent.h" using namespace mozilla; using namespace mozilla::dom; +#endif + using namespace mozilla::layers; typedef FrameMetrics::ViewID ViewID; @@ -319,11 +324,13 @@ nsFrameLoader::nsFrameLoader(nsIContent *aOwner, PRBool aNetworkCreated) , mInShow(PR_FALSE) , mHideCalled(PR_FALSE) , mNetworkCreated(aNetworkCreated) +#ifdef MOZ_IPC , mDelayRemoteDialogs(PR_FALSE) , mRemoteBrowserShown(PR_FALSE) , mRemoteFrame(false) , mCurrentRemoteFrame(nsnull) , mRemoteBrowser(nsnull) +#endif , mRenderMode(RENDER_MODE_DEFAULT) { } @@ -441,6 +448,7 @@ nsFrameLoader::ReallyStartLoadingInternal() return rv; } +#ifdef MOZ_IPC if (mRemoteFrame) { if (!mRemoteBrowser) { TryRemoteBrowser(); @@ -455,6 +463,7 @@ nsFrameLoader::ReallyStartLoadingInternal() mRemoteBrowser->LoadURL(mURIToLoad); return NS_OK; } +#endif NS_ASSERTION(mDocShell, "MaybeCreateDocShell succeeded with a null mDocShell"); @@ -525,9 +534,11 @@ nsFrameLoader::CheckURILoad(nsIURI* aURI) if (NS_FAILED(rv)) { return rv; } +#ifdef MOZ_IPC if (mRemoteFrame) { return NS_OK; } +#endif return CheckForRecursiveLoad(aURI); } @@ -543,10 +554,12 @@ nsFrameLoader::GetDocShell(nsIDocShell **aDocShell) nsresult rv = MaybeCreateDocShell(); if (NS_FAILED(rv)) return rv; +#ifdef MOZ_IPC if (mRemoteFrame) { NS_WARNING("No docshells for remote frames!"); return NS_ERROR_NOT_AVAILABLE; } +#endif NS_ASSERTION(mDocShell, "MaybeCreateDocShell succeeded, but null mDocShell"); } @@ -763,7 +776,10 @@ nsFrameLoader::Show(PRInt32 marginWidth, PRInt32 marginHeight, return PR_FALSE; } - if (!mRemoteFrame) { +#ifdef MOZ_IPC + if (!mRemoteFrame) +#endif + { if (!mDocShell) return PR_FALSE; nsCOMPtr presShell; @@ -787,9 +803,11 @@ nsFrameLoader::Show(PRInt32 marginWidth, PRInt32 marginHeight, if (!view) return PR_FALSE; +#ifdef MOZ_IPC if (mRemoteFrame) { return ShowRemoteFrame(GetSubDocumentSize(frame)); } +#endif nsCOMPtr baseWindow = do_QueryInterface(mDocShell); NS_ASSERTION(baseWindow, "Found a nsIDocShell that isn't a nsIBaseWindow."); @@ -862,6 +880,7 @@ nsFrameLoader::Show(PRInt32 marginWidth, PRInt32 marginHeight, return PR_TRUE; } +#ifdef MOZ_IPC bool nsFrameLoader::ShowRemoteFrame(const nsIntSize& size) { @@ -890,6 +909,7 @@ nsFrameLoader::ShowRemoteFrame(const nsIntSize& size) return true; } +#endif void nsFrameLoader::Hide() @@ -1214,11 +1234,13 @@ nsFrameLoader::SwapWithOtherLoader(nsFrameLoader* aOther, void nsFrameLoader::DestroyChild() { +#ifdef MOZ_IPC if (mRemoteBrowser) { mRemoteBrowser->SetOwnerElement(nsnull); mRemoteBrowser->Destroy(); mRemoteBrowser = nsnull; } +#endif } NS_IMETHODIMP @@ -1305,11 +1327,14 @@ void nsFrameLoader::SetOwnerContent(nsIContent* aContent) { mOwnerContent = aContent; +#ifdef MOZ_IPC if (RenderFrameParent* rfp = GetCurrentRemoteFrame()) { rfp->OwnerContentChanged(aContent); } +#endif } +#ifdef MOZ_IPC bool nsFrameLoader::ShouldUseRemoteProcess() { @@ -1345,6 +1370,7 @@ nsFrameLoader::ShouldUseRemoteProcess() PR_FALSE); return (bool) remoteEnabled; } +#endif nsresult nsFrameLoader::MaybeCreateDocShell() @@ -1352,15 +1378,19 @@ nsFrameLoader::MaybeCreateDocShell() if (mDocShell) { return NS_OK; } +#ifdef MOZ_IPC if (mRemoteFrame) { return NS_OK; } +#endif NS_ENSURE_STATE(!mDestroyCalled); +#ifdef MOZ_IPC if (ShouldUseRemoteProcess()) { mRemoteFrame = true; return NS_OK; } +#endif // Get our parent docshell off the document of mOwnerContent // XXXbz this is such a total hack.... We really need to have a @@ -1509,8 +1539,10 @@ nsFrameLoader::CheckForRecursiveLoad(nsIURI* aURI) if (NS_FAILED(rv)) { return rv; } +#ifdef MOZ_IPC NS_ASSERTION(!mRemoteFrame, "Shouldn't call CheckForRecursiveLoad on remote frames."); +#endif if (!mDocShell) { return NS_ERROR_FAILURE; } @@ -1610,6 +1642,7 @@ nsFrameLoader::CheckForRecursiveLoad(nsIURI* aURI) NS_IMETHODIMP nsFrameLoader::UpdatePositionAndSize(nsIFrame *aIFrame) { +#ifdef MOZ_IPC if (mRemoteFrame) { if (mRemoteBrowser) { nsIntSize size = GetSubDocumentSize(aIFrame); @@ -1617,6 +1650,7 @@ nsFrameLoader::UpdatePositionAndSize(nsIFrame *aIFrame) } return NS_OK; } +#endif return UpdateBaseWindowPositionAndSize(aIFrame); } @@ -1684,6 +1718,7 @@ nsFrameLoader::GetSubDocumentSize(const nsIFrame *aIFrame) presContext->AppUnitsToDevPixels(docSizeAppUnits.height)); } +#ifdef MOZ_IPC bool nsFrameLoader::TryRemoteBrowser() { @@ -1763,19 +1798,24 @@ nsFrameLoader::TryRemoteBrowser() } return true; } +#endif +#ifdef MOZ_IPC mozilla::dom::PBrowserParent* nsFrameLoader::GetRemoteBrowser() { return mRemoteBrowser; } +#endif NS_IMETHODIMP nsFrameLoader::ActivateRemoteFrame() { +#ifdef MOZ_IPC if (mRemoteBrowser) { mRemoteBrowser->Activate(); return NS_OK; } +#endif return NS_ERROR_UNEXPECTED; } @@ -1788,12 +1828,14 @@ nsFrameLoader::SendCrossProcessMouseEvent(const nsAString& aType, PRInt32 aModifiers, PRBool aIgnoreRootScrollFrame) { +#ifdef MOZ_IPC if (mRemoteBrowser) { mRemoteBrowser->SendMouseEvent(aType, aX, aY, aButton, aClickCount, aModifiers, aIgnoreRootScrollFrame); return NS_OK; } +#endif return NS_ERROR_FAILURE; } @@ -1801,10 +1843,12 @@ NS_IMETHODIMP nsFrameLoader::ActivateFrameEvent(const nsAString& aType, PRBool aCapture) { +#ifdef MOZ_IPC if (mRemoteBrowser) { return mRemoteBrowser->SendActivateFrameEvent(nsString(aType), aCapture) ? NS_OK : NS_ERROR_NOT_AVAILABLE; } +#endif return NS_ERROR_FAILURE; } @@ -1815,24 +1859,31 @@ nsFrameLoader::SendCrossProcessKeyEvent(const nsAString& aType, PRInt32 aModifiers, PRBool aPreventDefault) { +#ifdef MOZ_IPC if (mRemoteBrowser) { mRemoteBrowser->SendKeyEvent(aType, aKeyCode, aCharCode, aModifiers, aPreventDefault); return NS_OK; } +#endif return NS_ERROR_FAILURE; } NS_IMETHODIMP nsFrameLoader::GetDelayRemoteDialogs(PRBool* aRetVal) { +#ifdef MOZ_IPC *aRetVal = mDelayRemoteDialogs; +#else + *aRetVal = PR_FALSE; +#endif return NS_OK; } NS_IMETHODIMP nsFrameLoader::SetDelayRemoteDialogs(PRBool aDelay) { +#ifdef MOZ_IPC if (mRemoteBrowser && mDelayRemoteDialogs && !aDelay) { nsRefPtr ev = NS_NewRunnableMethod(mRemoteBrowser, @@ -1840,6 +1891,7 @@ nsFrameLoader::SetDelayRemoteDialogs(PRBool aDelay) NS_DispatchToCurrentThread(ev); } mDelayRemoteDialogs = aDelay; +#endif return NS_OK; } @@ -1870,11 +1922,13 @@ nsFrameLoader::CreateStaticClone(nsIFrameLoader* aDest) bool LoadScript(void* aCallbackData, const nsAString& aURL) { +#ifdef MOZ_IPC mozilla::dom::PBrowserParent* tabParent = static_cast(aCallbackData)->GetRemoteBrowser(); if (tabParent) { return tabParent->SendLoadRemoteScript(nsString(aURL)); } +#endif nsFrameLoader* fl = static_cast(aCallbackData); nsRefPtr tabChild = static_cast(fl->GetTabChildGlobalAsEventTarget()); @@ -1911,11 +1965,13 @@ bool SendAsyncMessageToChild(void* aCallbackData, const nsAString& aMessage, const nsAString& aJSON) { +#ifdef MOZ_IPC mozilla::dom::PBrowserParent* tabParent = static_cast(aCallbackData)->GetRemoteBrowser(); if (tabParent) { return tabParent->SendAsyncMessage(nsString(aMessage), nsString(aJSON)); } +#endif nsRefPtr ev = new nsAsyncMessageToChild(static_cast(aCallbackData), aMessage, aJSON); @@ -1940,6 +1996,7 @@ nsFrameLoader::GetContentViewsIn(float aXPx, float aYPx, PRUint32* aLength, nsIContentView*** aResult) { +#ifdef MOZ_IPC nscoord x = nsPresContext::CSSPixelsToAppUnits(aXPx - aLeftSize); nscoord y = nsPresContext::CSSPixelsToAppUnits(aYPx - aTopSize); nscoord w = nsPresContext::CSSPixelsToAppUnits(aLeftSize + aRightSize) + 1; @@ -1967,6 +2024,10 @@ nsFrameLoader::GetContentViewsIn(float aXPx, float aYPx, *aResult = result; *aLength = ids.Length(); +#else + *aResult = nsnull; + *aLength = 0; +#endif return NS_OK; } @@ -1974,6 +2035,7 @@ nsFrameLoader::GetContentViewsIn(float aXPx, float aYPx, NS_IMETHODIMP nsFrameLoader::GetRootContentView(nsIContentView** aContentView) { +#ifdef MOZ_IPC RenderFrameParent* rfp = GetCurrentRemoteFrame(); if (!rfp) { *aContentView = nsnull; @@ -1985,6 +2047,10 @@ nsFrameLoader::GetRootContentView(nsIContentView** aContentView) nsRefPtr(view).forget(aContentView); return NS_OK; +#else + return NS_ERROR_NOT_IMPLEMENTED; +#endif + } nsresult @@ -1997,14 +2063,20 @@ nsFrameLoader::EnsureMessageManager() return rv; } - if (!mIsTopLevelContent && !mRemoteFrame) { + if (!mIsTopLevelContent +#ifdef MOZ_IPC + && !mRemoteFrame +#endif + ) { return NS_OK; } if (mMessageManager) { +#ifdef MOZ_IPC if (ShouldUseRemoteProcess()) { mMessageManager->SetCallbackData(mRemoteBrowserShown ? this : nsnull); } +#endif return NS_OK; } @@ -2020,6 +2092,7 @@ nsFrameLoader::EnsureMessageManager() nsCOMPtr parentManager; chromeWindow->GetMessageManager(getter_AddRefs(parentManager)); +#ifdef MOZ_IPC if (ShouldUseRemoteProcess()) { mMessageManager = new nsFrameMessageManager(PR_TRUE, nsnull, @@ -2030,6 +2103,7 @@ nsFrameLoader::EnsureMessageManager() cx); NS_ENSURE_TRUE(mMessageManager, NS_ERROR_OUT_OF_MEMORY); } else +#endif { mMessageManager = new nsFrameMessageManager(PR_TRUE, diff --git a/content/base/src/nsFrameLoader.h b/content/base/src/nsFrameLoader.h index 4aa90fe7c96..7df004da528 100644 --- a/content/base/src/nsFrameLoader.h +++ b/content/base/src/nsFrameLoader.h @@ -61,6 +61,7 @@ class nsIView; class nsIInProcessContentFrameMessageManager; class AutoResetInShow; +#ifdef MOZ_IPC namespace mozilla { namespace dom { class PBrowserParent; @@ -78,6 +79,7 @@ typedef struct _GtkWidget GtkWidget; #ifdef MOZ_WIDGET_QT class QX11EmbedContainer; #endif +#endif /** * Defines a target configuration for this 's content @@ -165,9 +167,11 @@ class nsFrameLoader : public nsIFrameLoader, public nsIContentViewManager { friend class AutoResetInShow; +#ifdef MOZ_IPC typedef mozilla::dom::PBrowserParent PBrowserParent; typedef mozilla::dom::TabParent TabParent; typedef mozilla::layout::RenderFrameParent RenderFrameParent; +#endif protected: nsFrameLoader(nsIContent *aOwner, PRBool aNetworkCreated); @@ -242,6 +246,7 @@ public: nsIDocument* GetOwnerDoc() const { return mOwnerContent ? mOwnerContent->GetOwnerDoc() : nsnull; } +#ifdef MOZ_IPC PBrowserParent* GetRemoteBrowser(); /** @@ -272,6 +277,7 @@ public: { mCurrentRemoteFrame = aFrame; } +#endif nsFrameMessageManager* GetFrameMessageManager() { return mMessageManager; } nsIContent* GetOwnerContent() { return mOwnerContent; } @@ -279,7 +285,9 @@ public: private: +#ifdef MOZ_IPC bool ShouldUseRemoteProcess(); +#endif /** * If we are an IPC frame, set mRemoteFrame. Otherwise, create and @@ -299,11 +307,13 @@ private: void FireErrorEvent(); nsresult ReallyStartLoadingInternal(); +#ifdef MOZ_IPC // Return true if remote browser created; nothing else to do bool TryRemoteBrowser(); // Tell the remote browser that it's now "virtually visible" bool ShowRemoteFrame(const nsIntSize& size); +#endif nsCOMPtr mDocShell; nsCOMPtr mURIToLoad; @@ -325,6 +335,7 @@ private: // it may lose the flag. PRPackedBool mNetworkCreated : 1; +#ifdef MOZ_IPC PRPackedBool mDelayRemoteDialogs : 1; PRPackedBool mRemoteBrowserShown : 1; bool mRemoteFrame; @@ -332,6 +343,7 @@ private: nsCOMPtr mChildHost; RenderFrameParent* mCurrentRemoteFrame; TabParent* mRemoteBrowser; +#endif // See nsIFrameLoader.idl. Short story, if !(mRenderMode & // RENDER_MODE_ASYNC_SCROLL), all the fields below are ignored in diff --git a/content/base/src/nsFrameMessageManager.cpp b/content/base/src/nsFrameMessageManager.cpp index 6b0942aa408..374d592b944 100644 --- a/content/base/src/nsFrameMessageManager.cpp +++ b/content/base/src/nsFrameMessageManager.cpp @@ -35,8 +35,10 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "ContentChild.h" #include "ContentParent.h" +#endif #include "jscntxt.h" #include "nsFrameMessageManager.h" #include "nsContentUtils.h" @@ -727,6 +729,7 @@ NS_IMPL_ISUPPORTS1(nsScriptCacheCleaner, nsIObserver) nsFrameMessageManager* nsFrameMessageManager::sChildProcessManager = nsnull; nsFrameMessageManager* nsFrameMessageManager::sParentProcessManager = nsnull; +#ifdef MOZ_IPC bool SendAsyncMessageToChildProcess(void* aCallbackData, const nsAString& aMessage, const nsAString& aJSON) @@ -766,11 +769,14 @@ bool SendAsyncMessageToParentProcess(void* aCallbackData, return true; } +#endif + nsresult NS_NewParentProcessMessageManager(nsIFrameMessageManager** aResult) { NS_ASSERTION(!nsFrameMessageManager::sParentProcessManager, "Re-creating sParentProcessManager"); +#ifdef MOZ_IPC NS_ENSURE_TRUE(IsChromeProcess(), NS_ERROR_NOT_AVAILABLE); nsFrameMessageManager* mm = new nsFrameMessageManager(PR_TRUE, nsnull, @@ -784,6 +790,9 @@ NS_NewParentProcessMessageManager(nsIFrameMessageManager** aResult) NS_ENSURE_TRUE(mm, NS_ERROR_OUT_OF_MEMORY); nsFrameMessageManager::sParentProcessManager = mm; return CallQueryInterface(mm, aResult); +#else + return NS_ERROR_NOT_AVAILABLE; +#endif } @@ -792,6 +801,7 @@ NS_NewChildProcessMessageManager(nsISyncMessageSender** aResult) { NS_ASSERTION(!nsFrameMessageManager::sChildProcessManager, "Re-creating sChildProcessManager"); +#ifdef MOZ_IPC NS_ENSURE_TRUE(!IsChromeProcess(), NS_ERROR_NOT_AVAILABLE); nsFrameMessageManager* mm = new nsFrameMessageManager(PR_FALSE, SendSyncMessageToParentProcess, @@ -805,4 +815,7 @@ NS_NewChildProcessMessageManager(nsISyncMessageSender** aResult) NS_ENSURE_TRUE(mm, NS_ERROR_OUT_OF_MEMORY); nsFrameMessageManager::sChildProcessManager = mm; return CallQueryInterface(mm, aResult); +#else + return NS_ERROR_NOT_AVAILABLE; +#endif } diff --git a/content/canvas/src/Makefile.in b/content/canvas/src/Makefile.in index f98c7f4699d..836b895593b 100644 --- a/content/canvas/src/Makefile.in +++ b/content/canvas/src/Makefile.in @@ -55,9 +55,14 @@ CPPSRCS = \ CanvasImageCache.cpp \ CanvasUtils.cpp \ nsCanvasRenderingContext2D.cpp \ + $(NULL) + +ifdef MOZ_IPC +CPPSRCS += \ DocumentRendererParent.cpp \ DocumentRendererChild.cpp \ $(NULL) +endif # Canvas 3D Pieces diff --git a/content/canvas/src/nsCanvasRenderingContext2D.cpp b/content/canvas/src/nsCanvasRenderingContext2D.cpp index 0f907f4084f..6a417549196 100644 --- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -38,7 +38,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC # include "base/basictypes.h" +#endif #include "nsIDOMXULElement.h" @@ -117,6 +119,7 @@ #include "nsStyleUtil.h" #include "CanvasImageCache.h" +#ifdef MOZ_IPC # include # include "mozilla/dom/ContentParent.h" # include "mozilla/ipc/PDocumentRendererParent.h" @@ -127,6 +130,7 @@ # undef DrawText using namespace mozilla::ipc; +#endif #ifdef MOZ_SVG #include "nsSVGEffects.h" @@ -1230,6 +1234,7 @@ nsCanvasRenderingContext2D::SetIsOpaque(PRBool isOpaque) NS_IMETHODIMP nsCanvasRenderingContext2D::SetIsIPC(PRBool isIPC) { +#ifdef MOZ_IPC if (isIPC == mIPC) return NS_OK; @@ -1243,6 +1248,9 @@ nsCanvasRenderingContext2D::SetIsIPC(PRBool isIPC) } return NS_OK; +#else + return NS_ERROR_NOT_IMPLEMENTED; +#endif } NS_IMETHODIMP @@ -3759,6 +3767,7 @@ nsCanvasRenderingContext2D::AsyncDrawXULElement(nsIDOMXULElement* aElem, float a if (!frameloader) return NS_ERROR_FAILURE; +#ifdef MOZ_IPC PBrowserParent *child = frameloader->GetRemoteBrowser(); if (!child) { nsCOMPtr window = @@ -3806,6 +3815,14 @@ nsCanvasRenderingContext2D::AsyncDrawXULElement(nsIDOMXULElement* aElem, float a } return NS_OK; +#else + nsCOMPtr window = + do_GetInterface(frameloader->GetExistingDocShell()); + if (!window) + return NS_ERROR_FAILURE; + + return DrawWindow(window, aX, aY, aW, aH, aBGColor, flags); +#endif } // diff --git a/content/events/src/nsDOMEvent.cpp b/content/events/src/nsDOMEvent.cpp index 71644cdb2b3..b956ba04ce7 100644 --- a/content/events/src/nsDOMEvent.cpp +++ b/content/events/src/nsDOMEvent.cpp @@ -37,8 +37,10 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "base/basictypes.h" #include "IPC/IPCMessageUtils.h" +#endif #include "nsCOMPtr.h" #include "nsDOMEvent.h" #include "nsEventStateManager.h" @@ -1368,6 +1370,7 @@ nsDOMEvent::GetPreventDefault(PRBool* aReturn) void nsDOMEvent::Serialize(IPC::Message* aMsg, PRBool aSerializeInterfaceType) { +#ifdef MOZ_IPC if (aSerializeInterfaceType) { IPC::WriteParam(aMsg, NS_LITERAL_STRING("event")); } @@ -1389,11 +1392,13 @@ nsDOMEvent::Serialize(IPC::Message* aMsg, PRBool aSerializeInterfaceType) IPC::WriteParam(aMsg, trusted); // No timestamp serialization for now! +#endif } PRBool nsDOMEvent::Deserialize(const IPC::Message* aMsg, void** aIter) { +#ifdef MOZ_IPC nsString type; NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &type), PR_FALSE); @@ -1411,6 +1416,9 @@ nsDOMEvent::Deserialize(const IPC::Message* aMsg, void** aIter) SetTrusted(trusted); return PR_TRUE; +#else + return PR_FALSE; +#endif } diff --git a/content/events/src/nsDOMNotifyPaintEvent.cpp b/content/events/src/nsDOMNotifyPaintEvent.cpp index 62b6e597313..175cf0a21f8 100644 --- a/content/events/src/nsDOMNotifyPaintEvent.cpp +++ b/content/events/src/nsDOMNotifyPaintEvent.cpp @@ -36,8 +36,10 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "base/basictypes.h" #include "IPC/IPCMessageUtils.h" +#endif #include "nsDOMNotifyPaintEvent.h" #include "nsContentUtils.h" #include "nsClientRect.h" @@ -146,6 +148,7 @@ nsDOMNotifyPaintEvent::GetPaintRequests(nsIDOMPaintRequestList** aResult) return NS_OK; } +#ifdef MOZ_IPC void nsDOMNotifyPaintEvent::Serialize(IPC::Message* aMsg, PRBool aSerializeInterfaceType) @@ -187,6 +190,7 @@ nsDOMNotifyPaintEvent::Deserialize(const IPC::Message* aMsg, void** aIter) return PR_TRUE; } +#endif nsresult NS_NewDOMNotifyPaintEvent(nsIDOMEvent** aInstancePtrResult, nsPresContext* aPresContext, diff --git a/content/events/src/nsDOMNotifyPaintEvent.h b/content/events/src/nsDOMNotifyPaintEvent.h index aed65914a26..2238f551f32 100644 --- a/content/events/src/nsDOMNotifyPaintEvent.h +++ b/content/events/src/nsDOMNotifyPaintEvent.h @@ -61,8 +61,10 @@ public: // Forward to base class NS_FORWARD_TO_NSDOMEVENT +#ifdef MOZ_IPC virtual void Serialize(IPC::Message* aMsg, PRBool aSerializeInterfaceType); virtual PRBool Deserialize(const IPC::Message* aMsg, void** aIter); +#endif private: nsRegion GetRegion(); diff --git a/content/events/src/nsDOMScrollAreaEvent.cpp b/content/events/src/nsDOMScrollAreaEvent.cpp index 5712179653b..674164c26d8 100644 --- a/content/events/src/nsDOMScrollAreaEvent.cpp +++ b/content/events/src/nsDOMScrollAreaEvent.cpp @@ -35,8 +35,10 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "base/basictypes.h" #include "IPC/IPCMessageUtils.h" +#endif #include "nsDOMScrollAreaEvent.h" #include "nsGUIEvent.h" @@ -114,6 +116,7 @@ nsDOMScrollAreaEvent::InitScrollAreaEvent(const nsAString &aEventType, return NS_OK; } +#ifdef MOZ_IPC void nsDOMScrollAreaEvent::Serialize(IPC::Message* aMsg, PRBool aSerializeInterfaceType) @@ -149,6 +152,7 @@ nsDOMScrollAreaEvent::Deserialize(const IPC::Message* aMsg, void** aIter) return PR_TRUE; } +#endif nsresult NS_NewDOMScrollAreaEvent(nsIDOMEvent **aInstancePtrResult, diff --git a/content/events/src/nsDOMScrollAreaEvent.h b/content/events/src/nsDOMScrollAreaEvent.h index 34f943fd0d5..41b31372fd1 100644 --- a/content/events/src/nsDOMScrollAreaEvent.h +++ b/content/events/src/nsDOMScrollAreaEvent.h @@ -58,8 +58,10 @@ public: NS_FORWARD_TO_NSDOMUIEVENT +#ifdef MOZ_IPC virtual void Serialize(IPC::Message* aMsg, PRBool aSerializeInterfaceType); virtual PRBool Deserialize(const IPC::Message* aMsg, void** aIter); +#endif protected: nsClientRect mClientArea; diff --git a/content/events/src/nsDOMUIEvent.cpp b/content/events/src/nsDOMUIEvent.cpp index a3c1406a77f..758baa590eb 100644 --- a/content/events/src/nsDOMUIEvent.cpp +++ b/content/events/src/nsDOMUIEvent.cpp @@ -37,8 +37,10 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "base/basictypes.h" #include "IPC/IPCMessageUtils.h" +#endif #include "nsCOMPtr.h" #include "nsDOMUIEvent.h" #include "nsIPresShell.h" @@ -392,6 +394,7 @@ nsDOMUIEvent::DuplicatePrivateData() return rv; } +#ifdef MOZ_IPC void nsDOMUIEvent::Serialize(IPC::Message* aMsg, PRBool aSerializeInterfaceType) { @@ -413,6 +416,7 @@ nsDOMUIEvent::Deserialize(const IPC::Message* aMsg, void** aIter) NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &mDetail), PR_FALSE); return PR_TRUE; } +#endif nsresult NS_NewDOMUIEvent(nsIDOMEvent** aInstancePtrResult, nsPresContext* aPresContext, diff --git a/content/events/src/nsDOMUIEvent.h b/content/events/src/nsDOMUIEvent.h index a242af36f5b..71bf18f351b 100644 --- a/content/events/src/nsDOMUIEvent.h +++ b/content/events/src/nsDOMUIEvent.h @@ -62,8 +62,10 @@ public: // nsIPrivateDOMEvent interface NS_IMETHOD DuplicatePrivateData(); +#ifdef MOZ_IPC virtual void Serialize(IPC::Message* aMsg, PRBool aSerializeInterfaceType); virtual PRBool Deserialize(const IPC::Message* aMsg, void** aIter); +#endif // Forward to nsDOMEvent NS_FORWARD_TO_NSDOMEVENT diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index 5b5fb1a32d4..f3ae73f2463 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -44,7 +44,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "mozilla/dom/TabParent.h" +#endif #include "nsCOMPtr.h" #include "nsEventStateManager.h" @@ -162,7 +164,9 @@ #import #endif +#ifdef MOZ_IPC using namespace mozilla::dom; +#endif //#define DEBUG_DOCSHELL_FOCUS @@ -1334,16 +1338,20 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext, break; case NS_QUERY_SELECTED_TEXT: { +#ifdef MOZ_IPC if (RemoteQueryContentEvent(aEvent)) break; +#endif nsContentEventHandler handler(mPresContext); handler.OnQuerySelectedText((nsQueryContentEvent*)aEvent); } break; case NS_QUERY_TEXT_CONTENT: { +#ifdef MOZ_IPC if (RemoteQueryContentEvent(aEvent)) break; +#endif nsContentEventHandler handler(mPresContext); handler.OnQueryTextContent((nsQueryContentEvent*)aEvent); } @@ -1399,6 +1407,7 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext, break; case NS_SELECTION_SET: { +#ifdef MOZ_IPC nsSelectionEvent *selectionEvent = static_cast(aEvent); if (IsTargetCrossProcess(selectionEvent)) { @@ -1407,6 +1416,7 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext, selectionEvent->mSucceeded = PR_TRUE; break; } +#endif nsContentEventHandler handler(mPresContext); handler.OnSelectionEvent((nsSelectionEvent*)aEvent); } @@ -1427,6 +1437,7 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext, DoContentCommandScrollEvent(static_cast(aEvent)); } break; +#ifdef MOZ_IPC case NS_TEXT_TEXT: { nsTextEvent *textEvent = static_cast(aEvent); @@ -1453,6 +1464,7 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext, } } break; +#endif // MOZ_IPC } return NS_OK; } @@ -3325,6 +3337,7 @@ nsEventStateManager::PostHandleEvent(nsPresContext* aPresContext, return ret; } +#ifdef MOZ_IPC PRBool nsEventStateManager::RemoteQueryContentEvent(nsEvent *aEvent) { @@ -3354,6 +3367,7 @@ nsEventStateManager::IsTargetCrossProcess(nsGUIEvent *aEvent) return PR_FALSE; return TabParent::GetIMETabParent() != nsnull; } +#endif NS_IMETHODIMP nsEventStateManager::NotifyDestroyPresContext(nsPresContext* aPresContext) diff --git a/content/events/src/nsEventStateManager.h b/content/events/src/nsEventStateManager.h index 357559ad52a..236af0d33fb 100644 --- a/content/events/src/nsEventStateManager.h +++ b/content/events/src/nsEventStateManager.h @@ -349,9 +349,11 @@ protected: nsresult DoContentCommandEvent(nsContentCommandEvent* aEvent); nsresult DoContentCommandScrollEvent(nsContentCommandEvent* aEvent); +#ifdef MOZ_IPC PRBool RemoteQueryContentEvent(nsEvent *aEvent); mozilla::dom::TabParent *GetCrossProcessTarget(); PRBool IsTargetCrossProcess(nsGUIEvent *aEvent); +#endif PRInt32 mLockCursor; diff --git a/content/html/content/src/Makefile.in b/content/html/content/src/Makefile.in index e4a3d3e19c4..7659fe6a1c4 100644 --- a/content/html/content/src/Makefile.in +++ b/content/html/content/src/Makefile.in @@ -50,9 +50,14 @@ LIBXUL_LIBRARY = 1 EXPORTS = \ nsImageMapUtils.h \ nsClientRect.h \ - nsHTMLDNSPrefetch.h \ $(NULL) +ifdef MOZ_IPC +EXPORTS += \ + nsHTMLDNSPrefetch.h \ + $(NULL) +endif + CPPSRCS = \ nsClientRect.cpp \ nsHTMLDNSPrefetch.cpp \ diff --git a/content/html/content/src/nsHTMLCanvasElement.cpp b/content/html/content/src/nsHTMLCanvasElement.cpp index acf8bf9c6e5..d545cbb269e 100644 --- a/content/html/content/src/nsHTMLCanvasElement.cpp +++ b/content/html/content/src/nsHTMLCanvasElement.cpp @@ -553,6 +553,7 @@ NS_IMETHODIMP nsHTMLCanvasElement::MozGetIPCContext(const nsAString& aContextId, nsISupports **aContext) { +#ifdef MOZ_IPC if(!nsContentUtils::IsCallerTrustedForRead()) { // XXX ERRMSG we need to report an error to developers here! (bug 329026) return NS_ERROR_DOM_SECURITY_ERR; @@ -587,6 +588,9 @@ nsHTMLCanvasElement::MozGetIPCContext(const nsAString& aContextId, NS_ADDREF (*aContext = mCurrentContext); return NS_OK; +#else + return NS_ERROR_NOT_IMPLEMENTED; +#endif } nsresult diff --git a/content/html/content/src/nsHTMLDNSPrefetch.cpp b/content/html/content/src/nsHTMLDNSPrefetch.cpp index 36ee2f26a0f..0a400794dbb 100644 --- a/content/html/content/src/nsHTMLDNSPrefetch.cpp +++ b/content/html/content/src/nsHTMLDNSPrefetch.cpp @@ -36,10 +36,12 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "base/basictypes.h" #include "mozilla/net/NeckoCommon.h" #include "mozilla/net/NeckoChild.h" #include "nsURLHelper.h" +#endif #include "nsHTMLDNSPrefetch.h" #include "nsCOMPtr.h" @@ -106,8 +108,10 @@ nsHTMLDNSPrefetch::Initialize() rv = CallGetService(kDNSServiceCID, &sDNSService); if (NS_FAILED(rv)) return rv; +#ifdef MOZ_IPC if (IsNeckoChild()) NeckoChild::InitNeckoChild(); +#endif sInitialized = PR_TRUE; return NS_OK; @@ -138,6 +142,7 @@ nsHTMLDNSPrefetch::IsAllowed (nsIDocument *aDocument) nsresult nsHTMLDNSPrefetch::Prefetch(Link *aElement, PRUint16 flags) { +#ifdef MOZ_IPC if (IsNeckoChild()) { // Instead of transporting the Link object to the other process // we are using the hostname based function here, too. Compared to the @@ -148,6 +153,7 @@ nsHTMLDNSPrefetch::Prefetch(Link *aElement, PRUint16 flags) return Prefetch(hostname, flags); } +#endif if (!(sInitialized && sPrefetches && sDNSService && sDNSListener)) return NS_ERROR_NOT_AVAILABLE; @@ -176,6 +182,7 @@ nsHTMLDNSPrefetch::PrefetchHigh(Link *aElement) nsresult nsHTMLDNSPrefetch::Prefetch(nsAString &hostname, PRUint16 flags) { +#ifdef MOZ_IPC if (IsNeckoChild()) { // We need to check IsEmpty() because net_IsValidHostName() // considers empty strings to be valid hostnames @@ -185,6 +192,7 @@ nsHTMLDNSPrefetch::Prefetch(nsAString &hostname, PRUint16 flags) } return NS_OK; } +#endif if (!(sInitialized && sDNSService && sPrefetches && sDNSListener)) return NS_ERROR_NOT_AVAILABLE; diff --git a/content/html/content/src/nsHTMLDNSPrefetch.h b/content/html/content/src/nsHTMLDNSPrefetch.h index a25b2834c98..e2973ae6e5e 100644 --- a/content/html/content/src/nsHTMLDNSPrefetch.h +++ b/content/html/content/src/nsHTMLDNSPrefetch.h @@ -143,7 +143,9 @@ public: } mEntries[sMaxDeferred]; }; +#ifdef MOZ_IPC friend class mozilla::net::NeckoParent; +#endif }; #endif diff --git a/content/media/nsAudioStream.cpp b/content/media/nsAudioStream.cpp index 8eb6602084d..c5fe5e4c90b 100644 --- a/content/media/nsAudioStream.cpp +++ b/content/media/nsAudioStream.cpp @@ -37,12 +37,14 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/PAudioChild.h" #include "mozilla/dom/AudioChild.h" #include "mozilla/Monitor.h" #include "nsXULAppAPI.h" using namespace mozilla::dom; +#endif #include #include @@ -63,7 +65,7 @@ extern "C" { // Android's audio backend is not available in content processes, so audio must // be remoted to the parent chrome process. -#if defined(ANDROID) +#if defined(ANDROID) && defined(MOZ_IPC) #define REMOTE_AUDIO 1 #endif @@ -120,6 +122,7 @@ class nsAudioStreamLocal : public nsAudioStream }; +#ifdef MOZ_IPC class nsAudioStreamRemote : public nsAudioStream { public: @@ -291,6 +294,7 @@ class AudioShutdownEvent : public nsRunnable nsRefPtr mAudioChild; }; +#endif // MOZ_IPC void nsAudioStream::InitLibrary() @@ -593,6 +597,8 @@ PRInt32 nsAudioStreamLocal::GetMinWriteSamples() return static_cast(samples); } +#ifdef MOZ_IPC + nsAudioStreamRemote::nsAudioStreamRemote() : mAudioChild(NULL), mFormat(FORMAT_S16_LE), @@ -744,3 +750,5 @@ nsAudioStreamRemote::IsPaused() { return mPaused; } + +#endif // MOZ_IPC diff --git a/content/media/nsAudioStream.h b/content/media/nsAudioStream.h index de560a147be..d7878992579 100644 --- a/content/media/nsAudioStream.h +++ b/content/media/nsAudioStream.h @@ -64,13 +64,14 @@ public: // library after using it. static void ShutdownLibrary(); - // Thread that is shared between audio streams. + // Thread, usually for MOZ_IPC handling, that is shared between audio streams. // This may return null in the child process nsIThread *GetThread(); // AllocateStream will return either a local stream or a remoted stream - // depending on where you call it from. If you call this from a child process, - // you may receive an implementation which forwards to a compositing process. + // depending on where you call it from. If MOZ_IPC is enabled, and you + // call this from a child process, you may recieve an implementation which + // forwards to a compositing process. static nsAudioStream* AllocateStream(); // Initialize the audio stream. aNumChannels is the number of audio channels diff --git a/docshell/base/IHistory.h b/docshell/base/IHistory.h index 2448784db96..b03c718508a 100644 --- a/docshell/base/IHistory.h +++ b/docshell/base/IHistory.h @@ -71,7 +71,7 @@ public: * UnregisterVisitedCallback. * * @pre aURI must not be null. - * @pre aLink may be null only in the parent (chrome) process. + * @pre aLink may be null only in the MOZ_IPC parent process. * * @param aURI * The URI to check. diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 5e1e09db097..948c9b73497 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -229,7 +229,9 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID); #include "nsIChannelPolicy.h" #include "nsIContentSecurityPolicy.h" +#ifdef MOZ_IPC #include "nsXULAppAPI.h" +#endif using namespace mozilla; @@ -6010,10 +6012,12 @@ nsDocShell::OnRedirectStateChange(nsIChannel* aOldChannel, nsCOMPtr appCacheChannel = do_QueryInterface(aNewChannel); if (appCacheChannel) { +#ifdef MOZ_IPC // Permission will be checked in the parent process. if (GeckoProcessType_Default != XRE_GetProcessType()) appCacheChannel->SetChooseApplicationCache(PR_TRUE); else +#endif appCacheChannel->SetChooseApplicationCache(ShouldCheckAppCache(newURI)); } @@ -8724,10 +8728,12 @@ nsDocShell::DoURILoad(nsIURI * aURI, // Loads with the correct permissions should check for a matching // application cache. +#ifdef MOZ_IPC // Permission will be checked in the parent process if (GeckoProcessType_Default != XRE_GetProcessType()) appCacheChannel->SetChooseApplicationCache(PR_TRUE); else +#endif appCacheChannel->SetChooseApplicationCache( ShouldCheckAppCache(aURI)); } diff --git a/dom/Makefile.in b/dom/Makefile.in index 66b2af9130a..c74d6daf30d 100644 --- a/dom/Makefile.in +++ b/dom/Makefile.in @@ -83,8 +83,13 @@ DIRS += \ plugins \ indexedDB \ system \ + $(NULL) + +ifdef MOZ_IPC +DIRS += \ ipc \ $(NULL) +endif ifdef ENABLE_TESTS DIRS += tests diff --git a/dom/base/Makefile.in b/dom/base/Makefile.in index 8603c0f7bd7..9f3f473445f 100644 --- a/dom/base/Makefile.in +++ b/dom/base/Makefile.in @@ -83,7 +83,6 @@ EXPORTS = \ nsPIWindowRoot.h \ nsFocusManager.h \ nsWrapperCache.h \ - nsContentPermissionHelper.h \ $(NULL) CPPSRCS = \ @@ -107,17 +106,27 @@ CPPSRCS = \ nsScriptNameSpaceManager.cpp \ nsDOMScriptObjectFactory.cpp \ nsQueryContentEventResult.cpp \ - nsContentPermissionHelper.cpp \ $(NULL) +ifdef MOZ_IPC +EXPORTS += \ + nsContentPermissionHelper.h \ + $(NULL) +CPPSRCS += \ + nsContentPermissionHelper.cpp \ + $(NULL) +endif + include $(topsrcdir)/dom/dom-config.mk ifdef MOZ_JSDEBUGGER DEFINES += -DMOZ_JSDEBUGGER endif +ifdef MOZ_IPC include $(topsrcdir)/config/config.mk include $(topsrcdir)/ipc/chromium/chromium-config.mk +endif include $(topsrcdir)/config/rules.mk diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 2e5e13711e2..30fd854a270 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -46,7 +46,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "base/basictypes.h" +#endif // Local Includes #include "nsGlobalWindow.h" diff --git a/dom/plugins/Makefile.in b/dom/plugins/Makefile.in index b824c96cb95..3563be61178 100644 --- a/dom/plugins/Makefile.in +++ b/dom/plugins/Makefile.in @@ -50,6 +50,8 @@ EXPORTS_mozilla = \ PluginLibrary.h \ $(NULL) +ifdef MOZ_IPC + EXPORTS_NAMESPACES = mozilla mozilla/plugins EXPORTS_mozilla/plugins = \ @@ -149,6 +151,7 @@ LOCAL_INCLUDES = \ include $(topsrcdir)/config/config.mk include $(topsrcdir)/ipc/chromium/chromium-config.mk +endif include $(topsrcdir)/config/rules.mk diff --git a/dom/src/geolocation/Makefile.in b/dom/src/geolocation/Makefile.in index 39f03db04f2..8bd9c569d7e 100644 --- a/dom/src/geolocation/Makefile.in +++ b/dom/src/geolocation/Makefile.in @@ -83,7 +83,9 @@ LOCAL_INCLUDES += -I$(topsrcdir)/dom/system/android \ $(NULL) endif +ifdef MOZ_IPC EXPORTS += nsGeoPositionIPCSerialiser.h +endif include $(topsrcdir)/config/config.mk include $(topsrcdir)/ipc/chromium/chromium-config.mk diff --git a/dom/src/geolocation/nsGeolocation.cpp b/dom/src/geolocation/nsGeolocation.cpp index 81a42fd3802..de9d3e579e0 100644 --- a/dom/src/geolocation/nsGeolocation.cpp +++ b/dom/src/geolocation/nsGeolocation.cpp @@ -34,6 +34,7 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "nsContentPermissionHelper.h" #include "nsXULAppAPI.h" @@ -52,6 +53,7 @@ #include "nsDOMEventTargetHelper.h" #include "TabChild.h" +#endif #include "nsGeolocation.h" #include "nsAutoPtr.h" @@ -480,6 +482,7 @@ nsGeolocationRequest::Shutdown() mErrorCallback = nsnull; } +#ifdef MOZ_IPC bool nsGeolocationRequest::Recv__delete__(const bool& allow) { if (allow) @@ -488,6 +491,7 @@ bool nsGeolocationRequest::Recv__delete__(const bool& allow) (void) Cancel(); return true; } +#endif //////////////////////////////////////////////////// // nsGeolocationService //////////////////////////////////////////////////// @@ -677,11 +681,13 @@ nsGeolocationService::StartDevice() // inactivivity SetDisconnectTimer(); +#ifdef MOZ_IPC if (XRE_GetProcessType() == GeckoProcessType_Content) { ContentChild* cpc = ContentChild::GetSingleton(); cpc->SendAddGeolocationListener(); return NS_OK; } +#endif // Start them up! nsCOMPtr obs = mozilla::services::GetObserverService(); @@ -720,11 +726,13 @@ nsGeolocationService::StopDevice() mDisconnectTimer = nsnull; } +#ifdef MOZ_IPC if (XRE_GetProcessType() == GeckoProcessType_Content) { ContentChild* cpc = ContentChild::GetSingleton(); cpc->SendRemoveGeolocationListener(); return; // bail early } +#endif nsCOMPtr obs = mozilla::services::GetObserverService(); if (!obs) @@ -1045,6 +1053,7 @@ nsGeolocation::WindowOwnerStillExists() bool nsGeolocation::RegisterRequestWithPrompt(nsGeolocationRequest* request) { +#ifdef MOZ_IPC if (XRE_GetProcessType() == GeckoProcessType_Content) { nsCOMPtr window = do_QueryReferent(mOwner); if (!window) @@ -1066,6 +1075,7 @@ nsGeolocation::RegisterRequestWithPrompt(nsGeolocationRequest* request) request->Sendprompt(); return true; } +#endif if (nsContentUtils::GetBoolPref("geo.prompt.testing", PR_FALSE)) { diff --git a/dom/src/geolocation/nsGeolocation.h b/dom/src/geolocation/nsGeolocation.h index 7aa40746ae7..7dac97470ed 100644 --- a/dom/src/geolocation/nsGeolocation.h +++ b/dom/src/geolocation/nsGeolocation.h @@ -37,9 +37,11 @@ #ifndef nsGeoLocation_h #define nsGeoLocation_h +#ifdef MOZ_IPC #include "mozilla/dom/PContentPermissionRequestChild.h" // Microsoft's API Name hackery sucks #undef CreateEvent +#endif #include "nsCOMPtr.h" #include "nsAutoPtr.h" @@ -65,7 +67,9 @@ #include "nsIGeolocationProvider.h" #include "nsIContentPermissionPrompt.h" +#ifdef MOZ_IPC #include "PCOMContentPermissionRequestChild.h" +#endif class nsGeolocationService; class nsGeolocation; @@ -73,7 +77,9 @@ class nsGeolocation; class nsGeolocationRequest : public nsIContentPermissionRequest , public nsITimerCallback +#ifdef MOZ_IPC , public PCOMContentPermissionRequestChild +#endif { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS @@ -101,8 +107,10 @@ class nsGeolocationRequest ~nsGeolocationRequest(); +#ifdef MOZ_IPC bool Recv__delete__(const bool& allow); void IPDLRelease() { Release(); } +#endif private: diff --git a/dom/src/notification/nsDesktopNotification.cpp b/dom/src/notification/nsDesktopNotification.cpp index b7770adcad5..0ecec32fcae 100644 --- a/dom/src/notification/nsDesktopNotification.cpp +++ b/dom/src/notification/nsDesktopNotification.cpp @@ -36,6 +36,7 @@ #include "nsDesktopNotification.h" +#ifdef MOZ_IPC #include "nsContentPermissionHelper.h" #include "nsXULAppAPI.h" @@ -43,6 +44,7 @@ #include "TabChild.h" using namespace mozilla::dom; +#endif /* ------------------------------------------------------------------------ */ /* AlertServiceObserver */ @@ -127,6 +129,7 @@ nsDOMDesktopNotification::nsDOMDesktopNotification(const nsAString & title, nsRefPtr request = new nsDesktopNotificationRequest(this); // if we are in the content process, then remote it to the parent. +#ifdef MOZ_IPC if (XRE_GetProcessType() == GeckoProcessType_Content) { // if for some reason mOwner is null, just silently @@ -149,6 +152,7 @@ nsDOMDesktopNotification::nsDOMDesktopNotification(const nsAString & title, request->Sendprompt(); return; } +#endif // otherwise, dispatch it NS_DispatchToMainThread(request); diff --git a/dom/src/notification/nsDesktopNotification.h b/dom/src/notification/nsDesktopNotification.h index 18ff79b2319..bc480616449 100644 --- a/dom/src/notification/nsDesktopNotification.h +++ b/dom/src/notification/nsDesktopNotification.h @@ -37,7 +37,10 @@ #ifndef nsDesktopNotification_h #define nsDesktopNotification_h +#ifdef MOZ_IPC #include "PCOMContentPermissionRequestChild.h" +#endif + #include "nsDOMClassInfo.h" #include "nsIJSContextStack.h" @@ -152,8 +155,10 @@ protected: * Simple Request */ class nsDesktopNotificationRequest : public nsIContentPermissionRequest, - public nsRunnable, - public PCOMContentPermissionRequestChild + public nsRunnable +#ifdef MOZ_IPC + , public PCOMContentPermissionRequestChild +#endif { public: @@ -177,6 +182,8 @@ class nsDesktopNotificationRequest : public nsIContentPermissionRequest, { } +#ifdef MOZ_IPC + bool Recv__delete__(const bool& allow) { if (allow) @@ -186,6 +193,7 @@ class nsDesktopNotificationRequest : public nsIContentPermissionRequest, return true; } void IPDLRelease() { Release(); } +#endif nsRefPtr mDesktopNotification; }; diff --git a/dom/src/offline/nsDOMOfflineResourceList.cpp b/dom/src/offline/nsDOMOfflineResourceList.cpp index 381d95c4485..c9b5b26e794 100644 --- a/dom/src/offline/nsDOMOfflineResourceList.cpp +++ b/dom/src/offline/nsDOMOfflineResourceList.cpp @@ -57,9 +57,14 @@ #include "nsIScriptGlobalObject.h" #include "nsIWebNavigation.h" +#ifdef MOZ_IPC #include "nsXULAppAPI.h" #define IS_CHILD_PROCESS() \ (GeckoProcessType_Default != XRE_GetProcessType()) +#else +#define IS_CHILD_PROCESS() \ + (false) +#endif // Event names diff --git a/dom/src/storage/Makefile.in b/dom/src/storage/Makefile.in index 9faf2150cf4..3f78dd64df7 100644 --- a/dom/src/storage/Makefile.in +++ b/dom/src/storage/Makefile.in @@ -55,11 +55,13 @@ CPPSRCS = \ ifdef MOZ_STORAGE CPPSRCS += nsDOMStorageDBWrapper.cpp nsDOMStoragePersistentDB.cpp nsDOMStorageMemoryDB.cpp +ifdef MOZ_IPC CPPSRCS += StorageChild.cpp StorageParent.cpp EXPORTS_NAMESPACES = mozilla/dom EXPORTS_mozilla/dom = StorageChild.h StorageParent.h endif +endif # we don't want the shared lib, but we want to force the creation of a static lib. FORCE_STATIC_LIB = 1 diff --git a/dom/src/storage/nsDOMStorage.cpp b/dom/src/storage/nsDOMStorage.cpp index 4e852322f2d..8e418cc6856 100644 --- a/dom/src/storage/nsDOMStorage.cpp +++ b/dom/src/storage/nsDOMStorage.cpp @@ -40,10 +40,12 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "StorageChild.h" #include "StorageParent.h" #include "nsXULAppAPI.h" using mozilla::dom::StorageChild; +#endif #include "prnetdb.h" #include "nsCOMPtr.h" @@ -269,9 +271,11 @@ nsDOMStorageManager::Initialize() NS_ADDREF(gStorageManager); +#ifdef MOZ_IPC // No observers needed in non-chrome if (XRE_GetProcessType() != GeckoProcessType_Default) return NS_OK; +#endif nsCOMPtr os = mozilla::services::GetObserverService(); if (!os) @@ -1351,10 +1355,12 @@ nsDOMStorage::nsDOMStorage() { mSecurityChecker = this; +#ifdef MOZ_IPC if (XRE_GetProcessType() != GeckoProcessType_Default) mStorageImpl = new StorageChild(this); else - mStorageImpl = new DOMStorageImpl(this); +#endif + mStorageImpl = new DOMStorageImpl(this); } nsDOMStorage::nsDOMStorage(nsDOMStorage& aThat) @@ -1363,10 +1369,13 @@ nsDOMStorage::nsDOMStorage(nsDOMStorage& aThat) { mSecurityChecker = this; +#ifdef MOZ_IPC if (XRE_GetProcessType() != GeckoProcessType_Default) { StorageChild* other = static_cast(aThat.mStorageImpl.get()); mStorageImpl = new StorageChild(this, *other); - } else { + } else +#endif + { DOMStorageImpl* other = static_cast(aThat.mStorageImpl.get()); mStorageImpl = new DOMStorageImpl(this, *other); } diff --git a/embedding/browser/webBrowser/nsWebBrowser.cpp b/embedding/browser/webBrowser/nsWebBrowser.cpp index f0b35569008..c037dc2c2d8 100644 --- a/embedding/browser/webBrowser/nsWebBrowser.cpp +++ b/embedding/browser/webBrowser/nsWebBrowser.cpp @@ -1229,7 +1229,10 @@ NS_IMETHODIMP nsWebBrowser::Create() } mDocShellAsNav->SetSessionHistory(mInitInfo->sessionHistory); - if (XRE_GetProcessType() == GeckoProcessType_Default) { +#ifdef MOZ_IPC + if (XRE_GetProcessType() == GeckoProcessType_Default) +#endif + { // Hook up global history. Do not fail if we can't - just warn. rv = EnableGlobalHistory(mShouldEnableHistory); NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "EnableGlobalHistory() failed"); diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp index c202d553dcd..d182013ec65 100644 --- a/extensions/cookie/nsPermissionManager.cpp +++ b/extensions/cookie/nsPermissionManager.cpp @@ -37,9 +37,11 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/unused.h" +#endif #include "nsPermissionManager.h" #include "nsPermission.h" #include "nsCRT.h" @@ -61,6 +63,7 @@ static nsPermissionManager *gPermissionManager = nsnull; +#ifdef MOZ_IPC using mozilla::dom::ContentParent; using mozilla::dom::ContentChild; using mozilla::unused; // ha! @@ -105,6 +108,7 @@ ParentProcess() return nsnull; } +#endif #define ENSURE_NOT_CHILD_PROCESS_(onError) \ PR_BEGIN_MACRO \ @@ -170,7 +174,9 @@ NS_IMPL_ISUPPORTS3(nsPermissionManager, nsIPermissionManager, nsIObserver, nsISu nsPermissionManager::nsPermissionManager() : mLargestID(0) +#ifdef MOZ_IPC , mUpdateChildProcess(PR_FALSE) +#endif { } @@ -227,6 +233,7 @@ nsPermissionManager::Init() mObserverService->AddObserver(this, "profile-do-change", PR_TRUE); } +#ifdef MOZ_IPC if (IsChildProcess()) { // Get the permissions from the parent process InfallibleTArray perms; @@ -241,6 +248,7 @@ nsPermissionManager::Init() // Stop here; we don't need the DB in the child process return NS_OK; } +#endif // ignore failure here, since it's non-fatal (we can run fine without // persistent storage - e.g. if there's no profile). @@ -432,7 +440,9 @@ nsPermissionManager::Add(nsIURI *aURI, PRUint32 aExpireType, PRInt64 aExpireTime) { +#ifdef MOZ_IPC ENSURE_NOT_CHILD_PROCESS; +#endif NS_ENSURE_ARG_POINTER(aURI); NS_ENSURE_ARG_POINTER(aType); @@ -466,6 +476,7 @@ nsPermissionManager::AddInternal(const nsAFlatCString &aHost, NotifyOperationType aNotifyOperation, DBOperationType aDBOperation) { +#ifdef MOZ_IPC if (!IsChildProcess()) { // In the parent, send the update now, if the child is ready if (mUpdateChildProcess) { @@ -475,6 +486,7 @@ nsPermissionManager::AddInternal(const nsAFlatCString &aHost, unused << ParentProcess()->SendAddPermission(permission); } } +#endif if (!gHostArena) { gHostArena = new PLArenaPool; @@ -615,7 +627,9 @@ NS_IMETHODIMP nsPermissionManager::Remove(const nsACString &aHost, const char *aType) { +#ifdef MOZ_IPC ENSURE_NOT_CHILD_PROCESS; +#endif NS_ENSURE_ARG_POINTER(aType); @@ -633,7 +647,9 @@ nsPermissionManager::Remove(const nsACString &aHost, NS_IMETHODIMP nsPermissionManager::RemoveAll() { +#ifdef MOZ_IPC ENSURE_NOT_CHILD_PROCESS; +#endif nsresult rv = RemoveAllInternal(); NotifyObservers(nsnull, NS_LITERAL_STRING("cleared").get()); @@ -790,7 +806,9 @@ AddPermissionsToList(nsHostEntry *entry, void *arg) NS_IMETHODIMP nsPermissionManager::GetEnumerator(nsISimpleEnumerator **aEnum) { +#ifdef MOZ_IPC ENSURE_NOT_CHILD_PROCESS; +#endif // roll an nsCOMArray of all our permissions, then hand out an enumerator nsCOMArray array; @@ -803,7 +821,9 @@ NS_IMETHODIMP nsPermissionManager::GetEnumerator(nsISimpleEnumerator **aEnum) NS_IMETHODIMP nsPermissionManager::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData) { +#ifdef MOZ_IPC ENSURE_NOT_CHILD_PROCESS; +#endif if (!nsCRT::strcmp(aTopic, "profile-before-change")) { // The profile is about to change, @@ -900,7 +920,9 @@ nsPermissionManager::NotifyObservers(nsIPermission *aPermission, nsresult nsPermissionManager::Read() { +#ifdef MOZ_IPC ENSURE_NOT_CHILD_PROCESS; +#endif nsresult rv; @@ -968,7 +990,9 @@ static const char kMatchTypeHost[] = "host"; nsresult nsPermissionManager::Import() { +#ifdef MOZ_IPC ENSURE_NOT_CHILD_PROCESS; +#endif nsresult rv; @@ -1074,7 +1098,9 @@ nsPermissionManager::UpdateDB(OperationType aOp, PRUint32 aExpireType, PRInt64 aExpireTime) { +#ifdef MOZ_IPC ENSURE_NOT_CHILD_PROCESS_NORET; +#endif nsresult rv; diff --git a/extensions/cookie/nsPermissionManager.h b/extensions/cookie/nsPermissionManager.h index 78786a32943..b45772a6fea 100644 --- a/extensions/cookie/nsPermissionManager.h +++ b/extensions/cookie/nsPermissionManager.h @@ -251,6 +251,7 @@ private: // An array to store the strings identifying the different types. nsTArray mTypeArray; +#ifdef MOZ_IPC // Whether we should update the child process with every change to a // permission. This is set to true once the child is ready to receive // such updates. @@ -261,6 +262,7 @@ public: { mUpdateChildProcess = PR_TRUE; } +#endif }; // {4F6B5E00-0C36-11d5-A535-0010A401EB10} diff --git a/extensions/cookie/test/Makefile.in b/extensions/cookie/test/Makefile.in index 2bd0b08dda8..79dd07701dc 100644 --- a/extensions/cookie/test/Makefile.in +++ b/extensions/cookie/test/Makefile.in @@ -96,10 +96,12 @@ libs:: $(_BROWSER_TEST_FILES) XPCSHELL_TESTS = unit +ifdef MOZ_IPC # FIXME/bug 575918: out-of-process xpcshell is broken on OS X ifneq ($(OS_ARCH),Darwin) XPCSHELL_TESTS += unit_ipc endif +endif include $(topsrcdir)/config/rules.mk diff --git a/gfx/Makefile.in b/gfx/Makefile.in index 381e345d262..288c9f78ce4 100644 --- a/gfx/Makefile.in +++ b/gfx/Makefile.in @@ -59,12 +59,16 @@ endif DIRS += angle -DIRS += src qcms layers harfbuzz/src ots/src thebes src/thebes ipc +DIRS += src qcms layers harfbuzz/src ots/src thebes src/thebes ifdef BUILD_STATIC_LIBS DIRS += ycbcr endif +ifdef MOZ_IPC +DIRS += ipc +endif + ifdef ENABLE_TESTS TOOL_DIRS += tests endif diff --git a/gfx/ipc/Makefile.in b/gfx/ipc/Makefile.in index c0950b2425e..85c3fb0f6f9 100644 --- a/gfx/ipc/Makefile.in +++ b/gfx/ipc/Makefile.in @@ -42,6 +42,8 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +ifdef MOZ_IPC + MODULE = gfxipc LIBRARY_NAME = gfxipc_s FORCE_STATIC_LIB = 1 @@ -71,6 +73,8 @@ endif include $(topsrcdir)/config/config.mk include $(topsrcdir)/ipc/chromium/chromium-config.mk +endif + include $(topsrcdir)/config/rules.mk CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS) diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index c3527ac8f85..eae4fa9cd18 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -38,7 +38,9 @@ * * ***** END LICENSE BLOCK ***** */ -#include "mozilla/layers/ShadowLayers.h" +#ifdef MOZ_IPC +# include "mozilla/layers/ShadowLayers.h" +#endif // MOZ_IPC #include "ImageLayers.h" #include "Layers.h" @@ -239,6 +241,7 @@ Layer::CanUseOpaqueSurface() parent->CanUseOpaqueSurface(); } +#ifdef MOZ_IPC // NB: eventually these methods will be defined unconditionally, and // can be moved into Layers.h const nsIntRect* @@ -259,6 +262,13 @@ Layer::GetEffectiveVisibleRegion() return GetVisibleRegion(); } +#else + +const nsIntRect* Layer::GetEffectiveClipRect() { return GetClipRect(); } +const nsIntRegion& Layer::GetEffectiveVisibleRegion() { return GetVisibleRegion(); } + +#endif // MOZ_IPC + gfx3DMatrix Layer::SnapTransform(const gfx3DMatrix& aTransform, const gfxRect& aSnapRect, @@ -351,8 +361,10 @@ Layer::CalculateScissorRect(bool aIntermediate, const gfx3DMatrix& Layer::GetLocalTransform() { +#ifdef MOZ_IPC if (ShadowLayer* shadow = AsShadowLayer()) return shadow->GetShadowTransform(); +#endif return mTransform; } @@ -690,6 +702,7 @@ LayerManager::IsLogEnabled() return PR_LOG_TEST(sLog, PR_LOG_DEBUG); } +# ifdef MOZ_IPC static nsACString& PrintInfo(nsACString& aTo, ShadowLayer* aShadowLayer) { @@ -707,6 +720,12 @@ PrintInfo(nsACString& aTo, ShadowLayer* aShadowLayer) } return aTo; } +# else +static nsACString& PrintInfo(nsACString& aTo, ShadowLayer* aShadowLayer) +{ + return aTo; +} +# endif // MOZ_IPC #else // !MOZ_LAYERS_HAVE_LOG diff --git a/gfx/layers/Makefile.in b/gfx/layers/Makefile.in index daef4cd5942..0eb89f1f9bf 100644 --- a/gfx/layers/Makefile.in +++ b/gfx/layers/Makefile.in @@ -44,11 +44,14 @@ VPATH = \ $(srcdir)/opengl \ $(srcdir)/d3d9 \ $(srcdir)/d3d10 \ - $(srcdir)/ipc \ $(NULL) include $(DEPTH)/config/autoconf.mk +ifdef MOZ_IPC +VPATH += $(srcdir)/ipc +endif + MODULE = thebes LIBRARY_NAME = layers LIBXUL_LIBRARY = 1 @@ -124,6 +127,7 @@ CPPSRCS += \ endif endif +ifdef MOZ_IPC #{ EXPORTS_NAMESPACES = IPC mozilla/layers EXPORTS_IPC = ShadowLayerUtils.h EXPORTS_mozilla/layers =\ @@ -145,6 +149,8 @@ EXPORTS_mozilla/layers += ShadowLayerUtilsX11.h CPPSRCS += ShadowLayerUtilsX11.cpp endif #} +endif #} + # Enable GLES2.0 under maemo ifdef MOZ_X11 ifdef MOZ_PLATFORM_MAEMO @@ -154,7 +160,9 @@ endif include $(topsrcdir)/config/rules.mk +ifdef MOZ_IPC include $(topsrcdir)/ipc/chromium/chromium-config.mk +endif CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS) diff --git a/gfx/layers/basic/BasicLayers.cpp b/gfx/layers/basic/BasicLayers.cpp index 5d6a2f3122b..86bfa762e67 100644 --- a/gfx/layers/basic/BasicLayers.cpp +++ b/gfx/layers/basic/BasicLayers.cpp @@ -36,12 +36,14 @@ * * ***** END LICENSE BLOCK ***** */ -#include "gfxSharedImageSurface.h" +#ifdef MOZ_IPC +# include "gfxSharedImageSurface.h" -#include "mozilla/layers/PLayerChild.h" -#include "mozilla/layers/PLayersChild.h" -#include "mozilla/layers/PLayersParent.h" -#include "ipc/ShadowLayerChild.h" +# include "mozilla/layers/PLayerChild.h" +# include "mozilla/layers/PLayersChild.h" +# include "mozilla/layers/PLayersParent.h" +# include "ipc/ShadowLayerChild.h" +#endif #include "BasicLayers.h" #include "ImageLayers.h" @@ -1607,6 +1609,8 @@ BasicLayerManager::CreateReadbackLayer() return layer.forget(); } +#ifdef MOZ_IPC + class BasicShadowableThebesLayer; class BasicShadowableLayer : public ShadowableLayer { @@ -2890,6 +2894,7 @@ BasicShadowLayerManager::IsCompositingCheap() return mShadowManager && LayerManager::IsCompositingCheap(GetParentBackendType()); } +#endif // MOZ_IPC } } diff --git a/gfx/layers/basic/BasicLayers.h b/gfx/layers/basic/BasicLayers.h index 392479d38e8..6590f618001 100644 --- a/gfx/layers/basic/BasicLayers.h +++ b/gfx/layers/basic/BasicLayers.h @@ -45,7 +45,9 @@ #include "nsAutoRef.h" #include "nsThreadUtils.h" +#ifdef MOZ_IPC #include "mozilla/layers/ShadowLayers.h" +#endif class nsIWidget; @@ -69,7 +71,11 @@ class ReadbackProcessor; * between layers). */ class THEBES_API BasicLayerManager : +#ifdef MOZ_IPC public ShadowLayerManager +#else + public LayerManager +#endif { public: /** @@ -229,6 +235,7 @@ protected: }; +#ifdef MOZ_IPC class BasicShadowLayerManager : public BasicLayerManager, public ShadowLayerForwarder { @@ -277,6 +284,7 @@ private: LayerRefArray mKeepAlive; }; +#endif // MOZ_IPC } } diff --git a/gfx/layers/opengl/CanvasLayerOGL.cpp b/gfx/layers/opengl/CanvasLayerOGL.cpp index e7b5c2fec7a..c7f4478ecc6 100644 --- a/gfx/layers/opengl/CanvasLayerOGL.cpp +++ b/gfx/layers/opengl/CanvasLayerOGL.cpp @@ -35,7 +35,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC # include "gfxSharedImageSurface.h" +#endif #include "CanvasLayerOGL.h" @@ -251,6 +253,8 @@ CanvasLayerOGL::RenderLayer(int aPreviousDestination, } +#ifdef MOZ_IPC + ShadowCanvasLayerOGL::ShadowCanvasLayerOGL(LayerManagerOGL* aManager) : ShadowCanvasLayer(aManager, nsnull) , LayerOGL(aManager) @@ -338,3 +342,5 @@ ShadowCanvasLayerOGL::RenderLayer(int aPreviousFrameBuffer, mOGLManager->BindAndDrawQuad(program); } + +#endif // MOZ_IPC diff --git a/gfx/layers/opengl/CanvasLayerOGL.h b/gfx/layers/opengl/CanvasLayerOGL.h index 24bc189bd9e..23a66d5c491 100644 --- a/gfx/layers/opengl/CanvasLayerOGL.h +++ b/gfx/layers/opengl/CanvasLayerOGL.h @@ -38,8 +38,10 @@ #ifndef GFX_CANVASLAYEROGL_H #define GFX_CANVASLAYEROGL_H +#ifdef MOZ_IPC # include "mozilla/layers/PLayers.h" # include "mozilla/layers/ShadowLayers.h" +#endif // MOZ_IPC #include "LayerManagerOGL.h" #include "gfxASurface.h" @@ -87,6 +89,7 @@ protected: PRPackedBool mNeedsYFlip; }; +#ifdef MOZ_IPC // NB: eventually we'll have separate shadow canvas2d and shadow // canvas3d layers, but currently they look the same from the // perspective of the compositor process @@ -127,6 +130,7 @@ private: }; +#endif // MOZ_IPC } /* layers */ } /* mozilla */ diff --git a/gfx/layers/opengl/ColorLayerOGL.cpp b/gfx/layers/opengl/ColorLayerOGL.cpp index bf45085c435..de29e49a3b0 100644 --- a/gfx/layers/opengl/ColorLayerOGL.cpp +++ b/gfx/layers/opengl/ColorLayerOGL.cpp @@ -80,12 +80,14 @@ ColorLayerOGL::RenderLayer(int, return RenderColorLayer(this, mOGLManager, aOffset); } +#ifdef MOZ_IPC void ShadowColorLayerOGL::RenderLayer(int, const nsIntPoint& aOffset) { return RenderColorLayer(this, mOGLManager, aOffset); } +#endif // MOZ_IPC } /* layers */ diff --git a/gfx/layers/opengl/ColorLayerOGL.h b/gfx/layers/opengl/ColorLayerOGL.h index 717dc9a90f7..4cd291e079e 100644 --- a/gfx/layers/opengl/ColorLayerOGL.h +++ b/gfx/layers/opengl/ColorLayerOGL.h @@ -38,8 +38,10 @@ #ifndef GFX_COLORLAYEROGL_H #define GFX_COLORLAYEROGL_H +#ifdef MOZ_IPC # include "mozilla/layers/PLayers.h" # include "mozilla/layers/ShadowLayers.h" +#endif // MOZ_IPC #include "LayerManagerOGL.h" @@ -67,6 +69,7 @@ public: const nsIntPoint& aOffset); }; +#ifdef MOZ_IPC class ShadowColorLayerOGL : public ShadowColorLayer, public LayerOGL { @@ -87,6 +90,7 @@ public: virtual void RenderLayer(int aPreviousFrameBuffer, const nsIntPoint& aOffset); }; +#endif // MOZ_IPC } /* layers */ } /* mozilla */ diff --git a/gfx/layers/opengl/ContainerLayerOGL.cpp b/gfx/layers/opengl/ContainerLayerOGL.cpp index 2d77443b77f..f7121f25777 100644 --- a/gfx/layers/opengl/ContainerLayerOGL.cpp +++ b/gfx/layers/opengl/ContainerLayerOGL.cpp @@ -343,6 +343,8 @@ ContainerLayerOGL::RenderLayer(int aPreviousFrameBuffer, } +#ifdef MOZ_IPC + ShadowContainerLayerOGL::ShadowContainerLayerOGL(LayerManagerOGL *aManager) : ShadowContainerLayer(aManager, NULL) , LayerOGL(aManager) @@ -389,6 +391,8 @@ ShadowContainerLayerOGL::RenderLayer(int aPreviousFrameBuffer, ContainerRender(this, aPreviousFrameBuffer, aOffset, mOGLManager); } +#endif // MOZ_IPC + } /* layers */ } /* mozilla */ diff --git a/gfx/layers/opengl/ContainerLayerOGL.h b/gfx/layers/opengl/ContainerLayerOGL.h index 74fc728bc75..2a1184335dd 100644 --- a/gfx/layers/opengl/ContainerLayerOGL.h +++ b/gfx/layers/opengl/ContainerLayerOGL.h @@ -38,8 +38,10 @@ #ifndef GFX_CONTAINERLAYEROGL_H #define GFX_CONTAINERLAYEROGL_H +#ifdef MOZ_IPC # include "mozilla/layers/PLayers.h" # include "mozilla/layers/ShadowLayers.h" +#endif #include "Layers.h" #include "LayerManagerOGL.h" @@ -98,6 +100,7 @@ public: } }; +#ifdef MOZ_IPC class ShadowContainerLayerOGL : public ShadowContainerLayer, public LayerOGL { @@ -136,6 +139,7 @@ public: DefaultComputeEffectiveTransforms(aTransformToSurface); } }; +#endif // MOZ_IPC } /* layers */ } /* mozilla */ diff --git a/gfx/layers/opengl/ImageLayerOGL.cpp b/gfx/layers/opengl/ImageLayerOGL.cpp index 8a4a896cc9b..122a2dcc2a4 100644 --- a/gfx/layers/opengl/ImageLayerOGL.cpp +++ b/gfx/layers/opengl/ImageLayerOGL.cpp @@ -36,7 +36,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC # include "gfxSharedImageSurface.h" +#endif #include "ImageLayerOGL.h" #include "gfxImageSurface.h" @@ -743,6 +745,8 @@ CairoImageOGL::SetData(const CairoImage::Data &aData) tex); } +#ifdef MOZ_IPC + ShadowImageLayerOGL::ShadowImageLayerOGL(LayerManagerOGL* aManager) : ShadowImageLayer(aManager, nsnull) , LayerOGL(aManager) @@ -833,6 +837,8 @@ ShadowImageLayerOGL::RenderLayer(int aPreviousFrameBuffer, mOGLManager->BindAndDrawQuad(program); } +#endif // MOZ_IPC + } /* layers */ } /* mozilla */ diff --git a/gfx/layers/opengl/ImageLayerOGL.h b/gfx/layers/opengl/ImageLayerOGL.h index 8169f8b766b..09493b17c0f 100644 --- a/gfx/layers/opengl/ImageLayerOGL.h +++ b/gfx/layers/opengl/ImageLayerOGL.h @@ -38,8 +38,10 @@ #ifndef GFX_IMAGELAYEROGL_H #define GFX_IMAGELAYEROGL_H +#ifdef MOZ_IPC # include "mozilla/layers/PLayers.h" # include "mozilla/layers/ShadowLayers.h" +#endif // MOZ_IPC #include "LayerManagerOGL.h" #include "ImageLayers.h" @@ -232,6 +234,7 @@ public: gl::ShaderProgramType mLayerProgram; }; +#ifdef MOZ_IPC class ShadowImageLayerOGL : public ShadowImageLayer, public LayerOGL { @@ -268,6 +271,7 @@ private: }; +#endif } /* layers */ } /* mozilla */ diff --git a/gfx/layers/opengl/LayerManagerOGL.cpp b/gfx/layers/opengl/LayerManagerOGL.cpp index 5d3c8b850a1..070a75a343d 100644 --- a/gfx/layers/opengl/LayerManagerOGL.cpp +++ b/gfx/layers/opengl/LayerManagerOGL.cpp @@ -37,7 +37,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC # include "mozilla/layers/PLayers.h" +#endif // MOZ_IPC #include "LayerManagerOGL.h" #include "ThebesLayerOGL.h" @@ -968,6 +970,8 @@ void LayerOGL::ApplyFilter(gfxPattern::GraphicsFilter aFilter) } } +#ifdef MOZ_IPC + already_AddRefed LayerManagerOGL::CreateShadowThebesLayer() { @@ -1018,6 +1022,20 @@ LayerManagerOGL::CreateShadowCanvasLayer() return nsRefPtr(new ShadowCanvasLayerOGL(this)).forget(); } +#else + +already_AddRefed +LayerManagerOGL::CreateShadowThebesLayer() { return nsnull; } +already_AddRefed +LayerManagerOGL::CreateShadowContainerLayer() { return nsnull; } +already_AddRefed +LayerManagerOGL::CreateShadowImageLayer() { return nsnull; } +already_AddRefed +LayerManagerOGL::CreateShadowColorLayer() { return nsnull; } +already_AddRefed +LayerManagerOGL::CreateShadowCanvasLayer() { return nsnull; } + +#endif // MOZ_IPC } /* layers */ } /* mozilla */ diff --git a/gfx/layers/opengl/LayerManagerOGL.h b/gfx/layers/opengl/LayerManagerOGL.h index 0cc7d76968f..a4980353761 100644 --- a/gfx/layers/opengl/LayerManagerOGL.h +++ b/gfx/layers/opengl/LayerManagerOGL.h @@ -42,7 +42,9 @@ #include "Layers.h" +#ifdef MOZ_IPC #include "mozilla/layers/ShadowLayers.h" +#endif #ifdef XP_WIN #include @@ -82,7 +84,11 @@ class ShadowColorLayer; * the main thread. */ class THEBES_API LayerManagerOGL : +#ifdef MOZ_IPC public ShadowLayerManager +#else + public LayerManager +#endif { typedef mozilla::gl::GLContext GLContext; typedef mozilla::gl::ShaderProgramType ProgramType; diff --git a/gfx/layers/opengl/ThebesLayerOGL.cpp b/gfx/layers/opengl/ThebesLayerOGL.cpp index dd71cde4ee6..a36371e2c30 100644 --- a/gfx/layers/opengl/ThebesLayerOGL.cpp +++ b/gfx/layers/opengl/ThebesLayerOGL.cpp @@ -36,8 +36,10 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC # include "mozilla/layers/PLayers.h" # include "mozilla/layers/ShadowLayers.h" +#endif #include "ThebesLayerBuffer.h" #include "ThebesLayerOGL.h" @@ -776,6 +778,8 @@ ThebesLayerOGL::IsEmpty() } +#ifdef MOZ_IPC + class ShadowBufferOGL : public ThebesLayerBufferOGL { public: @@ -948,6 +952,8 @@ ShadowThebesLayerOGL::RenderLayer(int aPreviousFrameBuffer, mBuffer->RenderTo(aOffset, mOGLManager); } +#endif // MOZ_IPC + } /* layers */ } /* mozilla */ diff --git a/gfx/layers/opengl/ThebesLayerOGL.h b/gfx/layers/opengl/ThebesLayerOGL.h index b2b459437a3..ab1a9bc91db 100644 --- a/gfx/layers/opengl/ThebesLayerOGL.h +++ b/gfx/layers/opengl/ThebesLayerOGL.h @@ -38,8 +38,10 @@ #ifndef GFX_THEBESLAYEROGL_H #define GFX_THEBESLAYEROGL_H -#include "mozilla/layers/PLayers.h" -#include "mozilla/layers/ShadowLayers.h" +#ifdef MOZ_IPC +# include "mozilla/layers/PLayers.h" +# include "mozilla/layers/ShadowLayers.h" +#endif #include "Layers.h" #include "LayerManagerOGL.h" @@ -84,6 +86,7 @@ private: nsRefPtr mBuffer; }; +#ifdef MOZ_IPC class ShadowThebesLayerOGL : public ShadowThebesLayer, public LayerOGL { @@ -114,6 +117,7 @@ public: private: nsRefPtr mBuffer; }; +#endif // MOZ_IPC } /* layers */ } /* mozilla */ diff --git a/gfx/thebes/Makefile.in b/gfx/thebes/Makefile.in index fbc9ac47390..531c78b03e2 100644 --- a/gfx/thebes/Makefile.in +++ b/gfx/thebes/Makefile.in @@ -47,8 +47,13 @@ EXPORTS = \ GLContextProviderImpl.h \ nsCoreAnimationSupport.h \ EGLUtils.h \ + $(NULL) + +ifdef MOZ_IPC +EXPORTS += \ gfxSharedImageSurface.h \ $(NULL) +endif ifeq ($(MOZ_WIDGET_TOOLKIT),android) EXPORTS += \ @@ -180,7 +185,6 @@ CPPSRCS = \ gfxHarfBuzzShaper.cpp \ GLContext.cpp \ GLContextProviderOSMesa.cpp \ - gfxSharedImageSurface.cpp \ $(NULL) # Are we targeting x86 or x64? If so, build gfxAlphaRecoverySSE2.cpp. @@ -199,6 +203,12 @@ endif endif +ifdef MOZ_IPC +CPPSRCS += \ + gfxSharedImageSurface.cpp \ + $(NULL) +endif + SHARED_LIBRARY_LIBS += \ ../layers/$(LIB_PREFIX)layers.$(LIB_SUFFIX) \ $(NULL) diff --git a/gfx/thebes/gfxAndroidPlatform.cpp b/gfx/thebes/gfxAndroidPlatform.cpp index 4254268e60b..6e5fe1ac4ee 100644 --- a/gfx/thebes/gfxAndroidPlatform.cpp +++ b/gfx/thebes/gfxAndroidPlatform.cpp @@ -35,8 +35,10 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "mozilla/dom/ContentChild.h" #include "nsXULAppAPI.h" +#endif #include @@ -171,8 +173,10 @@ public: mMap.ops = nsnull; LOG("initializing the map failed"); } +#ifdef MOZ_IPC NS_ABORT_IF_FALSE(XRE_GetProcessType() == GeckoProcessType_Default, "StartupCacheFontNameCache should only be used in chrome procsess"); +#endif mCache = mozilla::scache::StartupCache::GetSingleton(); Init(); } diff --git a/ipc/chromium/chromium-config.mk b/ipc/chromium/chromium-config.mk index 09fc3db2287..8b09ed1730f 100644 --- a/ipc/chromium/chromium-config.mk +++ b/ipc/chromium/chromium-config.mk @@ -46,6 +46,8 @@ CHROMIUM_CONFIG_INCLUDED = 1 EXTRA_DEPS += $(topsrcdir)/ipc/chromium/chromium-config.mk +ifdef MOZ_IPC # { + DEFINES += \ -DEXCLUDE_SKIA_DEPENDENCIES \ -DCHROMIUM_MOZILLA_BUILD \ @@ -106,3 +108,4 @@ OS_CXXFLAGS := $(filter-out -pedantic,$(OS_CXXFLAGS)) endif # } endif # } +endif # } \ No newline at end of file diff --git a/js/src/xpconnect/shell/xpcshell.cpp b/js/src/xpconnect/shell/xpcshell.cpp index 82a9050298b..0dcb8071567 100644 --- a/js/src/xpconnect/shell/xpcshell.cpp +++ b/js/src/xpconnect/shell/xpcshell.cpp @@ -678,6 +678,8 @@ Clear(JSContext *cx, uintN argc, jsval *vp) return JS_TRUE; } +#ifdef MOZ_IPC + static JSBool SendCommand(JSContext* cx, uintN argc, @@ -722,6 +724,8 @@ GetChildGlobalObject(JSContext* cx, return JS_FALSE; } +#endif // MOZ_IPC + /* * JSContext option name to flag map. The option names are in alphabetical * order for better reporting. @@ -856,8 +860,10 @@ static JSFunctionSpec glob_functions[] = { #ifdef DEBUG {"dumpHeap", DumpHeap, 5,0}, #endif +#ifdef MOZ_IPC {"sendCommand", SendCommand, 1,0}, {"getChildGlobalObject", GetChildGlobalObject, 0,0}, +#endif #ifdef MOZ_CALLGRIND {"startCallgrind", js_StartCallgrind, 0,0}, {"stopCallgrind", js_StopCallgrind, 0,0}, @@ -2013,8 +2019,10 @@ main(int argc, char **argv) JS_DestroyContext(cx); } // this scopes the nsCOMPtrs +#ifdef MOZ_IPC if (!XRE_ShutdownTestShell()) NS_ERROR("problem shutting down testshell"); +#endif #ifdef MOZ_CRASHREPORTER // Get the crashreporter service while XPCOM is still active. diff --git a/layout/Makefile.in b/layout/Makefile.in index 7964c1a905c..98501607b07 100644 --- a/layout/Makefile.in +++ b/layout/Makefile.in @@ -52,13 +52,16 @@ PARALLEL_DIRS = \ tables \ xul/base/public \ xul/base/src \ - ipc \ $(NULL) ifdef NS_PRINTING PARALLEL_DIRS += printing endif +ifdef MOZ_IPC +PARALLEL_DIRS += ipc +endif + ifdef MOZ_MATHML PARALLEL_DIRS += \ mathml \ diff --git a/layout/base/Makefile.in b/layout/base/Makefile.in index b728ac362cd..3e9cf6485c5 100644 --- a/layout/base/Makefile.in +++ b/layout/base/Makefile.in @@ -148,7 +148,9 @@ FORCE_STATIC_LIB = 1 include $(topsrcdir)/config/rules.mk +ifdef MOZ_IPC include $(topsrcdir)/ipc/chromium/chromium-config.mk +endif LOCAL_INCLUDES += \ -I$(srcdir) \ diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index f3a8dbde7ac..dcea41baf35 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -1701,6 +1701,8 @@ nsDisplayOwnLayer::BuildLayer(nsDisplayListBuilder* aBuilder, return layer.forget(); } +#ifdef MOZ_IPC + nsDisplayScrollLayer::nsDisplayScrollLayer(nsDisplayListBuilder* aBuilder, nsDisplayList* aList, nsIFrame* aForFrame, @@ -1780,6 +1782,8 @@ nsDisplayScrollLayer::~nsDisplayScrollLayer() } #endif +#endif + nsDisplayClip::nsDisplayClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame, nsDisplayItem* aItem, const nsRect& aRect) diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index 8785eeb488f..f2644eacd7c 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -1769,6 +1769,7 @@ public: NS_DISPLAY_DECL_NAME("OwnLayer", TYPE_OWN_LAYER) }; +#ifdef MOZ_IPC /** * This creates a layer for the given list of items, whose visibility is * determined by the displayport for the given frame instead of what is @@ -1816,6 +1817,7 @@ public: private: nsIFrame* mViewportFrame; }; +#endif /** * nsDisplayClip can clip a list of items, but we take a single item diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in index f36829e6b0d..9cc786bef43 100644 --- a/layout/build/Makefile.in +++ b/layout/build/Makefile.in @@ -78,11 +78,17 @@ EXPORTS = \ nsLayoutStatics.h \ $(NULL) +ifdef MOZ_IPC +GKIPCLIB=../ipc/$(LIB_PREFIX)gkipc_s.$(LIB_SUFFIX) +else +GKIPCLIB=$(NULL) +endif + SHARED_LIBRARY_LIBS = \ ../base/$(LIB_PREFIX)gkbase_s.$(LIB_SUFFIX) \ ../forms/$(LIB_PREFIX)gkforms_s.$(LIB_SUFFIX) \ ../generic/$(LIB_PREFIX)gkgeneric_s.$(LIB_SUFFIX) \ - ../ipc/$(LIB_PREFIX)gkipc_s.$(LIB_SUFFIX) \ + $(GKIPCLIB) \ ../style/$(LIB_PREFIX)gkstyle_s.$(LIB_SUFFIX) \ ../tables/$(LIB_PREFIX)gktable_s.$(LIB_SUFFIX) \ ../xul/base/src/$(LIB_PREFIX)gkxulbase_s.$(LIB_SUFFIX) \ @@ -294,8 +300,10 @@ ifdef MOZ_NATIVE_LIBVPX EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS) endif +ifdef MOZ_IPC include $(topsrcdir)/config/config.mk include $(topsrcdir)/ipc/chromium/chromium-config.mk +endif include $(topsrcdir)/config/rules.mk diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp index 94ed5f64a00..65e6b7b765c 100644 --- a/layout/build/nsLayoutModule.cpp +++ b/layout/build/nsLayoutModule.cpp @@ -36,7 +36,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "base/basictypes.h" +#endif #include "xpcmodule.h" #include "mozilla/ModuleUtils.h" diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index 6d2a5e1092b..b3f31f6a0f7 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -55,7 +55,9 @@ #undef slots #endif +#ifdef MOZ_IPC #include "mozilla/plugins/PluginMessageUtils.h" +#endif #ifdef MOZ_X11 #include @@ -238,7 +240,9 @@ static PRLogModuleInfo *nsObjectFrameLM = PR_NewLogModule("nsObjectFrame"); #endif using namespace mozilla; +#ifdef MOZ_IPC using namespace mozilla::plugins; +#endif using namespace mozilla::layers; // special class for handeling DOM context menu events because for @@ -2351,6 +2355,7 @@ nsObjectFrame::PaintPlugin(nsDisplayListBuilder* aBuilder, nsPoint origin; gfxWindowsNativeDrawing nativeDraw(ctx, frameGfxRect); +#ifdef MOZ_IPC if (nativeDraw.IsDoublePass()) { // OOP plugin specific: let the shim know before we paint if we are doing a // double pass render. If this plugin isn't oop, the register window message @@ -2362,6 +2367,7 @@ nsObjectFrame::PaintPlugin(nsDisplayListBuilder* aBuilder, if (pluginEvent.event) inst->HandleEvent(&pluginEvent, nsnull); } +#endif do { HDC hdc = nativeDraw.BeginNativeDrawing(); if (!hdc) diff --git a/layout/generic/nsSubDocumentFrame.cpp b/layout/generic/nsSubDocumentFrame.cpp index 03e115c7397..4fd1470140e 100644 --- a/layout/generic/nsSubDocumentFrame.cpp +++ b/layout/generic/nsSubDocumentFrame.cpp @@ -43,8 +43,10 @@ * as ,