From 19d8c91a1049cf86df0c167327b1d69df0e026b8 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 17 Apr 2014 08:20:12 -0400 Subject: [PATCH 01/79] Bug 995411 - Update clobber file to fix bustage. r=bustage on a CLOSED TREE --- CLOBBER | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLOBBER b/CLOBBER index 4108b26533d8..22d13e193ea8 100644 --- a/CLOBBER +++ b/CLOBBER @@ -22,4 +22,4 @@ # changes to stick? As of bug 928195, this shouldn't be necessary! Please # don't change CLOBBER for WebIDL changes any more. -Bug 916012 moves definition from one WEBIDL_FILE to another (Bug 979886) +Bug 995411 moves some files around in gfx/layers and widget/xpwidget From 19f1372183d6df43e298c07e4f5677fc6bafb7e0 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 17 Apr 2014 14:06:50 +0200 Subject: [PATCH 02/79] Bug 996881: Inherit 'use strict' directive when calling toSource/toString for asm.js modules; r=luke --HG-- extra : rebase_source : 63ed080e38be66583c205d930b147bb1e2c66d2c --- js/src/jit-test/tests/asm.js/testSource.js | 27 ++++++++++++++++++++++ js/src/jit/AsmJS.cpp | 9 ++++++-- js/src/jit/AsmJSLink.cpp | 27 ++++++++++++++++++++-- js/src/jit/AsmJSModule.cpp | 9 +++++--- js/src/jit/AsmJSModule.h | 7 +++++- js/src/jsfun.cpp | 12 ++++++---- js/src/jsfun.h | 5 ++++ 7 files changed, 84 insertions(+), 12 deletions(-) diff --git a/js/src/jit-test/tests/asm.js/testSource.js b/js/src/jit-test/tests/asm.js/testSource.js index d5a575d40ce3..2e2ff5dc42b3 100644 --- a/js/src/jit-test/tests/asm.js/testSource.js +++ b/js/src/jit-test/tests/asm.js/testSource.js @@ -237,6 +237,33 @@ if (isAsmJSCompilationAvailable() && isCachingEnabled()) { })(); +/* Implicit "use strict" context */ +(function() { + +var funcHeader = 'function (glob, ffi, heap) {', + funcBody = '\n"use asm";\n\ + function g() {}\n\ + return g;\n\n' + funcFooter = '}', + funcSource = funcHeader + funcBody + funcFooter + useStrict = '\n"use strict";\n'; + +var f4 = eval("\"use strict\";\n(" + funcSource + ")"); + +var expectedToString = funcHeader + useStrict + funcBody + funcFooter +var expectedToSource = '(' + expectedToString + ')' + +assertEq(f4.toString(), expectedToString); +assertEq(f4.toSource(), expectedToSource); + +if (isAsmJSCompilationAvailable() && isCachingEnabled()) { + var f5 = eval("\"use strict\";\n(" + funcSource + ")"); + assertEq(isAsmJSModuleLoadedFromCache(f5), true); + assertEq(f5.toString(), expectedToString); + assertEq(f5.toSource(), expectedToSource); +} +})(); + /* Functions */ (function() { diff --git a/js/src/jit/AsmJS.cpp b/js/src/jit/AsmJS.cpp index a196590a891f..d419d42d5a75 100644 --- a/js/src/jit/AsmJS.cpp +++ b/js/src/jit/AsmJS.cpp @@ -1143,7 +1143,13 @@ class MOZ_STACK_CLASS ModuleCompiler uint32_t funcStart = parser_.pc->maybeFunction->pn_body->pn_pos.begin; uint32_t offsetToEndOfUseAsm = parser_.tokenStream.currentToken().pos.end; - module_ = cx_->new_(parser_.ss, funcStart, offsetToEndOfUseAsm); + + // "use strict" should be added to the source if we are in an implicit + // strict context, see also comment above addUseStrict in + // js::FunctionToString. + bool strict = parser_.pc->sc->strict && !parser_.pc->sc->hasExplicitUseStrict(); + + module_ = cx_->new_(parser_.ss, funcStart, offsetToEndOfUseAsm, strict); if (!module_) return false; @@ -1514,7 +1520,6 @@ class MOZ_STACK_CLASS ModuleCompiler { module_->initFuncEnd(parser_.tokenStream.currentToken().pos.end, parser_.tokenStream.peekTokenPos().end); - masm_.finish(); if (masm_.oom()) return false; diff --git a/js/src/jit/AsmJSLink.cpp b/js/src/jit/AsmJSLink.cpp index 7142eb81ef10..bd71166a0e1a 100644 --- a/js/src/jit/AsmJSLink.cpp +++ b/js/src/jit/AsmJSLink.cpp @@ -800,8 +800,31 @@ js::AsmJSModuleToString(JSContext *cx, HandleFunction fun, bool addParenToLambda if (!src) return nullptr; - if (!out.append(src->chars(), src->length())) - return nullptr; + if (module.strict()) { + // We need to add "use strict" in the body right after the opening + // brace. + size_t bodyStart = 0, bodyEnd; + + // No need to test for functions created with the Function ctor as + // these doesn't implicitly inherit the "use strict" context. Strict mode is + // enabled for functions created with the Function ctor only if they begin with + // the "use strict" directive, but these functions won't validate as asm.js + // modules. + + ConstTwoByteChars chars(src->chars(), src->length()); + if (!FindBody(cx, fun, chars, src->length(), &bodyStart, &bodyEnd)) + return nullptr; + + if (!out.append(chars, bodyStart) || + !out.append("\n\"use strict\";\n") || + !out.append(chars + bodyStart, src->length() - bodyStart)) + { + return nullptr; + } + } else { + if (!out.append(src->chars(), src->length())) + return nullptr; + } if (funCtor && !out.append("\n}")) return nullptr; diff --git a/js/src/jit/AsmJSModule.cpp b/js/src/jit/AsmJSModule.cpp index f128d834fd9a..2e9de679561d 100644 --- a/js/src/jit/AsmJSModule.cpp +++ b/js/src/jit/AsmJSModule.cpp @@ -328,7 +328,8 @@ AsmJSModule::staticallyLink(ExclusiveContext *cx) } } -AsmJSModule::AsmJSModule(ScriptSource *scriptSource, uint32_t funcStart, uint32_t offsetToEndOfUseAsm) +AsmJSModule::AsmJSModule(ScriptSource *scriptSource, uint32_t funcStart, + uint32_t offsetToEndOfUseAsm, bool strict) : globalArgumentName_(nullptr), importArgumentName_(nullptr), bufferArgumentName_(nullptr), @@ -344,6 +345,7 @@ AsmJSModule::AsmJSModule(ScriptSource *scriptSource, uint32_t funcStart, uint32_ mozilla::PodZero(&pod); scriptSource_->incref(); pod.minHeapLength_ = AsmJSAllocationGranularity; + pod.strict_ = strict; } AsmJSModule::~AsmJSModule() @@ -876,7 +878,7 @@ AsmJSModule::clone(JSContext *cx, ScopedJSDeletePtr *moduleOut) con { AutoUnprotectCodeForClone cloneGuard(cx, *this); - *moduleOut = cx->new_(scriptSource_, funcStart_, offsetToEndOfUseAsm_); + *moduleOut = cx->new_(scriptSource_, funcStart_, offsetToEndOfUseAsm_, pod.strict_); if (!*moduleOut) return false; @@ -1313,8 +1315,9 @@ js::LookupAsmJSModuleInCache(ExclusiveContext *cx, uint32_t funcStart = parser.pc->maybeFunction->pn_body->pn_pos.begin; uint32_t offsetToEndOfUseAsm = parser.tokenStream.currentToken().pos.end; + bool strict = parser.pc->sc->strict && !parser.pc->sc->hasExplicitUseStrict(); ScopedJSDeletePtr module( - cx->new_(parser.ss, funcStart, offsetToEndOfUseAsm)); + cx->new_(parser.ss, funcStart, offsetToEndOfUseAsm, strict)); if (!module) return false; cursor = module->deserialize(cx, cursor); diff --git a/js/src/jit/AsmJSModule.h b/js/src/jit/AsmJSModule.h index d8d5199a0496..d9738588a474 100644 --- a/js/src/jit/AsmJSModule.h +++ b/js/src/jit/AsmJSModule.h @@ -431,6 +431,7 @@ class AsmJSModule struct Pod { uint32_t funcLength_; uint32_t funcLengthWithRightBrace_; + bool strict_; uint32_t numGlobalVars_; uint32_t numFFIs_; size_t funcPtrTableAndExitBytes_; @@ -464,7 +465,8 @@ class AsmJSModule mutable bool codeIsProtected_; public: - explicit AsmJSModule(ScriptSource *scriptSource, uint32_t functStart, uint32_t offsetToEndOfUseAsm); + explicit AsmJSModule(ScriptSource *scriptSource, uint32_t functStart, + uint32_t offsetToEndOfUseAsm, bool strict); ~AsmJSModule(); void trace(JSTracer *trc) { @@ -524,6 +526,9 @@ class AsmJSModule uint32_t funcEndAfterCurly() const { return funcStart_ + pod.funcLengthWithRightBrace_; } + bool strict() const { + return pod.strict_; + } bool addGlobalVarInit(const Value &v, AsmJSCoercion coercion, uint32_t *globalIndex) { JS_ASSERT(pod.funcPtrTableAndExitBytes_ == 0); diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 347862d0259e..7f4639cd5f11 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -626,14 +626,18 @@ const Class JSFunction::class_ = { const Class* const js::FunctionClassPtr = &JSFunction::class_; /* Find the body of a function (not including braces). */ -static bool -FindBody(JSContext *cx, HandleFunction fun, ConstTwoByteChars chars, size_t length, +bool +js::FindBody(JSContext *cx, HandleFunction fun, ConstTwoByteChars chars, size_t length, size_t *bodyStart, size_t *bodyEnd) { // We don't need principals, since those are only used for error reporting. CompileOptions options(cx); - options.setFileAndLine("internal-findBody", 0) - .setVersion(fun->nonLazyScript()->getVersion()); + options.setFileAndLine("internal-findBody", 0); + + // For asm.js modules, there's no script. + if (fun->hasScript()) + options.setVersion(fun->nonLazyScript()->getVersion()); + AutoKeepAtoms keepAtoms(cx->perThreadData); TokenStream ts(cx, options, chars.get(), length, nullptr); int nest = 0; diff --git a/js/src/jsfun.h b/js/src/jsfun.h index 226ddc2666e1..d11f1ac52f73 100644 --- a/js/src/jsfun.h +++ b/js/src/jsfun.h @@ -554,6 +554,11 @@ CloneFunctionObject(JSContext *cx, HandleFunction fun, HandleObject parent, gc::AllocKind kind = JSFunction::FinalizeKind, NewObjectKind newKindArg = GenericObject); + +extern bool +FindBody(JSContext *cx, HandleFunction fun, ConstTwoByteChars chars, size_t length, + size_t *bodyStart, size_t *bodyEnd); + } // namespace js inline js::FunctionExtended * From fd1bedcb21b779096cdf3837026e5bc4eaa6787b Mon Sep 17 00:00:00 2001 From: Andrew Church Date: Thu, 17 Apr 2014 09:23:16 -0400 Subject: [PATCH 03/79] Bug 981281 - Ctrl+left/right arrow skips words with leading/trailing punctuation with layout.word_select.stop_at_punctuation=false. r=mats test3/test4 are copies of test1/test2 tweaked for stop_at_punctuation=false. --- layout/generic/nsFrame.cpp | 4 +- .../generic/test/test_movement_by_words.html | 193 +++++++++++++++++- 2 files changed, 193 insertions(+), 4 deletions(-) diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 22d835ed6804..0b38dfcc66e6 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -6696,8 +6696,8 @@ nsFrame::BreakWordBetweenPunctuation(const PeekWordState* aState, } if (!Preferences::GetBool("layout.word_select.stop_at_punctuation")) { // When this pref is false, we never stop at a punctuation boundary unless - // it's after whitespace - return false; + // it's followed by whitespace (in the relevant direction). + return aWhitespaceAfter; } if (!aIsKeyboardSelect) { // mouse caret movement (e.g. word selection) always stops at every punctuation boundary diff --git a/layout/generic/test/test_movement_by_words.html b/layout/generic/test/test_movement_by_words.html index b71820d8fa03..8f5402b5d501 100644 --- a/layout/generic/test/test_movement_by_words.html +++ b/layout/generic/test/test_movement_by_words.html @@ -14,7 +14,7 @@

Catch-all


+
+
+
+
+
+
+
+
+ + diff --git a/dom/webidl/HTMLLinkElement.webidl b/dom/webidl/HTMLLinkElement.webidl index 3f90d61330bc..30741c942b3c 100644 --- a/dom/webidl/HTMLLinkElement.webidl +++ b/dom/webidl/HTMLLinkElement.webidl @@ -28,8 +28,7 @@ interface HTMLLinkElement : HTMLElement { attribute DOMString hreflang; [SetterThrows, Pure] attribute DOMString type; -// Not supported yet: -// [PutForwards=value] readonly attribute DOMSettableTokenList sizes; + [PutForwards=value] readonly attribute DOMSettableTokenList sizes; }; HTMLLinkElement implements LinkStyle; From eef14cc65a0d2c4f1b96b585a943cbe8d54398d0 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 17 Apr 2014 07:53:36 -0400 Subject: [PATCH 34/79] Bug 997383 - Avoid using the base namespace since it causes problems in unified builds. r=nical --- gfx/layers/ipc/ImageBridgeParent.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gfx/layers/ipc/ImageBridgeParent.cpp b/gfx/layers/ipc/ImageBridgeParent.cpp index 44933140540c..8d3d30057120 100644 --- a/gfx/layers/ipc/ImageBridgeParent.cpp +++ b/gfx/layers/ipc/ImageBridgeParent.cpp @@ -34,7 +34,6 @@ #include "mozilla/layers/TextureHost.h" #include "nsThreadUtils.h" -using namespace base; using namespace mozilla::ipc; using namespace mozilla::gfx; @@ -118,7 +117,7 @@ ImageBridgeParent::RecvUpdateNoSwap(const EditArray& aEdits) static void ConnectImageBridgeInParentProcess(ImageBridgeParent* aBridge, Transport* aTransport, - ProcessHandle aOtherProcess) + base::ProcessHandle aOtherProcess) { aBridge->Open(aTransport, aOtherProcess, XRE_GetIOMessageLoop(), ipc::ParentSide); } @@ -126,7 +125,7 @@ ConnectImageBridgeInParentProcess(ImageBridgeParent* aBridge, /*static*/ PImageBridgeParent* ImageBridgeParent::Create(Transport* aTransport, ProcessId aOtherProcess) { - ProcessHandle processHandle; + base::ProcessHandle processHandle; if (!base::OpenProcessHandle(aOtherProcess, &processHandle)) { return nullptr; } From c1a7eb8c17ab4c9ae9e7e17a5befc7a8a8510fa7 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 17 Apr 2014 07:54:25 -0400 Subject: [PATCH 35/79] Bug 995411 - Move various pieces of APZ code into gfx/layers/apz. r=jrmuizel,botond --HG-- rename : gfx/layers/ipc/GeckoContentController.h => gfx/layers/apz/public/GeckoContentController.h rename : gfx/layers/composite/APZCTreeManager.cpp => gfx/layers/apz/src/APZCTreeManager.cpp rename : gfx/layers/composite/APZCTreeManager.h => gfx/layers/apz/src/APZCTreeManager.h rename : gfx/layers/ipc/AsyncPanZoomController.cpp => gfx/layers/apz/src/AsyncPanZoomController.cpp rename : gfx/layers/ipc/AsyncPanZoomController.h => gfx/layers/apz/src/AsyncPanZoomController.h rename : gfx/layers/ipc/Axis.cpp => gfx/layers/apz/src/Axis.cpp rename : gfx/layers/ipc/Axis.h => gfx/layers/apz/src/Axis.h rename : gfx/layers/ipc/GestureEventListener.cpp => gfx/layers/apz/src/GestureEventListener.cpp rename : gfx/layers/ipc/GestureEventListener.h => gfx/layers/apz/src/GestureEventListener.h rename : gfx/layers/ipc/TaskThrottler.cpp => gfx/layers/apz/src/TaskThrottler.cpp rename : gfx/layers/ipc/TaskThrottler.h => gfx/layers/apz/src/TaskThrottler.h rename : widget/xpwidgets/APZCCallbackHelper.cpp => gfx/layers/apz/util/APZCCallbackHelper.cpp rename : widget/xpwidgets/APZCCallbackHelper.h => gfx/layers/apz/util/APZCCallbackHelper.h rename : widget/xpwidgets/ActiveElementManager.cpp => gfx/layers/apz/util/ActiveElementManager.cpp rename : widget/xpwidgets/ActiveElementManager.h => gfx/layers/apz/util/ActiveElementManager.h --- dom/ipc/TabChild.cpp | 4 +-- dom/ipc/TabChild.h | 4 +-- .../public}/GeckoContentController.h | 0 .../src}/APZCTreeManager.cpp | 2 +- .../{composite => apz/src}/APZCTreeManager.h | 0 .../src}/AsyncPanZoomController.cpp | 3 +- .../{ipc => apz/src}/AsyncPanZoomController.h | 2 +- gfx/layers/{ipc => apz/src}/Axis.cpp | 0 gfx/layers/{ipc => apz/src}/Axis.h | 0 .../{ipc => apz/src}/GestureEventListener.cpp | 0 .../{ipc => apz/src}/GestureEventListener.h | 0 gfx/layers/{ipc => apz/src}/TaskThrottler.cpp | 0 gfx/layers/{ipc => apz/src}/TaskThrottler.h | 0 .../layers/apz/util}/APZCCallbackHelper.cpp | 2 +- .../layers/apz/util}/APZCCallbackHelper.h | 8 +++--- .../layers/apz/util}/ActiveElementManager.cpp | 4 +-- .../layers/apz/util}/ActiveElementManager.h | 8 +++--- gfx/layers/ipc/LayerTransactionParent.cpp | 2 +- gfx/layers/moz.build | 28 +++++++++++-------- widget/gonk/ParentProcessController.cpp | 6 ++-- widget/windows/winrt/APZController.cpp | 8 +++--- widget/xpwidgets/moz.build | 4 --- 22 files changed, 43 insertions(+), 42 deletions(-) rename gfx/layers/{ipc => apz/public}/GeckoContentController.h (100%) rename gfx/layers/{composite => apz/src}/APZCTreeManager.cpp (99%) rename gfx/layers/{composite => apz/src}/APZCTreeManager.h (100%) rename gfx/layers/{ipc => apz/src}/AsyncPanZoomController.cpp (99%) rename gfx/layers/{ipc => apz/src}/AsyncPanZoomController.h (99%) rename gfx/layers/{ipc => apz/src}/Axis.cpp (100%) rename gfx/layers/{ipc => apz/src}/Axis.h (100%) rename gfx/layers/{ipc => apz/src}/GestureEventListener.cpp (100%) rename gfx/layers/{ipc => apz/src}/GestureEventListener.h (100%) rename gfx/layers/{ipc => apz/src}/TaskThrottler.cpp (100%) rename gfx/layers/{ipc => apz/src}/TaskThrottler.h (100%) rename {widget/xpwidgets => gfx/layers/apz/util}/APZCCallbackHelper.cpp (99%) rename {widget/xpwidgets => gfx/layers/apz/util}/APZCCallbackHelper.h (97%) rename {widget/xpwidgets => gfx/layers/apz/util}/ActiveElementManager.cpp (99%) rename {widget/xpwidgets => gfx/layers/apz/util}/ActiveElementManager.h (92%) diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index e99acd76806f..d23d926e4ccd 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -18,6 +18,8 @@ #include "mozilla/docshell/OfflineCacheUpdateChild.h" #include "mozilla/ipc/DocumentRendererChild.h" #include "mozilla/ipc/FileDescriptorUtils.h" +#include "mozilla/layers/ActiveElementManager.h" +#include "mozilla/layers/APZCCallbackHelper.h" #include "mozilla/layers/AsyncPanZoomController.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/layers/ImageBridgeChild.h" @@ -68,13 +70,11 @@ #include "StructuredCloneUtils.h" #include "nsViewportInfo.h" #include "JavaScriptChild.h" -#include "APZCCallbackHelper.h" #include "nsILoadContext.h" #include "ipc/nsGUIEventIPC.h" #include "mozilla/gfx/Matrix.h" #include "UnitTransforms.h" #include "ClientLayerManager.h" -#include "ActiveElementManager.h" #include "nsColorPickerProxy.h" diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index 13e3ebd94cd5..fdade87b0125 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -42,7 +42,7 @@ namespace layout { class RenderFrameChild; } -namespace widget { +namespace layers { class ActiveElementManager; } @@ -232,7 +232,7 @@ class TabChild : public PBrowserChild, typedef mozilla::dom::ClonedMessageData ClonedMessageData; typedef mozilla::layout::RenderFrameChild RenderFrameChild; typedef mozilla::layout::ScrollingBehavior ScrollingBehavior; - typedef mozilla::widget::ActiveElementManager ActiveElementManager; + typedef mozilla::layers::ActiveElementManager ActiveElementManager; public: /** diff --git a/gfx/layers/ipc/GeckoContentController.h b/gfx/layers/apz/public/GeckoContentController.h similarity index 100% rename from gfx/layers/ipc/GeckoContentController.h rename to gfx/layers/apz/public/GeckoContentController.h diff --git a/gfx/layers/composite/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp similarity index 99% rename from gfx/layers/composite/APZCTreeManager.cpp rename to gfx/layers/apz/src/APZCTreeManager.cpp index f14de3171d8c..8710769659cb 100644 --- a/gfx/layers/composite/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -4,7 +4,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "APZCTreeManager.h" -#include "AsyncCompositionManager.h" // for ViewTransform #include "Compositor.h" // for Compositor #include "CompositorParent.h" // for CompositorParent, etc #include "InputData.h" // for InputData, etc @@ -12,6 +11,7 @@ #include "gfx3DMatrix.h" // for gfx3DMatrix #include "mozilla/dom/Touch.h" // for Touch #include "mozilla/gfx/Point.h" // for Point +#include "mozilla/layers/AsyncCompositionManager.h" // for ViewTransform #include "mozilla/layers/AsyncPanZoomController.h" #include "mozilla/MouseEvents.h" #include "mozilla/mozalloc.h" // for operator new diff --git a/gfx/layers/composite/APZCTreeManager.h b/gfx/layers/apz/src/APZCTreeManager.h similarity index 100% rename from gfx/layers/composite/APZCTreeManager.h rename to gfx/layers/apz/src/APZCTreeManager.h diff --git a/gfx/layers/ipc/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp similarity index 99% rename from gfx/layers/ipc/AsyncPanZoomController.cpp rename to gfx/layers/apz/src/AsyncPanZoomController.cpp index 7b976564cbc8..46734e5046b3 100644 --- a/gfx/layers/ipc/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -14,7 +14,6 @@ #include "FrameMetrics.h" // for FrameMetrics, etc #include "GestureEventListener.h" // for GestureEventListener #include "InputData.h" // for MultiTouchInput, etc -#include "LayerTransactionParent.h" // for LayerTransactionParent #include "Units.h" // for CSSRect, CSSPoint, etc #include "UnitTransforms.h" // for TransformTo #include "base/message_loop.h" // for MessageLoop @@ -40,7 +39,7 @@ #include "mozilla/layers/APZCTreeManager.h" // for ScrollableLayerGuid #include "mozilla/layers/AsyncCompositionManager.h" // for ViewTransform #include "mozilla/layers/Axis.h" // for AxisX, AxisY, Axis, etc -#include "mozilla/layers/GeckoContentController.h" +#include "mozilla/layers/LayerTransactionParent.h" // for LayerTransactionParent #include "mozilla/layers/PCompositorParent.h" // for PCompositorParent #include "mozilla/layers/TaskThrottler.h" // for TaskThrottler #include "mozilla/mozalloc.h" // for operator new, etc diff --git a/gfx/layers/ipc/AsyncPanZoomController.h b/gfx/layers/apz/src/AsyncPanZoomController.h similarity index 99% rename from gfx/layers/ipc/AsyncPanZoomController.h rename to gfx/layers/apz/src/AsyncPanZoomController.h index c44a5d0a8552..996f8abd700f 100644 --- a/gfx/layers/ipc/AsyncPanZoomController.h +++ b/gfx/layers/apz/src/AsyncPanZoomController.h @@ -8,7 +8,7 @@ #define mozilla_layers_AsyncPanZoomController_h #include "CrossProcessMutex.h" -#include "GeckoContentController.h" +#include "mozilla/layers/GeckoContentController.h" #include "mozilla/Attributes.h" #include "mozilla/EventForwards.h" #include "mozilla/Monitor.h" diff --git a/gfx/layers/ipc/Axis.cpp b/gfx/layers/apz/src/Axis.cpp similarity index 100% rename from gfx/layers/ipc/Axis.cpp rename to gfx/layers/apz/src/Axis.cpp diff --git a/gfx/layers/ipc/Axis.h b/gfx/layers/apz/src/Axis.h similarity index 100% rename from gfx/layers/ipc/Axis.h rename to gfx/layers/apz/src/Axis.h diff --git a/gfx/layers/ipc/GestureEventListener.cpp b/gfx/layers/apz/src/GestureEventListener.cpp similarity index 100% rename from gfx/layers/ipc/GestureEventListener.cpp rename to gfx/layers/apz/src/GestureEventListener.cpp diff --git a/gfx/layers/ipc/GestureEventListener.h b/gfx/layers/apz/src/GestureEventListener.h similarity index 100% rename from gfx/layers/ipc/GestureEventListener.h rename to gfx/layers/apz/src/GestureEventListener.h diff --git a/gfx/layers/ipc/TaskThrottler.cpp b/gfx/layers/apz/src/TaskThrottler.cpp similarity index 100% rename from gfx/layers/ipc/TaskThrottler.cpp rename to gfx/layers/apz/src/TaskThrottler.cpp diff --git a/gfx/layers/ipc/TaskThrottler.h b/gfx/layers/apz/src/TaskThrottler.h similarity index 100% rename from gfx/layers/ipc/TaskThrottler.h rename to gfx/layers/apz/src/TaskThrottler.h diff --git a/widget/xpwidgets/APZCCallbackHelper.cpp b/gfx/layers/apz/util/APZCCallbackHelper.cpp similarity index 99% rename from widget/xpwidgets/APZCCallbackHelper.cpp rename to gfx/layers/apz/util/APZCCallbackHelper.cpp index 2d37c1b263a5..a4b675d02468 100644 --- a/widget/xpwidgets/APZCCallbackHelper.cpp +++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp @@ -12,7 +12,7 @@ #include "nsIInterfaceRequestorUtils.h" namespace mozilla { -namespace widget { +namespace layers { bool APZCCallbackHelper::HasValidPresShellId(nsIDOMWindowUtils* aUtils, diff --git a/widget/xpwidgets/APZCCallbackHelper.h b/gfx/layers/apz/util/APZCCallbackHelper.h similarity index 97% rename from widget/xpwidgets/APZCCallbackHelper.h rename to gfx/layers/apz/util/APZCCallbackHelper.h index 505a3c11efd3..e5e0668c2841 100644 --- a/widget/xpwidgets/APZCCallbackHelper.h +++ b/gfx/layers/apz/util/APZCCallbackHelper.h @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef __mozilla_widget_APZCCallbackHelper_h__ -#define __mozilla_widget_APZCCallbackHelper_h__ +#ifndef mozilla_layers_APZCCallbackHelper_h +#define mozilla_layers_APZCCallbackHelper_h #include "FrameMetrics.h" #include "nsIContent.h" @@ -12,7 +12,7 @@ #include "nsIDOMWindowUtils.h" namespace mozilla { -namespace widget { +namespace layers { /* This class contains some helper methods that facilitate implementing the GeckoContentController callback interface required by the AsyncPanZoomController. @@ -100,4 +100,4 @@ public: } } -#endif /*__mozilla_widget_APZCCallbackHelper_h__ */ +#endif /* mozilla_layers_APZCCallbackHelper_h */ diff --git a/widget/xpwidgets/ActiveElementManager.cpp b/gfx/layers/apz/util/ActiveElementManager.cpp similarity index 99% rename from widget/xpwidgets/ActiveElementManager.cpp rename to gfx/layers/apz/util/ActiveElementManager.cpp index b9c1900ad7a7..6edb27c918db 100644 --- a/widget/xpwidgets/ActiveElementManager.cpp +++ b/gfx/layers/apz/util/ActiveElementManager.cpp @@ -15,7 +15,7 @@ #include "base/task.h" namespace mozilla { -namespace widget { +namespace layers { static int32_t sActivationDelayMs = 100; static bool sActivationDelayMsSet = false; @@ -148,4 +148,4 @@ ActiveElementManager::CancelTask() } } -} \ No newline at end of file +} diff --git a/widget/xpwidgets/ActiveElementManager.h b/gfx/layers/apz/util/ActiveElementManager.h similarity index 92% rename from widget/xpwidgets/ActiveElementManager.h rename to gfx/layers/apz/util/ActiveElementManager.h index 974f4449c2fd..b52df02303b1 100644 --- a/widget/xpwidgets/ActiveElementManager.h +++ b/gfx/layers/apz/util/ActiveElementManager.h @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef __mozilla_widget_ActiveElementManager_h__ -#define __mozilla_widget_ActiveElementManager_h__ +#ifndef mozilla_layers_ActiveElementManager_h +#define mozilla_layers_ActiveElementManager_h #include "nsCOMPtr.h" #include "nsISupportsImpl.h" @@ -15,7 +15,7 @@ class nsIDOMElement; class CancelableTask; namespace mozilla { -namespace widget { +namespace layers { /** * Manages setting and clearing the ':active' CSS pseudostate in the presence @@ -82,4 +82,4 @@ private: } } -#endif /*__mozilla_widget_ActiveElementManager_h__ */ +#endif /* mozilla_layers_ActiveElementManager_h */ diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index 4867b2bf7b5d..5bb409618055 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -41,7 +41,7 @@ #include "GeckoProfiler.h" #include "mozilla/layers/TextureHost.h" #include "mozilla/layers/AsyncCompositionManager.h" -#include "AsyncPanZoomController.h" +#include "mozilla/layers/AsyncPanZoomController.h" typedef std::vector EditReplyVector; diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index b664db68a807..26378539f090 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -97,6 +97,16 @@ EXPORTS.gfxipc += [ ] EXPORTS.mozilla.layers += [ + 'apz/public/GeckoContentController.h', + # exporting things from apz/src is temporary until we extract a + # proper interface for the code there + 'apz/src/APZCTreeManager.h', + 'apz/src/AsyncPanZoomController.h', + 'apz/src/Axis.h', + 'apz/src/GestureEventListener.h', + 'apz/src/TaskThrottler.h', + 'apz/util/ActiveElementManager.h', + 'apz/util/APZCCallbackHelper.h', 'AtomicRefCountedWithFinalize.h', 'basic/BasicCompositor.h', 'basic/MacIOSurfaceTextureHostBasic.h', @@ -110,7 +120,6 @@ EXPORTS.mozilla.layers += [ 'client/TextureClient.h', 'client/TextureClientPool.h', 'client/TiledContentClient.h', - 'composite/APZCTreeManager.h', 'composite/AsyncCompositionManager.h', 'composite/CanvasLayerComposite.h', 'composite/ColorLayerComposite.h', @@ -126,15 +135,11 @@ EXPORTS.mozilla.layers += [ 'D3D9SurfaceImage.h', 'Effects.h', 'ImageDataSerializer.h', - 'ipc/AsyncPanZoomController.h', - 'ipc/Axis.h', 'ipc/CompositableForwarder.h', 'ipc/CompositableTransactionParent.h', 'ipc/CompositorChild.h', 'ipc/CompositorParent.h', 'ipc/FenceUtils.h', - 'ipc/GeckoContentController.h', - 'ipc/GestureEventListener.h', 'ipc/ImageBridgeChild.h', 'ipc/ImageBridgeParent.h', 'ipc/ISurfaceAllocator.h', @@ -144,7 +149,6 @@ EXPORTS.mozilla.layers += [ 'ipc/ShadowLayersManager.h', 'ipc/SharedPlanarYCbCrImage.h', 'ipc/SharedRGBImage.h', - 'ipc/TaskThrottler.h', 'LayersTypes.h', 'opengl/CompositingRenderTargetOGL.h', 'opengl/CompositorOGL.h', @@ -216,6 +220,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': ] UNIFIED_SOURCES += [ + 'apz/src/APZCTreeManager.cpp', + 'apz/src/AsyncPanZoomController.cpp', + 'apz/src/Axis.cpp', + 'apz/src/GestureEventListener.cpp', + 'apz/src/TaskThrottler.cpp', + 'apz/util/ActiveElementManager.cpp', + 'apz/util/APZCCallbackHelper.cpp', 'basic/BasicCanvasLayer.cpp', 'basic/BasicColorLayer.cpp', 'basic/BasicCompositor.cpp', @@ -242,7 +253,6 @@ UNIFIED_SOURCES += [ 'client/TextureClient.cpp', 'client/TextureClientPool.cpp', 'client/TiledContentClient.cpp', - 'composite/APZCTreeManager.cpp', 'composite/AsyncCompositionManager.cpp', 'composite/CanvasLayerComposite.cpp', 'composite/ColorLayerComposite.cpp', @@ -261,12 +271,9 @@ UNIFIED_SOURCES += [ 'Effects.cpp', 'ImageDataSerializer.cpp', 'ImageLayers.cpp', - 'ipc/AsyncPanZoomController.cpp', - 'ipc/Axis.cpp', 'ipc/CompositableTransactionParent.cpp', 'ipc/CompositorChild.cpp', 'ipc/CompositorParent.cpp', - 'ipc/GestureEventListener.cpp', 'ipc/ImageBridgeChild.cpp', 'ipc/ImageBridgeParent.cpp', 'ipc/ISurfaceAllocator.cpp', @@ -277,7 +284,6 @@ UNIFIED_SOURCES += [ 'ipc/ShadowLayers.cpp', 'ipc/SharedPlanarYCbCrImage.cpp', 'ipc/SharedRGBImage.cpp', - 'ipc/TaskThrottler.cpp', 'LayerScope.cpp', 'LayersLogging.cpp', 'LayerSorter.cpp', diff --git a/widget/gonk/ParentProcessController.cpp b/widget/gonk/ParentProcessController.cpp index ae85746714ec..3f96a53291f8 100644 --- a/widget/gonk/ParentProcessController.cpp +++ b/widget/gonk/ParentProcessController.cpp @@ -6,7 +6,7 @@ #include "ParentProcessController.h" #include "nsIContent.h" #include "nsLayoutUtils.h" -#include "APZCCallbackHelper.h" +#include "mozilla/layers/APZCCallbackHelper.h" #include "base/message_loop.h" namespace mozilla { @@ -26,7 +26,7 @@ public: MOZ_ASSERT(NS_IsMainThread()); nsCOMPtr content = nsLayoutUtils::FindContentFor(mFrameMetrics.GetScrollId()); if (content) { - APZCCallbackHelper::UpdateSubFrame(content, mFrameMetrics); + mozilla::layers::APZCCallbackHelper::UpdateSubFrame(content, mFrameMetrics); } return NS_OK; } @@ -54,7 +54,7 @@ void ParentProcessController::AcknowledgeScrollUpdate(const FrameMetrics::ViewID& aScrollId, const uint32_t& aScrollGeneration) { - APZCCallbackHelper::AcknowledgeScrollUpdate(aScrollId, aScrollGeneration); + mozilla::layers::APZCCallbackHelper::AcknowledgeScrollUpdate(aScrollId, aScrollGeneration); } void diff --git a/widget/windows/winrt/APZController.cpp b/widget/windows/winrt/APZController.cpp index c03f514cebd9..2f0374ff6d43 100644 --- a/widget/windows/winrt/APZController.cpp +++ b/widget/windows/winrt/APZController.cpp @@ -9,7 +9,7 @@ #include "MetroUtils.h" #include "nsPrintfCString.h" #include "nsIWidgetListener.h" -#include "APZCCallbackHelper.h" +#include "mozilla/layers/APZCCallbackHelper.h" #include "nsIDocument.h" #include "nsPresContext.h" #include "nsIDOMElement.h" @@ -114,7 +114,7 @@ public: #ifdef DEBUG_CONTROLLER WinUtils::Log("APZController: detected subframe or content editable"); #endif - APZCCallbackHelper::UpdateSubFrame(targetContent, mFrameMetrics); + mozilla::layers::APZCCallbackHelper::UpdateSubFrame(targetContent, mFrameMetrics); return NS_OK; } @@ -128,7 +128,7 @@ public: if (window) { utils = do_GetInterface(window); if (utils) { - APZCCallbackHelper::UpdateRootFrame(utils, mFrameMetrics); + mozilla::layers::APZCCallbackHelper::UpdateRootFrame(utils, mFrameMetrics); #ifdef DEBUG_CONTROLLER WinUtils::Log("APZController: %I64d mDisplayPortMargins: %0.2f %0.2f %0.2f %0.2f", @@ -224,7 +224,7 @@ APZController::AcknowledgeScrollUpdate(const FrameMetrics::ViewID& aScrollId, WinUtils::Log("APZController::AcknowledgeScrollUpdate scrollid=%I64d gen=%lu", aScrollId, aScrollGeneration); #endif - APZCCallbackHelper::AcknowledgeScrollUpdate(aScrollId, aScrollGeneration); + mozilla::layers::APZCCallbackHelper::AcknowledgeScrollUpdate(aScrollId, aScrollGeneration); } void diff --git a/widget/xpwidgets/moz.build b/widget/xpwidgets/moz.build index 02b07e3d63e5..3b2c6191d545 100644 --- a/widget/xpwidgets/moz.build +++ b/widget/xpwidgets/moz.build @@ -5,8 +5,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. EXPORTS += [ - 'ActiveElementManager.h', - 'APZCCallbackHelper.h', 'ContentHelper.h', 'GfxDriverInfo.h', 'GfxInfoBase.h', @@ -14,8 +12,6 @@ EXPORTS += [ ] UNIFIED_SOURCES += [ - 'ActiveElementManager.cpp', - 'APZCCallbackHelper.cpp', 'ContentHelper.cpp', 'GfxDriverInfo.cpp', 'GfxInfoBase.cpp', From 45ccf298c9a84e6c4b1ea751308cf3c8756113e7 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 15 Apr 2014 16:14:10 -0400 Subject: [PATCH 36/79] Bug 996019 - fix browser_bug435325.js to not connect to example.com; r=ehsan --- browser/base/content/test/general/browser_bug435325.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/browser/base/content/test/general/browser_bug435325.js b/browser/base/content/test/general/browser_bug435325.js index 2e9136d2be36..fe05c757a12d 100644 --- a/browser/base/content/test/general/browser_bug435325.js +++ b/browser/base/content/test/general/browser_bug435325.js @@ -51,6 +51,11 @@ function checkPage() { // Now press the "Try Again" button ok(gBrowser.contentDocument.getElementById("errorTryAgain"), "The error page has got a #errorTryAgain element"); + + // Re-enable the proxy so example.com is resolved to localhost, rather than + // the actual example.com. + Services.prefs.setIntPref("network.proxy.type", proxyPrefValue); + gBrowser.contentDocument.getElementById("errorTryAgain").click(); ok(!Services.io.offline, "After clicking the Try Again button, we're back " + @@ -60,7 +65,6 @@ function checkPage() { } registerCleanupFunction(function() { - Services.prefs.setIntPref("network.proxy.type", proxyPrefValue); Services.prefs.setBoolPref("browser.cache.disk.enable", true); Services.prefs.setBoolPref("browser.cache.memory.enable", true); Services.io.offline = false; From 480666cb673f13fa634b4374b522493246852353 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 15 Apr 2014 16:31:51 -0400 Subject: [PATCH 37/79] Bug 996031 - remove 455407.html crashtest; r=dholbert The bug that this test was intended to test seems transient, according to testing with nightlies around the time the bug was filed. Additionally, the test connects to external servers, which is frowned upon and will soon be forbidden. --- layout/generic/crashtests/455407.html | 13 ------------- layout/generic/crashtests/crashtests.list | 1 - 2 files changed, 14 deletions(-) delete mode 100644 layout/generic/crashtests/455407.html diff --git a/layout/generic/crashtests/455407.html b/layout/generic/crashtests/455407.html deleted file mode 100644 index 54d389ce1848..000000000000 --- a/layout/generic/crashtests/455407.html +++ /dev/null @@ -1,13 +0,0 @@ - -Crash [@ nsSubDocumentFrame::Reflow] with generated content and resizing iframe - - - - - - diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index b5f5c9a78438..f9956f5edd35 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -300,7 +300,6 @@ load 453762-1.html load 455171-1.html load 455171-2.html load 455171-3.html -load 455407.html load 455643-1.xhtml load 457375.html load 457380-1.html From 49460f7600cf4b93ba91a42e218651e21769cbb2 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 15 Apr 2014 17:14:51 -0400 Subject: [PATCH 38/79] Bug 995995 - set testing prefs to redirect to the test proxy server for RSS feeds; r=jmaher --- testing/profiles/prefs_general.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/testing/profiles/prefs_general.js b/testing/profiles/prefs_general.js index ddf278ff2878..d6bfe36fa68f 100644 --- a/testing/profiles/prefs_general.js +++ b/testing/profiles/prefs_general.js @@ -177,3 +177,12 @@ user_pref("browser.snippets.syncPromo.enabled", false); // Do not turn HTTP cache v2 for our infra tests (some tests are failing) user_pref("browser.cache.use_new_backend_temp", false); + +// Don't connect to Yahoo! for RSS feed tests. +// en-US only uses .types.0.uri, but set all of them just to be sure. +user_pref('browser.contentHandlers.types.0.uri', 'http://test1.example.org/rss?url=%%s') +user_pref('browser.contentHandlers.types.1.uri', 'http://test1.example.org/rss?url=%%s') +user_pref('browser.contentHandlers.types.2.uri', 'http://test1.example.org/rss?url=%%s') +user_pref('browser.contentHandlers.types.3.uri', 'http://test1.example.org/rss?url=%%s') +user_pref('browser.contentHandlers.types.4.uri', 'http://test1.example.org/rss?url=%%s') +user_pref('browser.contentHandlers.types.5.uri', 'http://test1.example.org/rss?url=%%s') From dad03bd3658eeb6e0e96ba0b161c9aa827cd0136 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Wed, 16 Apr 2014 13:21:20 -0400 Subject: [PATCH 39/79] Bug 997291 - remove write-only gInspectee variables from devtools server tests; r=jmaher --- .../devtools/server/tests/mochitest/test_inspector-release.html | 1 - toolkit/devtools/server/tests/mochitest/test_styles-applied.html | 1 - toolkit/devtools/server/tests/mochitest/test_styles-svg.html | 1 - 3 files changed, 3 deletions(-) diff --git a/toolkit/devtools/server/tests/mochitest/test_inspector-release.html b/toolkit/devtools/server/tests/mochitest/test_inspector-release.html index 37e828c1a6b8..392992dd471f 100644 --- a/toolkit/devtools/server/tests/mochitest/test_inspector-release.html +++ b/toolkit/devtools/server/tests/mochitest/test_inspector-release.html @@ -31,7 +31,6 @@ function assertOwnership() { addTest(function setup() { let url = document.getElementById("inspectorContent").href; attachURL(url, function(err, client, tab, doc) { - gInspectee = doc; let {InspectorFront} = devtools.require("devtools/server/actors/inspector"); let inspector = InspectorFront(client, tab); promiseDone(inspector.getWalker().then(walker => { diff --git a/toolkit/devtools/server/tests/mochitest/test_styles-applied.html b/toolkit/devtools/server/tests/mochitest/test_styles-applied.html index bd251c781c28..b6129b786f21 100644 --- a/toolkit/devtools/server/tests/mochitest/test_styles-applied.html +++ b/toolkit/devtools/server/tests/mochitest/test_styles-applied.html @@ -28,7 +28,6 @@ var gClient = null; addTest(function setup() { let url = document.getElementById("inspectorContent").href; attachURL(url, function(err, client, tab, doc) { - gInspectee = doc; let {InspectorFront} = devtools.require("devtools/server/actors/inspector"); let inspector = InspectorFront(client, tab); promiseDone(inspector.getWalker().then(walker => { diff --git a/toolkit/devtools/server/tests/mochitest/test_styles-svg.html b/toolkit/devtools/server/tests/mochitest/test_styles-svg.html index 5d2ab213bdba..28c5a5f8a80e 100644 --- a/toolkit/devtools/server/tests/mochitest/test_styles-svg.html +++ b/toolkit/devtools/server/tests/mochitest/test_styles-svg.html @@ -29,7 +29,6 @@ var gClient = null; addTest(function setup() { let url = document.getElementById("inspectorContent").href; attachURL(url, function(err, client, tab, doc) { - gInspectee = doc; let {InspectorFront} = devtools.require("devtools/server/actors/inspector"); let inspector = InspectorFront(client, tab); promiseDone(inspector.getWalker().then(walker => { From fcd7542b90884a7938fb12c5e740c5743b24623d Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Thu, 17 Apr 2014 14:04:26 +0200 Subject: [PATCH 40/79] Backed out changeset b032a90ee083 (bug 983489) for m-e10s test failures --- gfx/layers/composite/LayerManagerComposite.cpp | 3 +++ gfx/layers/ipc/CompositorParent.cpp | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index 085fc1b5dc0c..c17bc4f47321 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -131,6 +131,9 @@ LayerManagerComposite::Destroy() RootLayer()->Destroy(); } mRoot = nullptr; + + mCompositor->Destroy(); + mDestroyed = true; } } diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 67794b83f9b6..1aa3296e8267 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -241,9 +241,7 @@ CompositorParent::Destroy() // Ensure that the layer manager is destructed on the compositor thread. mLayerManager = nullptr; - mCompositor->Destroy(); mCompositor = nullptr; - mCompositionManager = nullptr; mApzcTreeManager->ClearTree(); mApzcTreeManager = nullptr; @@ -275,6 +273,7 @@ CompositorParent::RecvWillStop() } mLayerManager->Destroy(); mLayerManager = nullptr; + mCompositor = nullptr; mCompositionManager = nullptr; } From c2691dbe6c3c68b8649df2a5f85a18fa85c61ed3 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Thu, 17 Apr 2014 12:11:07 +0000 Subject: [PATCH 41/79] Bug 613659 - Implement box-decoration-break in the style system. r=cam --- layout/style/nsCSSKeywordList.h | 2 ++ layout/style/nsCSSPropList.h | 10 ++++++++++ layout/style/nsCSSProps.cpp | 6 ++++++ layout/style/nsCSSProps.h | 1 + layout/style/nsComputedDOMStyle.cpp | 10 ++++++++++ layout/style/nsComputedDOMStyle.h | 1 + layout/style/nsRuleNode.cpp | 7 +++++++ layout/style/nsStyleConsts.h | 4 ++++ layout/style/nsStyleStruct.cpp | 5 ++++- layout/style/nsStyleStruct.h | 1 + layout/style/test/property_database.js | 11 +++++++++++ modules/libpref/src/init/all.js | 3 +++ 12 files changed, 60 insertions(+), 1 deletion(-) diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index 606023d9b5ae..4f65808a84e7 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -208,6 +208,7 @@ CSS_KEY(circle, circle) CSS_KEY(cjk-decimal, cjk_decimal) CSS_KEY(cjk-ideographic, cjk_ideographic) CSS_KEY(clip, clip) +CSS_KEY(clone, clone) CSS_KEY(close-quote, close_quote) CSS_KEY(closest-corner, closest_corner) CSS_KEY(closest-side, closest_side) @@ -496,6 +497,7 @@ CSS_KEY(skew, skew) CSS_KEY(skewx, skewx) CSS_KEY(skewy, skewy) CSS_KEY(slashed-zero, slashed_zero) +CSS_KEY(slice, slice) CSS_KEY(small, small) CSS_KEY(small-caps, small_caps) CSS_KEY(small-caption, small_caption) diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index b78ac87fdb61..c8f0fd00592c 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -1365,6 +1365,16 @@ CSS_PROP_POSITION( nullptr, offsetof(nsStylePosition, mOffset), eStyleAnimType_Sides_Bottom) +CSS_PROP_BORDER( + box-decoration-break, + box_decoration_break, + BoxDecorationBreak, + CSS_PROPERTY_PARSE_VALUE, + "layout.css.box-decoration-break.enabled", + VARIANT_HK, + kBoxDecorationBreakKTable, + CSS_PROP_NO_OFFSET, + eStyleAnimType_None) CSS_PROP_BORDER( box-shadow, box_shadow, diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 886407141b64..4e0c7a01cc3e 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -796,6 +796,12 @@ const KTableValue nsCSSProps::kBoxPropSourceKTable[] = { eCSSKeyword_UNKNOWN,-1 }; +const KTableValue nsCSSProps::kBoxDecorationBreakKTable[] = { + eCSSKeyword_slice, NS_STYLE_BOX_DECORATION_BREAK_SLICE, + eCSSKeyword_clone, NS_STYLE_BOX_DECORATION_BREAK_CLONE, + eCSSKeyword_UNKNOWN,-1 +}; + const KTableValue nsCSSProps::kBoxShadowTypeKTable[] = { eCSSKeyword_inset, NS_STYLE_BOX_SHADOW_INSET, eCSSKeyword_UNKNOWN,-1 diff --git a/layout/style/nsCSSProps.h b/layout/style/nsCSSProps.h index 84d90baa03de..fde719e5dd42 100644 --- a/layout/style/nsCSSProps.h +++ b/layout/style/nsCSSProps.h @@ -520,6 +520,7 @@ public: static const KTableValue kBorderStyleKTable[]; static const KTableValue kBorderWidthKTable[]; static const KTableValue kBoxAlignKTable[]; + static const KTableValue kBoxDecorationBreakKTable[]; static const KTableValue kBoxDirectionKTable[]; static const KTableValue kBoxOrientKTable[]; static const KTableValue kBoxPackKTable[]; diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index dcf90381c5e0..e9a3f31772d4 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -2980,6 +2980,16 @@ nsComputedDOMStyle::GetCSSShadowArray(nsCSSShadowArray* aArray, return valueList; } +CSSValue* +nsComputedDOMStyle::DoGetBoxDecorationBreak() +{ + nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue; + val->SetIdent( + nsCSSProps::ValueToKeywordEnum(StyleBorder()->mBoxDecorationBreak, + nsCSSProps::kBoxDecorationBreakKTable)); + return val; +} + CSSValue* nsComputedDOMStyle::DoGetBoxShadow() { diff --git a/layout/style/nsComputedDOMStyle.h b/layout/style/nsComputedDOMStyle.h index f4a3a8de174f..45e0b841ae55 100644 --- a/layout/style/nsComputedDOMStyle.h +++ b/layout/style/nsComputedDOMStyle.h @@ -222,6 +222,7 @@ private: /* Box properties */ mozilla::dom::CSSValue* DoGetBoxAlign(); + mozilla::dom::CSSValue* DoGetBoxDecorationBreak(); mozilla::dom::CSSValue* DoGetBoxDirection(); mozilla::dom::CSSValue* DoGetBoxFlex(); mozilla::dom::CSSValue* DoGetBoxOrdinalGroup(); diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 9f1e295ffc6d..e1c56f868460 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -6445,6 +6445,13 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, { COMPUTE_START_RESET(Border, (mPresContext), border, parentBorder) + // box-decoration-break: enum, inherit, initial + SetDiscrete(*aRuleData->ValueForBoxDecorationBreak(), + border->mBoxDecorationBreak, canStoreInRuleTree, + SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, + parentBorder->mBoxDecorationBreak, + NS_STYLE_BOX_DECORATION_BREAK_SLICE, 0, 0, 0, 0); + // box-shadow: none, list, inherit, initial const nsCSSValue* boxShadowValue = aRuleData->ValueForBoxShadow(); switch (boxShadowValue->GetUnit()) { diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index e2de9998afea..1b1d7774fa08 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -117,6 +117,10 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) { #define NS_STYLE_BOX_PACK_END 2 #define NS_STYLE_BOX_PACK_JUSTIFY 3 +// box-decoration-break +#define NS_STYLE_BOX_DECORATION_BREAK_SLICE 0 +#define NS_STYLE_BOX_DECORATION_BREAK_CLONE 1 + // box-direction #define NS_STYLE_BOX_DIRECTION_NORMAL 0 #define NS_STYLE_BOX_DIRECTION_REVERSE 1 diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 12592d5472a6..14d59f4ebb7b 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -388,6 +388,7 @@ nsStyleBorder::nsStyleBorder(nsPresContext* aPresContext) mBorderImageRepeatH(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH), mBorderImageRepeatV(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH), mFloatEdge(NS_STYLE_FLOAT_EDGE_CONTENT), + mBoxDecorationBreak(NS_STYLE_BOX_DECORATION_BREAK_SLICE), mComputedBorder(0, 0, 0, 0) { MOZ_COUNT_CTOR(nsStyleBorder); @@ -439,6 +440,7 @@ nsStyleBorder::nsStyleBorder(const nsStyleBorder& aSrc) mBorderImageRepeatH(aSrc.mBorderImageRepeatH), mBorderImageRepeatV(aSrc.mBorderImageRepeatV), mFloatEdge(aSrc.mFloatEdge), + mBoxDecorationBreak(aSrc.mBoxDecorationBreak), mComputedBorder(aSrc.mComputedBorder), mBorder(aSrc.mBorder), mTwipsPerPixel(aSrc.mTwipsPerPixel) @@ -528,7 +530,8 @@ nsChangeHint nsStyleBorder::CalcDifference(const nsStyleBorder& aOther) const GetComputedBorder() != aOther.GetComputedBorder() || mFloatEdge != aOther.mFloatEdge || mBorderImageOutset != aOther.mBorderImageOutset || - (shadowDifference & nsChangeHint_NeedReflow)) + (shadowDifference & nsChangeHint_NeedReflow) || + mBoxDecorationBreak != aOther.mBoxDecorationBreak) return NS_STYLE_HINT_REFLOW; NS_FOR_CSS_SIDES(ix) { diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index df7287e69de8..05bc1438c39f 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -986,6 +986,7 @@ public: uint8_t mBorderImageRepeatH; // [reset] see nsStyleConsts.h uint8_t mBorderImageRepeatV; // [reset] uint8_t mFloatEdge; // [reset] + uint8_t mBoxDecorationBreak; // [reset] see nsStyleConsts.h protected: // mComputedBorder holds the CSS2.1 computed border-width values. diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index b5ba594a87f1..a68273b39056 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -5387,6 +5387,17 @@ if (SpecialPowers.getBoolPref("layout.css.overflow-clip-box.enabled")) { }; } +if (SpecialPowers.getBoolPref("layout.css.box-decoration-break.enabled")) { + gCSSProperties["box-decoration-break"] = { + domProp: "boxDecorationBreak", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "slice" ], + other_values: [ "clone" ], + invalid_values: [ "auto", "none", "1px" ] + }; +} + if (SpecialPowers.getBoolPref("layout.css.unset-value.enabled")) { gCSSProperties["animation-direction"].invalid_values.push("normal, unset"); gCSSProperties["animation-name"].invalid_values.push("bounce, unset", "unset, bounce"); diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js index 026e3f222efc..af6a472d819c 100644 --- a/modules/libpref/src/init/all.js +++ b/modules/libpref/src/init/all.js @@ -1900,6 +1900,9 @@ pref("layout.css.variables.enabled", true); // Is support for CSS overflow-clip-box enabled for non-UA sheets? pref("layout.css.overflow-clip-box.enabled", false); +// Is support for CSS box-decoration-break enabled? +pref("layout.css.box-decoration-break.enabled", false); + // pref for which side vertical scrollbars should be on // 0 = end-side in UI direction // 1 = end-side in document/content direction From 49ad4f839b34286e70448ffec1a00c9a9f53e7ec Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Thu, 17 Apr 2014 12:11:07 +0000 Subject: [PATCH 42/79] Bug 613659 - Add "skip sides" and border/frame size parameters to GetBorderRadii(). Add an inline convenience method for the old signature. r=cam --- layout/generic/nsFrame.cpp | 9 +++++---- layout/generic/nsGfxScrollFrame.cpp | 9 +++++++-- layout/generic/nsGfxScrollFrame.h | 13 ++++++++----- layout/generic/nsIFrame.h | 15 +++++++++++---- layout/tables/nsTableCellFrame.cpp | 5 ++++- layout/tables/nsTableCellFrame.h | 5 ++++- 6 files changed, 39 insertions(+), 17 deletions(-) diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 8f0915c615f0..84401a4b6352 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -1277,7 +1277,8 @@ nsIFrame::OutsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets) } /* virtual */ bool -nsIFrame::GetBorderRadii(nscoord aRadii[8]) const +nsIFrame::GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea, + int aSkipSides, nscoord aRadii[8]) const { if (IsThemed()) { // When we're themed, the native theme code draws the border and @@ -1292,9 +1293,9 @@ nsIFrame::GetBorderRadii(nscoord aRadii[8]) const } return false; } - nsSize size = GetSize(); - return ComputeBorderRadii(StyleBorder()->mBorderRadius, size, size, - GetSkipSides(), aRadii); + return ComputeBorderRadii(StyleBorder()->mBorderRadius, + aFrameSize, aBorderArea, + aSkipSides, aRadii); } bool diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 144f3a01b393..4b9e2ccfbe2b 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -4366,10 +4366,15 @@ ReduceRadii(nscoord aXBorder, nscoord aYBorder, * have scrollbars. */ bool -ScrollFrameHelper::GetBorderRadii(nscoord aRadii[8]) const +ScrollFrameHelper::GetBorderRadii(const nsSize& aFrameSize, + const nsSize& aBorderArea, + int aSkipSides, + nscoord aRadii[8]) const { - if (!mOuter->nsContainerFrame::GetBorderRadii(aRadii)) + if (!mOuter->nsContainerFrame::GetBorderRadii(aFrameSize, aBorderArea, + aSkipSides, aRadii)) { return false; + } // Since we can use GetActualScrollbarSizes (rather than // GetDesiredScrollbarSizes) since this doesn't affect reflow, we diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index 338003b89801..2d593f239815 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -71,7 +71,8 @@ public: bool& aCreateLayer, bool aPositioned); - bool GetBorderRadii(nscoord aRadii[8]) const; + bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea, + int aSkipSides, nscoord aRadii[8]) const; // nsIReflowCallback virtual bool ReflowFinished() MOZ_OVERRIDE; @@ -471,8 +472,9 @@ public: const nsPoint& aScrollPosition); nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext); - virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE { - return mHelper.GetBorderRadii(aRadii); + virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea, + int aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE { + return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii); } virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; @@ -808,8 +810,9 @@ public: NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE; - virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE { - return mHelper.GetBorderRadii(aRadii); + virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea, + int aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE { + return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii); } nsresult Layout(nsBoxLayoutState& aState); diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 4bfcf121feaf..7e03c54ad0e2 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -1042,12 +1042,19 @@ public: static void OutsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets); /** - * Fill in border radii for this frame. Return whether any are - * nonzero. - * + * Fill in border radii for this frame. Return whether any are nonzero. * Indices into aRadii are the NS_CORNER_* constants in nsStyleConsts.h + * aSkipSides is a union of SIDE_BIT_LEFT/RIGHT/TOP/BOTTOM bits that says + * which side(s) to skip. */ - virtual bool GetBorderRadii(nscoord aRadii[8]) const; + virtual bool GetBorderRadii(const nsSize& aFrameSize, + const nsSize& aBorderArea, + int aSkipSides, + nscoord aRadii[8]) const; + bool GetBorderRadii(nscoord aRadii[8]) const { + nsSize sz = GetSize(); + return GetBorderRadii(sz, sz, GetSkipSides(), aRadii); + } bool GetPaddingBoxBorderRadii(nscoord aRadii[8]) const; bool GetContentBoxBorderRadii(nscoord aRadii[8]) const; diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 39d51c3af034..ee7304dbff7d 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -1103,7 +1103,10 @@ nsBCTableCellFrame::GetUsedBorder() const } /* virtual */ bool -nsBCTableCellFrame::GetBorderRadii(nscoord aRadii[8]) const +nsBCTableCellFrame::GetBorderRadii(const nsSize& aFrameSize, + const nsSize& aBorderArea, + int aSkipSides, + nscoord aRadii[8]) const { NS_FOR_CSS_HALF_CORNERS(corner) { aRadii[corner] = 0; diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index 855628479414..6225f2dd5cf7 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -298,7 +298,10 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; virtual nsMargin GetUsedBorder() const MOZ_OVERRIDE; - virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE; + virtual bool GetBorderRadii(const nsSize& aFrameSize, + const nsSize& aBorderArea, + int aSkipSides, + nscoord aRadii[8]) const MOZ_OVERRIDE; // Get the *inner half of the border only*, in twips. virtual nsMargin* GetBorderWidth(nsMargin& aBorder) const MOZ_OVERRIDE; From f49195c8f736966630bd69fcb8181c6cd98eb6ac Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Thu, 17 Apr 2014 12:11:07 +0000 Subject: [PATCH 43/79] Bug 613659 - Implement box-decoration-break layout for border/box-shadow and paddding/margin for inlines. r=cam --- layout/base/nsCSSRendering.cpp | 373 +++++++++++++++++++------ layout/base/nsCSSRenderingBorders.cpp | 2 - layout/base/nsCSSRenderingBorders.h | 4 +- layout/base/nsDisplayList.cpp | 3 - layout/generic/nsContainerFrame.cpp | 32 ++- layout/generic/nsFrame.cpp | 5 + layout/generic/nsImageFrame.cpp | 4 + layout/generic/nsInlineFrame.cpp | 37 ++- layout/generic/nsLineLayout.cpp | 18 +- layout/generic/nsSplittableFrame.cpp | 6 +- layout/tables/nsTableCellFrame.cpp | 5 + layout/tables/nsTableColGroupFrame.cpp | 5 + layout/tables/nsTableFrame.cpp | 5 + layout/tables/nsTableRowFrame.cpp | 5 + layout/tables/nsTableRowGroupFrame.cpp | 5 + 15 files changed, 387 insertions(+), 122 deletions(-) diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 2d8bb4616daa..0c2be7aa2163 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -61,6 +61,19 @@ using mozilla::CSSSizeOrRatio; static int gFrameTreeLockCount = 0; +static void +ApplySkipSides(int aSkipSides, nsMargin* aMargin) +{ + if (aSkipSides & SIDE_BIT_LEFT) + aMargin->left = 0; + if (aSkipSides & SIDE_BIT_TOP) + aMargin->top = 0; + if (aSkipSides & SIDE_BIT_RIGHT) + aMargin->right = 0; + if (aSkipSides & SIDE_BIT_BOTTOM) + aMargin->bottom = 0; +} + // To avoid storing this data on nsInlineFrame (bloat) and to avoid // recalculating this for each frame in a continuation (perf), hold // a cache of various coordinate information that we need in order @@ -81,10 +94,18 @@ struct InlineBackgroundData mBoundingBox.SetRect(0,0,0,0); mContinuationPoint = mLineContinuationPoint = mUnbrokenWidth = 0; mFrame = mBlockFrame = nullptr; + mLeftBorderData.Reset(); } + /** + * Return a continuous rect for (an inline) aFrame relative to the + * continuation that draws the left-most part of the background. + * This is used when painting backgrounds. + */ nsRect GetContinuousRect(nsIFrame* aFrame) { + MOZ_ASSERT(aFrame->GetType() == nsGkAtoms::inlineFrame); + SetFrame(aFrame); nscoord x; @@ -98,12 +119,9 @@ struct InlineBackgroundData NS_STYLE_DIRECTION_RTL); nscoord curOffset = aFrame->GetOffsetTo(mBlockFrame).x; - // No need to use our GetPrevContinuation/GetNextContinuation methods - // here, since ib-split siblings are certainly not on the same line. - - nsIFrame* inlineFrame = aFrame->GetPrevContinuation(); // If the continuation is fluid we know inlineFrame is not on the same line. // If it's not fluid, we need to test further to be sure. + nsIFrame* inlineFrame = aFrame->GetPrevContinuation(); while (inlineFrame && !inlineFrame->GetNextInFlow() && AreOnSameLine(aFrame, inlineFrame)) { nscoord frameXOffset = inlineFrame->GetOffsetTo(mBlockFrame).x; @@ -140,6 +158,39 @@ struct InlineBackgroundData return nsRect(-x, 0, mUnbrokenWidth, mFrame->GetSize().height); } + /** + * Return a continuous rect for (an inline) aFrame relative to the + * continuation that should draw the left-border. This is used when painting + * borders and clipping backgrounds. This may NOT be the same continuous rect + * as for drawing backgrounds; the continuation with the left-border might be + * somewhere in the middle of that rect (e.g. BIDI), in those cases we need + * the reverse background order starting at the left-border continuation. + */ + nsRect GetBorderContinuousRect(nsIFrame* aFrame, nsRect aBorderArea) + { + // Calling GetContinuousRect(aFrame) here may lead to Reset/Init which + // resets our mLeftBorderData so we save it ... + LeftBorderData saved(mLeftBorderData); + nsRect joinedBorderArea = GetContinuousRect(aFrame); + if (!saved.mIsValid || saved.mFrame != mLeftBorderData.mFrame) { + if (aFrame == mLeftBorderData.mFrame) { + mLeftBorderData.SetX(joinedBorderArea.x); + } else if (mLeftBorderData.mFrame) { + mLeftBorderData.SetX(GetContinuousRect(mLeftBorderData.mFrame).x); + } + } else { + // ... and restore it when possible. + mLeftBorderData.mX = saved.mX; + } + if (joinedBorderArea.x > mLeftBorderData.mX) { + joinedBorderArea.x = + -(mUnbrokenWidth + joinedBorderArea.x - aBorderArea.width); + } else { + joinedBorderArea.x -= mLeftBorderData.mX; + } + return joinedBorderArea; + } + nsRect GetBoundingRect(nsIFrame* aFrame) { SetFrame(aFrame); @@ -157,13 +208,22 @@ struct InlineBackgroundData } protected: - nsIFrame* mFrame; - nsBlockFrame* mBlockFrame; - nsRect mBoundingBox; - nscoord mContinuationPoint; - nscoord mUnbrokenWidth; - nscoord mLineContinuationPoint; - bool mBidiEnabled; + struct LeftBorderData { + nsIFrame* mFrame; // the continuation that may have a left-border + nscoord mX; // cached GetContinuousRect(mFrame).x + bool mIsValid; // true if mX is valid + void Reset() { mFrame = nullptr; mIsValid = false; } + void SetX(nscoord aX) { mX = aX; mIsValid = true; } + }; + + nsIFrame* mFrame; + nsBlockFrame* mBlockFrame; + nsRect mBoundingBox; + nscoord mContinuationPoint; + nscoord mUnbrokenWidth; + nscoord mLineContinuationPoint; + LeftBorderData mLeftBorderData; + bool mBidiEnabled; void SetFrame(nsIFrame* aFrame) { @@ -236,6 +296,7 @@ protected: void Init(nsIFrame* aFrame) { + mLeftBorderData.Reset(); mBidiEnabled = aFrame->PresContext()->BidiEnabled(); if (mBidiEnabled) { // Find the containing block frame @@ -252,8 +313,11 @@ protected: // Start with the previous flow frame as our continuation point // is the total of the widths of the previous frames. nsIFrame* inlineFrame = GetPrevContinuation(aFrame); - while (inlineFrame) { + if (!mLeftBorderData.mFrame && + !(inlineFrame->GetSkipSides() & SIDE_BIT_LEFT)) { + mLeftBorderData.mFrame = inlineFrame; + } nsRect rect = inlineFrame->GetRect(); mContinuationPoint += rect.width; if (mBidiEnabled && !AreOnSameLine(aFrame, inlineFrame)) { @@ -268,6 +332,10 @@ protected: // unbroken width. inlineFrame = aFrame; while (inlineFrame) { + if (!mLeftBorderData.mFrame && + !(inlineFrame->GetSkipSides() & SIDE_BIT_LEFT)) { + mLeftBorderData.mFrame = inlineFrame; + } nsRect rect = inlineFrame->GetRect(); mUnbrokenWidth += rect.width; mBoundingBox.UnionRect(mBoundingBox, rect); @@ -371,6 +439,94 @@ MakeBevelColor(mozilla::css::Side whichSide, uint8_t style, return theColor; } +static bool +GetRadii(nsIFrame* aForFrame, const nsStyleBorder& aBorder, + const nsRect& aOrigBorderArea, const nsRect& aBorderArea, + gfxCornerSizes* aBgRadii) +{ + nscoord radii[8]; + bool haveRoundedCorners; + nsSize sz = aBorderArea.Size(); + nsSize frameSize = aForFrame->GetSize(); + if (&aBorder == aForFrame->StyleBorder() && + frameSize == aOrigBorderArea.Size()) { + haveRoundedCorners = aForFrame->GetBorderRadii(sz, sz, 0, radii); + } else { + haveRoundedCorners = + nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius, frameSize, sz, 0, radii); + } + if (haveRoundedCorners) { + auto d2a = aForFrame->PresContext()->AppUnitsPerDevPixel(); + nsCSSRendering::ComputePixelRadii(radii, d2a, aBgRadii); + } + return haveRoundedCorners; +} + +static nsRect +JoinBoxesForVerticalSlice(nsIFrame* aFrame, const nsRect& aBorderArea) +{ + // Inflate vertically as if our continuations were laid out vertically + // adjacent. Note that we don't touch the width. + nsRect borderArea = aBorderArea; + nscoord h = 0; + nsIFrame* f = aFrame->GetNextContinuation(); + for (; f; f = f->GetNextContinuation()) { + MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_PART_OF_IBSPLIT), + "anonymous ib-split block shouldn't have border/background"); + h += f->GetRect().height; + } + borderArea.height += h; + h = 0; + f = aFrame->GetPrevContinuation(); + for (; f; f = f->GetPrevContinuation()) { + MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_PART_OF_IBSPLIT), + "anonymous ib-split block shouldn't have border/background"); + h += f->GetRect().height; + } + borderArea.y -= h; + borderArea.height += h; + return borderArea; +} + +/** + * Inflate aBorderArea which is relative to aFrame's origin to calculate + * a hypothetical non-split frame area for all the continuations. + * See "Joining Boxes for 'slice'" in + * http://dev.w3.org/csswg/css-break/#break-decoration + */ +enum InlineBoxOrder { eForBorder, eForBackground }; +static nsRect +JoinBoxesForSlice(nsIFrame* aFrame, const nsRect& aBorderArea, + InlineBoxOrder aOrder) +{ + if (aFrame->GetType() == nsGkAtoms::inlineFrame) { + return (aOrder == eForBorder + ? gInlineBGData->GetBorderContinuousRect(aFrame, aBorderArea) + : gInlineBGData->GetContinuousRect(aFrame)) + + aBorderArea.TopLeft(); + } + return JoinBoxesForVerticalSlice(aFrame, aBorderArea); +} + +static bool +IsBoxDecorationSlice(const nsStyleBorder& aStyleBorder) +{ + return aStyleBorder.mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_SLICE; +} + +static nsRect +BoxDecorationRectForBorder(nsIFrame* aFrame, const nsRect& aBorderArea, + const nsStyleBorder* aStyleBorder = nullptr) +{ + if (!aStyleBorder) { + aStyleBorder = aFrame->StyleBorder(); + } + return ::IsBoxDecorationSlice(*aStyleBorder) + ? ::JoinBoxesForSlice(aFrame, aBorderArea, eForBorder) + : aBorderArea; +} + //---------------------------------------------------------------------- // Thebes Border Rendering Code Start @@ -449,10 +605,6 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext, nsStyleContext* aStyleContext, int aSkipSides) { - nsMargin border; - nscoord twipsRadii[8]; - nsCompatibility compatMode = aPresContext->CompatibilityMode(); - SN("++ PaintBorder"); // Check to see if we have an appearance defined. If so, we let the theme @@ -474,59 +626,67 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext, // Get our style context's color struct. const nsStyleColor* ourColor = aStyleContext->StyleColor(); - // in NavQuirks mode we want to use the parent's context as a starting point - // for determining the background color - nsIFrame* bgFrame = nsCSSRendering::FindNonTransparentBackgroundFrame - (aForFrame, compatMode == eCompatibility_NavQuirks ? true : false); + // In NavQuirks mode we want to use the parent's context as a starting point + // for determining the background color. + bool quirks = aPresContext->CompatibilityMode() == eCompatibility_NavQuirks; + nsIFrame* bgFrame = FindNonTransparentBackgroundFrame(aForFrame, quirks); nsStyleContext* bgContext = bgFrame->StyleContext(); nscolor bgColor = bgContext->GetVisitedDependentColor(eCSSProperty_background_color); - border = aStyleBorder.GetComputedBorder(); + nsMargin border = aStyleBorder.GetComputedBorder(); if ((0 == border.left) && (0 == border.right) && (0 == border.top) && (0 == border.bottom)) { // Empty border area return; } - nsSize frameSize = aForFrame->GetSize(); - if (&aStyleBorder == aForFrame->StyleBorder() && - frameSize == aBorderArea.Size()) { - aForFrame->GetBorderRadii(twipsRadii); + // Compute the outermost boundary of the area that might be painted. + // Same coordinate space as aBorderArea & aBGClipRect. + nsRect joinedBorderArea = + ::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aStyleBorder); + gfxCornerSizes bgRadii; + ::GetRadii(aForFrame, aStyleBorder, aBorderArea, joinedBorderArea, &bgRadii); + + + SF(" joinedBorderArea: %d %d %d %d\n", joinedBorderArea.x, joinedBorderArea.y, + joinedBorderArea.width, joinedBorderArea.height); + + // start drawing + gfxContext* ctx = aRenderingContext.ThebesContext(); + ctx->Save(); + + if (::IsBoxDecorationSlice(aStyleBorder)) { + if (aSkipSides == 0) { + // No continuations most likely, or ::first-letter that wants all border- + // sides on the first continuation. + joinedBorderArea = aBorderArea; + } else if (joinedBorderArea.IsEqualEdges(aBorderArea)) { + // No need for a clip, just skip the sides we don't want. + ::ApplySkipSides(aSkipSides, &border); + } else { + // We're drawing borders around the joined continuation boxes so we need + // to clip that to the slice that we want for this frame. + aRenderingContext.IntersectClip(aBorderArea); + } } else { - nsIFrame::ComputeBorderRadii(aStyleBorder.mBorderRadius, frameSize, - aBorderArea.Size(), aSkipSides, twipsRadii); + MOZ_ASSERT(joinedBorderArea.IsEqualEdges(aBorderArea), + "Should use aBorderArea for box-decoration-break:clone"); + MOZ_ASSERT(aForFrame->GetSkipSides() == 0, + "Should not skip sides for box-decoration-break:clone except " + "::first-letter/line continuations or other frame types that " + "don't have borders but those shouldn't reach this point."); } - // Turn off rendering for all of the zero sized sides - if (aSkipSides & SIDE_BIT_TOP) border.top = 0; - if (aSkipSides & SIDE_BIT_RIGHT) border.right = 0; - if (aSkipSides & SIDE_BIT_BOTTOM) border.bottom = 0; - if (aSkipSides & SIDE_BIT_LEFT) border.left = 0; - - // get the inside and outside parts of the border - nsRect outerRect(aBorderArea); - - SF(" outerRect: %d %d %d %d\n", outerRect.x, outerRect.y, outerRect.width, outerRect.height); - - // we can assume that we're already clipped to aDirtyRect -- I think? (!?) - - // Get our conversion values + // Convert to dev pixels. nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1); - - // convert outer and inner rects - gfxRect oRect(nsLayoutUtils::RectToGfxRect(outerRect, twipsPerPixel)); - - // convert the border widths + gfxRect joinedBorderAreaPx = + nsLayoutUtils::RectToGfxRect(joinedBorderArea, twipsPerPixel); gfxFloat borderWidths[4] = { gfxFloat(border.top / twipsPerPixel), gfxFloat(border.right / twipsPerPixel), gfxFloat(border.bottom / twipsPerPixel), gfxFloat(border.left / twipsPerPixel) }; - // convert the radii - gfxCornerSizes borderRadii; - ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii); - uint8_t borderStyles[4]; nscolor borderColors[4]; nsBorderColors *compositeColors[4]; @@ -543,32 +703,25 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext, } SF(" borderStyles: %d %d %d %d\n", borderStyles[0], borderStyles[1], borderStyles[2], borderStyles[3]); - - // start drawing - gfxContext *ctx = aRenderingContext.ThebesContext(); - - ctx->Save(); + //SF ("bgRadii: %f %f %f %f\n", bgRadii[0], bgRadii[1], bgRadii[2], bgRadii[3]); #if 0 - // this will draw a transparent red backround underneath the oRect area + // this will draw a transparent red backround underneath the border area ctx->Save(); - ctx->Rectangle(oRect); + ctx->Rectangle(joinedBorderAreaPx); ctx->SetColor(gfxRGBA(1.0, 0.0, 0.0, 0.5)); ctx->Fill(); ctx->Restore(); #endif - //SF ("borderRadii: %f %f %f %f\n", borderRadii[0], borderRadii[1], borderRadii[2], borderRadii[3]); - nsCSSBorderRenderer br(twipsPerPixel, ctx, - oRect, + joinedBorderAreaPx, borderStyles, borderWidths, - borderRadii, + bgRadii, borderColors, compositeColors, - aSkipSides, bgColor); br.DrawBorders(); @@ -688,7 +841,7 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext, outlineWidths, outlineRadii, outlineColors, - nullptr, 0, + nullptr, bgColor); br.DrawBorders(); @@ -741,7 +894,7 @@ nsCSSRendering::PaintFocus(nsPresContext* aPresContext, focusWidths, focusRadii, focusColors, - nullptr, 0, + nullptr, NS_RGB(255, 0, 0)); br.DrawBorders(); @@ -996,13 +1149,10 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, nsCSSShadowArray* shadows = styleBorder->mBoxShadow; if (!shadows) return; - nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1); + gfxContextAutoSaveRestore gfxStateRestorer; bool hasBorderRadius; bool nativeTheme; // mutually exclusive with hasBorderRadius - gfxCornerSizes borderRadii; - - // Get any border radius, since box-shadow must also have rounded corners if the frame does const nsStyleDisplay* styleDisplay = aForFrame->StyleDisplay(); nsITheme::Transparency transparency; if (aForFrame->IsThemed(styleDisplay, &transparency)) { @@ -1013,17 +1163,29 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, nativeTheme = transparency != nsITheme::eOpaque; } else { nativeTheme = false; + hasBorderRadius = true; // we'll update this below + } + + nsRect frameRect = nativeTheme ? + aForFrame->GetVisualOverflowRectRelativeToSelf() + aFrameArea.TopLeft() : + aFrameArea; + frameRect = ::BoxDecorationRectForBorder(aForFrame, frameRect); + + // Get any border radius, since box-shadow must also have rounded corners if + // the frame does. + gfxCornerSizes borderRadii; + const nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1); + if (hasBorderRadius) { nscoord twipsRadii[8]; NS_ASSERTION(aFrameArea.Size() == aForFrame->VisualBorderRectRelativeToSelf().Size(), "unexpected size"); - hasBorderRadius = aForFrame->GetBorderRadii(twipsRadii); + nsSize sz = frameRect.Size(); + hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, 0, twipsRadii); if (hasBorderRadius) { ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii); } } - nsRect frameRect = - nativeTheme ? aForFrame->GetVisualOverflowRectRelativeToSelf() + aFrameArea.TopLeft() : aFrameArea; gfxRect frameGfxRect(nsLayoutUtils::RectToGfxRect(frameRect, twipsPerPixel)); frameGfxRect.Round(); @@ -1047,6 +1209,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, std::max(borderRadii[C_BL].height, borderRadii[C_BR].height), 0)); } + int skipSides = aForFrame->GetSkipSides(); for (uint32_t i = shadows->Length(); i > 0; --i) { nsCSSShadowItem* shadowItem = shadows->ShadowAt(i - 1); if (shadowItem->mInset) @@ -1127,7 +1290,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, } else { renderContext->Save(); // Clip out the area of the actual frame so the shadow is not shown within - // the frame + // the frame. renderContext->NewPath(); renderContext->Rectangle(shadowGfxRectPlusBlur); if (hasBorderRadius) { @@ -1139,6 +1302,36 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, renderContext->SetFillRule(gfxContext::FILL_RULE_EVEN_ODD); renderContext->Clip(); + // Clip the shadow so that we only get the part that applies to aForFrame. + nsRect fragmentClip = shadowRectPlusBlur; + if (skipSides) { + if (skipSides & SIDE_BIT_LEFT) { + nscoord xmost = fragmentClip.XMost(); + fragmentClip.x = aFrameArea.x; + fragmentClip.width = xmost - fragmentClip.x; + } + if (skipSides & SIDE_BIT_RIGHT) { + nscoord xmost = fragmentClip.XMost(); + nscoord overflow = xmost - aFrameArea.XMost(); + if (overflow > 0) { + fragmentClip.width -= overflow; + } + } + if (skipSides & SIDE_BIT_TOP) { + nscoord ymost = fragmentClip.YMost(); + fragmentClip.y = aFrameArea.y; + fragmentClip.height = ymost - fragmentClip.y; + } + if (skipSides & SIDE_BIT_BOTTOM) { + nscoord ymost = fragmentClip.YMost(); + nscoord overflow = ymost - aFrameArea.YMost(); + if (overflow > 0) { + fragmentClip.height -= overflow; + } + } + } + aRenderingContext.IntersectClip(fragmentClip); + gfxCornerSizes clipRectRadii; if (hasBorderRadius) { gfxFloat spreadDistance = shadowItem->mSpread / twipsPerPixel; @@ -1188,18 +1381,20 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext, return; } + NS_ASSERTION(aForFrame->GetType() == nsGkAtoms::fieldSetFrame || + aFrameArea.Size() == aForFrame->GetSize(), "unexpected size"); + + nsRect frameRect = ::BoxDecorationRectForBorder(aForFrame, aFrameArea); + nsRect paddingRect = frameRect; + nsMargin border = aForFrame->GetUsedBorder(); + paddingRect.Deflate(border); + // Get any border radius, since box-shadow must also have rounded corners // if the frame does. nscoord twipsRadii[8]; - NS_ASSERTION(aForFrame->GetType() == nsGkAtoms::fieldSetFrame || - aFrameArea.Size() == aForFrame->GetSize(), "unexpected size"); - bool hasBorderRadius = aForFrame->GetBorderRadii(twipsRadii); - nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1); - - nsRect paddingRect = aFrameArea; - nsMargin border = aForFrame->GetUsedBorder(); - aForFrame->ApplySkipSides(border); - paddingRect.Deflate(border); + nsSize sz = frameRect.Size(); + bool hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, 0, twipsRadii); + const nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1); gfxCornerSizes innerRadii; if (hasBorderRadius) { @@ -1221,13 +1416,9 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext, if (!shadowItem->mInset) continue; - /* - * shadowRect: the frame's padding rect - * shadowPaintRect: the area to paint on the temp surface, larger than shadowRect - * so that blurs still happen properly near the edges - * shadowClipRect: the area on the temporary surface within shadowPaintRect - * that we will NOT paint in - */ + // shadowPaintRect: the area to paint on the temp surface + // shadowClipRect: the area on the temporary surface within shadowPaintRect + // that we will NOT paint in nscoord blurRadius = shadowItem->mRadius; nsMargin blurMargin = nsContextBoxBlur::GetBlurRadiusMargin(blurRadius, twipsPerPixel); @@ -4935,10 +5126,8 @@ nsContextBoxBlur::GetBlurRadiusMargin(nscoord aBlurRadius, gfxIntSize blurRadius = ComputeBlurRadius(aBlurRadius, aAppUnitsPerDevPixel); nsMargin result; - result.top = blurRadius.height * aAppUnitsPerDevPixel; - result.right = blurRadius.width * aAppUnitsPerDevPixel; - result.bottom = blurRadius.height * aAppUnitsPerDevPixel; - result.left = blurRadius.width * aAppUnitsPerDevPixel; + result.top = result.bottom = blurRadius.height * aAppUnitsPerDevPixel; + result.left = result.right = blurRadius.width * aAppUnitsPerDevPixel; return result; } diff --git a/layout/base/nsCSSRenderingBorders.cpp b/layout/base/nsCSSRenderingBorders.cpp index 405eb1bca272..05f361953717 100644 --- a/layout/base/nsCSSRenderingBorders.cpp +++ b/layout/base/nsCSSRenderingBorders.cpp @@ -120,7 +120,6 @@ nsCSSBorderRenderer::nsCSSBorderRenderer(int32_t aAppUnitsPerPixel, gfxCornerSizes& aBorderRadii, const nscolor* aBorderColors, nsBorderColors* const* aCompositeColors, - int aSkipSides, nscolor aBackgroundColor) : mContext(aDestContext), mOuterRect(aOuterRect), @@ -130,7 +129,6 @@ nsCSSBorderRenderer::nsCSSBorderRenderer(int32_t aAppUnitsPerPixel, mBorderColors(aBorderColors), mCompositeColors(aCompositeColors), mAUPP(aAppUnitsPerPixel), - mSkipSides(aSkipSides), mBackgroundColor(aBackgroundColor) { if (!mCompositeColors) { diff --git a/layout/base/nsCSSRenderingBorders.h b/layout/base/nsCSSRenderingBorders.h index 41a2415b4ece..461a765abd3a 100644 --- a/layout/base/nsCSSRenderingBorders.h +++ b/layout/base/nsCSSRenderingBorders.h @@ -79,7 +79,6 @@ struct nsCSSBorderRenderer { gfxCornerSizes& aBorderRadii, const nscolor* aBorderColors, nsBorderColors* const* aCompositeColors, - int aSkipSides, nscolor aBackgroundColor); gfxCornerSizes mBorderCornerDimensions; @@ -105,8 +104,7 @@ struct nsCSSBorderRenderer { // core app units per pixel int32_t mAUPP; - // misc -- which sides to skip, the background color - int mSkipSides; + // the background color nscolor mBackgroundColor; // calculated values diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 9dddee0f9074..8b444093d9bc 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -2839,11 +2839,8 @@ nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder, PROFILER_LABEL("nsDisplayBoxShadowOuter", "Paint"); for (uint32_t i = 0; i < rects.Length(); ++i) { - aCtx->PushState(); - aCtx->IntersectClip(rects[i]); nsCSSRendering::PaintBoxShadowOuter(presContext, *aCtx, mFrame, borderRect, rects[i], mOpacity); - aCtx->PopState(); } } diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index 0fd9e7225a44..472245db0914 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -849,12 +849,31 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext, // This frame is a first-in-flow, but it might have a previous bidi // continuation, in which case that continuation should handle the startSide // border. + // For box-decoration-break:clone we setup clonePBM = startPBM + endPBM and + // add that to each line. For box-decoration-break:slice clonePBM is zero. + nscoord clonePBM = 0; // PBM = PaddingBorderMargin + const bool sliceBreak = + styleBorder->mBoxDecorationBreak == NS_STYLE_BOX_DECORATION_BREAK_SLICE; if (!GetPrevContinuation()) { - aData->currentLine += + nscoord startPBM = // clamp negative calc() to 0 std::max(GetCoord(stylePadding->mPadding.Get(startSide), 0), 0) + styleBorder->GetComputedBorderWidth(startSide) + GetCoord(styleMargin->mMargin.Get(startSide), 0); + if (MOZ_LIKELY(sliceBreak)) { + aData->currentLine += startPBM; + } else { + clonePBM = startPBM; + } + } + + nscoord endPBM = + // clamp negative calc() to 0 + std::max(GetCoord(stylePadding->mPadding.Get(endSide), 0), 0) + + styleBorder->GetComputedBorderWidth(endSide) + + GetCoord(styleMargin->mMargin.Get(endSide), 0); + if (MOZ_UNLIKELY(!sliceBreak)) { + clonePBM += endPBM; } const nsLineList_iterator* savedLine = aData->line; @@ -863,6 +882,9 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext, nsContainerFrame *lastInFlow; for (nsContainerFrame *nif = this; nif; nif = static_cast(nif->GetNextInFlow())) { + if (aData->currentLine == 0) { + aData->currentLine = clonePBM; + } for (nsIFrame *kid = nif->mFrames.FirstChild(); kid; kid = kid->GetNextSibling()) { if (aType == nsLayoutUtils::MIN_WIDTH) @@ -891,12 +913,8 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext, // We reached the last-in-flow, but it might have a next bidi // continuation, in which case that continuation should handle // the endSide border. - if (!lastInFlow->GetNextContinuation()) { - aData->currentLine += - // clamp negative calc() to 0 - std::max(GetCoord(stylePadding->mPadding.Get(endSide), 0), 0) + - styleBorder->GetComputedBorderWidth(endSide) + - GetCoord(styleMargin->mMargin.Get(endSide), 0); + if (MOZ_LIKELY(!lastInFlow->GetNextContinuation() && sliceBreak)) { + aData->currentLine += endPBM; } } diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 84401a4b6352..22d835ed6804 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -953,6 +953,11 @@ nsIFrame::GetUsedPadding() const int nsIFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const { + if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { + return 0; + } + // Convert the logical skip sides to physical sides using the frame's // writing mode WritingMode writingMode = GetWritingMode(); diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 435e7f0a3537..62f4cb9c5037 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -1782,6 +1782,10 @@ nsImageFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const int nsImageFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { + if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { + return 0; + } int skip = 0; if (nullptr != GetPrevInFlow()) { skip |= LOGICAL_SIDE_B_START; diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp index 526041e63646..a59003c8d03c 100644 --- a/layout/generic/nsInlineFrame.cpp +++ b/layout/generic/nsInlineFrame.cpp @@ -115,7 +115,11 @@ nsInlineFrame::IsSelfEmpty() !nsLayoutUtils::IsPaddingZero(padding->mPadding.GetLeft()) || !IsMarginZero(margin->mMargin.GetLeft()); if (haveLeft || haveRight) { - if (GetStateBits() & NS_FRAME_PART_OF_IBSPLIT) { + // We skip this block and return false for box-decoration-break:clone since + // in that case all the continuations will have the border/padding/margin. + if ((GetStateBits() & NS_FRAME_PART_OF_IBSPLIT) && + StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_SLICE) { bool haveStart, haveEnd; if (NS_STYLE_DIRECTION_LTR == StyleVisibility()->mDirection) { haveStart = haveLeft; @@ -491,9 +495,15 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext, RestyleManager* restyleManager = aPresContext->RestyleManager(); WritingMode wm = aReflowState.GetWritingMode(); nscoord startEdge = 0; + const bool boxDecorationBreakClone = + MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE); // Don't offset by our start borderpadding if we have a prev continuation or - // if we're in a part of an {ib} split other than the first one. - if (!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) { + // if we're in a part of an {ib} split other than the first one. For + // box-decoration-break:clone we always offset our start since all + // continuations have border/padding. + if ((!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) || + boxDecorationBreakClone) { startEdge = aReflowState.ComputedLogicalBorderPadding().IStart(wm); } nscoord availableISize = aReflowState.AvailableISize(); @@ -654,8 +664,10 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext, // Make sure to not include our start border and padding if we have a prev // continuation or if we're in a part of an {ib} split other than the first - // one. - if (!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) { + // one. For box-decoration-break:clone we always include our start border + // and padding since all continuations have them. + if ((!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) || + boxDecorationBreakClone) { aMetrics.ISize() += aReflowState.ComputedLogicalBorderPadding().IStart(wm); } @@ -664,11 +676,13 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext, * continuation and either not in an {ib} split or the last part of it. To * be the last continuation we have to be complete (so that we won't get a * next-in-flow) and have no non-fluid continuations on our continuation - * chain. + * chain. For box-decoration-break:clone we always apply the end border and + * padding since all continuations have them. */ - if (NS_FRAME_IS_COMPLETE(aStatus) && - !LastInFlow()->GetNextContinuation() && - !FrameIsNonLastInIBSplit()) { + if ((NS_FRAME_IS_COMPLETE(aStatus) && + !LastInFlow()->GetNextContinuation() && + !FrameIsNonLastInIBSplit()) || + boxDecorationBreakClone) { aMetrics.Width() += aReflowState.ComputedLogicalBorderPadding().IEnd(wm); } @@ -872,6 +886,11 @@ nsInlineFrame::PushFrames(nsPresContext* aPresContext, int nsInlineFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { + if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { + return 0; + } + int skip = 0; if (!IsFirst()) { nsInlineFrame* prev = (nsInlineFrame*) GetPrevContinuation(); diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index fffcfbfc76ce..9b74ede0278a 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -1076,9 +1076,12 @@ nsLineLayout::ApplyStartMargin(PerFrameData* pfd, // in an ib split. Note that the ib sibling (block-in-inline // sibling) annotations only live on the first continuation, but we // don't want to apply the start margin for later continuations - // anyway. - if (pfd->mFrame->GetPrevContinuation() || - pfd->mFrame->FrameIsNonFirstInIBSplit()) { + // anyway. For box-decoration-break:clone we apply the start-margin + // on all continuations. + if ((pfd->mFrame->GetPrevContinuation() || + pfd->mFrame->FrameIsNonFirstInIBSplit()) && + aReflowState.mStyleBorder->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_SLICE) { // Zero this out so that when we compute the max-element-width of // the frame we will properly avoid adding in the starting margin. pfd->mMargin.IStart(frameWM) = 0; @@ -1160,6 +1163,9 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd, * 3) The frame is in an {ib} split and is not the last part. * * However, none of that applies if this is a letter frame (XXXbz why?) + * + * For box-decoration-break:clone we apply the end margin on all + * continuations (that are not letter frames). */ if (pfd->mFrame->GetPrevContinuation() || pfd->mFrame->FrameIsNonFirstInIBSplit()) { @@ -1167,8 +1173,10 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd, } if ((NS_FRAME_IS_NOT_COMPLETE(aStatus) || pfd->mFrame->LastInFlow()->GetNextContinuation() || - pfd->mFrame->FrameIsNonLastInIBSplit()) - && !pfd->GetFlag(PFD_ISLETTERFRAME)) { + pfd->mFrame->FrameIsNonLastInIBSplit()) && + !pfd->GetFlag(PFD_ISLETTERFRAME) && + pfd->mFrame->StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_SLICE) { pfd->mMargin.IEnd(frameWM) = 0; } LogicalMargin usedMargins = pfd->mMargin.ConvertTo(lineWM, frameWM); diff --git a/layout/generic/nsSplittableFrame.cpp b/layout/generic/nsSplittableFrame.cpp index 6f35289b3da1..8a83e85574ce 100644 --- a/layout/generic/nsSplittableFrame.cpp +++ b/layout/generic/nsSplittableFrame.cpp @@ -253,8 +253,12 @@ nsSplittableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) co return LOGICAL_SIDES_B_BOTH; } - int skip = 0; + if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { + return 0; + } + int skip = 0; if (GetPrevInFlow()) { skip |= LOGICAL_SIDE_B_START; } diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index ee7304dbff7d..0aac7c2dd856 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -550,6 +550,11 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, int nsTableCellFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { + if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { + return 0; + } + int skip = 0; if (nullptr != GetPrevInFlow()) { skip |= LOGICAL_SIDE_B_START; diff --git a/layout/tables/nsTableColGroupFrame.cpp b/layout/tables/nsTableColGroupFrame.cpp index 37fa8c5befd6..071d0d519ffb 100644 --- a/layout/tables/nsTableColGroupFrame.cpp +++ b/layout/tables/nsTableColGroupFrame.cpp @@ -343,6 +343,11 @@ nsTableColGroupFrame::RemoveFrame(ChildListID aListID, int nsTableColGroupFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { + if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { + return 0; + } + int skip = 0; if (nullptr != GetPrevInFlow()) { skip |= 1 << LOGICAL_SIDE_B_START; diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 60613ba7d413..33fa27e05670 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -1409,6 +1409,11 @@ nsTableFrame::PaintTableBorderBackground(nsRenderingContext& aRenderingContext, int nsTableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { + if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { + return 0; + } + int skip = 0; // frame attribute was accounted for in nsHTMLTableElement::MapTableBorderInto // account for pagination diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index d1c493b629bd..67863457e02a 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -605,6 +605,11 @@ nsTableRowFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, int nsTableRowFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { + if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { + return 0; + } + int skip = 0; if (nullptr != GetPrevInFlow()) { skip |= LOGICAL_SIDE_B_START; diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index b149921f9870..f387a7e0af5e 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -256,6 +256,11 @@ nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, int nsTableRowGroupFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { + if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { + return 0; + } + int skip = 0; if (nullptr != GetPrevInFlow()) { skip |= LOGICAL_SIDE_B_START; From d7d26fc9a6e526b09e64e56de758e345bd0f5b33 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Thu, 17 Apr 2014 12:11:07 +0000 Subject: [PATCH 44/79] Bug 613659 - Implement box-decoration-break layout for backgrounds. r=cam,jmuizelaar --HG-- rename : layout/reftests/backgrounds/background-size-each-box.html => layout/reftests/backgrounds/background-size-clone.html rename : layout/reftests/backgrounds/background-size-cover-each-box.html => layout/reftests/backgrounds/background-size-cover-clone.html rename : layout/reftests/backgrounds/background-size-cover-continuous.html => layout/reftests/backgrounds/background-size-cover-slice.html rename : layout/reftests/backgrounds/background-size-continuous.html => layout/reftests/backgrounds/background-size-slice.html --- gfx/thebes/gfxContext.h | 12 +- layout/base/nsCSSRendering.cpp | 171 ++++++++---------- layout/base/nsCSSRendering.h | 3 - layout/base/nsDisplayList.cpp | 25 +-- layout/generic/crashtests/383089-1.html | 2 +- .../background-size-bounding-box.html | 36 ---- ...ch-box.html => background-size-clone.html} | 6 +- .../background-size-cover-bounding-box.html | 37 ---- ....html => background-size-cover-clone.html} | 6 +- ....html => background-size-cover-slice.html} | 6 +- ...inuous.html => background-size-slice.html} | 6 +- layout/reftests/backgrounds/reftest.list | 18 +- layout/reftests/bugs/368020-3-ref.html | 2 +- layout/reftests/bugs/368020-3.html | 2 +- layout/reftests/bugs/368020-4-ref.html | 15 -- layout/reftests/bugs/368020-4.html | 15 -- layout/reftests/bugs/368020-5-ref.html | 2 +- layout/reftests/bugs/368020-5.html | 2 +- layout/reftests/bugs/reftest.list | 3 +- 19 files changed, 112 insertions(+), 257 deletions(-) delete mode 100644 layout/reftests/backgrounds/background-size-bounding-box.html rename layout/reftests/backgrounds/{background-size-each-box.html => background-size-clone.html} (75%) delete mode 100644 layout/reftests/backgrounds/background-size-cover-bounding-box.html rename layout/reftests/backgrounds/{background-size-cover-each-box.html => background-size-cover-clone.html} (74%) rename layout/reftests/backgrounds/{background-size-cover-continuous.html => background-size-cover-slice.html} (73%) rename layout/reftests/backgrounds/{background-size-continuous.html => background-size-slice.html} (75%) delete mode 100644 layout/reftests/bugs/368020-4-ref.html delete mode 100644 layout/reftests/bugs/368020-4.html diff --git a/gfx/thebes/gfxContext.h b/gfx/thebes/gfxContext.h index bdc6821117aa..bbff91847eae 100644 --- a/gfx/thebes/gfxContext.h +++ b/gfx/thebes/gfxContext.h @@ -831,14 +831,12 @@ public: mContext->Save(); } - void Reset(gfxContext *aContext) { - // Do the equivalent of destroying and re-creating this object. - NS_PRECONDITION(aContext, "must provide a context"); - if (mContext) { - mContext->Restore(); + void EnsureSaved(gfxContext *aContext) { + MOZ_ASSERT(!mContext || mContext == aContext, "wrong context"); + if (!mContext) { + mContext = aContext; + mContext->Save(); } - mContext = aContext; - mContext->Save(); } private: diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 0c2be7aa2163..fde893c6137e 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -527,6 +527,18 @@ BoxDecorationRectForBorder(nsIFrame* aFrame, const nsRect& aBorderArea, : aBorderArea; } +static nsRect +BoxDecorationRectForBackground(nsIFrame* aFrame, const nsRect& aBorderArea, + const nsStyleBorder* aStyleBorder = nullptr) +{ + if (!aStyleBorder) { + aStyleBorder = aFrame->StyleBorder(); + } + return ::IsBoxDecorationSlice(*aStyleBorder) + ? ::JoinBoxesForSlice(aFrame, aBorderArea, eForBackground) + : aBorderArea; +} + //---------------------------------------------------------------------- // Thebes Border Rendering Code Start @@ -1697,6 +1709,7 @@ GetBackgroundClip(gfxContext *aCtx, uint8_t aBackgroundClip, aClipState->mCustomClip = false; aClipState->mRadiiAreOuter = true; aClipState->mClippedRadii = aBGRadii; + if (aForFrame->GetType() == nsGkAtoms::scrollFrame && NS_STYLE_BG_ATTACHMENT_LOCAL == aBackgroundAttachment) { // As of this writing, this is still in discussion in the CSS Working Group @@ -1795,15 +1808,13 @@ SetupBackgroundClip(BackgroundClipState& aClipState, gfxContext *aCtx, // as above with bgArea, arguably a bug, but table painting seems // to depend on it. - if (aHaveRoundedCorners || aClipState.mHasAdditionalBGClipArea) { - aAutoSR->Reset(aCtx); - } - if (aClipState.mHasAdditionalBGClipArea) { gfxRect bgAreaGfx = nsLayoutUtils::RectToGfxRect( aClipState.mAdditionalBGClipArea, aAppUnitsPerPixel); bgAreaGfx.Round(); bgAreaGfx.Condition(); + + aAutoSR->EnsureSaved(aCtx); aCtx->NewPath(); aCtx->Rectangle(bgAreaGfx, true); aCtx->Clip(); @@ -1824,6 +1835,7 @@ SetupBackgroundClip(BackgroundClipState& aClipState, gfxContext *aCtx, return; } + aAutoSR->EnsureSaved(aCtx); aCtx->NewPath(); aCtx->RoundedRectangle(bgAreaGfx, aClipState.mClippedRadii, aClipState.mRadiiAreOuter); aCtx->Clip(); @@ -2598,26 +2610,14 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, return; // Compute the outermost boundary of the area that might be painted. - gfxContext *ctx = aRenderingContext.ThebesContext(); - nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel(); - - // Same coordinate space as aBorderArea & aBGClipRect + // Same coordinate space as aBorderArea & aBGClipRect. + nsRect paintBorderArea = + ::BoxDecorationRectForBackground(aForFrame, aBorderArea, &aBorder); + nsRect clipBorderArea = + ::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aBorder); gfxCornerSizes bgRadii; - bool haveRoundedCorners; - { - nscoord radii[8]; - nsSize frameSize = aForFrame->GetSize(); - if (&aBorder == aForFrame->StyleBorder() && - frameSize == aBorderArea.Size()) { - haveRoundedCorners = aForFrame->GetBorderRadii(radii); - } else { - haveRoundedCorners = nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius, - frameSize, aBorderArea.Size(), - aForFrame->GetSkipSides(), radii); - } - if (haveRoundedCorners) - ComputePixelRadii(radii, appUnitsPerPixel, &bgRadii); - } + bool haveRoundedCorners = + ::GetRadii(aForFrame, aBorder, aBorderArea, clipBorderArea, &bgRadii); // The 'bgClipArea' (used only by the image tiling logic, far below) // is the caller-provided aBGClipRect if any, or else the area @@ -2625,6 +2625,8 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, // SetupCurrentBackgroundClip. (Arguably it should be the // intersection, but that breaks the table painter -- in particular, // taking the intersection breaks reftests/bugs/403249-1[ab].) + gfxContext* ctx = aRenderingContext.ThebesContext(); + nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel(); BackgroundClipState clipState; uint8_t currentBackgroundClip; bool isSolidBorder; @@ -2654,7 +2656,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, } GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment, - aForFrame, aBorderArea, + aForFrame, clipBorderArea, aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel, &clipState); } @@ -2663,6 +2665,8 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, if (drawBackgroundColor && !isCanvasFrame) ctx->SetColor(gfxRGBA(bgColor)); + // NOTE: no Save() yet, we do that later by calling autoSR.EnsureSaved(ctx) + // in the cases we need it. gfxContextAutoSaveRestore autoSR; // If there is no background image, draw a color. (If there is @@ -2722,19 +2726,30 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, // already called GetBackgroundClip above and it stored its results // in clipState. if (clipSet) { + autoSR = gfxContextAutoSaveRestore(); // reset the previous one GetBackgroundClip(ctx, currentBackgroundClip, layer.mAttachment, aForFrame, - aBorderArea, aDirtyRect, haveRoundedCorners, + clipBorderArea, aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel, &clipState); } SetupBackgroundClip(clipState, ctx, haveRoundedCorners, appUnitsPerPixel, &autoSR); clipSet = true; + if (!clipBorderArea.IsEqualEdges(aBorderArea)) { + // We're drawing the background for the joined continuation boxes + // so we need to clip that to the slice that we want for this frame. + gfxRect clip = + nsLayoutUtils::RectToGfxRect(aBorderArea, appUnitsPerPixel); + autoSR.EnsureSaved(ctx); + ctx->NewPath(); + ctx->SnappedRectangle(clip); + ctx->Clip(); + } } } if ((aLayer < 0 || i == (uint32_t)startLayer) && !clipState.mDirtyRectGfx.IsEmpty()) { nsBackgroundLayerState state = PrepareBackgroundLayer(aPresContext, aForFrame, - aFlags, aBorderArea, clipState.mBGClipArea, *bg, layer); + aFlags, paintBorderArea, clipState.mBGClipArea, layer); if (!state.mFillArea.IsEmpty()) { if (state.mCompositingOp != gfxContext::OPERATOR_OVER) { NS_ASSERTION(ctx->CurrentOperator() == gfxContext::OPERATOR_OVER, @@ -2743,7 +2758,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, } state.mImageRenderer.DrawBackground(aPresContext, aRenderingContext, state.mDestArea, state.mFillArea, - state.mAnchor + aBorderArea.TopLeft(), + state.mAnchor + paintBorderArea.TopLeft(), clipState.mDirtyRect); if (state.mCompositingOp != gfxContext::OPERATOR_OVER) { ctx->SetOperator(gfxContext::OPERATOR_OVER); @@ -2798,26 +2813,12 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext, } // Compute the outermost boundary of the area that might be painted. - gfxContext *ctx = aRenderingContext.ThebesContext(); - nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel(); - - // Same coordinate space as aBorderArea + // Same coordinate space as aBorderArea. + nsRect clipBorderArea = + ::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aBorder); gfxCornerSizes bgRadii; - bool haveRoundedCorners; - { - nscoord radii[8]; - nsSize frameSize = aForFrame->GetSize(); - if (&aBorder == aForFrame->StyleBorder() && - frameSize == aBorderArea.Size()) { - haveRoundedCorners = aForFrame->GetBorderRadii(radii); - } else { - haveRoundedCorners = nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius, - frameSize, aBorderArea.Size(), - aForFrame->GetSkipSides(), radii); - } - if (haveRoundedCorners) - ComputePixelRadii(radii, appUnitsPerPixel, &bgRadii); - } + bool haveRoundedCorners = + ::GetRadii(aForFrame, aBorder, aBorderArea, clipBorderArea, &bgRadii); // The background is rendered over the 'background-clip' area, // which is normally equal to the border area but may be reduced @@ -2827,6 +2828,8 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext, // radii as the border code will. // The background-color is drawn based on the bottom // background-clip. + gfxContext* ctx = aRenderingContext.ThebesContext(); + nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel(); const nsStyleBackground *bg = aBackgroundSC->StyleBackground(); uint8_t currentBackgroundClip = bg->BottomLayer().mClip; bool isSolidBorder = @@ -2841,7 +2844,7 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext, BackgroundClipState clipState; GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment, - aForFrame, aBorderArea, + aForFrame, clipBorderArea, aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel, &clipState); @@ -2866,47 +2869,17 @@ nsRect nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext, nsIFrame* aForFrame, const nsRect& aBorderArea, - const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer, nsIFrame** aAttachedToFrame) { // Compute background origin area relative to aBorderArea now as we may need // it to compute the effective image size for a CSS gradient. - nsRect bgPositioningArea(0, 0, 0, 0); + nsRect bgPositioningArea; nsIAtom* frameType = aForFrame->GetType(); nsIFrame* geometryFrame = aForFrame; - if (frameType == nsGkAtoms::inlineFrame) { - // XXXjwalden Strictly speaking this is not quite faithful to how - // background-break is supposed to interact with background-origin values, - // but it's a non-trivial amount of work to make it fully conformant, and - // until the specification is more finalized (and assuming background-break - // even makes the cut) it doesn't make sense to hammer out exact behavior. - switch (aBackground.mBackgroundInlinePolicy) { - case NS_STYLE_BG_INLINE_POLICY_EACH_BOX: - bgPositioningArea = nsRect(nsPoint(0,0), aBorderArea.Size()); - break; - case NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX: - bgPositioningArea = gInlineBGData->GetBoundingRect(aForFrame); - break; - default: - NS_ERROR("Unknown background-inline-policy value! " - "Please, teach me what to do."); - case NS_STYLE_BG_INLINE_POLICY_CONTINUOUS: - bgPositioningArea = gInlineBGData->GetContinuousRect(aForFrame); - break; - } - } else if (frameType == nsGkAtoms::canvasFrame) { - geometryFrame = aForFrame->GetFirstPrincipalChild(); - // geometryFrame might be null if this canvas is a page created - // as an overflow container (e.g. the in-flow content has already - // finished and this page only displays the continuations of - // absolutely positioned content). - if (geometryFrame) { - bgPositioningArea = geometryFrame->GetRect(); - } - } else if (frameType == nsGkAtoms::scrollFrame && - NS_STYLE_BG_ATTACHMENT_LOCAL == aLayer.mAttachment) { + if (MOZ_UNLIKELY(frameType == nsGkAtoms::scrollFrame && + NS_STYLE_BG_ATTACHMENT_LOCAL == aLayer.mAttachment)) { nsIScrollableFrame* scrollableFrame = do_QueryFrame(aForFrame); bgPositioningArea = nsRect( scrollableFrame->GetScrolledFrame()->GetPosition() @@ -2930,6 +2903,17 @@ nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext, } *aAttachedToFrame = aForFrame; return bgPositioningArea; + } + + if (MOZ_UNLIKELY(frameType == nsGkAtoms::canvasFrame)) { + geometryFrame = aForFrame->GetFirstPrincipalChild(); + // geometryFrame might be null if this canvas is a page created + // as an overflow container (e.g. the in-flow content has already + // finished and this page only displays the continuations of + // absolutely positioned content). + if (geometryFrame) { + bgPositioningArea = geometryFrame->GetRect(); + } } else { bgPositioningArea = nsRect(nsPoint(0,0), aBorderArea.Size()); } @@ -2943,7 +2927,6 @@ nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext, NS_ASSERTION(aLayer.mOrigin == NS_STYLE_BG_ORIGIN_CONTENT, "unknown background-origin value"); } - geometryFrame->ApplySkipSides(border); bgPositioningArea.Deflate(border); } @@ -3027,11 +3010,10 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext, uint32_t aFlags, const nsRect& aBorderArea, const nsRect& aBGClipRect, - const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer) { /* - * The background properties we need to keep in mind when drawing background + * The properties we need to keep in mind when drawing background * layers are: * * background-image @@ -3041,8 +3023,8 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext, * background-clip * background-origin * background-size - * background-break (-moz-background-inline-policy) * background-blend-mode + * box-decoration-break * * (background-color applies to the entire element and not to individual * layers, so it is irrelevant to this method.) @@ -3065,22 +3047,21 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext, * depends upon background-attachment (only in the case where that value * is 'fixed') * background-size - * depends upon background-break (for the background positioning area for - * resolving percentages), background-image (for the image's intrinsic + * depends upon box-decoration-break (for the background positioning area + * for resolving percentages), background-image (for the image's intrinsic * size), background-repeat (if that value is 'round'), and * background-origin (for the background painting area, when * background-repeat is 'round') - * background-break - * depends upon background-origin (specifying how the boxes making up the - * background positioning area are determined) + * box-decoration-break + * no dependencies * * As a result of only-if dependencies we don't strictly do a topological * sort of the above properties when processing, but it's pretty close to one: * * background-clip (by caller) * background-image - * background-break, background-origin - * background-attachment (postfix for background-{origin,break} if 'fixed') + * box-decoration-break, background-origin + * background-attachment (postfix for background-origin if 'fixed') * background-size * background-position * background-repeat @@ -3106,7 +3087,7 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext, // it to compute the effective image size for a CSS gradient. nsRect bgPositioningArea = ComputeBackgroundPositioningArea(aPresContext, aForFrame, aBorderArea, - aBackground, aLayer, &attachedToFrame); + aLayer, &attachedToFrame); // For background-attachment:fixed backgrounds, we'll limit the area // where the background can be drawn to the viewport. @@ -3176,13 +3157,13 @@ nsCSSRendering::GetBackgroundLayerRect(nsPresContext* aPresContext, nsIFrame* aForFrame, const nsRect& aBorderArea, const nsRect& aClipRect, - const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer, uint32_t aFlags) { + nsRect borderArea = ::BoxDecorationRectForBackground(aForFrame, aBorderArea); nsBackgroundLayerState state = - PrepareBackgroundLayer(aPresContext, aForFrame, aFlags, aBorderArea, - aClipRect, aBackground, aLayer); + PrepareBackgroundLayer(aPresContext, aForFrame, aFlags, borderArea, + aClipRect, aLayer); return state.mFillArea; } diff --git a/layout/base/nsCSSRendering.h b/layout/base/nsCSSRendering.h index 7fd615791a51..f6e668f38576 100644 --- a/layout/base/nsCSSRendering.h +++ b/layout/base/nsCSSRendering.h @@ -456,7 +456,6 @@ struct nsCSSRendering { ComputeBackgroundPositioningArea(nsPresContext* aPresContext, nsIFrame* aForFrame, const nsRect& aBorderArea, - const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer, nsIFrame** aAttachedToFrame); @@ -466,7 +465,6 @@ struct nsCSSRendering { uint32_t aFlags, const nsRect& aBorderArea, const nsRect& aBGClipRect, - const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer); /** @@ -542,7 +540,6 @@ struct nsCSSRendering { nsIFrame* aForFrame, const nsRect& aBorderArea, const nsRect& aClipRect, - const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer, uint32_t aFlags); diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 8b444093d9bc..605821167bd4 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -1934,14 +1934,8 @@ nsDisplayBackgroundImage::IsSingleFixedPositionImage(nsDisplayListBuilder* aBuil return false; nsBackgroundLayerState state = - nsCSSRendering::PrepareBackgroundLayer(presContext, - mFrame, - flags, - borderArea, - aClipRect, - *mBackgroundStyle, - layer); - + nsCSSRendering::PrepareBackgroundLayer(presContext, mFrame, flags, + borderArea, aClipRect, layer); nsImageRenderer* imageRenderer = &state.mImageRenderer; // We only care about images here, not gradients. if (!imageRenderer->IsRasterImage()) @@ -1974,14 +1968,8 @@ nsDisplayBackgroundImage::TryOptimizeToImageLayer(LayerManager* aManager, } nsBackgroundLayerState state = - nsCSSRendering::PrepareBackgroundLayer(presContext, - mFrame, - flags, - borderArea, - borderArea, - *mBackgroundStyle, - layer); - + nsCSSRendering::PrepareBackgroundLayer(presContext, mFrame, flags, + borderArea, borderArea, layer); nsImageRenderer* imageRenderer = &state.mImageRenderer; // We only care about images here, not gradients. if (!imageRenderer->IsRasterImage()) @@ -2247,7 +2235,7 @@ nsDisplayBackgroundImage::GetPositioningArea() return nsCSSRendering::ComputeBackgroundPositioningArea( mFrame->PresContext(), mFrame, nsRect(ToReferenceFrame(), mFrame->GetSize()), - *mBackgroundStyle, mBackgroundStyle->mLayers[mLayer], + mBackgroundStyle->mLayers[mLayer], &attachedToFrame) + ToReferenceFrame(); } @@ -2361,8 +2349,7 @@ nsDisplayBackgroundImage::GetBoundsInternal(nsDisplayListBuilder* aBuilder) { } const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer]; return nsCSSRendering::GetBackgroundLayerRect(presContext, mFrame, - borderBox, clipRect, - *mBackgroundStyle, layer, + borderBox, clipRect, layer, aBuilder->GetBackgroundPaintFlags()); } diff --git a/layout/generic/crashtests/383089-1.html b/layout/generic/crashtests/383089-1.html index f73c1a8dfb6c..c6497719bd82 100644 --- a/layout/generic/crashtests/383089-1.html +++ b/layout/generic/crashtests/383089-1.html @@ -78,7 +78,7 @@ function foo()


-
+


x
diff --git a/layout/reftests/backgrounds/background-size-bounding-box.html b/layout/reftests/backgrounds/background-size-bounding-box.html deleted file mode 100644 index 6136a3729cf9..000000000000 --- a/layout/reftests/backgrounds/background-size-bounding-box.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - background-break: bounding-box - - - -
- - - - -
- - diff --git a/layout/reftests/backgrounds/background-size-each-box.html b/layout/reftests/backgrounds/background-size-clone.html similarity index 75% rename from layout/reftests/backgrounds/background-size-each-box.html rename to layout/reftests/backgrounds/background-size-clone.html index 35c1a205a77c..af6fdef42304 100644 --- a/layout/reftests/backgrounds/background-size-each-box.html +++ b/layout/reftests/backgrounds/background-size-clone.html @@ -1,7 +1,7 @@ - background-break: each-box + box-decoration-break: clone
- +
diff --git a/layout/reftests/backgrounds/background-size-cover-bounding-box.html b/layout/reftests/backgrounds/background-size-cover-bounding-box.html deleted file mode 100644 index 97a11096c0c3..000000000000 --- a/layout/reftests/backgrounds/background-size-cover-bounding-box.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - background-size: cover; background-break: bounding-box - - - -
- - - - -
- - diff --git a/layout/reftests/backgrounds/background-size-cover-each-box.html b/layout/reftests/backgrounds/background-size-cover-clone.html similarity index 74% rename from layout/reftests/backgrounds/background-size-cover-each-box.html rename to layout/reftests/backgrounds/background-size-cover-clone.html index d639f4ed5dbb..8abd119d26a8 100644 --- a/layout/reftests/backgrounds/background-size-cover-each-box.html +++ b/layout/reftests/backgrounds/background-size-cover-clone.html @@ -1,7 +1,7 @@ - background-size: cover; background-break: each-box + background-size: cover; box-decoration-break: clone
- +
diff --git a/layout/reftests/backgrounds/background-size-cover-continuous.html b/layout/reftests/backgrounds/background-size-cover-slice.html similarity index 73% rename from layout/reftests/backgrounds/background-size-cover-continuous.html rename to layout/reftests/backgrounds/background-size-cover-slice.html index 2d749675add0..9969971f29a3 100644 --- a/layout/reftests/backgrounds/background-size-cover-continuous.html +++ b/layout/reftests/backgrounds/background-size-cover-slice.html @@ -1,7 +1,7 @@ - background-size: cover; background-break: continuous + background-size: cover; box-decoration-break: slice
- +
diff --git a/layout/reftests/backgrounds/background-size-continuous.html b/layout/reftests/backgrounds/background-size-slice.html similarity index 75% rename from layout/reftests/backgrounds/background-size-continuous.html rename to layout/reftests/backgrounds/background-size-slice.html index 4373cdcd238a..94fe4d862434 100644 --- a/layout/reftests/backgrounds/background-size-continuous.html +++ b/layout/reftests/backgrounds/background-size-slice.html @@ -1,7 +1,7 @@ - background-break: continuous + box-decoration-break: slice
- +
diff --git a/layout/reftests/backgrounds/reftest.list b/layout/reftests/backgrounds/reftest.list index 1edd270ffbbe..c7deefd86107 100644 --- a/layout/reftests/backgrounds/reftest.list +++ b/layout/reftests/backgrounds/reftest.list @@ -90,19 +90,15 @@ fails-if(smallScreen&&Android) != background-size-body-contain-no-repeat.html ba skip-if(B2G) == background-layers-1a.html background-layers-1-ref.html # bug 773482 == background-layers-1b.html background-layers-1-ref.html -# -moz-background-inline-policy is touchy and hard to test due to stretching -# artifacts and the difficulty of covering exact lines, and its CSS3 analog is -# on the chopping block at the moment, so just make sure background-size results -# in a different rendering when present. -!= background-size-cover-continuous.html background-size-continuous.html -!= background-size-cover-each-box.html background-size-each-box.html -!= background-size-cover-bounding-box.html background-size-bounding-box.html +# box-decoration-break's effect on backgrounds is touchy and hard to test due to stretching +# artifacts and the difficulty of covering exact lines, so just make sure +# background-size results in a different rendering when present. +pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-slice.html background-size-slice.html +pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-clone.html background-size-clone.html # ...and make sure each rendering with background-size is different from the -# others -!= background-size-cover-continuous.html background-size-cover-each-box.html -!= background-size-cover-continuous.html background-size-cover-bounding-box.html -!= background-size-cover-each-box.html background-size-cover-bounding-box.html +# other +pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-slice.html background-size-cover-clone.html == background-size-monster-ch.html background-size-monster-ref.html == background-size-monster-cm.html background-size-monster-ref.html diff --git a/layout/reftests/bugs/368020-3-ref.html b/layout/reftests/bugs/368020-3-ref.html index 0d2775826a45..13209c61fd02 100644 --- a/layout/reftests/bugs/368020-3-ref.html +++ b/layout/reftests/bugs/368020-3-ref.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/368020-3.html b/layout/reftests/bugs/368020-3.html index 9b324eb4aeaf..294a935f34d7 100644 --- a/layout/reftests/bugs/368020-3.html +++ b/layout/reftests/bugs/368020-3.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/368020-4-ref.html b/layout/reftests/bugs/368020-4-ref.html deleted file mode 100644 index 473f3e256f1a..000000000000 --- a/layout/reftests/bugs/368020-4-ref.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -Testcase, bug 368020 - - - - - blah
- blah
- blah -
- - - diff --git a/layout/reftests/bugs/368020-4.html b/layout/reftests/bugs/368020-4.html deleted file mode 100644 index 40537301469e..000000000000 --- a/layout/reftests/bugs/368020-4.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -Testcase, bug 368020 - - - - - blah
- blah
- blah -
- - - diff --git a/layout/reftests/bugs/368020-5-ref.html b/layout/reftests/bugs/368020-5-ref.html index d60b1e3c67b6..f048ae93716a 100644 --- a/layout/reftests/bugs/368020-5-ref.html +++ b/layout/reftests/bugs/368020-5-ref.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/368020-5.html b/layout/reftests/bugs/368020-5.html index e120e842c82d..f576bbf45e39 100644 --- a/layout/reftests/bugs/368020-5.html +++ b/layout/reftests/bugs/368020-5.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 58f86e2bb857..9636e733b0f3 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -596,8 +596,7 @@ skip-if(B2G) == 367247-l-scroll.html 367247-l-auto.html skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == 368020-1.html 368020-1-ref.html == 368020-2.html 368020-2-ref.html fails == 368020-3.html 368020-3-ref.html # bug 368085 -fails == 368020-4.html 368020-4-ref.html # bug 368085 -== 368020-5.html 368020-5-ref.html +pref(layout.css.box-decoration-break.enabled,true) == 368020-5.html 368020-5-ref.html == 368155-1.xhtml 368155-1-ref.xhtml asserts(4) == 368155-negative-margins-1.html 368155-negative-margins-1-ref.html # bug 387205 / bug 457397 # we can't test this because there's antialiasing involved, and our comparison From 0ebadaa7d154381f27fc1f6ef4642f558569037f Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Thu, 17 Apr 2014 12:11:08 +0000 Subject: [PATCH 45/79] Bug 613659 - Remove remaining vestiges of -moz-background-inline-policy. r=cam --- layout/base/nsDisplayList.cpp | 5 +++-- layout/style/nsCSSKeywordList.h | 2 -- layout/style/nsCSSPropList.h | 16 ---------------- layout/style/nsCSSProps.cpp | 7 ------- layout/style/nsCSSProps.h | 1 - layout/style/nsComputedDOMStyle.cpp | 10 ---------- layout/style/nsComputedDOMStyle.h | 1 - layout/style/nsComputedDOMStylePropertyList.h | 1 - layout/style/nsRuleNode.cpp | 8 -------- layout/style/nsStyleStruct.cpp | 6 +----- layout/style/nsStyleStruct.h | 5 ----- layout/style/test/property_database.js | 8 -------- .../test/test_shorthand_property_getters.html | 4 ---- 13 files changed, 4 insertions(+), 70 deletions(-) diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 605821167bd4..81955631bdc6 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -2182,12 +2182,13 @@ nsDisplayBackgroundImage::GetOpaqueRegion(nsDisplayListBuilder* aBuilder, *aSnap = true; - // For policies other than EACH_BOX, don't try to optimize here, since + // For NS_STYLE_BOX_DECORATION_BREAK_SLICE, don't try to optimize here, since // this could easily lead to O(N^2) behavior inside InlineBackgroundData, // which expects frames to be sent to it in content order, not reverse // content order which we'll produce here. // Of course, if there's only one frame in the flow, it doesn't matter. - if (mBackgroundStyle->mBackgroundInlinePolicy == NS_STYLE_BG_INLINE_POLICY_EACH_BOX || + if (mFrame->StyleBorder()->mBoxDecorationBreak == + NS_STYLE_BOX_DECORATION_BREAK_CLONE || (!mFrame->GetPrevContinuation() && !mFrame->GetNextContinuation())) { const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer]; if (layer.mImage.IsOpaque() && layer.mBlendMode == NS_STYLE_BLEND_NORMAL) { diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index 4f65808a84e7..5ae84e997d7e 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -188,7 +188,6 @@ CSS_KEY(border-box, border_box) CSS_KEY(both, both) CSS_KEY(bottom, bottom) CSS_KEY(bottom-outside, bottom_outside) -CSS_KEY(bounding-box, bounding_box) CSS_KEY(break-all, break_all) CSS_KEY(break-word, break_word) CSS_KEY(brightness, brightness) @@ -258,7 +257,6 @@ CSS_KEY(double, double) CSS_KEY(double-struck, double_struck) CSS_KEY(drop-shadow, drop_shadow) CSS_KEY(e-resize, e_resize) -CSS_KEY(each-box, each_box) CSS_KEY(ease, ease) CSS_KEY(ease-in, ease_in) CSS_KEY(ease-in-out, ease_in_out) diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index c8f0fd00592c..b92c078bc735 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -274,10 +274,6 @@ // 'text-shadow' (see above) and 'box-shadow' (which is like the // border properties). -// We include '-moz-background-inline-policy' (css3-background's -// 'background-break') in both as a background property, although this -// is somewhat questionable. - CSS_PROP_DISPLAY( -moz-appearance, appearance, @@ -537,18 +533,6 @@ CSS_PROP_BACKGROUND( nullptr, CSS_PROP_NO_OFFSET, eStyleAnimType_None) -CSS_PROP_BACKGROUND( - -moz-background-inline-policy, - _moz_background_inline_policy, - CSS_PROP_DOMPROP_PREFIXED(BackgroundInlinePolicy), - CSS_PROPERTY_PARSE_VALUE | - CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | - CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, - "", - VARIANT_HK, - kBackgroundInlinePolicyKTable, - CSS_PROP_NO_OFFSET, - eStyleAnimType_None) CSS_PROP_BACKGROUND( background-blend-mode, background_blend_mode, diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 4e0c7a01cc3e..a02f54138c1b 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -676,13 +676,6 @@ const KTableValue nsCSSProps::kBackgroundAttachmentKTable[] = { eCSSKeyword_UNKNOWN,-1 }; -const KTableValue nsCSSProps::kBackgroundInlinePolicyKTable[] = { - eCSSKeyword_each_box, NS_STYLE_BG_INLINE_POLICY_EACH_BOX, - eCSSKeyword_continuous, NS_STYLE_BG_INLINE_POLICY_CONTINUOUS, - eCSSKeyword_bounding_box, NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX, - eCSSKeyword_UNKNOWN,-1 -}; - static_assert(NS_STYLE_BG_CLIP_BORDER == NS_STYLE_BG_ORIGIN_BORDER && NS_STYLE_BG_CLIP_PADDING == NS_STYLE_BG_ORIGIN_PADDING && NS_STYLE_BG_CLIP_CONTENT == NS_STYLE_BG_ORIGIN_CONTENT, diff --git a/layout/style/nsCSSProps.h b/layout/style/nsCSSProps.h index fde719e5dd42..0a6a4e5ec447 100644 --- a/layout/style/nsCSSProps.h +++ b/layout/style/nsCSSProps.h @@ -506,7 +506,6 @@ public: static const KTableValue kBackfaceVisibilityKTable[]; static const KTableValue kTransformStyleKTable[]; static const KTableValue kBackgroundAttachmentKTable[]; - static const KTableValue kBackgroundInlinePolicyKTable[]; static const KTableValue kBackgroundOriginKTable[]; static const KTableValue kBackgroundPositionKTable[]; static const KTableValue kBackgroundRepeatKTable[]; diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index e9a3f31772d4..31d435558434 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -2073,16 +2073,6 @@ nsComputedDOMStyle::DoGetBackgroundImage() return valueList; } -CSSValue* -nsComputedDOMStyle::DoGetBackgroundInlinePolicy() -{ - nsROCSSPrimitiveValue *val = new nsROCSSPrimitiveValue; - val->SetIdent(nsCSSProps::ValueToKeywordEnum( - StyleBackground()->mBackgroundInlinePolicy, - nsCSSProps::kBackgroundInlinePolicyKTable)); - return val; -} - CSSValue* nsComputedDOMStyle::DoGetBackgroundBlendMode() { diff --git a/layout/style/nsComputedDOMStyle.h b/layout/style/nsComputedDOMStyle.h index 45e0b841ae55..48183456dd21 100644 --- a/layout/style/nsComputedDOMStyle.h +++ b/layout/style/nsComputedDOMStyle.h @@ -284,7 +284,6 @@ private: mozilla::dom::CSSValue* DoGetBackgroundPosition(); mozilla::dom::CSSValue* DoGetBackgroundRepeat(); mozilla::dom::CSSValue* DoGetBackgroundClip(); - mozilla::dom::CSSValue* DoGetBackgroundInlinePolicy(); mozilla::dom::CSSValue* DoGetBackgroundBlendMode(); mozilla::dom::CSSValue* DoGetBackgroundOrigin(); mozilla::dom::CSSValue* DoGetBackgroundSize(); diff --git a/layout/style/nsComputedDOMStylePropertyList.h b/layout/style/nsComputedDOMStylePropertyList.h index e83473a4dc8f..c66cc7c692d6 100644 --- a/layout/style/nsComputedDOMStylePropertyList.h +++ b/layout/style/nsComputedDOMStylePropertyList.h @@ -230,7 +230,6 @@ COMPUTED_STYLE_PROP(z_index, ZIndex) \* ******************************* */ COMPUTED_STYLE_PROP(appearance, Appearance) -COMPUTED_STYLE_PROP(_moz_background_inline_policy, BackgroundInlinePolicy) COMPUTED_STYLE_PROP(binding, Binding) COMPUTED_STYLE_PROP(border_bottom_colors, BorderBottomColors) COMPUTED_STYLE_PROP(border_left_colors, BorderLeftColors) diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index e1c56f868460..4c45bcfe5eff 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -6239,14 +6239,6 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, uint8_t(NS_STYLE_BG_CLIP_BORDER), parentBG->mClipCount, bg->mClipCount, maxItemCount, rebuild, canStoreInRuleTree); - // background-inline-policy: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForBackgroundInlinePolicy(), - bg->mBackgroundInlinePolicy, - canStoreInRuleTree, - SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, - parentBG->mBackgroundInlinePolicy, - NS_STYLE_BG_INLINE_POLICY_CONTINUOUS, 0, 0, 0, 0); - // background-blend-mode: enum, inherit, initial [list] SetBackgroundList(aContext, *aRuleData->ValueForBackgroundBlendMode(), bg->mLayers, diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 14d59f4ebb7b..6f5d49392a36 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -1971,7 +1971,6 @@ nsStyleBackground::nsStyleBackground() , mSizeCount(1) , mBlendModeCount(1) , mBackgroundColor(NS_RGBA(0, 0, 0, 0)) - , mBackgroundInlinePolicy(NS_STYLE_BG_INLINE_POLICY_CONTINUOUS) { MOZ_COUNT_CTOR(nsStyleBackground); Layer *onlyLayer = mLayers.AppendElement(); @@ -1990,7 +1989,6 @@ nsStyleBackground::nsStyleBackground(const nsStyleBackground& aSource) , mBlendModeCount(aSource.mBlendModeCount) , mLayers(aSource.mLayers) // deep copy , mBackgroundColor(aSource.mBackgroundColor) - , mBackgroundInlinePolicy(aSource.mBackgroundInlinePolicy) { MOZ_COUNT_CTOR(nsStyleBackground); // If the deep copy of mLayers failed, truncate the counts. @@ -2048,9 +2046,7 @@ nsChangeHint nsStyleBackground::CalcDifference(const nsStyleBackground& aOther) } } - if (hasVisualDifference || - mBackgroundColor != aOther.mBackgroundColor || - mBackgroundInlinePolicy != aOther.mBackgroundInlinePolicy) + if (hasVisualDifference || mBackgroundColor != aOther.mBackgroundColor) return NS_STYLE_HINT_VISUAL; return NS_STYLE_HINT_NONE; diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 05bc1438c39f..5e05bf832829 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -539,11 +539,6 @@ struct nsStyleBackground { nscolor mBackgroundColor; // [reset] - // FIXME: This (now background-break in css3-background) should - // probably move into a different struct so that everything in - // nsStyleBackground is set by the background shorthand. - uint8_t mBackgroundInlinePolicy; // [reset] See nsStyleConsts.h - // True if this background is completely transparent. bool IsTransparent() const; diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index a68273b39056..c82d270103e5 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -648,14 +648,6 @@ var gCSSProperties = { other_values: [ "radio", "menulist" ], invalid_values: [] }, - "-moz-background-inline-policy": { - domProp: "MozBackgroundInlinePolicy", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "continuous" ], - other_values: ["bounding-box", "each-box" ], - invalid_values: [] - }, "-moz-binding": { domProp: "MozBinding", inherited: false, diff --git a/layout/style/test/test_shorthand_property_getters.html b/layout/style/test/test_shorthand_property_getters.html index 355ecb723a7a..5f761c4bd49e 100644 --- a/layout/style/test/test_shorthand_property_getters.html +++ b/layout/style/test/test_shorthand_property_getters.html @@ -139,10 +139,6 @@ isnot(e.style.background, "", "should have background shorthand (size:100% auto) e.setAttribute("style", "background: red; background-size: auto 100%"); isnot(e.style.background, "", "should have background shorthand (size:auto 100%)"); -// Test background-inline-policy not interacting with the background shorthand. -e.setAttribute("style", "background: red; -moz-background-inline-policy: each-box"); -isnot(e.style.background, "", "should have background shorthand (-moz-background-inline-policy not relevant)"); - // Check that we only serialize background when the lists (of layers) for // the subproperties are the same length. e.setAttribute("style", "background-clip: border-box, padding-box, border-box; background-origin: border-box, padding-box, padding-box; background-size: cover, auto, contain; background-color: blue; background-image: url(404.png), none, url(404-2.png); background-attachment: fixed, scroll, scroll; background-position: top left, center, 30px 50px; background-repeat: repeat-x, repeat, no-repeat"); From 3eb5b165fe09cac49faf2ae422e78757f688b05d Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Thu, 17 Apr 2014 12:11:08 +0000 Subject: [PATCH 46/79] Bug 613659 - Reftests for box-decoration-break. r=cam --- layout/reftests/bugs/368020-3-ref.html | 2 +- layout/reftests/bugs/368020-3.html | 2 +- layout/reftests/bugs/368020-5-ref.html | 2 +- layout/reftests/bugs/368020-5.html | 2 +- layout/reftests/bugs/reftest.list | 2 +- .../css-break/box-decoration-break-1-ref.html | 67 +++++++++ .../css-break/box-decoration-break-1.html | 71 ++++++++++ ...ion-break-with-inset-box-shadow-1-ref.html | 132 +++++++++++++++++ ...oration-break-with-inset-box-shadow-1.html | 134 ++++++++++++++++++ ...on-break-with-outset-box-shadow-1-ref.html | 131 +++++++++++++++++ ...ration-break-with-outset-box-shadow-1.html | 133 +++++++++++++++++ .../css-break/green-circle-alpha-32x32.png | Bin 0 -> 396 bytes layout/reftests/css-break/reftest.list | 4 + layout/reftests/reftest.list | 3 + 14 files changed, 680 insertions(+), 5 deletions(-) create mode 100644 layout/reftests/css-break/box-decoration-break-1-ref.html create mode 100644 layout/reftests/css-break/box-decoration-break-1.html create mode 100644 layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1-ref.html create mode 100644 layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1.html create mode 100644 layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1-ref.html create mode 100644 layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1.html create mode 100644 layout/reftests/css-break/green-circle-alpha-32x32.png create mode 100644 layout/reftests/css-break/reftest.list diff --git a/layout/reftests/bugs/368020-3-ref.html b/layout/reftests/bugs/368020-3-ref.html index 13209c61fd02..7a95a6c4d429 100644 --- a/layout/reftests/bugs/368020-3-ref.html +++ b/layout/reftests/bugs/368020-3-ref.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/368020-3.html b/layout/reftests/bugs/368020-3.html index 294a935f34d7..d04165527d86 100644 --- a/layout/reftests/bugs/368020-3.html +++ b/layout/reftests/bugs/368020-3.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/368020-5-ref.html b/layout/reftests/bugs/368020-5-ref.html index f048ae93716a..0cc7180afed4 100644 --- a/layout/reftests/bugs/368020-5-ref.html +++ b/layout/reftests/bugs/368020-5-ref.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/368020-5.html b/layout/reftests/bugs/368020-5.html index f576bbf45e39..013708cad03e 100644 --- a/layout/reftests/bugs/368020-5.html +++ b/layout/reftests/bugs/368020-5.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 9636e733b0f3..be07854f9e36 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -595,7 +595,7 @@ skip-if(B2G) == 367247-l-scroll.html 367247-l-auto.html != 367612-1g.html 367612-1-ref.html skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == 368020-1.html 368020-1-ref.html == 368020-2.html 368020-2-ref.html -fails == 368020-3.html 368020-3-ref.html # bug 368085 +== 368020-3.html 368020-3-ref.html pref(layout.css.box-decoration-break.enabled,true) == 368020-5.html 368020-5-ref.html == 368155-1.xhtml 368155-1-ref.xhtml asserts(4) == 368155-negative-margins-1.html 368155-negative-margins-1-ref.html # bug 387205 / bug 457397 diff --git a/layout/reftests/css-break/box-decoration-break-1-ref.html b/layout/reftests/css-break/box-decoration-break-1-ref.html new file mode 100644 index 000000000000..431c499a1f66 --- /dev/null +++ b/layout/reftests/css-break/box-decoration-break-1-ref.html @@ -0,0 +1,67 @@ + + + + + CSS Test: Testing box-decoration-break:clone + + + + + + + + + + + +
  a  
  b  
  c  
  a  
  b  
  c  
  a  
  b  
  c  
+ +
+ + + + + + +
  a  
  b  
  c  
  a  
  b  
  c  
  a  
  b  
  c  
+ + + diff --git a/layout/reftests/css-break/box-decoration-break-1.html b/layout/reftests/css-break/box-decoration-break-1.html new file mode 100644 index 000000000000..e0326ccc1fa2 --- /dev/null +++ b/layout/reftests/css-break/box-decoration-break-1.html @@ -0,0 +1,71 @@ + + + + + CSS Test: Testing box-decoration-break:clone + + + + + + + + + + + + + +
  a  
  b  
  c  
  a  
  b  
  c  
  a  
  b  
  c  
+ +
+ + + + + + +
  a  
  b  
  c  

  a  
  b  
  c  

  a  
  b  
  c  

+ + + diff --git a/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1-ref.html b/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1-ref.html new file mode 100644 index 000000000000..f372a0f920ed --- /dev/null +++ b/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1-ref.html @@ -0,0 +1,132 @@ + + + + + CSS Test: Testing box-decoration-break:clone with inset box-shadow + + + + + + +
+ +
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+ +
+ + +
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+
+ +
+ + + diff --git a/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1.html b/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1.html new file mode 100644 index 000000000000..97e64700cc9b --- /dev/null +++ b/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1.html @@ -0,0 +1,134 @@ + + + + + CSS Test: Testing box-decoration-break:clone with inset box-shadow + + + + + + + + +
+ +
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+ +
+ + +
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+
+ +
+ + + diff --git a/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1-ref.html b/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1-ref.html new file mode 100644 index 000000000000..938fc391480f --- /dev/null +++ b/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1-ref.html @@ -0,0 +1,131 @@ + + + + + CSS Test: Testing box-decoration-break:clone with outset box-shadow + + + + + + +
+ +
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+ +
+ + +
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+  a  
  b  
  c  
+  a  
  b  
  c  
+  a  
  b  
  c  
+
+
+ +
+ + diff --git a/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1.html b/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1.html new file mode 100644 index 000000000000..417bf76ca434 --- /dev/null +++ b/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1.html @@ -0,0 +1,133 @@ + + + + + CSS Test: Testing box-decoration-break:clone with outset box-shadow + + + + + + + + +
+ +
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+ +
+ + +
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+  a  
  b  
  c  

+  a  
  b  
  c  

+  a  
  b  
  c  

+
+
+ +
+ + diff --git a/layout/reftests/css-break/green-circle-alpha-32x32.png b/layout/reftests/css-break/green-circle-alpha-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..a007675a176123cab7291d684537dde8961ecec7 GIT binary patch literal 396 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$v_d#0*}aI z1_o|n5N2eUHAey{$X?><>&kwIla1GcWoG4q7eFD|%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6^dDE`6I#W5t}@YCsrLd^;SuJV~G+fV4eS);RcoA>LzHtnHS z{Rz{fGqi#h82epO>Di%p@}Jj%pY!>3xc^jZJh$gjS6~cMkc*ODz^13M?q8~u5>Gmh z>@(F}i8)WYZK|6~cyC^d43|FP9`Y_P;?p(epB>kHTjtL^KUW~4__^)Ev}?}$KVQ7A zk@xuc!-bm#PS_qbX18*9ud~3taE^6?@f@)N2mYANsva!s8&W(Sv@{fAg#@^{IYXATM literal 0 HcmV?d00001 diff --git a/layout/reftests/css-break/reftest.list b/layout/reftests/css-break/reftest.list new file mode 100644 index 000000000000..2935df26bb25 --- /dev/null +++ b/layout/reftests/css-break/reftest.list @@ -0,0 +1,4 @@ +pref(layout.css.box-decoration-break.enabled,true) == box-decoration-break-1.html box-decoration-break-1-ref.html + +fuzzy(1,20) pref(layout.css.box-decoration-break.enabled,true) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html +fuzzy(16,460) pref(layout.css.box-decoration-break.enabled,true) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html diff --git a/layout/reftests/reftest.list b/layout/reftests/reftest.list index c461d65d00bb..b540cec8a284 100644 --- a/layout/reftests/reftest.list +++ b/layout/reftests/reftest.list @@ -56,6 +56,9 @@ include css-animations/reftest.list # blending/ include css-blending/reftest.list +# Tests for the css-break spec +include css-break/reftest.list + # css calc() tests include css-calc/reftest.list From ed0dd48a03755048df7a20fc5daf6ba77c332975 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Thu, 17 Apr 2014 12:11:08 +0000 Subject: [PATCH 47/79] Bug 613659 - Change mode-lines and indentation to 2-space indent. r=cam --- layout/style/test/property_database.js | 10292 +++++++++++------------ 1 file changed, 5146 insertions(+), 5146 deletions(-) diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index c82d270103e5..a6ec6a090449 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -1,5 +1,5 @@ -/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* vim: set shiftwidth=4 tabstop=4 autoindent cindent noexpandtab: */ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=2 sw=2 sts=2 et: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -15,1038 +15,1038 @@ const CSS_TYPE_TRUE_SHORTHAND = 1; const CSS_TYPE_SHORTHAND_AND_LONGHAND = 2; // Each property has the following fields: -// domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties -// inherited: Whether the property is inherited by default (stated as -// yes or no in the property header in all CSS specs) -// type: see above -// alias_for: optional, indicates that the property is an alias for -// some other property that is the preferred serialization. (Type -// must not be CSS_TYPE_LONGHAND.) -// get_computed: if present, the property's computed value shows up on -// another property, and this is a function used to get it -// initial_values: Values whose computed value should be the same as the -// computed value for the property's initial value. -// other_values: Values whose computed value should be different from the -// computed value for the property's initial value. -// XXX Should have a third field for values whose computed value may or -// may not be the same as for the property's initial value. -// invalid_values: Things that are not values for the property and -// should be rejected, but which are balanced and should not absorb -// what follows -// quirks_values: Values that should be accepted in quirks mode only, -// mapped to the values they are equivalent to. -// unbalanced_values: Things that are not values for the property and -// should be rejected, and which also contain unbalanced constructs -// that should absorb what follows +// domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties +// inherited: Whether the property is inherited by default (stated as +// yes or no in the property header in all CSS specs) +// type: see above +// alias_for: optional, indicates that the property is an alias for +// some other property that is the preferred serialization. (Type +// must not be CSS_TYPE_LONGHAND.) +// get_computed: if present, the property's computed value shows up on +// another property, and this is a function used to get it +// initial_values: Values whose computed value should be the same as the +// computed value for the property's initial value. +// other_values: Values whose computed value should be different from the +// computed value for the property's initial value. +// XXX Should have a third field for values whose computed value may or +// may not be the same as for the property's initial value. +// invalid_values: Things that are not values for the property and +// should be rejected, but which are balanced and should not absorb +// what follows +// quirks_values: Values that should be accepted in quirks mode only, +// mapped to the values they are equivalent to. +// unbalanced_values: Things that are not values for the property and +// should be rejected, and which also contain unbalanced constructs +// that should absorb what follows // Helper functions used to construct gCSSProperties. function initial_font_family_is_sans_serif() { - // The initial value of 'font-family' might be 'serif' or - // 'sans-serif'. - var div = document.createElement("div"); - div.setAttribute("style", "font: initial"); - return getComputedStyle(div, "").fontFamily == "sans-serif"; + // The initial value of 'font-family' might be 'serif' or + // 'sans-serif'. + var div = document.createElement("div"); + div.setAttribute("style", "font: initial"); + return getComputedStyle(div, "").fontFamily == "sans-serif"; } var gInitialFontFamilyIsSansSerif = initial_font_family_is_sans_serif(); // shared by background-image and border-image-source var validGradientAndElementValues = [ - "-moz-element(#a)", - "-moz-element( #a )", - "-moz-element(#a-1)", - "-moz-element(#a\\:1)", - /* gradient torture test */ - "linear-gradient(red, blue)", - "linear-gradient(red, yellow, blue)", - "linear-gradient(red 1px, yellow 20%, blue 24em, green)", - "linear-gradient(red, yellow, green, blue 50%)", - "linear-gradient(red -50%, yellow -25%, green, blue)", - "linear-gradient(red -99px, yellow, green, blue 120%)", - "linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "-moz-element(#a)", + "-moz-element( #a )", + "-moz-element(#a-1)", + "-moz-element(#a\\:1)", + /* gradient torture test */ + "linear-gradient(red, blue)", + "linear-gradient(red, yellow, blue)", + "linear-gradient(red 1px, yellow 20%, blue 24em, green)", + "linear-gradient(red, yellow, green, blue 50%)", + "linear-gradient(red -50%, yellow -25%, green, blue)", + "linear-gradient(red -99px, yellow, green, blue 120%)", + "linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "linear-gradient(to top, red, blue)", - "linear-gradient(to bottom, red, blue)", - "linear-gradient(to left, red, blue)", - "linear-gradient(to right, red, blue)", - "linear-gradient(to top left, red, blue)", - "linear-gradient(to top right, red, blue)", - "linear-gradient(to bottom left, red, blue)", - "linear-gradient(to bottom right, red, blue)", - "linear-gradient(to left top, red, blue)", - "linear-gradient(to left bottom, red, blue)", - "linear-gradient(to right top, red, blue)", - "linear-gradient(to right bottom, red, blue)", + "linear-gradient(to top, red, blue)", + "linear-gradient(to bottom, red, blue)", + "linear-gradient(to left, red, blue)", + "linear-gradient(to right, red, blue)", + "linear-gradient(to top left, red, blue)", + "linear-gradient(to top right, red, blue)", + "linear-gradient(to bottom left, red, blue)", + "linear-gradient(to bottom right, red, blue)", + "linear-gradient(to left top, red, blue)", + "linear-gradient(to left bottom, red, blue)", + "linear-gradient(to right top, red, blue)", + "linear-gradient(to right bottom, red, blue)", - "linear-gradient(-33deg, red, blue)", - "linear-gradient(30grad, red, blue)", - "linear-gradient(10deg, red, blue)", - "linear-gradient(1turn, red, blue)", - "linear-gradient(.414rad, red, blue)", + "linear-gradient(-33deg, red, blue)", + "linear-gradient(30grad, red, blue)", + "linear-gradient(10deg, red, blue)", + "linear-gradient(1turn, red, blue)", + "linear-gradient(.414rad, red, blue)", - "-moz-linear-gradient(red, blue)", - "-moz-linear-gradient(red, yellow, blue)", - "-moz-linear-gradient(red 1px, yellow 20%, blue 24em, green)", - "-moz-linear-gradient(red, yellow, green, blue 50%)", - "-moz-linear-gradient(red -50%, yellow -25%, green, blue)", - "-moz-linear-gradient(red -99px, yellow, green, blue 120%)", - "-moz-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "-moz-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "-moz-linear-gradient(red, blue)", + "-moz-linear-gradient(red, yellow, blue)", + "-moz-linear-gradient(red 1px, yellow 20%, blue 24em, green)", + "-moz-linear-gradient(red, yellow, green, blue 50%)", + "-moz-linear-gradient(red -50%, yellow -25%, green, blue)", + "-moz-linear-gradient(red -99px, yellow, green, blue 120%)", + "-moz-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "-moz-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "-moz-linear-gradient(to top, red, blue)", - "-moz-linear-gradient(to bottom, red, blue)", - "-moz-linear-gradient(to left, red, blue)", - "-moz-linear-gradient(to right, red, blue)", - "-moz-linear-gradient(to top left, red, blue)", - "-moz-linear-gradient(to top right, red, blue)", - "-moz-linear-gradient(to bottom left, red, blue)", - "-moz-linear-gradient(to bottom right, red, blue)", - "-moz-linear-gradient(to left top, red, blue)", - "-moz-linear-gradient(to left bottom, red, blue)", - "-moz-linear-gradient(to right top, red, blue)", - "-moz-linear-gradient(to right bottom, red, blue)", + "-moz-linear-gradient(to top, red, blue)", + "-moz-linear-gradient(to bottom, red, blue)", + "-moz-linear-gradient(to left, red, blue)", + "-moz-linear-gradient(to right, red, blue)", + "-moz-linear-gradient(to top left, red, blue)", + "-moz-linear-gradient(to top right, red, blue)", + "-moz-linear-gradient(to bottom left, red, blue)", + "-moz-linear-gradient(to bottom right, red, blue)", + "-moz-linear-gradient(to left top, red, blue)", + "-moz-linear-gradient(to left bottom, red, blue)", + "-moz-linear-gradient(to right top, red, blue)", + "-moz-linear-gradient(to right bottom, red, blue)", - "-moz-linear-gradient(top left, red, blue)", - "-moz-linear-gradient(0 0, red, blue)", - "-moz-linear-gradient(20% bottom, red, blue)", - "-moz-linear-gradient(center 20%, red, blue)", - "-moz-linear-gradient(left 35px, red, blue)", - "-moz-linear-gradient(10% 10em, red, blue)", - "-moz-linear-gradient(44px top, red, blue)", + "-moz-linear-gradient(top left, red, blue)", + "-moz-linear-gradient(0 0, red, blue)", + "-moz-linear-gradient(20% bottom, red, blue)", + "-moz-linear-gradient(center 20%, red, blue)", + "-moz-linear-gradient(left 35px, red, blue)", + "-moz-linear-gradient(10% 10em, red, blue)", + "-moz-linear-gradient(44px top, red, blue)", - "-moz-linear-gradient(top left 45deg, red, blue)", - "-moz-linear-gradient(20% bottom -300deg, red, blue)", - "-moz-linear-gradient(center 20% 1.95929rad, red, blue)", - "-moz-linear-gradient(left 35px 30grad, red, blue)", - "-moz-linear-gradient(left 35px 0.1turn, red, blue)", - "-moz-linear-gradient(10% 10em 99999deg, red, blue)", - "-moz-linear-gradient(44px top -33deg, red, blue)", + "-moz-linear-gradient(top left 45deg, red, blue)", + "-moz-linear-gradient(20% bottom -300deg, red, blue)", + "-moz-linear-gradient(center 20% 1.95929rad, red, blue)", + "-moz-linear-gradient(left 35px 30grad, red, blue)", + "-moz-linear-gradient(left 35px 0.1turn, red, blue)", + "-moz-linear-gradient(10% 10em 99999deg, red, blue)", + "-moz-linear-gradient(44px top -33deg, red, blue)", - "-moz-linear-gradient(-33deg, red, blue)", - "-moz-linear-gradient(30grad left 35px, red, blue)", - "-moz-linear-gradient(10deg 20px, red, blue)", - "-moz-linear-gradient(1turn 20px, red, blue)", - "-moz-linear-gradient(.414rad bottom, red, blue)", + "-moz-linear-gradient(-33deg, red, blue)", + "-moz-linear-gradient(30grad left 35px, red, blue)", + "-moz-linear-gradient(10deg 20px, red, blue)", + "-moz-linear-gradient(1turn 20px, red, blue)", + "-moz-linear-gradient(.414rad bottom, red, blue)", - "-moz-linear-gradient(blue calc(0px) ,green calc(25%) ,red calc(40px) ,blue calc(60px) , yellow calc(100px))", - "-moz-linear-gradient(-33deg, blue calc(-25%) ,red 40px)", - "-moz-linear-gradient(10deg, blue calc(100px + -25%),red calc(40px))", - "-moz-linear-gradient(10deg, blue calc(-25px),red calc(100%))", - "-moz-linear-gradient(.414rad, blue calc(100px + -25px) ,green calc(100px + -25px) ,red calc(100px + -25%) ,blue calc(-25px) , yellow calc(-25px))", - "-moz-linear-gradient(1turn, blue calc(-25%) ,green calc(25px) ,red calc(25%),blue calc(0px),white 50px, yellow calc(-25px))", + "-moz-linear-gradient(blue calc(0px) ,green calc(25%) ,red calc(40px) ,blue calc(60px) , yellow calc(100px))", + "-moz-linear-gradient(-33deg, blue calc(-25%) ,red 40px)", + "-moz-linear-gradient(10deg, blue calc(100px + -25%),red calc(40px))", + "-moz-linear-gradient(10deg, blue calc(-25px),red calc(100%))", + "-moz-linear-gradient(.414rad, blue calc(100px + -25px) ,green calc(100px + -25px) ,red calc(100px + -25%) ,blue calc(-25px) , yellow calc(-25px))", + "-moz-linear-gradient(1turn, blue calc(-25%) ,green calc(25px) ,red calc(25%),blue calc(0px),white 50px, yellow calc(-25px))", - "radial-gradient(red, blue)", - "radial-gradient(red, yellow, blue)", - "radial-gradient(red 1px, yellow 20%, blue 24em, green)", - "radial-gradient(red, yellow, green, blue 50%)", - "radial-gradient(red -50%, yellow -25%, green, blue)", - "radial-gradient(red -99px, yellow, green, blue 120%)", - "radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "radial-gradient(red, blue)", + "radial-gradient(red, yellow, blue)", + "radial-gradient(red 1px, yellow 20%, blue 24em, green)", + "radial-gradient(red, yellow, green, blue 50%)", + "radial-gradient(red -50%, yellow -25%, green, blue)", + "radial-gradient(red -99px, yellow, green, blue 120%)", + "radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "radial-gradient(0 0, red, blue)", - "radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "radial-gradient(0 0, red, blue)", + "radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "radial-gradient(at top left, red, blue)", - "radial-gradient(at 20% bottom, red, blue)", - "radial-gradient(at center 20%, red, blue)", - "radial-gradient(at left 35px, red, blue)", - "radial-gradient(at 10% 10em, red, blue)", - "radial-gradient(at 44px top, red, blue)", - "radial-gradient(at 0 0, red, blue)", + "radial-gradient(at top left, red, blue)", + "radial-gradient(at 20% bottom, red, blue)", + "radial-gradient(at center 20%, red, blue)", + "radial-gradient(at left 35px, red, blue)", + "radial-gradient(at 10% 10em, red, blue)", + "radial-gradient(at 44px top, red, blue)", + "radial-gradient(at 0 0, red, blue)", - "radial-gradient(farthest-corner, red, blue)", - "radial-gradient(circle, red, blue)", - "radial-gradient(ellipse closest-corner, red, blue)", - "radial-gradient(closest-corner ellipse, red, blue)", + "radial-gradient(farthest-corner, red, blue)", + "radial-gradient(circle, red, blue)", + "radial-gradient(ellipse closest-corner, red, blue)", + "radial-gradient(closest-corner ellipse, red, blue)", - "radial-gradient(43px, red, blue)", - "radial-gradient(43px 43px, red, blue)", - "radial-gradient(50% 50%, red, blue)", - "radial-gradient(43px 50%, red, blue)", - "radial-gradient(50% 43px, red, blue)", - "radial-gradient(circle 43px, red, blue)", - "radial-gradient(43px circle, red, blue)", - "radial-gradient(ellipse 43px 43px, red, blue)", - "radial-gradient(ellipse 50% 50%, red, blue)", - "radial-gradient(ellipse 43px 50%, red, blue)", - "radial-gradient(ellipse 50% 43px, red, blue)", - "radial-gradient(50% 43px ellipse, red, blue)", + "radial-gradient(43px, red, blue)", + "radial-gradient(43px 43px, red, blue)", + "radial-gradient(50% 50%, red, blue)", + "radial-gradient(43px 50%, red, blue)", + "radial-gradient(50% 43px, red, blue)", + "radial-gradient(circle 43px, red, blue)", + "radial-gradient(43px circle, red, blue)", + "radial-gradient(ellipse 43px 43px, red, blue)", + "radial-gradient(ellipse 50% 50%, red, blue)", + "radial-gradient(ellipse 43px 50%, red, blue)", + "radial-gradient(ellipse 50% 43px, red, blue)", + "radial-gradient(50% 43px ellipse, red, blue)", - "radial-gradient(farthest-corner at top left, red, blue)", - "radial-gradient(ellipse closest-corner at 45px, red, blue)", - "radial-gradient(circle farthest-side at 45px, red, blue)", - "radial-gradient(closest-side ellipse at 50%, red, blue)", - "radial-gradient(farthest-corner circle at 4em, red, blue)", + "radial-gradient(farthest-corner at top left, red, blue)", + "radial-gradient(ellipse closest-corner at 45px, red, blue)", + "radial-gradient(circle farthest-side at 45px, red, blue)", + "radial-gradient(closest-side ellipse at 50%, red, blue)", + "radial-gradient(farthest-corner circle at 4em, red, blue)", - "radial-gradient(30% 40% at top left, red, blue)", - "radial-gradient(50px 60px at 15% 20%, red, blue)", - "radial-gradient(7em 8em at 45px, red, blue)", + "radial-gradient(30% 40% at top left, red, blue)", + "radial-gradient(50px 60px at 15% 20%, red, blue)", + "radial-gradient(7em 8em at 45px, red, blue)", - "-moz-radial-gradient(red, blue)", - "-moz-radial-gradient(red, yellow, blue)", - "-moz-radial-gradient(red 1px, yellow 20%, blue 24em, green)", - "-moz-radial-gradient(red, yellow, green, blue 50%)", - "-moz-radial-gradient(red -50%, yellow -25%, green, blue)", - "-moz-radial-gradient(red -99px, yellow, green, blue 120%)", - "-moz-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "-moz-radial-gradient(red, blue)", + "-moz-radial-gradient(red, yellow, blue)", + "-moz-radial-gradient(red 1px, yellow 20%, blue 24em, green)", + "-moz-radial-gradient(red, yellow, green, blue 50%)", + "-moz-radial-gradient(red -50%, yellow -25%, green, blue)", + "-moz-radial-gradient(red -99px, yellow, green, blue 120%)", + "-moz-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "-moz-radial-gradient(top left, red, blue)", - "-moz-radial-gradient(20% bottom, red, blue)", - "-moz-radial-gradient(center 20%, red, blue)", - "-moz-radial-gradient(left 35px, red, blue)", - "-moz-radial-gradient(10% 10em, red, blue)", - "-moz-radial-gradient(44px top, red, blue)", + "-moz-radial-gradient(top left, red, blue)", + "-moz-radial-gradient(20% bottom, red, blue)", + "-moz-radial-gradient(center 20%, red, blue)", + "-moz-radial-gradient(left 35px, red, blue)", + "-moz-radial-gradient(10% 10em, red, blue)", + "-moz-radial-gradient(44px top, red, blue)", - "-moz-radial-gradient(top left 45deg, red, blue)", - "-moz-radial-gradient(0 0, red, blue)", - "-moz-radial-gradient(20% bottom -300deg, red, blue)", - "-moz-radial-gradient(center 20% 1.95929rad, red, blue)", - "-moz-radial-gradient(left 35px 30grad, red, blue)", - "-moz-radial-gradient(10% 10em 99999deg, red, blue)", - "-moz-radial-gradient(44px top -33deg, red, blue)", - "-moz-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "-moz-radial-gradient(top left 45deg, red, blue)", + "-moz-radial-gradient(0 0, red, blue)", + "-moz-radial-gradient(20% bottom -300deg, red, blue)", + "-moz-radial-gradient(center 20% 1.95929rad, red, blue)", + "-moz-radial-gradient(left 35px 30grad, red, blue)", + "-moz-radial-gradient(10% 10em 99999deg, red, blue)", + "-moz-radial-gradient(44px top -33deg, red, blue)", + "-moz-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "-moz-radial-gradient(-33deg, red, blue)", - "-moz-radial-gradient(30grad left 35px, red, blue)", - "-moz-radial-gradient(10deg 20px, red, blue)", - "-moz-radial-gradient(.414rad bottom, red, blue)", + "-moz-radial-gradient(-33deg, red, blue)", + "-moz-radial-gradient(30grad left 35px, red, blue)", + "-moz-radial-gradient(10deg 20px, red, blue)", + "-moz-radial-gradient(.414rad bottom, red, blue)", - "-moz-radial-gradient(cover, red, blue)", - "-moz-radial-gradient(circle, red, blue)", - "-moz-radial-gradient(ellipse closest-corner, red, blue)", - "-moz-radial-gradient(farthest-side circle, red, blue)", + "-moz-radial-gradient(cover, red, blue)", + "-moz-radial-gradient(circle, red, blue)", + "-moz-radial-gradient(ellipse closest-corner, red, blue)", + "-moz-radial-gradient(farthest-side circle, red, blue)", - "-moz-radial-gradient(top left, cover, red, blue)", - "-moz-radial-gradient(15% 20%, circle, red, blue)", - "-moz-radial-gradient(45px, ellipse closest-corner, red, blue)", - "-moz-radial-gradient(45px, farthest-side circle, red, blue)", + "-moz-radial-gradient(top left, cover, red, blue)", + "-moz-radial-gradient(15% 20%, circle, red, blue)", + "-moz-radial-gradient(45px, ellipse closest-corner, red, blue)", + "-moz-radial-gradient(45px, farthest-side circle, red, blue)", - "-moz-radial-gradient(99deg, cover, red, blue)", - "-moz-radial-gradient(-1.2345rad, circle, red, blue)", - "-moz-radial-gradient(399grad, ellipse closest-corner, red, blue)", - "-moz-radial-gradient(399grad, farthest-side circle, red, blue)", + "-moz-radial-gradient(99deg, cover, red, blue)", + "-moz-radial-gradient(-1.2345rad, circle, red, blue)", + "-moz-radial-gradient(399grad, ellipse closest-corner, red, blue)", + "-moz-radial-gradient(399grad, farthest-side circle, red, blue)", - "-moz-radial-gradient(top left 99deg, cover, red, blue)", - "-moz-radial-gradient(15% 20% -1.2345rad, circle, red, blue)", - "-moz-radial-gradient(45px 399grad, ellipse closest-corner, red, blue)", - "-moz-radial-gradient(45px 399grad, farthest-side circle, red, blue)", + "-moz-radial-gradient(top left 99deg, cover, red, blue)", + "-moz-radial-gradient(15% 20% -1.2345rad, circle, red, blue)", + "-moz-radial-gradient(45px 399grad, ellipse closest-corner, red, blue)", + "-moz-radial-gradient(45px 399grad, farthest-side circle, red, blue)", - "-moz-repeating-linear-gradient(red, blue)", - "-moz-repeating-linear-gradient(red, yellow, blue)", - "-moz-repeating-linear-gradient(red 1px, yellow 20%, blue 24em, green)", - "-moz-repeating-linear-gradient(red, yellow, green, blue 50%)", - "-moz-repeating-linear-gradient(red -50%, yellow -25%, green, blue)", - "-moz-repeating-linear-gradient(red -99px, yellow, green, blue 120%)", - "-moz-repeating-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "-moz-repeating-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "-moz-repeating-linear-gradient(red, blue)", + "-moz-repeating-linear-gradient(red, yellow, blue)", + "-moz-repeating-linear-gradient(red 1px, yellow 20%, blue 24em, green)", + "-moz-repeating-linear-gradient(red, yellow, green, blue 50%)", + "-moz-repeating-linear-gradient(red -50%, yellow -25%, green, blue)", + "-moz-repeating-linear-gradient(red -99px, yellow, green, blue 120%)", + "-moz-repeating-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "-moz-repeating-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "-moz-repeating-linear-gradient(to top, red, blue)", - "-moz-repeating-linear-gradient(to bottom, red, blue)", - "-moz-repeating-linear-gradient(to left, red, blue)", - "-moz-repeating-linear-gradient(to right, red, blue)", - "-moz-repeating-linear-gradient(to top left, red, blue)", - "-moz-repeating-linear-gradient(to top right, red, blue)", - "-moz-repeating-linear-gradient(to bottom left, red, blue)", - "-moz-repeating-linear-gradient(to bottom right, red, blue)", - "-moz-repeating-linear-gradient(to left top, red, blue)", - "-moz-repeating-linear-gradient(to left bottom, red, blue)", - "-moz-repeating-linear-gradient(to right top, red, blue)", - "-moz-repeating-linear-gradient(to right bottom, red, blue)", + "-moz-repeating-linear-gradient(to top, red, blue)", + "-moz-repeating-linear-gradient(to bottom, red, blue)", + "-moz-repeating-linear-gradient(to left, red, blue)", + "-moz-repeating-linear-gradient(to right, red, blue)", + "-moz-repeating-linear-gradient(to top left, red, blue)", + "-moz-repeating-linear-gradient(to top right, red, blue)", + "-moz-repeating-linear-gradient(to bottom left, red, blue)", + "-moz-repeating-linear-gradient(to bottom right, red, blue)", + "-moz-repeating-linear-gradient(to left top, red, blue)", + "-moz-repeating-linear-gradient(to left bottom, red, blue)", + "-moz-repeating-linear-gradient(to right top, red, blue)", + "-moz-repeating-linear-gradient(to right bottom, red, blue)", - "-moz-repeating-linear-gradient(top left, red, blue)", - "-moz-repeating-linear-gradient(0 0, red, blue)", - "-moz-repeating-linear-gradient(20% bottom, red, blue)", - "-moz-repeating-linear-gradient(center 20%, red, blue)", - "-moz-repeating-linear-gradient(left 35px, red, blue)", - "-moz-repeating-linear-gradient(10% 10em, red, blue)", - "-moz-repeating-linear-gradient(44px top, red, blue)", + "-moz-repeating-linear-gradient(top left, red, blue)", + "-moz-repeating-linear-gradient(0 0, red, blue)", + "-moz-repeating-linear-gradient(20% bottom, red, blue)", + "-moz-repeating-linear-gradient(center 20%, red, blue)", + "-moz-repeating-linear-gradient(left 35px, red, blue)", + "-moz-repeating-linear-gradient(10% 10em, red, blue)", + "-moz-repeating-linear-gradient(44px top, red, blue)", - "-moz-repeating-linear-gradient(top left 45deg, red, blue)", - "-moz-repeating-linear-gradient(20% bottom -300deg, red, blue)", - "-moz-repeating-linear-gradient(center 20% 1.95929rad, red, blue)", - "-moz-repeating-linear-gradient(left 35px 30grad, red, blue)", - "-moz-repeating-linear-gradient(10% 10em 99999deg, red, blue)", - "-moz-repeating-linear-gradient(44px top -33deg, red, blue)", + "-moz-repeating-linear-gradient(top left 45deg, red, blue)", + "-moz-repeating-linear-gradient(20% bottom -300deg, red, blue)", + "-moz-repeating-linear-gradient(center 20% 1.95929rad, red, blue)", + "-moz-repeating-linear-gradient(left 35px 30grad, red, blue)", + "-moz-repeating-linear-gradient(10% 10em 99999deg, red, blue)", + "-moz-repeating-linear-gradient(44px top -33deg, red, blue)", - "-moz-repeating-linear-gradient(-33deg, red, blue)", - "-moz-repeating-linear-gradient(30grad left 35px, red, blue)", - "-moz-repeating-linear-gradient(10deg 20px, red, blue)", - "-moz-repeating-linear-gradient(.414rad bottom, red, blue)", + "-moz-repeating-linear-gradient(-33deg, red, blue)", + "-moz-repeating-linear-gradient(30grad left 35px, red, blue)", + "-moz-repeating-linear-gradient(10deg 20px, red, blue)", + "-moz-repeating-linear-gradient(.414rad bottom, red, blue)", - "-moz-repeating-radial-gradient(red, blue)", - "-moz-repeating-radial-gradient(red, yellow, blue)", - "-moz-repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)", - "-moz-repeating-radial-gradient(red, yellow, green, blue 50%)", - "-moz-repeating-radial-gradient(red -50%, yellow -25%, green, blue)", - "-moz-repeating-radial-gradient(red -99px, yellow, green, blue 120%)", - "-moz-repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "-moz-repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "-moz-repeating-radial-gradient(red, blue)", + "-moz-repeating-radial-gradient(red, yellow, blue)", + "-moz-repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)", + "-moz-repeating-radial-gradient(red, yellow, green, blue 50%)", + "-moz-repeating-radial-gradient(red -50%, yellow -25%, green, blue)", + "-moz-repeating-radial-gradient(red -99px, yellow, green, blue 120%)", + "-moz-repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "-moz-repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "repeating-radial-gradient(at top left, red, blue)", - "repeating-radial-gradient(at 0 0, red, blue)", - "repeating-radial-gradient(at 20% bottom, red, blue)", - "repeating-radial-gradient(at center 20%, red, blue)", - "repeating-radial-gradient(at left 35px, red, blue)", - "repeating-radial-gradient(at 10% 10em, red, blue)", - "repeating-radial-gradient(at 44px top, red, blue)", + "repeating-radial-gradient(at top left, red, blue)", + "repeating-radial-gradient(at 0 0, red, blue)", + "repeating-radial-gradient(at 20% bottom, red, blue)", + "repeating-radial-gradient(at center 20%, red, blue)", + "repeating-radial-gradient(at left 35px, red, blue)", + "repeating-radial-gradient(at 10% 10em, red, blue)", + "repeating-radial-gradient(at 44px top, red, blue)", - "-moz-repeating-radial-gradient(farthest-corner, red, blue)", - "-moz-repeating-radial-gradient(circle, red, blue)", - "-moz-repeating-radial-gradient(ellipse closest-corner, red, blue)", + "-moz-repeating-radial-gradient(farthest-corner, red, blue)", + "-moz-repeating-radial-gradient(circle, red, blue)", + "-moz-repeating-radial-gradient(ellipse closest-corner, red, blue)", - "repeating-radial-gradient(farthest-corner at top left, red, blue)", - "repeating-radial-gradient(closest-corner ellipse at 45px, red, blue)", - "repeating-radial-gradient(farthest-side circle at 45px, red, blue)", - "repeating-radial-gradient(ellipse closest-side at 50%, red, blue)", - "repeating-radial-gradient(circle farthest-corner at 4em, red, blue)", + "repeating-radial-gradient(farthest-corner at top left, red, blue)", + "repeating-radial-gradient(closest-corner ellipse at 45px, red, blue)", + "repeating-radial-gradient(farthest-side circle at 45px, red, blue)", + "repeating-radial-gradient(ellipse closest-side at 50%, red, blue)", + "repeating-radial-gradient(circle farthest-corner at 4em, red, blue)", - "repeating-radial-gradient(30% 40% at top left, red, blue)", - "repeating-radial-gradient(50px 60px at 15% 20%, red, blue)", - "repeating-radial-gradient(7em 8em at 45px, red, blue)", + "repeating-radial-gradient(30% 40% at top left, red, blue)", + "repeating-radial-gradient(50px 60px at 15% 20%, red, blue)", + "repeating-radial-gradient(7em 8em at 45px, red, blue)", - "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 2, 10, 10, 2)", - "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10%, 50%, 30%, 0%)", - "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10, 50%, 30%, 0)", + "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 2, 10, 10, 2)", + "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10%, 50%, 30%, 0%)", + "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10, 50%, 30%, 0)", - "-moz-radial-gradient(calc(25%) top, red, blue)", - "-moz-radial-gradient(left calc(25%), red, blue)", - "-moz-radial-gradient(calc(25px) top, red, blue)", - "-moz-radial-gradient(left calc(25px), red, blue)", - "-moz-radial-gradient(calc(-25%) top, red, blue)", - "-moz-radial-gradient(left calc(-25%), red, blue)", - "-moz-radial-gradient(calc(-25px) top, red, blue)", - "-moz-radial-gradient(left calc(-25px), red, blue)", - "-moz-radial-gradient(calc(100px + -25%) top, red, blue)", - "-moz-radial-gradient(left calc(100px + -25%), red, blue)", - "-moz-radial-gradient(calc(100px + -25px) top, red, blue)", - "-moz-radial-gradient(left calc(100px + -25px), red, blue)" + "-moz-radial-gradient(calc(25%) top, red, blue)", + "-moz-radial-gradient(left calc(25%), red, blue)", + "-moz-radial-gradient(calc(25px) top, red, blue)", + "-moz-radial-gradient(left calc(25px), red, blue)", + "-moz-radial-gradient(calc(-25%) top, red, blue)", + "-moz-radial-gradient(left calc(-25%), red, blue)", + "-moz-radial-gradient(calc(-25px) top, red, blue)", + "-moz-radial-gradient(left calc(-25px), red, blue)", + "-moz-radial-gradient(calc(100px + -25%) top, red, blue)", + "-moz-radial-gradient(left calc(100px + -25%), red, blue)", + "-moz-radial-gradient(calc(100px + -25px) top, red, blue)", + "-moz-radial-gradient(left calc(100px + -25px), red, blue)" ]; var invalidGradientAndElementValues = [ - "-moz-element(#a:1)", - "-moz-element(a#a)", - "-moz-element(#a a)", - "-moz-element(#a+a)", - "-moz-element(#a())", - /* no quirks mode colors */ - "linear-gradient(red, ff00ff)", - /* no quirks mode colors */ - "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat", - /* no quirks mode lengths */ - "-moz-linear-gradient(10 10px -45deg, red, blue) repeat", - "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", - "linear-gradient(red -99, yellow, green, blue 120%)", - /* Old syntax */ - "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, from(blue), to(red))", - "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", - "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", - "-moz-linear-gradient(10px, 20px, 30px, 40px, color-stop(0.5, #00ccff))", - "-moz-linear-gradient(20px 20px, from(blue), to(red))", - "-moz-linear-gradient(40px 40px, 10px 10px, from(blue) to(red) color-stop(10%, fuchsia))", - "-moz-linear-gradient(20px 20px 30px, 10px 10px, from(red), to(#ff0000))", - "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", - "-moz-linear-gradient(left left, top top, from(blue))", - "-moz-linear-gradient(inherit, 10px 10px, from(blue))", - /* New syntax */ - "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)", - "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", - "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", - "-moz-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)", - "-moz-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)", - "-moz-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)", - "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", - "-moz-linear-gradient(left left, top top, blue 0)", - "-moz-linear-gradient(inherit, 10px 10px, blue 0)", - "-moz-linear-gradient(left left blue red)", - "-moz-linear-gradient(left left blue, red)", - "-moz-linear-gradient()", - "-moz-linear-gradient(cover, red, blue)", - "-moz-linear-gradient(auto, red, blue)", - "-moz-linear-gradient(22 top, red, blue)", - "-moz-linear-gradient(10% red blue)", - "-moz-linear-gradient(10%, red blue)", - "-moz-linear-gradient(10%,, red, blue)", - "-moz-linear-gradient(45px, center, red, blue)", - "-moz-linear-gradient(45px, center red, blue)", - "-moz-radial-gradient(contain, ellipse, red, blue)", - "-moz-radial-gradient(10deg contain, red, blue)", - "-moz-radial-gradient(10deg, contain,, red, blue)", - "-moz-radial-gradient(contain contain, red, blue)", - "-moz-radial-gradient(ellipse circle, red, blue)", - "-moz-radial-gradient(to top left, red, blue)", - "-moz-radial-gradient(center, 10%, red, blue)", - "-moz-radial-gradient(5rad, 20px, red, blue)", - "-moz-radial-gradient(40%, -100px -10%, red, blue)", + "-moz-element(#a:1)", + "-moz-element(a#a)", + "-moz-element(#a a)", + "-moz-element(#a+a)", + "-moz-element(#a())", + /* no quirks mode colors */ + "linear-gradient(red, ff00ff)", + /* no quirks mode colors */ + "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat", + /* no quirks mode lengths */ + "-moz-linear-gradient(10 10px -45deg, red, blue) repeat", + "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", + "linear-gradient(red -99, yellow, green, blue 120%)", + /* Old syntax */ + "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, from(blue), to(red))", + "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", + "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", + "-moz-linear-gradient(10px, 20px, 30px, 40px, color-stop(0.5, #00ccff))", + "-moz-linear-gradient(20px 20px, from(blue), to(red))", + "-moz-linear-gradient(40px 40px, 10px 10px, from(blue) to(red) color-stop(10%, fuchsia))", + "-moz-linear-gradient(20px 20px 30px, 10px 10px, from(red), to(#ff0000))", + "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", + "-moz-linear-gradient(left left, top top, from(blue))", + "-moz-linear-gradient(inherit, 10px 10px, from(blue))", + /* New syntax */ + "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)", + "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", + "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", + "-moz-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)", + "-moz-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)", + "-moz-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)", + "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", + "-moz-linear-gradient(left left, top top, blue 0)", + "-moz-linear-gradient(inherit, 10px 10px, blue 0)", + "-moz-linear-gradient(left left blue red)", + "-moz-linear-gradient(left left blue, red)", + "-moz-linear-gradient()", + "-moz-linear-gradient(cover, red, blue)", + "-moz-linear-gradient(auto, red, blue)", + "-moz-linear-gradient(22 top, red, blue)", + "-moz-linear-gradient(10% red blue)", + "-moz-linear-gradient(10%, red blue)", + "-moz-linear-gradient(10%,, red, blue)", + "-moz-linear-gradient(45px, center, red, blue)", + "-moz-linear-gradient(45px, center red, blue)", + "-moz-radial-gradient(contain, ellipse, red, blue)", + "-moz-radial-gradient(10deg contain, red, blue)", + "-moz-radial-gradient(10deg, contain,, red, blue)", + "-moz-radial-gradient(contain contain, red, blue)", + "-moz-radial-gradient(ellipse circle, red, blue)", + "-moz-radial-gradient(to top left, red, blue)", + "-moz-radial-gradient(center, 10%, red, blue)", + "-moz-radial-gradient(5rad, 20px, red, blue)", + "-moz-radial-gradient(40%, -100px -10%, red, blue)", - "-moz-radial-gradient(at top left to cover, red, blue)", - "-moz-radial-gradient(at 15% 20% circle, red, blue)", + "-moz-radial-gradient(at top left to cover, red, blue)", + "-moz-radial-gradient(at 15% 20% circle, red, blue)", - "-moz-radial-gradient(to cover, red, blue)", - "-moz-radial-gradient(to contain, red, blue)", - "-moz-radial-gradient(to closest-side circle, red, blue)", - "-moz-radial-gradient(to farthest-corner ellipse, red, blue)", + "-moz-radial-gradient(to cover, red, blue)", + "-moz-radial-gradient(to contain, red, blue)", + "-moz-radial-gradient(to closest-side circle, red, blue)", + "-moz-radial-gradient(to farthest-corner ellipse, red, blue)", - "-moz-radial-gradient(ellipse at 45px closest-corner, red, blue)", - "-moz-radial-gradient(circle at 45px farthest-side, red, blue)", - "-moz-radial-gradient(ellipse 45px, closest-side, red, blue)", - "-moz-radial-gradient(circle 45px, farthest-corner, red, blue)", - "-moz-radial-gradient(ellipse, ellipse closest-side, red, blue)", - "-moz-radial-gradient(circle, circle farthest-corner, red, blue)", + "-moz-radial-gradient(ellipse at 45px closest-corner, red, blue)", + "-moz-radial-gradient(circle at 45px farthest-side, red, blue)", + "-moz-radial-gradient(ellipse 45px, closest-side, red, blue)", + "-moz-radial-gradient(circle 45px, farthest-corner, red, blue)", + "-moz-radial-gradient(ellipse, ellipse closest-side, red, blue)", + "-moz-radial-gradient(circle, circle farthest-corner, red, blue)", - "-moz-radial-gradient(99deg to farthest-corner, red, blue)", - "-moz-radial-gradient(-1.2345rad circle, red, blue)", - "-moz-radial-gradient(ellipse 399grad to closest-corner, red, blue)", - "-moz-radial-gradient(circle 399grad to farthest-side, red, blue)", + "-moz-radial-gradient(99deg to farthest-corner, red, blue)", + "-moz-radial-gradient(-1.2345rad circle, red, blue)", + "-moz-radial-gradient(ellipse 399grad to closest-corner, red, blue)", + "-moz-radial-gradient(circle 399grad to farthest-side, red, blue)", - "-moz-radial-gradient(at top left 99deg, to farthest-corner, red, blue)", - "-moz-radial-gradient(circle at 15% 20% -1.2345rad, red, blue)", - "-moz-radial-gradient(to top left at 30% 40%, red, blue)", - "-moz-radial-gradient(ellipse at 45px 399grad, to closest-corner, red, blue)", - "-moz-radial-gradient(at 45px 399grad to farthest-side circle, red, blue)", + "-moz-radial-gradient(at top left 99deg, to farthest-corner, red, blue)", + "-moz-radial-gradient(circle at 15% 20% -1.2345rad, red, blue)", + "-moz-radial-gradient(to top left at 30% 40%, red, blue)", + "-moz-radial-gradient(ellipse at 45px 399grad, to closest-corner, red, blue)", + "-moz-radial-gradient(at 45px 399grad to farthest-side circle, red, blue)", - "-moz-radial-gradient(to 50%, red, blue)", - "-moz-radial-gradient(circle to 50%, red, blue)", - "-moz-radial-gradient(circle to 43px 43px, red, blue)", - "-moz-radial-gradient(circle to 50% 50%, red, blue)", - "-moz-radial-gradient(circle to 43px 50%, red, blue)", - "-moz-radial-gradient(circle to 50% 43px, red, blue)", - "-moz-radial-gradient(ellipse to 43px, red, blue)", - "-moz-radial-gradient(ellipse to 50%, red, blue)", + "-moz-radial-gradient(to 50%, red, blue)", + "-moz-radial-gradient(circle to 50%, red, blue)", + "-moz-radial-gradient(circle to 43px 43px, red, blue)", + "-moz-radial-gradient(circle to 50% 50%, red, blue)", + "-moz-radial-gradient(circle to 43px 50%, red, blue)", + "-moz-radial-gradient(circle to 50% 43px, red, blue)", + "-moz-radial-gradient(ellipse to 43px, red, blue)", + "-moz-radial-gradient(ellipse to 50%, red, blue)", - "-moz-linear-gradient(to 0 0, red, blue)", - "-moz-linear-gradient(to 20% bottom, red, blue)", - "-moz-linear-gradient(to center 20%, red, blue)", - "-moz-linear-gradient(to left 35px, red, blue)", - "-moz-linear-gradient(to 10% 10em, red, blue)", - "-moz-linear-gradient(to 44px top, red, blue)", - "-moz-linear-gradient(to top left 45deg, red, blue)", - "-moz-linear-gradient(to 20% bottom -300deg, red, blue)", - "-moz-linear-gradient(to center 20% 1.95929rad, red, blue)", - "-moz-linear-gradient(to left 35px 30grad, red, blue)", - "-moz-linear-gradient(to 10% 10em 99999deg, red, blue)", - "-moz-linear-gradient(to 44px top -33deg, red, blue)", - "-moz-linear-gradient(to -33deg, red, blue)", - "-moz-linear-gradient(to 30grad left 35px, red, blue)", - "-moz-linear-gradient(to 10deg 20px, red, blue)", - "-moz-linear-gradient(to .414rad bottom, red, blue)", + "-moz-linear-gradient(to 0 0, red, blue)", + "-moz-linear-gradient(to 20% bottom, red, blue)", + "-moz-linear-gradient(to center 20%, red, blue)", + "-moz-linear-gradient(to left 35px, red, blue)", + "-moz-linear-gradient(to 10% 10em, red, blue)", + "-moz-linear-gradient(to 44px top, red, blue)", + "-moz-linear-gradient(to top left 45deg, red, blue)", + "-moz-linear-gradient(to 20% bottom -300deg, red, blue)", + "-moz-linear-gradient(to center 20% 1.95929rad, red, blue)", + "-moz-linear-gradient(to left 35px 30grad, red, blue)", + "-moz-linear-gradient(to 10% 10em 99999deg, red, blue)", + "-moz-linear-gradient(to 44px top -33deg, red, blue)", + "-moz-linear-gradient(to -33deg, red, blue)", + "-moz-linear-gradient(to 30grad left 35px, red, blue)", + "-moz-linear-gradient(to 10deg 20px, red, blue)", + "-moz-linear-gradient(to .414rad bottom, red, blue)", - "-moz-linear-gradient(to top top, red, blue)", - "-moz-linear-gradient(to bottom bottom, red, blue)", - "-moz-linear-gradient(to left left, red, blue)", - "-moz-linear-gradient(to right right, red, blue)", + "-moz-linear-gradient(to top top, red, blue)", + "-moz-linear-gradient(to bottom bottom, red, blue)", + "-moz-linear-gradient(to left left, red, blue)", + "-moz-linear-gradient(to right right, red, blue)", - "-moz-repeating-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)", - "-moz-repeating-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", - "-moz-repeating-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", - "-moz-repeating-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)", - "-moz-repeating-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)", - "-moz-repeating-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)", - "-moz-repeating-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", - "-moz-repeating-linear-gradient(left left, top top, blue 0)", - "-moz-repeating-linear-gradient(inherit, 10px 10px, blue 0)", - "-moz-repeating-linear-gradient(left left blue red)", - "-moz-repeating-linear-gradient()", + "-moz-repeating-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)", + "-moz-repeating-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", + "-moz-repeating-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", + "-moz-repeating-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)", + "-moz-repeating-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)", + "-moz-repeating-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)", + "-moz-repeating-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", + "-moz-repeating-linear-gradient(left left, top top, blue 0)", + "-moz-repeating-linear-gradient(inherit, 10px 10px, blue 0)", + "-moz-repeating-linear-gradient(left left blue red)", + "-moz-repeating-linear-gradient()", - "-moz-repeating-linear-gradient(to 0 0, red, blue)", - "-moz-repeating-linear-gradient(to 20% bottom, red, blue)", - "-moz-repeating-linear-gradient(to center 20%, red, blue)", - "-moz-repeating-linear-gradient(to left 35px, red, blue)", - "-moz-repeating-linear-gradient(to 10% 10em, red, blue)", - "-moz-repeating-linear-gradient(to 44px top, red, blue)", - "-moz-repeating-linear-gradient(to top left 45deg, red, blue)", - "-moz-repeating-linear-gradient(to 20% bottom -300deg, red, blue)", - "-moz-repeating-linear-gradient(to center 20% 1.95929rad, red, blue)", - "-moz-repeating-linear-gradient(to left 35px 30grad, red, blue)", - "-moz-repeating-linear-gradient(to 10% 10em 99999deg, red, blue)", - "-moz-repeating-linear-gradient(to 44px top -33deg, red, blue)", - "-moz-repeating-linear-gradient(to -33deg, red, blue)", - "-moz-repeating-linear-gradient(to 30grad left 35px, red, blue)", - "-moz-repeating-linear-gradient(to 10deg 20px, red, blue)", - "-moz-repeating-linear-gradient(to .414rad bottom, red, blue)", + "-moz-repeating-linear-gradient(to 0 0, red, blue)", + "-moz-repeating-linear-gradient(to 20% bottom, red, blue)", + "-moz-repeating-linear-gradient(to center 20%, red, blue)", + "-moz-repeating-linear-gradient(to left 35px, red, blue)", + "-moz-repeating-linear-gradient(to 10% 10em, red, blue)", + "-moz-repeating-linear-gradient(to 44px top, red, blue)", + "-moz-repeating-linear-gradient(to top left 45deg, red, blue)", + "-moz-repeating-linear-gradient(to 20% bottom -300deg, red, blue)", + "-moz-repeating-linear-gradient(to center 20% 1.95929rad, red, blue)", + "-moz-repeating-linear-gradient(to left 35px 30grad, red, blue)", + "-moz-repeating-linear-gradient(to 10% 10em 99999deg, red, blue)", + "-moz-repeating-linear-gradient(to 44px top -33deg, red, blue)", + "-moz-repeating-linear-gradient(to -33deg, red, blue)", + "-moz-repeating-linear-gradient(to 30grad left 35px, red, blue)", + "-moz-repeating-linear-gradient(to 10deg 20px, red, blue)", + "-moz-repeating-linear-gradient(to .414rad bottom, red, blue)", - "-moz-repeating-linear-gradient(to top top, red, blue)", - "-moz-repeating-linear-gradient(to bottom bottom, red, blue)", - "-moz-repeating-linear-gradient(to left left, red, blue)", - "-moz-repeating-linear-gradient(to right right, red, blue)", + "-moz-repeating-linear-gradient(to top top, red, blue)", + "-moz-repeating-linear-gradient(to bottom bottom, red, blue)", + "-moz-repeating-linear-gradient(to left left, red, blue)", + "-moz-repeating-linear-gradient(to right right, red, blue)", - "-moz-repeating-radial-gradient(to top left at 30% 40%, red, blue)", - "-moz-repeating-radial-gradient(ellipse at 45px closest-corner, red, blue)", - "-moz-repeating-radial-gradient(circle at 45px farthest-side, red, blue)", + "-moz-repeating-radial-gradient(to top left at 30% 40%, red, blue)", + "-moz-repeating-radial-gradient(ellipse at 45px closest-corner, red, blue)", + "-moz-repeating-radial-gradient(circle at 45px farthest-side, red, blue)", - "radial-gradient(circle 175px 20px, black, white)", - "radial-gradient(175px 20px circle, black, white)", - "radial-gradient(ellipse 175px, black, white)", - "radial-gradient(175px ellipse, black, white)", - "radial-gradient(50%, red, blue)", - "radial-gradient(circle 50%, red, blue)", - "radial-gradient(50% circle, red, blue)", + "radial-gradient(circle 175px 20px, black, white)", + "radial-gradient(175px 20px circle, black, white)", + "radial-gradient(ellipse 175px, black, white)", + "radial-gradient(175px ellipse, black, white)", + "radial-gradient(50%, red, blue)", + "radial-gradient(circle 50%, red, blue)", + "radial-gradient(50% circle, red, blue)", - /* Valid only when prefixed */ - "linear-gradient(top left, red, blue)", - "linear-gradient(0 0, red, blue)", - "linear-gradient(20% bottom, red, blue)", - "linear-gradient(center 20%, red, blue)", - "linear-gradient(left 35px, red, blue)", - "linear-gradient(10% 10em, red, blue)", - "linear-gradient(44px top, red, blue)", + /* Valid only when prefixed */ + "linear-gradient(top left, red, blue)", + "linear-gradient(0 0, red, blue)", + "linear-gradient(20% bottom, red, blue)", + "linear-gradient(center 20%, red, blue)", + "linear-gradient(left 35px, red, blue)", + "linear-gradient(10% 10em, red, blue)", + "linear-gradient(44px top, red, blue)", - "linear-gradient(top left 45deg, red, blue)", - "linear-gradient(20% bottom -300deg, red, blue)", - "linear-gradient(center 20% 1.95929rad, red, blue)", - "linear-gradient(left 35px 30grad, red, blue)", - "linear-gradient(left 35px 0.1turn, red, blue)", - "linear-gradient(10% 10em 99999deg, red, blue)", - "linear-gradient(44px top -33deg, red, blue)", + "linear-gradient(top left 45deg, red, blue)", + "linear-gradient(20% bottom -300deg, red, blue)", + "linear-gradient(center 20% 1.95929rad, red, blue)", + "linear-gradient(left 35px 30grad, red, blue)", + "linear-gradient(left 35px 0.1turn, red, blue)", + "linear-gradient(10% 10em 99999deg, red, blue)", + "linear-gradient(44px top -33deg, red, blue)", - "linear-gradient(30grad left 35px, red, blue)", - "linear-gradient(10deg 20px, red, blue)", - "linear-gradient(1turn 20px, red, blue)", - "linear-gradient(.414rad bottom, red, blue)", + "linear-gradient(30grad left 35px, red, blue)", + "linear-gradient(10deg 20px, red, blue)", + "linear-gradient(1turn 20px, red, blue)", + "linear-gradient(.414rad bottom, red, blue)", - "radial-gradient(top left 45deg, red, blue)", - "radial-gradient(20% bottom -300deg, red, blue)", - "radial-gradient(center 20% 1.95929rad, red, blue)", - "radial-gradient(left 35px 30grad, red, blue)", - "radial-gradient(10% 10em 99999deg, red, blue)", - "radial-gradient(44px top -33deg, red, blue)", + "radial-gradient(top left 45deg, red, blue)", + "radial-gradient(20% bottom -300deg, red, blue)", + "radial-gradient(center 20% 1.95929rad, red, blue)", + "radial-gradient(left 35px 30grad, red, blue)", + "radial-gradient(10% 10em 99999deg, red, blue)", + "radial-gradient(44px top -33deg, red, blue)", - "radial-gradient(-33deg, red, blue)", - "radial-gradient(30grad left 35px, red, blue)", - "radial-gradient(10deg 20px, red, blue)", - "radial-gradient(.414rad bottom, red, blue)", + "radial-gradient(-33deg, red, blue)", + "radial-gradient(30grad left 35px, red, blue)", + "radial-gradient(10deg 20px, red, blue)", + "radial-gradient(.414rad bottom, red, blue)", - "radial-gradient(cover, red, blue)", - "radial-gradient(ellipse contain, red, blue)", - "radial-gradient(cover circle, red, blue)", + "radial-gradient(cover, red, blue)", + "radial-gradient(ellipse contain, red, blue)", + "radial-gradient(cover circle, red, blue)", - "radial-gradient(top left, cover, red, blue)", - "radial-gradient(15% 20%, circle, red, blue)", - "radial-gradient(45px, ellipse closest-corner, red, blue)", - "radial-gradient(45px, farthest-side circle, red, blue)", + "radial-gradient(top left, cover, red, blue)", + "radial-gradient(15% 20%, circle, red, blue)", + "radial-gradient(45px, ellipse closest-corner, red, blue)", + "radial-gradient(45px, farthest-side circle, red, blue)", - "radial-gradient(99deg, cover, red, blue)", - "radial-gradient(-1.2345rad, circle, red, blue)", - "radial-gradient(399grad, ellipse closest-corner, red, blue)", - "radial-gradient(399grad, farthest-side circle, red, blue)", + "radial-gradient(99deg, cover, red, blue)", + "radial-gradient(-1.2345rad, circle, red, blue)", + "radial-gradient(399grad, ellipse closest-corner, red, blue)", + "radial-gradient(399grad, farthest-side circle, red, blue)", - "radial-gradient(top left 99deg, cover, red, blue)", - "radial-gradient(15% 20% -1.2345rad, circle, red, blue)", - "radial-gradient(45px 399grad, ellipse closest-corner, red, blue)", - "radial-gradient(45px 399grad, farthest-side circle, red, blue)", + "radial-gradient(top left 99deg, cover, red, blue)", + "radial-gradient(15% 20% -1.2345rad, circle, red, blue)", + "radial-gradient(45px 399grad, ellipse closest-corner, red, blue)", + "radial-gradient(45px 399grad, farthest-side circle, red, blue)", - /* Valid only when unprefixed */ - "-moz-radial-gradient(at top left, red, blue)", - "-moz-radial-gradient(at 20% bottom, red, blue)", - "-moz-radial-gradient(at center 20%, red, blue)", - "-moz-radial-gradient(at left 35px, red, blue)", - "-moz-radial-gradient(at 10% 10em, red, blue)", - "-moz-radial-gradient(at 44px top, red, blue)", - "-moz-radial-gradient(at 0 0, red, blue)", + /* Valid only when unprefixed */ + "-moz-radial-gradient(at top left, red, blue)", + "-moz-radial-gradient(at 20% bottom, red, blue)", + "-moz-radial-gradient(at center 20%, red, blue)", + "-moz-radial-gradient(at left 35px, red, blue)", + "-moz-radial-gradient(at 10% 10em, red, blue)", + "-moz-radial-gradient(at 44px top, red, blue)", + "-moz-radial-gradient(at 0 0, red, blue)", - "-moz-radial-gradient(circle 43px, red, blue)", - "-moz-radial-gradient(ellipse 43px 43px, red, blue)", - "-moz-radial-gradient(ellipse 50% 50%, red, blue)", - "-moz-radial-gradient(ellipse 43px 50%, red, blue)", - "-moz-radial-gradient(ellipse 50% 43px, red, blue)", + "-moz-radial-gradient(circle 43px, red, blue)", + "-moz-radial-gradient(ellipse 43px 43px, red, blue)", + "-moz-radial-gradient(ellipse 50% 50%, red, blue)", + "-moz-radial-gradient(ellipse 43px 50%, red, blue)", + "-moz-radial-gradient(ellipse 50% 43px, red, blue)", - "-moz-radial-gradient(farthest-corner at top left, red, blue)", - "-moz-radial-gradient(ellipse closest-corner at 45px, red, blue)", - "-moz-radial-gradient(circle farthest-side at 45px, red, blue)", - "-moz-radial-gradient(closest-side ellipse at 50%, red, blue)", - "-moz-radial-gradient(farthest-corner circle at 4em, red, blue)", + "-moz-radial-gradient(farthest-corner at top left, red, blue)", + "-moz-radial-gradient(ellipse closest-corner at 45px, red, blue)", + "-moz-radial-gradient(circle farthest-side at 45px, red, blue)", + "-moz-radial-gradient(closest-side ellipse at 50%, red, blue)", + "-moz-radial-gradient(farthest-corner circle at 4em, red, blue)", - "-moz-radial-gradient(30% 40% at top left, red, blue)", - "-moz-radial-gradient(50px 60px at 15% 20%, red, blue)", - "-moz-radial-gradient(7em 8em at 45px, red, blue)" + "-moz-radial-gradient(30% 40% at top left, red, blue)", + "-moz-radial-gradient(50px 60px at 15% 20%, red, blue)", + "-moz-radial-gradient(7em 8em at 45px, red, blue)" ]; var unbalancedGradientAndElementValues = [ - "-moz-element(#a()", + "-moz-element(#a()", ]; var gCSSProperties = { - "animation": { - domProp: "animation", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ], - initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ], - other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ], - invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial", "2s all,, 1s bounce", "2s all, , 1s bounce" ] - }, - "animation-delay": { - domProp: "animationDelay", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px" ] - }, - "animation-direction": { - domProp: "animationDirection", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ], - invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ] - }, - "animation-duration": { - domProp: "animationDuration", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px", "-1ms", "-2s" ] - }, - "animation-fill-mode": { - domProp: "animationFillMode", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ], - invalid_values: [ "all"] - }, - "animation-iteration-count": { - domProp: "animationIterationCount", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1" ], - other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ], - // negatives forbidden per - // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html - invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ] - }, - "animation-name": { - domProp: "animationName", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ], - invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ] - }, - "animation-play-state": { - domProp: "animationPlayState", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "running" ], - other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ], - invalid_values: [ "0" ] - }, - "animation-timing-function": { - domProp: "animationTimingFunction", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], - other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], - invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] - }, - "-moz-appearance": { - domProp: "MozAppearance", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "radio", "menulist" ], - invalid_values: [] - }, - "-moz-binding": { - domProp: "MozBinding", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(foo.xml)" ], - invalid_values: [] - }, - "-moz-border-bottom-colors": { - domProp: "MozBorderBottomColors", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] - }, - "-moz-border-end": { - domProp: "MozBorderEnd", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 green none" ] - }, - "-moz-border-end-color": { - domProp: "MozBorderEndColor", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ] - }, - "-moz-border-end-style": { - domProp: "MozBorderEndStyle", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "-moz-border-end-width": { - domProp: "MozBorderEndWidth", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - prerequisites: { "-moz-border-end-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%", "5" ] - }, - "border-image": { - domProp: "borderImage", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], - initial_values: [ "none" ], - other_values: [ "url('border.png') 27 27 27 27", - "url('border.png') 27", - "stretch url('border.png')", - "url('border.png') 27 fill", - "url('border.png') 27 27 27 27 repeat", - "repeat url('border.png') 27 27 27 27", - "url('border.png') repeat 27 27 27 27", - "url('border.png') fill 27 27 27 27 repeat", - "url('border.png') 27 27 27 27 / 1em", - "27 27 27 27 / 1em url('border.png') ", - "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat", - "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')", - "url('border.png') 27 27 27 27 / / 10 10 1em", - "fill 27 27 27 27 / / 10 10 1em url('border.png')", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ], - invalid_values: [ "url('border.png') 27 27 27 27 27", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em", - "url('border.png') 27 27 27 27 /", - "url('border.png') fill", - "url('border.png') fill repeat", - "fill repeat", - "url('border.png') fill / 1em", - "url('border.png') / repeat", - "url('border.png') 1 /", - "url('border.png') 1 / /", - "1 / url('border.png')", - "url('border.png') / 1", - "url('border.png') / / 1"] - }, - "border-image-source": { - domProp: "borderImageSource", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "url('border.png')" - ].concat(validGradientAndElementValues), - invalid_values: [ - "url('border.png') url('border.png')", - ].concat(invalidGradientAndElementValues), - unbalanced_values: [ - ].concat(unbalancedGradientAndElementValues) - }, - "border-image-slice": { - domProp: "borderImageSlice", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "100%", "100% 100% 100% 100%" ], - other_values: [ "0%", "10", "10 100% 0 2", "0 0 0 0", "fill 10 10", "10 10 fill" ], - invalid_values: [ "-10%", "-10", "10 10 10 10 10", "10 10 10 10 -10", "10px", "-10px", "fill", "fill fill 10px", "10px fill fill" ] - }, - "border-image-width": { - domProp: "borderImageWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "1 1 1 1" ], - other_values: [ "0", "0%", "0px", "auto auto auto auto", "10 10% auto 15px", "10px 10px 10px 10px", "10", "10 10", "10 10 10" ], - invalid_values: [ "-10", "-10px", "-10%", "10 10 10 10 10", "10 10 10 10 auto", "auto auto auto auto auto" ] - }, - "border-image-outset": { - domProp: "borderImageOutset", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0 0 0 0" ], - other_values: [ "10px", "10", "10 10", "10 10 10", "10 10 10 10", "10px 10 10 10px" ], - invalid_values: [ "-10", "-10px", "-10%", "10%", "10 10 10 10 10" ] - }, - "border-image-repeat": { - domProp: "borderImageRepeat", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch", "stretch stretch" ], - other_values: [ "round", "repeat", "stretch round", "repeat round", "stretch repeat", "round round", "repeat repeat" ], - invalid_values: [ "none", "stretch stretch stretch", "0", "10", "0%", "0px" ] - }, - "-moz-border-left-colors": { - domProp: "MozBorderLeftColors", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] - }, - "border-radius": { - domProp: "borderRadius", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ], - initial_values: [ "0", "0px", "0%", "0px 0 0 0px", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ], - other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular - "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - "2px 2px calc(2px + 1%) 2px", - "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px", - ], - invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ] - }, - "border-bottom-left-radius": { - domProp: "borderBottomLeftRadius", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "border-bottom-right-radius": { - domProp: "borderBottomRightRadius", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "border-top-left-radius": { - domProp: "borderTopLeftRadius", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "border-top-right-radius": { - domProp: "borderTopRightRadius", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "-moz-border-right-colors": { - domProp: "MozBorderRightColors", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] - }, - "-moz-border-start": { - domProp: "MozBorderStart", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 green solid" ] - }, - "-moz-border-start-color": { - domProp: "MozBorderStartColor", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ] - }, - "-moz-border-start-style": { - domProp: "MozBorderStartStyle", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "-moz-border-start-width": { - domProp: "MozBorderStartWidth", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - prerequisites: { "-moz-border-start-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%", "5" ] - }, - "-moz-border-top-colors": { - domProp: "MozBorderTopColors", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] - }, - "-moz-box-align": { - domProp: "MozBoxAlign", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch" ], - other_values: [ "start", "center", "baseline", "end" ], - invalid_values: [] - }, - "-moz-box-direction": { - domProp: "MozBoxDirection", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "reverse" ], - invalid_values: [] - }, - "-moz-box-flex": { - domProp: "MozBoxFlex", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0.0", "-0.0" ], - other_values: [ "1", "100", "0.1" ], - invalid_values: [ "10px", "-1" ] - }, - "-moz-box-ordinal-group": { - domProp: "MozBoxOrdinalGroup", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1" ], - other_values: [ "2", "100", "0" ], - invalid_values: [ "1.0", "-1", "-1000" ] - }, - "-moz-box-orient": { - domProp: "MozBoxOrient", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "horizontal", "inline-axis" ], - other_values: [ "vertical", "block-axis" ], - invalid_values: [] - }, - "-moz-box-pack": { - domProp: "MozBoxPack", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "start" ], - other_values: [ "center", "end", "justify" ], - invalid_values: [] - }, - "box-sizing": { - domProp: "boxSizing", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "content-box" ], - other_values: [ "border-box", "padding-box" ], - invalid_values: [ "margin-box", "content", "padding", "border", "margin" ] - }, - "-moz-box-sizing": { - domProp: "MozBoxSizing", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "box-sizing", - subproperties: [ "box-sizing" ], - initial_values: [ "content-box" ], - other_values: [ "border-box", "padding-box" ], - invalid_values: [ "margin-box", "content", "padding", "border", "margin" ] - }, - "-moz-columns": { - domProp: "MozColumns", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "-moz-column-count", "-moz-column-width" ], - initial_values: [ "auto", "auto auto" ], - other_values: [ "3", "20px", "2 10px", "10px 2", "2 auto", "auto 2", "auto 50px", "50px auto" ], - invalid_values: [ "5%", "-1px", "-1", "3 5", "10px 4px", "10 2px 5in", "30px -1", - "auto 3 5px", "5 auto 20px", "auto auto auto" ] - }, - "-moz-column-count": { - domProp: "MozColumnCount", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "1", "17" ], - // negative and zero invalid per editor's draft - invalid_values: [ "-1", "0", "3px" ] - }, + "animation": { + domProp: "animation", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ], + initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ], + other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ], + invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial", "2s all,, 1s bounce", "2s all, , 1s bounce" ] + }, + "animation-delay": { + domProp: "animationDelay", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px" ] + }, + "animation-direction": { + domProp: "animationDirection", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ], + invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ] + }, + "animation-duration": { + domProp: "animationDuration", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px", "-1ms", "-2s" ] + }, + "animation-fill-mode": { + domProp: "animationFillMode", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ], + invalid_values: [ "all"] + }, + "animation-iteration-count": { + domProp: "animationIterationCount", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1" ], + other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ], + // negatives forbidden per + // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html + invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ] + }, + "animation-name": { + domProp: "animationName", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ], + invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ] + }, + "animation-play-state": { + domProp: "animationPlayState", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "running" ], + other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ], + invalid_values: [ "0" ] + }, + "animation-timing-function": { + domProp: "animationTimingFunction", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], + other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], + invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + }, + "-moz-appearance": { + domProp: "MozAppearance", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "radio", "menulist" ], + invalid_values: [] + }, + "-moz-binding": { + domProp: "MozBinding", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(foo.xml)" ], + invalid_values: [] + }, + "-moz-border-bottom-colors": { + domProp: "MozBorderBottomColors", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], + invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + }, + "-moz-border-end": { + domProp: "MozBorderEnd", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 green none" ] + }, + "-moz-border-end-color": { + domProp: "MozBorderEndColor", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + initial_values: [ "currentColor" ], + other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ] + }, + "-moz-border-end-style": { + domProp: "MozBorderEndStyle", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "-moz-border-end-width": { + domProp: "MozBorderEndWidth", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + prerequisites: { "-moz-border-end-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%", "5" ] + }, + "border-image": { + domProp: "borderImage", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], + initial_values: [ "none" ], + other_values: [ "url('border.png') 27 27 27 27", + "url('border.png') 27", + "stretch url('border.png')", + "url('border.png') 27 fill", + "url('border.png') 27 27 27 27 repeat", + "repeat url('border.png') 27 27 27 27", + "url('border.png') repeat 27 27 27 27", + "url('border.png') fill 27 27 27 27 repeat", + "url('border.png') 27 27 27 27 / 1em", + "27 27 27 27 / 1em url('border.png') ", + "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat", + "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')", + "url('border.png') 27 27 27 27 / / 10 10 1em", + "fill 27 27 27 27 / / 10 10 1em url('border.png')", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ], + invalid_values: [ "url('border.png') 27 27 27 27 27", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em", + "url('border.png') 27 27 27 27 /", + "url('border.png') fill", + "url('border.png') fill repeat", + "fill repeat", + "url('border.png') fill / 1em", + "url('border.png') / repeat", + "url('border.png') 1 /", + "url('border.png') 1 / /", + "1 / url('border.png')", + "url('border.png') / 1", + "url('border.png') / / 1"] + }, + "border-image-source": { + domProp: "borderImageSource", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + "url('border.png')" + ].concat(validGradientAndElementValues), + invalid_values: [ + "url('border.png') url('border.png')", + ].concat(invalidGradientAndElementValues), + unbalanced_values: [ + ].concat(unbalancedGradientAndElementValues) + }, + "border-image-slice": { + domProp: "borderImageSlice", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "100%", "100% 100% 100% 100%" ], + other_values: [ "0%", "10", "10 100% 0 2", "0 0 0 0", "fill 10 10", "10 10 fill" ], + invalid_values: [ "-10%", "-10", "10 10 10 10 10", "10 10 10 10 -10", "10px", "-10px", "fill", "fill fill 10px", "10px fill fill" ] + }, + "border-image-width": { + domProp: "borderImageWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "1 1 1 1" ], + other_values: [ "0", "0%", "0px", "auto auto auto auto", "10 10% auto 15px", "10px 10px 10px 10px", "10", "10 10", "10 10 10" ], + invalid_values: [ "-10", "-10px", "-10%", "10 10 10 10 10", "10 10 10 10 auto", "auto auto auto auto auto" ] + }, + "border-image-outset": { + domProp: "borderImageOutset", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0 0 0 0" ], + other_values: [ "10px", "10", "10 10", "10 10 10", "10 10 10 10", "10px 10 10 10px" ], + invalid_values: [ "-10", "-10px", "-10%", "10%", "10 10 10 10 10" ] + }, + "border-image-repeat": { + domProp: "borderImageRepeat", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "stretch", "stretch stretch" ], + other_values: [ "round", "repeat", "stretch round", "repeat round", "stretch repeat", "round round", "repeat repeat" ], + invalid_values: [ "none", "stretch stretch stretch", "0", "10", "0%", "0px" ] + }, + "-moz-border-left-colors": { + domProp: "MozBorderLeftColors", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], + invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + }, + "border-radius": { + domProp: "borderRadius", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ], + initial_values: [ "0", "0px", "0%", "0px 0 0 0px", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ], + other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular + "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + "2px 2px calc(2px + 1%) 2px", + "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px", + ], + invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ] + }, + "border-bottom-left-radius": { + domProp: "borderBottomLeftRadius", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "border-bottom-right-radius": { + domProp: "borderBottomRightRadius", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "border-top-left-radius": { + domProp: "borderTopLeftRadius", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "border-top-right-radius": { + domProp: "borderTopRightRadius", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "-moz-border-right-colors": { + domProp: "MozBorderRightColors", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], + invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + }, + "-moz-border-start": { + domProp: "MozBorderStart", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 green solid" ] + }, + "-moz-border-start-color": { + domProp: "MozBorderStartColor", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + initial_values: [ "currentColor" ], + other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ] + }, + "-moz-border-start-style": { + domProp: "MozBorderStartStyle", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "-moz-border-start-width": { + domProp: "MozBorderStartWidth", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + prerequisites: { "-moz-border-start-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%", "5" ] + }, + "-moz-border-top-colors": { + domProp: "MozBorderTopColors", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], + invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + }, + "-moz-box-align": { + domProp: "MozBoxAlign", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "stretch" ], + other_values: [ "start", "center", "baseline", "end" ], + invalid_values: [] + }, + "-moz-box-direction": { + domProp: "MozBoxDirection", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "reverse" ], + invalid_values: [] + }, + "-moz-box-flex": { + domProp: "MozBoxFlex", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0.0", "-0.0" ], + other_values: [ "1", "100", "0.1" ], + invalid_values: [ "10px", "-1" ] + }, + "-moz-box-ordinal-group": { + domProp: "MozBoxOrdinalGroup", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1" ], + other_values: [ "2", "100", "0" ], + invalid_values: [ "1.0", "-1", "-1000" ] + }, + "-moz-box-orient": { + domProp: "MozBoxOrient", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "horizontal", "inline-axis" ], + other_values: [ "vertical", "block-axis" ], + invalid_values: [] + }, + "-moz-box-pack": { + domProp: "MozBoxPack", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "start" ], + other_values: [ "center", "end", "justify" ], + invalid_values: [] + }, + "box-sizing": { + domProp: "boxSizing", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "content-box" ], + other_values: [ "border-box", "padding-box" ], + invalid_values: [ "margin-box", "content", "padding", "border", "margin" ] + }, + "-moz-box-sizing": { + domProp: "MozBoxSizing", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "box-sizing", + subproperties: [ "box-sizing" ], + initial_values: [ "content-box" ], + other_values: [ "border-box", "padding-box" ], + invalid_values: [ "margin-box", "content", "padding", "border", "margin" ] + }, + "-moz-columns": { + domProp: "MozColumns", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "-moz-column-count", "-moz-column-width" ], + initial_values: [ "auto", "auto auto" ], + other_values: [ "3", "20px", "2 10px", "10px 2", "2 auto", "auto 2", "auto 50px", "50px auto" ], + invalid_values: [ "5%", "-1px", "-1", "3 5", "10px 4px", "10 2px 5in", "30px -1", + "auto 3 5px", "5 auto 20px", "auto auto auto" ] + }, + "-moz-column-count": { + domProp: "MozColumnCount", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "1", "17" ], + // negative and zero invalid per editor's draft + invalid_values: [ "-1", "0", "3px" ] + }, "-moz-column-fill": { domProp: "MozColumnFill", inherited: false, @@ -1055,3308 +1055,3308 @@ var gCSSProperties = { other_values: [ "auto" ], invalid_values: [ "2px", "dotted", "5em" ] }, - "-moz-column-gap": { - domProp: "MozColumnGap", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal", "1em", "calc(-2em + 3em)" ], - other_values: [ "2px", "4em", - "calc(2px)", - "calc(-2px)", - "calc(0px)", - "calc(0pt)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "3%", "-1px", "4" ] - }, - "-moz-column-rule": { - domProp: "MozColumnRule", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "color": "green" }, - subproperties: [ "-moz-column-rule-width", "-moz-column-rule-style", "-moz-column-rule-color" ], - initial_values: [ "medium none currentColor", "none", "medium", "currentColor" ], - other_values: [ "2px blue solid", "red dotted 1px", "ridge 4px orange", "5px solid" ], - invalid_values: [ "2px 3px 4px red", "dotted dashed", "5px dashed green 3px", "5 solid", "5 green solid" ] - }, - "-moz-column-rule-width": { - domProp: "MozColumnRuleWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "-moz-column-rule-style": "solid" }, - initial_values: [ - "medium", - "3px", - "-moz-calc(3px)", - "-moz-calc(5em + 3px - 5em)", - "calc(3px)", - "calc(5em + 3px - 5em)", - ], - other_values: [ "thin", "15px", - /* valid -moz-calc() values */ - "-moz-calc(-2px)", - "-moz-calc(2px)", - "-moz-calc(3em)", - "-moz-calc(3em + 2px)", - "-moz-calc( 3em + 2px)", - "-moz-calc(3em + 2px )", - "-moz-calc( 3em + 2px )", - "-moz-calc(3*25px)", - "-moz-calc(3 *25px)", - "-moz-calc(3 * 25px)", - "-moz-calc(3* 25px)", - "-moz-calc(25px*3)", - "-moz-calc(25px *3)", - "-moz-calc(25px* 3)", - "-moz-calc(25px * 3)", - "-moz-calc(25px * 3 / 4)", - "-moz-calc((25px * 3) / 4)", - "-moz-calc(25px * (3 / 4))", - "-moz-calc(3 * 25px / 4)", - "-moz-calc((3 * 25px) / 4)", - "-moz-calc(3 * (25px / 4))", - "-moz-calc(3em + 25px * 3 / 4)", - "-moz-calc(3em + (25px * 3) / 4)", - "-moz-calc(3em + 25px * (3 / 4))", - "-moz-calc(25px * 3 / 4 + 3em)", - "-moz-calc((25px * 3) / 4 + 3em)", - "-moz-calc(25px * (3 / 4) + 3em)", - "-moz-calc(3em + (25px * 3 / 4))", - "-moz-calc(3em + ((25px * 3) / 4))", - "-moz-calc(3em + (25px * (3 / 4)))", - "-moz-calc((25px * 3 / 4) + 3em)", - "-moz-calc(((25px * 3) / 4) + 3em)", - "-moz-calc((25px * (3 / 4)) + 3em)", - "-moz-calc(3*25px + 1in)", - "-moz-calc(1in - 3em + 2px)", - "-moz-calc(1in - (3em + 2px))", - "-moz-calc((1in - 3em) + 2px)", - "-moz-calc(50px/2)", - "-moz-calc(50px/(2 - 1))", - "-moz-calc(-3px)", - /* numeric reduction cases */ - "-moz-calc(5 * 3 * 2em)", - "-moz-calc(2em * 5 * 3)", - "-moz-calc((5 * 3) * 2em)", - "-moz-calc(2em * (5 * 3))", - "-moz-calc((5 + 3) * 2em)", - "-moz-calc(2em * (5 + 3))", - "-moz-calc(2em / (5 + 3))", - "-moz-calc(2em * (5*2 + 3))", - "-moz-calc(2em * ((5*2) + 3))", - "-moz-calc(2em * (5*(2 + 3)))", + "-moz-column-gap": { + domProp: "MozColumnGap", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal", "1em", "calc(-2em + 3em)" ], + other_values: [ "2px", "4em", + "calc(2px)", + "calc(-2px)", + "calc(0px)", + "calc(0pt)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "3%", "-1px", "4" ] + }, + "-moz-column-rule": { + domProp: "MozColumnRule", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + prerequisites: { "color": "green" }, + subproperties: [ "-moz-column-rule-width", "-moz-column-rule-style", "-moz-column-rule-color" ], + initial_values: [ "medium none currentColor", "none", "medium", "currentColor" ], + other_values: [ "2px blue solid", "red dotted 1px", "ridge 4px orange", "5px solid" ], + invalid_values: [ "2px 3px 4px red", "dotted dashed", "5px dashed green 3px", "5 solid", "5 green solid" ] + }, + "-moz-column-rule-width": { + domProp: "MozColumnRuleWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "-moz-column-rule-style": "solid" }, + initial_values: [ + "medium", + "3px", + "-moz-calc(3px)", + "-moz-calc(5em + 3px - 5em)", + "calc(3px)", + "calc(5em + 3px - 5em)", + ], + other_values: [ "thin", "15px", + /* valid -moz-calc() values */ + "-moz-calc(-2px)", + "-moz-calc(2px)", + "-moz-calc(3em)", + "-moz-calc(3em + 2px)", + "-moz-calc( 3em + 2px)", + "-moz-calc(3em + 2px )", + "-moz-calc( 3em + 2px )", + "-moz-calc(3*25px)", + "-moz-calc(3 *25px)", + "-moz-calc(3 * 25px)", + "-moz-calc(3* 25px)", + "-moz-calc(25px*3)", + "-moz-calc(25px *3)", + "-moz-calc(25px* 3)", + "-moz-calc(25px * 3)", + "-moz-calc(25px * 3 / 4)", + "-moz-calc((25px * 3) / 4)", + "-moz-calc(25px * (3 / 4))", + "-moz-calc(3 * 25px / 4)", + "-moz-calc((3 * 25px) / 4)", + "-moz-calc(3 * (25px / 4))", + "-moz-calc(3em + 25px * 3 / 4)", + "-moz-calc(3em + (25px * 3) / 4)", + "-moz-calc(3em + 25px * (3 / 4))", + "-moz-calc(25px * 3 / 4 + 3em)", + "-moz-calc((25px * 3) / 4 + 3em)", + "-moz-calc(25px * (3 / 4) + 3em)", + "-moz-calc(3em + (25px * 3 / 4))", + "-moz-calc(3em + ((25px * 3) / 4))", + "-moz-calc(3em + (25px * (3 / 4)))", + "-moz-calc((25px * 3 / 4) + 3em)", + "-moz-calc(((25px * 3) / 4) + 3em)", + "-moz-calc((25px * (3 / 4)) + 3em)", + "-moz-calc(3*25px + 1in)", + "-moz-calc(1in - 3em + 2px)", + "-moz-calc(1in - (3em + 2px))", + "-moz-calc((1in - 3em) + 2px)", + "-moz-calc(50px/2)", + "-moz-calc(50px/(2 - 1))", + "-moz-calc(-3px)", + /* numeric reduction cases */ + "-moz-calc(5 * 3 * 2em)", + "-moz-calc(2em * 5 * 3)", + "-moz-calc((5 * 3) * 2em)", + "-moz-calc(2em * (5 * 3))", + "-moz-calc((5 + 3) * 2em)", + "-moz-calc(2em * (5 + 3))", + "-moz-calc(2em / (5 + 3))", + "-moz-calc(2em * (5*2 + 3))", + "-moz-calc(2em * ((5*2) + 3))", + "-moz-calc(2em * (5*(2 + 3)))", - "-moz-calc((5 + 7) * 3em)", - "-moz-calc((5em + 3em) - 2em)", - "-moz-calc((5em - 3em) + 2em)", - "-moz-calc(2em - (5em - 3em))", - "-moz-calc(2em + (5em - 3em))", - "-moz-calc(2em - (5em + 3em))", - "-moz-calc(2em + (5em + 3em))", - "-moz-calc(2em + 5em - 3em)", - "-moz-calc(2em - 5em - 3em)", - "-moz-calc(2em + 5em + 3em)", - "-moz-calc(2em - 5em + 3em)", + "-moz-calc((5 + 7) * 3em)", + "-moz-calc((5em + 3em) - 2em)", + "-moz-calc((5em - 3em) + 2em)", + "-moz-calc(2em - (5em - 3em))", + "-moz-calc(2em + (5em - 3em))", + "-moz-calc(2em - (5em + 3em))", + "-moz-calc(2em + (5em + 3em))", + "-moz-calc(2em + 5em - 3em)", + "-moz-calc(2em - 5em - 3em)", + "-moz-calc(2em + 5em + 3em)", + "-moz-calc(2em - 5em + 3em)", - "-moz-calc(2em / 4 * 3)", - "-moz-calc(2em * 4 / 3)", - "-moz-calc(2em * 4 * 3)", - "-moz-calc(2em / 4 / 3)", - "-moz-calc(4 * 2em / 3)", - "-moz-calc(4 / 3 * 2em)", + "-moz-calc(2em / 4 * 3)", + "-moz-calc(2em * 4 / 3)", + "-moz-calc(2em * 4 * 3)", + "-moz-calc(2em / 4 / 3)", + "-moz-calc(4 * 2em / 3)", + "-moz-calc(4 / 3 * 2em)", - "-moz-calc((2em / 4) * 3)", - "-moz-calc((2em * 4) / 3)", - "-moz-calc((2em * 4) * 3)", - "-moz-calc((2em / 4) / 3)", - "-moz-calc((4 * 2em) / 3)", - "-moz-calc((4 / 3) * 2em)", + "-moz-calc((2em / 4) * 3)", + "-moz-calc((2em * 4) / 3)", + "-moz-calc((2em * 4) * 3)", + "-moz-calc((2em / 4) / 3)", + "-moz-calc((4 * 2em) / 3)", + "-moz-calc((4 / 3) * 2em)", - "-moz-calc(2em / (4 * 3))", - "-moz-calc(2em * (4 / 3))", - "-moz-calc(2em * (4 * 3))", - "-moz-calc(2em / (4 / 3))", - "-moz-calc(4 * (2em / 3))", + "-moz-calc(2em / (4 * 3))", + "-moz-calc(2em * (4 / 3))", + "-moz-calc(2em * (4 * 3))", + "-moz-calc(2em / (4 / 3))", + "-moz-calc(4 * (2em / 3))", - // Valid cases with unitless zero (which is never - // a length). - "-moz-calc(0 * 2em)", - "-moz-calc(2em * 0)", - "-moz-calc(3em + 0 * 2em)", - "-moz-calc(3em + 2em * 0)", - "-moz-calc((0 + 2) * 2em)", - "-moz-calc((2 + 0) * 2em)", - // And test zero lengths while we're here. - "-moz-calc(2 * 0px)", - "-moz-calc(0 * 0px)", - "-moz-calc(2 * 0em)", - "-moz-calc(0 * 0em)", - "-moz-calc(0px * 0)", - "-moz-calc(0px * 2)", + // Valid cases with unitless zero (which is never + // a length). + "-moz-calc(0 * 2em)", + "-moz-calc(2em * 0)", + "-moz-calc(3em + 0 * 2em)", + "-moz-calc(3em + 2em * 0)", + "-moz-calc((0 + 2) * 2em)", + "-moz-calc((2 + 0) * 2em)", + // And test zero lengths while we're here. + "-moz-calc(2 * 0px)", + "-moz-calc(0 * 0px)", + "-moz-calc(2 * 0em)", + "-moz-calc(0 * 0em)", + "-moz-calc(0px * 0)", + "-moz-calc(0px * 2)", - /* valid calc() values */ - "calc(-2px)", - "calc(2px)", - "calc(3em)", - "calc(3em + 2px)", - "calc( 3em + 2px)", - "calc(3em + 2px )", - "calc( 3em + 2px )", - "calc(3*25px)", - "calc(3 *25px)", - "calc(3 * 25px)", - "calc(3* 25px)", - "calc(25px*3)", - "calc(25px *3)", - "calc(25px* 3)", - "calc(25px * 3)", - "calc(25px * 3 / 4)", - "calc((25px * 3) / 4)", - "calc(25px * (3 / 4))", - "calc(3 * 25px / 4)", - "calc((3 * 25px) / 4)", - "calc(3 * (25px / 4))", - "calc(3em + 25px * 3 / 4)", - "calc(3em + (25px * 3) / 4)", - "calc(3em + 25px * (3 / 4))", - "calc(25px * 3 / 4 + 3em)", - "calc((25px * 3) / 4 + 3em)", - "calc(25px * (3 / 4) + 3em)", - "calc(3em + (25px * 3 / 4))", - "calc(3em + ((25px * 3) / 4))", - "calc(3em + (25px * (3 / 4)))", - "calc((25px * 3 / 4) + 3em)", - "calc(((25px * 3) / 4) + 3em)", - "calc((25px * (3 / 4)) + 3em)", - "calc(3*25px + 1in)", - "calc(1in - 3em + 2px)", - "calc(1in - (3em + 2px))", - "calc((1in - 3em) + 2px)", - "calc(50px/2)", - "calc(50px/(2 - 1))", - "calc(-3px)", - /* numeric reduction cases */ - "calc(5 * 3 * 2em)", - "calc(2em * 5 * 3)", - "calc((5 * 3) * 2em)", - "calc(2em * (5 * 3))", - "calc((5 + 3) * 2em)", - "calc(2em * (5 + 3))", - "calc(2em / (5 + 3))", - "calc(2em * (5*2 + 3))", - "calc(2em * ((5*2) + 3))", - "calc(2em * (5*(2 + 3)))", + /* valid calc() values */ + "calc(-2px)", + "calc(2px)", + "calc(3em)", + "calc(3em + 2px)", + "calc( 3em + 2px)", + "calc(3em + 2px )", + "calc( 3em + 2px )", + "calc(3*25px)", + "calc(3 *25px)", + "calc(3 * 25px)", + "calc(3* 25px)", + "calc(25px*3)", + "calc(25px *3)", + "calc(25px* 3)", + "calc(25px * 3)", + "calc(25px * 3 / 4)", + "calc((25px * 3) / 4)", + "calc(25px * (3 / 4))", + "calc(3 * 25px / 4)", + "calc((3 * 25px) / 4)", + "calc(3 * (25px / 4))", + "calc(3em + 25px * 3 / 4)", + "calc(3em + (25px * 3) / 4)", + "calc(3em + 25px * (3 / 4))", + "calc(25px * 3 / 4 + 3em)", + "calc((25px * 3) / 4 + 3em)", + "calc(25px * (3 / 4) + 3em)", + "calc(3em + (25px * 3 / 4))", + "calc(3em + ((25px * 3) / 4))", + "calc(3em + (25px * (3 / 4)))", + "calc((25px * 3 / 4) + 3em)", + "calc(((25px * 3) / 4) + 3em)", + "calc((25px * (3 / 4)) + 3em)", + "calc(3*25px + 1in)", + "calc(1in - 3em + 2px)", + "calc(1in - (3em + 2px))", + "calc((1in - 3em) + 2px)", + "calc(50px/2)", + "calc(50px/(2 - 1))", + "calc(-3px)", + /* numeric reduction cases */ + "calc(5 * 3 * 2em)", + "calc(2em * 5 * 3)", + "calc((5 * 3) * 2em)", + "calc(2em * (5 * 3))", + "calc((5 + 3) * 2em)", + "calc(2em * (5 + 3))", + "calc(2em / (5 + 3))", + "calc(2em * (5*2 + 3))", + "calc(2em * ((5*2) + 3))", + "calc(2em * (5*(2 + 3)))", - "calc((5 + 7) * 3em)", - "calc((5em + 3em) - 2em)", - "calc((5em - 3em) + 2em)", - "calc(2em - (5em - 3em))", - "calc(2em + (5em - 3em))", - "calc(2em - (5em + 3em))", - "calc(2em + (5em + 3em))", - "calc(2em + 5em - 3em)", - "calc(2em - 5em - 3em)", - "calc(2em + 5em + 3em)", - "calc(2em - 5em + 3em)", + "calc((5 + 7) * 3em)", + "calc((5em + 3em) - 2em)", + "calc((5em - 3em) + 2em)", + "calc(2em - (5em - 3em))", + "calc(2em + (5em - 3em))", + "calc(2em - (5em + 3em))", + "calc(2em + (5em + 3em))", + "calc(2em + 5em - 3em)", + "calc(2em - 5em - 3em)", + "calc(2em + 5em + 3em)", + "calc(2em - 5em + 3em)", - "calc(2em / 4 * 3)", - "calc(2em * 4 / 3)", - "calc(2em * 4 * 3)", - "calc(2em / 4 / 3)", - "calc(4 * 2em / 3)", - "calc(4 / 3 * 2em)", + "calc(2em / 4 * 3)", + "calc(2em * 4 / 3)", + "calc(2em * 4 * 3)", + "calc(2em / 4 / 3)", + "calc(4 * 2em / 3)", + "calc(4 / 3 * 2em)", - "calc((2em / 4) * 3)", - "calc((2em * 4) / 3)", - "calc((2em * 4) * 3)", - "calc((2em / 4) / 3)", - "calc((4 * 2em) / 3)", - "calc((4 / 3) * 2em)", + "calc((2em / 4) * 3)", + "calc((2em * 4) / 3)", + "calc((2em * 4) * 3)", + "calc((2em / 4) / 3)", + "calc((4 * 2em) / 3)", + "calc((4 / 3) * 2em)", - "calc(2em / (4 * 3))", - "calc(2em * (4 / 3))", - "calc(2em * (4 * 3))", - "calc(2em / (4 / 3))", - "calc(4 * (2em / 3))", + "calc(2em / (4 * 3))", + "calc(2em * (4 / 3))", + "calc(2em * (4 * 3))", + "calc(2em / (4 / 3))", + "calc(4 * (2em / 3))", - // Valid cases with unitless zero (which is never - // a length). - "calc(0 * 2em)", - "calc(2em * 0)", - "calc(3em + 0 * 2em)", - "calc(3em + 2em * 0)", - "calc((0 + 2) * 2em)", - "calc((2 + 0) * 2em)", - // And test zero lengths while we're here. - "calc(2 * 0px)", - "calc(0 * 0px)", - "calc(2 * 0em)", - "calc(0 * 0em)", - "calc(0px * 0)", - "calc(0px * 2)", + // Valid cases with unitless zero (which is never + // a length). + "calc(0 * 2em)", + "calc(2em * 0)", + "calc(3em + 0 * 2em)", + "calc(3em + 2em * 0)", + "calc((0 + 2) * 2em)", + "calc((2 + 0) * 2em)", + // And test zero lengths while we're here. + "calc(2 * 0px)", + "calc(0 * 0px)", + "calc(2 * 0em)", + "calc(0 * 0em)", + "calc(0px * 0)", + "calc(0px * 2)", - ], - invalid_values: [ "20", "-1px", "red", "50%", - /* invalid -moz-calc() values */ - "-moz-calc(2em+ 2px)", - "-moz-calc(2em +2px)", - "-moz-calc(2em+2px)", - "-moz-calc(2em- 2px)", - "-moz-calc(2em -2px)", - "-moz-calc(2em-2px)", - /* invalid calc() values */ - "calc(2em+ 2px)", - "calc(2em +2px)", - "calc(2em+2px)", - "calc(2em- 2px)", - "calc(2em -2px)", - "calc(2em-2px)", - "-moz-min()", - "calc(min())", - "-moz-max()", - "calc(max())", - "-moz-min(5px)", - "calc(min(5px))", - "-moz-max(5px)", - "calc(max(5px))", - "-moz-min(5px,2em)", - "calc(min(5px,2em))", - "-moz-max(5px,2em)", - "calc(max(5px,2em))", - "calc(50px/(2 - 2))", - "calc(5 + 5)", - "calc(5 * 5)", - "calc(5em * 5em)", - "calc(5em / 5em * 5em)", + ], + invalid_values: [ "20", "-1px", "red", "50%", + /* invalid -moz-calc() values */ + "-moz-calc(2em+ 2px)", + "-moz-calc(2em +2px)", + "-moz-calc(2em+2px)", + "-moz-calc(2em- 2px)", + "-moz-calc(2em -2px)", + "-moz-calc(2em-2px)", + /* invalid calc() values */ + "calc(2em+ 2px)", + "calc(2em +2px)", + "calc(2em+2px)", + "calc(2em- 2px)", + "calc(2em -2px)", + "calc(2em-2px)", + "-moz-min()", + "calc(min())", + "-moz-max()", + "calc(max())", + "-moz-min(5px)", + "calc(min(5px))", + "-moz-max(5px)", + "calc(max(5px))", + "-moz-min(5px,2em)", + "calc(min(5px,2em))", + "-moz-max(5px,2em)", + "calc(max(5px,2em))", + "calc(50px/(2 - 2))", + "calc(5 + 5)", + "calc(5 * 5)", + "calc(5em * 5em)", + "calc(5em / 5em * 5em)", - "calc(4 * 3 / 2em)", - "calc((4 * 3) / 2em)", - "calc(4 * (3 / 2em))", - "calc(4 / (3 * 2em))", + "calc(4 * 3 / 2em)", + "calc((4 * 3) / 2em)", + "calc(4 * (3 / 2em))", + "calc(4 / (3 * 2em))", - // Tests for handling of unitless zero, which cannot - // be a length inside calc(). - "calc(0)", - "calc(0 + 2em)", - "calc(2em + 0)", - "calc(0 * 2)", - "calc(2 * 0)", - "calc(1 * (2em + 0))", - "calc((2em + 0))", - "calc((2em + 0) * 1)", - "calc(1 * (0 + 2em))", - "calc((0 + 2em))", - "calc((0 + 2em) * 1)", - ] - }, - "-moz-column-rule-style": { - domProp: "MozColumnRuleStyle", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "solid", "hidden", "ridge", "groove", "inset", "outset", "double", "dotted", "dashed" ], - invalid_values: [ "20", "foo" ] - }, - "-moz-column-rule-color": { - domProp: "MozColumnRuleColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "green" }, - initial_values: [ "currentColor", "-moz-use-text-color" ], - other_values: [ "red", "blue", "#ffff00" ], - invalid_values: [ "ffff00" ] - }, - "-moz-column-width": { - domProp: "MozColumnWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ - "15px", - "calc(15px)", - "calc(30px - 3em)", - "calc(-15px)", - "0px", - "calc(0px)" - ], - invalid_values: [ "20", "-1px", "50%" ] - }, - "-moz-float-edge": { - domProp: "MozFloatEdge", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "content-box" ], - other_values: [ "margin-box" ], - invalid_values: [ "content", "padding", "border", "margin" ] - }, - "-moz-force-broken-image-icon": { - domProp: "MozForceBrokenImageIcon", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0" ], - other_values: [ "1" ], - invalid_values: [] - }, - "-moz-image-region": { - domProp: "MozImageRegion", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "rect(3px 20px 15px 4px)", "rect(17px, 21px, 33px, 2px)" ], - invalid_values: [ "rect(17px, 21px, 33, 2px)" ] - }, - "-moz-margin-end": { - domProp: "MozMarginEnd", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* no subproperties */ - /* auto may or may not be initial */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "3em", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "-moz-margin-start": { - domProp: "MozMarginStart", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* no subproperties */ - /* auto may or may not be initial */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "3em", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "-moz-outline-radius": { - domProp: "MozOutlineRadius", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - subproperties: [ "-moz-outline-radius-bottomleft", "-moz-outline-radius-bottomright", "-moz-outline-radius-topleft", "-moz-outline-radius-topright" ], - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ], - other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular - "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - "2px 2px calc(2px + 1%) 2px", - "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px", - ], - invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ] - }, - "-moz-outline-radius-bottomleft": { - domProp: "MozOutlineRadiusBottomleft", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "-moz-outline-radius-bottomright": { - domProp: "MozOutlineRadiusBottomright", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "-moz-outline-radius-topleft": { - domProp: "MozOutlineRadiusTopleft", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "-moz-outline-radius-topright": { - domProp: "MozOutlineRadiusTopright", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "-moz-padding-end": { - domProp: "MozPaddingEnd", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* no subproperties */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "3em", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "-moz-padding-start": { - domProp: "MozPaddingStart", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* no subproperties */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "3em", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "resize": { - domProp: "resize", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block", "overflow": "auto" }, - initial_values: [ "none" ], - other_values: [ "both", "horizontal", "vertical" ], - invalid_values: [] - }, - "-moz-stack-sizing": { - domProp: "MozStackSizing", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch-to-fit" ], - other_values: [ "ignore" ], - invalid_values: [] - }, - "-moz-tab-size": { - domProp: "MozTabSize", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "8" ], - other_values: [ "0", "3", "99", "12000" ], - invalid_values: [ "-1", "-808", "3.0", "17.5" ] - }, - "-moz-text-size-adjust": { - domProp: "MozTextSizeAdjust", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none" ], - invalid_values: [ "-5%", "0", "100", "0%", "50%", "100%", "220.3%" ] - }, - "transform": { - domProp: "transform", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "300px", "height": "50px" }, - initial_values: [ "none" ], - other_values: [ "translatex(1px)", "translatex(4em)", - "translatex(-4px)", "translatex(3px)", - "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", - "translatey(4em)", "translate(3px)", "translate(10px, -3px)", - "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", - "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", - "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", - "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", - "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", - "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", - "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", - "translatex(50%)", "translatey(50%)", "translate(50%)", - "translate(3%, 5px)", "translate(5px, 3%)", - "matrix(1, 2, 3, 4, 5, 6)", - /* valid calc() values */ - "translatex(calc(5px + 10%))", - "translatey(calc(0.25 * 5px + 10% / 3))", - "translate(calc(5px - 10% * 3))", - "translate(calc(5px - 3 * 10%), 50px)", - "translate(-50px, calc(5px - 10% * 3))", - "translatez(1px)", "translatez(4em)", "translatez(-4px)", - "translatez(0px)", "translatez(2px) translatez(5px)", - "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", - "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", - "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", - "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", - "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", - "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", - ], - invalid_values: ["1px", "#0000ff", "red", "auto", - "translatex(1)", "translatey(1)", "translate(2)", - "translate(-3, -4)", - "translatex(1px 1px)", "translatex(translatex(1px))", - "translatex(#0000ff)", "translatex(red)", "translatey()", - "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", - "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", - "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", - "matrix(0, 1, 2, 3%, 4%, 5%)", "matrix(1, 2, 3, 4, 5px, 6%)", - "matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)", - "matrix(1, 2, 3, 4, 5px, 6em)", - /* invalid calc() values */ - "translatey(-moz-min(5px,10%))", - "translatex(-moz-max(5px,10%))", - "translate(10px, calc(min(5px,10%)))", - "translate(calc(max(5px,10%)), 10%)", - "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))", - "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", - "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)" - ], - }, - "transform-origin": { - domProp: "transformOrigin", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* no subproperties */ - prerequisites: { "width": "10px", "height": "10px", "display": "block"}, - initial_values: [ "50% 50%", "center", "center center" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", - "top", "bottom","top left", "top right", - "top center", "center left", "center right", - "bottom left", "bottom right", "bottom center", - "20% center", "6px center", "13in bottom", - "left 50px", "right 13%", "center 40px", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)", - "6px 5px 5px", - "top center 10px" - ], - invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff", - "border", "center red", "right diagonal", - "#00ffff bottom"] - }, - "perspective-origin": { - domProp: "perspectiveOrigin", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* no subproperties */ - prerequisites: { "width": "10px", "height": "10px", "display": "block"}, - initial_values: [ "50% 50%", "center", "center center" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", - "top", "bottom","top left", "top right", - "top center", "center left", "center right", - "bottom left", "bottom right", "bottom center", - "20% center", "6px center", "13in bottom", - "left 50px", "right 13%", "center 40px", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)" ], - invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff", - "border", "center red", "right diagonal", - "#00ffff bottom"] - }, - "perspective": { - domProp: "perspective", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "1000px", "500.2px" ], - invalid_values: [ "pants", "200", "0", "-100px", "-27.2em", "0px" ] - }, - "backface-visibility": { - domProp: "backfaceVisibility", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "visible" ], - other_values: [ "hidden" ], - invalid_values: [ "collapse" ] - }, - "transform-style": { - domProp: "transformStyle", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "flat" ], - other_values: [ "preserve-3d" ], - invalid_values: [] - }, - "-moz-user-focus": { - domProp: "MozUserFocus", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "normal", "ignore", "select-all", "select-before", "select-after", "select-same", "select-menu" ], - invalid_values: [] - }, - "-moz-user-input": { - domProp: "MozUserInput", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none", "enabled", "disabled" ], - invalid_values: [] - }, - "-moz-user-modify": { - domProp: "MozUserModify", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "read-only" ], - other_values: [ "read-write", "write-only" ], - invalid_values: [] - }, - "-moz-user-select": { - domProp: "MozUserSelect", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none", "text", "element", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ], - invalid_values: [] - }, - "-moz-window-shadow": { - domProp: "MozWindowShadow", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "default" ], - other_values: [ "none", "menu", "tooltip", "sheet" ], - invalid_values: [] - }, - "background": { - domProp: "background", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "background-attachment", "background-color", "background-image", "background-position", "background-repeat", "background-clip", "background-origin", "background-size" ], - initial_values: [ "transparent", "none", "repeat", "scroll", "0% 0%", "top left", "left top", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto", - "transparent none", "top left none", "left top none", "none left top", "none top left", "none 0% 0%", "left top / auto none", "left top / auto auto none", - "transparent none repeat scroll top left", "left top repeat none scroll transparent", "transparent none repeat scroll top left / auto", "left top / auto repeat none scroll transparent", "none repeat scroll 0% 0% / auto auto transparent" ], - other_values: [ - /* without multiple backgrounds */ - "green", - "none green repeat scroll left top", - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", - "repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') transparent left top scroll", - "repeat-x", - "repeat-y", - "no-repeat", - "none repeat-y transparent scroll 0% 0%", - "fixed", - "0% top transparent fixed repeat none", - "top", - "left", - "50% 50%", - "center", - "top / 100px", - "left / contain", - "left / cover", - "10px / 10%", - "10em / calc(20px)", - "top left / 100px 100px", - "top left / 100px auto", - "top left / 100px 10%", - "top left / 100px calc(20px)", - "bottom right scroll none transparent repeat", - "50% transparent", - "transparent 50%", - "50%", - "-moz-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat", - "-moz-linear-gradient(10px 10px -45deg, red, blue) repeat", - "-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat", - "-moz-repeating-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat", - "-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat", - "-moz-element(#test) lime", - /* multiple backgrounds */ - "url(404.png), url(404.png)", - "url(404.png), url(404.png) transparent", - "url(404.png), url(404.png) red", - "repeat-x, fixed, none", - "0% top url(404.png), url(404.png) 0% top", - "fixed repeat-y top left url(404.png), repeat-x green", - "url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) black", - "top left / contain, bottom right / cover", - /* test cases with clip+origin in the shorthand */ - "url(404.png) green padding-box", - "url(404.png) border-box transparent", - "content-box url(404.png) blue", - "url(404.png) green padding-box padding-box", - "url(404.png) green padding-box border-box", - "content-box border-box url(404.png) blue", - ], - invalid_values: [ - /* mixes with keywords have to be in correct order */ - "50% left", "top 50%", - /* no quirks mode colors */ - "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat", - /* no quirks mode lengths */ - "-moz-linear-gradient(10 10px -45deg, red, blue) repeat", - "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", - "linear-gradient(red -99, yellow, green, blue 120%)", - /* bug 258080: don't accept background-position separated */ - "left url(404.png) top", "top url(404.png) left", - /* not allowed to have color in non-bottom layer */ - "url(404.png) transparent, url(404.png)", - "url(404.png) red, url(404.png)", - "url(404.png) transparent, url(404.png) transparent", - "url(404.png) transparent red, url(404.png) transparent red", - "url(404.png) red, url(404.png) red", - "url(404.png) rgba(0, 0, 0, 0), url(404.png)", - "url(404.png) rgb(255, 0, 0), url(404.png)", - "url(404.png) rgba(0, 0, 0, 0), url(404.png) rgba(0, 0, 0, 0)", - "url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0), url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0)", - "url(404.png) rgb(255, 0, 0), url(404.png) rgb(255, 0, 0)", - /* bug 513395: old syntax for gradients */ - "-moz-radial-gradient(10% bottom, 30px, 20px 20px, 10px, from(#ffffff), to(black)) scroll no-repeat", - "-moz-linear-gradient(10px 10px, 20px 20px, from(red), to(blue)) repeat", - /* clip and origin separated in the shorthand */ - "url(404.png) padding-box green border-box", - "url(404.png) padding-box green padding-box", - "transparent padding-box url(404.png) border-box", - "transparent padding-box url(404.png) padding-box", - ] - }, - "background-attachment": { - domProp: "backgroundAttachment", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "scroll" ], - other_values: [ "fixed", "local", "scroll,scroll", "fixed, scroll", "scroll, fixed, local, scroll", "fixed, fixed" ], - invalid_values: [] - }, - "background-clip": { - /* - * When we rename this to 'background-clip', we also - * need to rename the values to match the spec. - */ - domProp: "backgroundClip", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "border-box" ], - other_values: [ "content-box", "padding-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], - invalid_values: [ "margin-box", "border-box border-box" ] - }, - "background-color": { - domProp: "backgroundColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "transparent", "rgba(255, 127, 15, 0)", "hsla(240, 97%, 50%, 0.0)", "rgba(0, 0, 0, 0)", "rgba(255,255,255,-3.7)" ], - other_values: [ "green", "rgb(255, 0, 128)", "#fc2", "#96ed2a", "black", "rgba(255,255,0,3)", "hsl(240, 50%, 50%)", "rgb(50%, 50%, 50%)", "-moz-default-background-color" ], - invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "rgb(100, 100.0, 100)" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "background-image": { - domProp: "backgroundImage", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - "none, none", - "none, none, none, none, none", - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", - "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", - ].concat(validGradientAndElementValues), - invalid_values: [ - ].concat(invalidGradientAndElementValues), - unbalanced_values: [ - ].concat(unbalancedGradientAndElementValues) - }, - "background-origin": { - domProp: "backgroundOrigin", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "padding-box" ], - other_values: [ "border-box", "content-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], - invalid_values: [ "margin-box", "padding-box padding-box" ] - }, - "background-position": { - domProp: "backgroundPosition", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "top 0% left 0%", "top 0% left", "top left", "left top", "0% 0%", "0% top", "left 0%" ], - other_values: [ "top", "left", "right", "bottom", "center", "center bottom", "bottom center", "center right", "right center", "center top", "top center", "center left", "left center", "right bottom", "bottom right", "50%", "top left, top left", "top left, top right", "top right, top left", "left top, 0% 0%", "10% 20%, 30%, 40%", "top left, bottom right", "right bottom, left top", "0%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)", - "0px 0px", - "right 20px top 60px", - "right 20px bottom 60px", - "left 20px top 60px", - "left 20px bottom 60px", - "right -50px top -50px", - "left -50px bottom -50px", - "right 20px top -50px", - "right -20px top 50px", - "right 3em bottom 10px", - "bottom 3em right 10px", - "top 3em right 10px", - "left 15px", - "10px top", - "left top 15px", - "left 10px top", - "left 20%", - "right 20%" - ], - invalid_values: [ "center 10px center 4px", "center 10px center", - "top 20%", "bottom 20%", "50% left", "top 50%", - "50% bottom 10%", "right 10% 50%", "left right", - "top bottom", "left 10% right", - "top 20px bottom 20px", "left left", "20 20" ] - }, - "background-repeat": { - domProp: "backgroundRepeat", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "repeat", "repeat repeat" ], - other_values: [ "repeat-x", "repeat-y", "no-repeat", - "repeat-x, repeat-x", - "repeat, no-repeat", - "repeat-y, no-repeat, repeat-y", - "repeat, repeat, repeat", - "repeat no-repeat", - "no-repeat repeat", - "no-repeat no-repeat", - "repeat repeat, repeat repeat", - ], - invalid_values: [ "repeat repeat repeat", - "repeat-x repeat-y", - "repeat repeat-x", - "repeat repeat-y", - "repeat-x repeat", - "repeat-y repeat" ] - }, - "background-size": { - domProp: "backgroundSize", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto", "auto auto" ], - other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)" - ], - invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3" ] - }, - "border": { - domProp: "border", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-right-color", "border-right-style", "border-right-width", "border-top-color", "border-top-style", "border-top-width", "-moz-border-top-colors", "-moz-border-right-colors", "-moz-border-bottom-colors", "-moz-border-left-colors", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor", "calc(4px - 1px) none" ], - other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid", "calc(2px) solid blue" ], - invalid_values: [ "5%", "medium solid ff00ff", "5 solid green" ] - }, - "border-bottom": { - domProp: "borderBottom", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] - }, - "border-bottom-color": { - domProp: "borderBottomColor", - 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" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "border-bottom-style": { - domProp: "borderBottomStyle", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "border-bottom-width": { - domProp: "borderBottomWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "border-bottom-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, - }, - "border-collapse": { - domProp: "borderCollapse", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "separate" ], - other_values: [ "collapse" ], - invalid_values: [] - }, - "border-color": { - domProp: "borderColor", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-color", "border-right-color", "border-bottom-color", "border-left-color" ], - initial_values: [ "currentColor", "currentColor currentColor", "currentColor currentColor currentColor", "currentColor currentColor currentcolor CURRENTcolor" ], - other_values: [ "green", "currentColor green", "currentColor currentColor green", "currentColor currentColor currentColor green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "border-left": { - domProp: "borderLeft", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-left-color", "border-left-style", "border-left-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] - }, - "border-left-color": { - domProp: "borderLeftColor", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_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" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "border-left-style": { - domProp: "borderLeftStyle", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "border-left-width": { - domProp: "borderLeftWidth", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - prerequisites: { "border-left-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, - }, - "border-right": { - domProp: "borderRight", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-right-color", "border-right-style", "border-right-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] - }, - "border-right-color": { - domProp: "borderRightColor", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_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" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "border-right-style": { - domProp: "borderRightStyle", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "border-right-width": { - domProp: "borderRightWidth", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - prerequisites: { "border-right-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, - }, - "border-spacing": { - domProp: "borderSpacing", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0 0", "0px", "0 0px", "calc(0px)", "calc(0px) calc(0em)", "calc(2em - 2em) calc(3px + 7px - 10px)", "calc(-5px)", "calc(-5px) calc(-5px)" ], - other_values: [ "3px", "4em 2px", "4em 0", "0px 2px", "calc(7px)", "0 calc(7px)", "calc(7px) 0", "calc(0px) calc(7px)", "calc(7px) calc(0px)", "7px calc(0px)", "calc(0px) 7px", "7px calc(0px)", "3px calc(2em)" ], - invalid_values: [ "0%", "0 0%", "-5px", "-5px -5px", "0 -5px", "-5px 0" ] - }, - "border-style": { - domProp: "borderStyle", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-style", "border-right-style", "border-bottom-style", "border-left-style" ], - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none", "none none", "none none none", "none none none none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge", "none solid", "none none solid", "none none none solid", "groove none none none", "none ridge none none", "none none double none", "none none none dotted" ], - invalid_values: [] - }, - "border-top": { - domProp: "borderTop", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-color", "border-top-style", "border-top-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] - }, - "border-top-color": { - domProp: "borderTopColor", - 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" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "border-top-style": { - domProp: "borderTopStyle", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "border-top-width": { - domProp: "borderTopWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "border-top-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, - }, - "border-width": { - domProp: "borderWidth", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-width", "border-right-width", "border-bottom-width", "border-left-width" ], - prerequisites: { "border-style": "solid" }, - initial_values: [ "medium", "3px", "medium medium", "3px medium medium", "medium 3px medium medium", "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)" ], - other_values: [ "thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)" ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, - }, - "bottom": { - domProp: "bottom", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, - /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "box-shadow": { - domProp: "boxShadow", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - prerequisites: { "color": "blue" }, - other_values: [ "2px 2px", "2px 2px 1px", "2px 2px 2px 2px", "blue 3px 2px", "2px 2px 1px 5px green", "2px 2px red", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange", "3px 0 0 0", "inset 2px 2px 3px 4px black", "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px", - /* calc() values */ - "2px 2px calc(-5px)", /* clamped */ - "calc(3em - 2px) 2px green", - "green calc(3em - 2px) 2px", - "2px calc(2px + 0.2em)", - "blue 2px calc(2px + 0.2em)", - "2px calc(2px + 0.2em) blue", - "calc(-2px) calc(-2px)", - "-2px -2px", - "calc(2px) calc(2px)", - "calc(2px) calc(2px) calc(2px)", - "calc(2px) calc(2px) calc(2px) calc(2px)" - ], - invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none", "3 3", "3px 3", "3 3px", "3px 3px 3", "3px 3px 3px 3" ] - }, - "caption-side": { - domProp: "captionSide", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "top" ], - other_values: [ "right", "left", "bottom", "top-outside", "bottom-outside" ], - invalid_values: [] - }, - "clear": { - domProp: "clear", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "left", "right", "both" ], - invalid_values: [] - }, - "clip": { - domProp: "clip", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "rect(0 0 0 0)", "rect(auto,auto,auto,auto)", "rect(3px, 4px, 4em, 0)", "rect(auto, 3em, 4pt, 2px)", "rect(2px 3px 4px 5px)" ], - invalid_values: [ "rect(auto, 3em, 2%, 5px)" ], - quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" }, - }, - "color": { - domProp: "color", - inherited: true, - type: CSS_TYPE_LONGHAND, - /* XXX should test currentColor, but may or may not be initial */ - initial_values: [ "black", "#000", "-moz-default-color" ], - other_values: [ "green", "#f3c", "#fed292", "rgba(45,300,12,2)", "transparent", "-moz-nativehyperlinktext", "rgba(255,128,0,0.5)" ], - invalid_values: [ "#f", "#ff", "#ffff", "#fffff", "#fffffff", "#ffffffff", "#fffffffff" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a", "fff": "#ffffff", "ffffff": "#ffffff", }, - }, - "content": { - domProp: "content", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX needs to be on pseudo-elements */ - initial_values: [ "normal", "none" ], - other_values: [ '""', "''", '"hello"', "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'counter(foo)', 'counter(bar, upper-roman)', 'counters(foo, ".")', "counters(bar, '-', lower-greek)", "'-' counter(foo) '.'", "attr(title)", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "close-quote attr(title) counters(foo, '.', upper-alpha)", "counter(foo, none)", "counters(bar, '.', none)", "attr(\\32)", "attr(\\2)", "attr(-\\2)", "attr(-\\32)", "counter(\\2)", "counters(\\32, '.')", "counter(-\\32, upper-roman)", "counters(-\\2, '-', lower-greek)", "counter(\\()", "counters(a\\+b, '.')", "counter(\\}, upper-alpha)", "-moz-alt-content" ], - invalid_values: [ 'counters(foo)', 'counter(foo, ".")', 'attr("title")', "attr('title')", "attr(2)", "attr(-2)", "counter(2)", "counters(-2, '.')", "-moz-alt-content 'foo'", "'foo' -moz-alt-content" ] - }, - "counter-increment": { - domProp: "counterIncrement", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ], - invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ], - unbalanced_values: [ "foo 1 (" ] - }, - "counter-reset": { - domProp: "counterReset", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ], - invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ] - }, - "cursor": { - domProp: "cursor", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress", "copy", "alias", "context-menu", "cell", "not-allowed", "col-resize", "row-resize", "no-drop", "vertical-text", "all-scroll", "nesw-resize", "nwse-resize", "ns-resize", "ew-resize", "none", "grab", "grabbing", "zoom-in", "zoom-out", "-moz-grab", "-moz-grabbing", "-moz-zoom-in", "-moz-zoom-out", "url(foo.png), move", "url(foo.png) 5 7, move", "url(foo.png) 12 3, url(bar.png), no-drop", "url(foo.png), url(bar.png) 7 2, wait", "url(foo.png) 3 2, url(bar.png) 7 9, pointer" ], - invalid_values: [ "url(foo.png)", "url(foo.png) 5 5" ] - }, - "direction": { - domProp: "direction", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "ltr" ], - other_values: [ "rtl" ], - invalid_values: [] - }, - "display": { - domProp: "display", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "inline" ], - /* XXX none will really mess with other properties */ - prerequisites: { "float": "none", "position": "static" }, - other_values: [ - "block", - "flex", - "inline-flex", - "list-item", - "inline-block", - "table", - "inline-table", - "table-row-group", - "table-header-group", - "table-footer-group", - "table-row", - "table-column-group", - "table-column", - "table-cell", - "table-caption", - "none" - ], - invalid_values: [] - }, - "empty-cells": { - domProp: "emptyCells", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "show" ], - other_values: [ "hide", "-moz-show-background" ], - invalid_values: [] - }, - "float": { - domProp: "cssFloat", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "left", "right" ], - invalid_values: [] - }, - "font": { - domProp: "font", - inherited: true, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch", "font-size-adjust", "-moz-font-feature-settings", "-moz-font-language-override" ], - initial_values: [ (gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif") ], - other_values: [ "large serif", "9px fantasy", "bold italic small-caps 24px/1.4 Times New Roman, serif", "small inherit roman", "small roman inherit", - // system fonts - "caption", "icon", "menu", "message-box", "small-caption", "status-bar", - // Gecko-specific system fonts - "-moz-window", "-moz-document", "-moz-desktop", "-moz-info", "-moz-dialog", "-moz-button", "-moz-pull-down-menu", "-moz-list", "-moz-field", "-moz-workspace", - ], - invalid_values: [ "9 fantasy", "-2px fantasy" ] - }, - "font-family": { - domProp: "fontFamily", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ (gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif") ], - other_values: [ (gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif"), "Times New Roman, serif", "'Times New Roman', serif", "cursive", "fantasy", "\\\"Times New Roman", "\"Times New Roman\"", "Times, \\\"Times New Roman", "Times, \"Times New Roman\"", "-no-such-font-installed", "inherit roman", "roman inherit", "Times, inherit roman", "inherit roman, Times", "roman inherit, Times", "Times, roman inherit" ], - invalid_values: [ "\"Times New\" Roman", "\"Times New Roman\n", "Times, \"Times New Roman\n" ] - }, - "-moz-font-feature-settings": { - domProp: "MozFontFeatureSettings", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ - "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", - "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', - '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', - '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', - '"liga" ,"smcp" 0 , "blah"' - ], - invalid_values: [ - 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', - 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", - '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', - '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' - ] - }, - "-moz-font-language-override": { - domProp: "MozFontLanguageOverride", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], - invalid_values: [ "TRK", "ja" ] - }, - "font-size": { - domProp: "fontSize", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "medium", - "1rem", - "calc(1rem)", - "calc(0.75rem + 200% - 125% + 0.25rem - 75%)" - ], - other_values: [ "large", "2em", "50%", "xx-small", "36pt", "8px", "larger", "smaller", - "0px", - "0%", - "calc(2em)", - "calc(36pt + 75% + (30% + 2em + 2px))", - "calc(-2em)", - "calc(-50%)", - "calc(-1px)" - ], - invalid_values: [ "-2em", "-50%", "-1px" ], - quirks_values: { "5": "5px" }, - }, - "font-size-adjust": { - domProp: "fontSizeAdjust", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "0.3", "0.5", "0.7" ], - invalid_values: [] - }, - "font-stretch": { - domProp: "fontStretch", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" ], - invalid_values: [ "narrower", "wider" ] - }, - "font-style": { - domProp: "fontStyle", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "italic", "oblique" ], - invalid_values: [] - }, - "font-variant": { - domProp: "fontVariant", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "small-caps" ], - invalid_values: [ "small-caps normal" ] - }, - "font-weight": { - domProp: "fontWeight", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal", "400" ], - other_values: [ "bold", "100", "200", "300", "500", "600", "700", "800", "900", "bolder", "lighter" ], - invalid_values: [ "0", "100.0", "107", "399", "401", "699", "710", "1000" ] - }, - "height": { - domProp: "height", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* FIXME: test zero, and test calc clamping */ - initial_values: [ " auto" ], - /* computed value tests for height test more with display:block */ - prerequisites: { "display": "block" }, - other_values: [ "15px", "3em", "15%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ], - quirks_values: { "5": "5px" }, - }, - "ime-mode": { - domProp: "imeMode", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "normal", "disabled", "active", "inactive" ], - invalid_values: [ "none", "enabled", "1px" ] - }, - "left": { - domProp: "left", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, - /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "letter-spacing": { - domProp: "letterSpacing", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "0", "0px", "1em", "2px", "-3px", - "calc(0px)", "calc(1em)", "calc(1em + 3px)", - "calc(15px / 2)", "calc(15px/2)", "calc(-3px)" - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "line-height": { - domProp: "lineHeight", - inherited: true, - type: CSS_TYPE_LONGHAND, - /* - * Inheritance tests require consistent font size, since - * getComputedStyle (which uses the CSS2 computed value, or - * CSS2.1 used value) doesn't match what the CSS2.1 computed - * value is. And they even require consistent font metrics for - * computation of 'normal'. -moz-block-height requires height - * on a block. - */ - prerequisites: { "font-size": "19px", "font-size-adjust": "none", "font-family": "serif", "font-weight": "normal", "font-style": "normal", "height": "18px", "display": "block"}, - initial_values: [ "normal" ], - other_values: [ "1.0", "1", "1em", "47px", "-moz-block-height" ], - invalid_values: [] - }, - "list-style": { - domProp: "listStyle", - inherited: true, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "list-style-type", "list-style-position", "list-style-image" ], - initial_values: [ "outside", "disc", "disc outside", "outside disc", "disc none", "none disc", "none disc outside", "none outside disc", "disc none outside", "disc outside none", "outside none disc", "outside disc none" ], - other_values: [ "inside none", "none inside", "none none inside", "square", "none", "none none", "outside none none", "none outside none", "none none outside", "none outside", "outside none", - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none', - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside', - 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - 'outside none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none', - 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside', - 'none outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside none', - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside' - ], - invalid_values: [ "outside outside", "disc disc", "unknown value", "none none none", "none disc url(404.png)", "none url(404.png) disc", "disc none url(404.png)", "disc url(404.png) none", "url(404.png) none disc", "url(404.png) disc none", "none disc outside url(404.png)" ] - }, - "list-style-image": { - domProp: "listStyleImage", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - // Add some tests for interesting url() values here to test serialization, etc. - "url(\'data:text/plain,\"\')", - "url(\"data:text/plain,\'\")", - "url(\'data:text/plain,\\\'\')", - "url(\"data:text/plain,\\\"\")", - "url(\'data:text/plain,\\\"\')", - "url(\"data:text/plain,\\\'\")", - "url(data:text/plain,\\\\)", - ], - invalid_values: [] - }, - "list-style-position": { - domProp: "listStylePosition", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "outside" ], - other_values: [ "inside" ], - invalid_values: [] - }, - "list-style-type": { - domProp: "listStyleType", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "disc" ], - other_values: [ "none", "circle", "square", - "decimal", "decimal-leading-zero", - "lower-roman", "upper-roman", "lower-greek", - "lower-alpha", "lower-latin", "upper-alpha", "upper-latin", - "hebrew", "armenian", "georgian", - "cjk-decimal", "cjk-ideographic", - "hiragana", "katakana", "hiragana-iroha", "katakana-iroha", - "japanese-informal", "japanese-formal", "korean-hangul-formal", - "korean-hanja-informal", "korean-hanja-formal", - "simp-chinese-informal", "simp-chinese-formal", - "trad-chinese-informal", "trad-chinese-formal", - "-moz-cjk-heavenly-stem", "-moz-cjk-earthly-branch", - "-moz-trad-chinese-informal", "-moz-trad-chinese-formal", - "-moz-simp-chinese-informal", "-moz-simp-chinese-formal", - "-moz-japanese-informal", "-moz-japanese-formal", - "-moz-arabic-indic", "-moz-persian", "-moz-urdu", - "-moz-devanagari", "-moz-gurmukhi", "-moz-gujarati", - "-moz-oriya", "-moz-kannada", "-moz-malayalam", "-moz-bengali", - "-moz-tamil", "-moz-telugu", "-moz-thai", "-moz-lao", - "-moz-myanmar", "-moz-khmer", - "-moz-hangul", "-moz-hangul-consonant", - "-moz-ethiopic-halehame", "-moz-ethiopic-numeric", - "-moz-ethiopic-halehame-am", - "-moz-ethiopic-halehame-ti-er", "-moz-ethiopic-halehame-ti-et" - ], - invalid_values: [] - }, - "margin": { - domProp: "margin", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "margin-top", "margin-right", "margin-bottom", "margin-left" ], - initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt" ], - other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ], - invalid_values: [], - quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, - }, - "margin-bottom": { - domProp: "marginBottom", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "margin-left": { - domProp: "marginLeft", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* no subproperties */ - /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", ".5px", "+32px", "+.789px", "-.328px", "+0.56px", "-0.974px", "237px", "-289px", "-056px", "1987.45px", "-84.32px", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], - quirks_values: { "5": "5px" }, - }, - "margin-right": { - domProp: "marginRight", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* no subproperties */ - /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "margin-top": { - domProp: "marginTop", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "marker-offset": { - domProp: "markerOffset", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "6em", "-1px", "calc(0px)", "calc(3em + 2px - 4px)", "calc(-2em)" ], - invalid_values: [] - }, - "marks": { - /* XXX not a real property; applies only to page context */ - domProp: "marks", - inherited: false, - backend_only: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "crop", "cross", "crop cross", "cross crop" ], - invalid_values: [ "none none", "crop none", "none crop", "cross none", "none cross" ] - }, - "max-height": { - domProp: "maxHeight", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "none" ], - other_values: [ "30px", "50%", "0", - "calc(2px)", - "calc(-2px)", - "calc(0px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "auto", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ] - }, - "max-width": { - domProp: "maxWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "none" ], - other_values: [ "30px", "50%", "0", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", - "calc(2px)", - "calc(-2px)", - "calc(0px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "auto", "5" ] - }, - "min-height": { - domProp: "minHeight", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ], - other_values: [ "30px", "50%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "auto", "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ] - }, - "min-width": { - domProp: "minWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ], - other_values: [ "30px", "50%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "auto", "none", "5" ] - }, + // Tests for handling of unitless zero, which cannot + // be a length inside calc(). + "calc(0)", + "calc(0 + 2em)", + "calc(2em + 0)", + "calc(0 * 2)", + "calc(2 * 0)", + "calc(1 * (2em + 0))", + "calc((2em + 0))", + "calc((2em + 0) * 1)", + "calc(1 * (0 + 2em))", + "calc((0 + 2em))", + "calc((0 + 2em) * 1)", + ] + }, + "-moz-column-rule-style": { + domProp: "MozColumnRuleStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "solid", "hidden", "ridge", "groove", "inset", "outset", "double", "dotted", "dashed" ], + invalid_values: [ "20", "foo" ] + }, + "-moz-column-rule-color": { + domProp: "MozColumnRuleColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "green" }, + initial_values: [ "currentColor", "-moz-use-text-color" ], + other_values: [ "red", "blue", "#ffff00" ], + invalid_values: [ "ffff00" ] + }, + "-moz-column-width": { + domProp: "MozColumnWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ + "15px", + "calc(15px)", + "calc(30px - 3em)", + "calc(-15px)", + "0px", + "calc(0px)" + ], + invalid_values: [ "20", "-1px", "50%" ] + }, + "-moz-float-edge": { + domProp: "MozFloatEdge", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "content-box" ], + other_values: [ "margin-box" ], + invalid_values: [ "content", "padding", "border", "margin" ] + }, + "-moz-force-broken-image-icon": { + domProp: "MozForceBrokenImageIcon", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0" ], + other_values: [ "1" ], + invalid_values: [] + }, + "-moz-image-region": { + domProp: "MozImageRegion", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "rect(3px 20px 15px 4px)", "rect(17px, 21px, 33px, 2px)" ], + invalid_values: [ "rect(17px, 21px, 33, 2px)" ] + }, + "-moz-margin-end": { + domProp: "MozMarginEnd", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* no subproperties */ + /* auto may or may not be initial */ + initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "3em", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "-moz-margin-start": { + domProp: "MozMarginStart", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* no subproperties */ + /* auto may or may not be initial */ + initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "3em", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "-moz-outline-radius": { + domProp: "MozOutlineRadius", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + subproperties: [ "-moz-outline-radius-bottomleft", "-moz-outline-radius-bottomright", "-moz-outline-radius-topleft", "-moz-outline-radius-topright" ], + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ], + other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular + "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + "2px 2px calc(2px + 1%) 2px", + "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px", + ], + invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ] + }, + "-moz-outline-radius-bottomleft": { + domProp: "MozOutlineRadiusBottomleft", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "-moz-outline-radius-bottomright": { + domProp: "MozOutlineRadiusBottomright", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "-moz-outline-radius-topleft": { + domProp: "MozOutlineRadiusTopleft", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "-moz-outline-radius-topright": { + domProp: "MozOutlineRadiusTopright", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "-moz-padding-end": { + domProp: "MozPaddingEnd", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* no subproperties */ + initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "3em", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "-moz-padding-start": { + domProp: "MozPaddingStart", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* no subproperties */ + initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "3em", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "resize": { + domProp: "resize", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block", "overflow": "auto" }, + initial_values: [ "none" ], + other_values: [ "both", "horizontal", "vertical" ], + invalid_values: [] + }, + "-moz-stack-sizing": { + domProp: "MozStackSizing", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "stretch-to-fit" ], + other_values: [ "ignore" ], + invalid_values: [] + }, + "-moz-tab-size": { + domProp: "MozTabSize", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "8" ], + other_values: [ "0", "3", "99", "12000" ], + invalid_values: [ "-1", "-808", "3.0", "17.5" ] + }, + "-moz-text-size-adjust": { + domProp: "MozTextSizeAdjust", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "none" ], + invalid_values: [ "-5%", "0", "100", "0%", "50%", "100%", "220.3%" ] + }, + "transform": { + domProp: "transform", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "300px", "height": "50px" }, + initial_values: [ "none" ], + other_values: [ "translatex(1px)", "translatex(4em)", + "translatex(-4px)", "translatex(3px)", + "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", + "translatey(4em)", "translate(3px)", "translate(10px, -3px)", + "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", + "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", + "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", + "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", + "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", + "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", + "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", + "translatex(50%)", "translatey(50%)", "translate(50%)", + "translate(3%, 5px)", "translate(5px, 3%)", + "matrix(1, 2, 3, 4, 5, 6)", + /* valid calc() values */ + "translatex(calc(5px + 10%))", + "translatey(calc(0.25 * 5px + 10% / 3))", + "translate(calc(5px - 10% * 3))", + "translate(calc(5px - 3 * 10%), 50px)", + "translate(-50px, calc(5px - 10% * 3))", + "translatez(1px)", "translatez(4em)", "translatez(-4px)", + "translatez(0px)", "translatez(2px) translatez(5px)", + "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", + "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", + "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", + "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", + "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", + "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", + ], + invalid_values: ["1px", "#0000ff", "red", "auto", + "translatex(1)", "translatey(1)", "translate(2)", + "translate(-3, -4)", + "translatex(1px 1px)", "translatex(translatex(1px))", + "translatex(#0000ff)", "translatex(red)", "translatey()", + "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", + "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", + "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", + "matrix(0, 1, 2, 3%, 4%, 5%)", "matrix(1, 2, 3, 4, 5px, 6%)", + "matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)", + "matrix(1, 2, 3, 4, 5px, 6em)", + /* invalid calc() values */ + "translatey(-moz-min(5px,10%))", + "translatex(-moz-max(5px,10%))", + "translate(10px, calc(min(5px,10%)))", + "translate(calc(max(5px,10%)), 10%)", + "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))", + "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", + "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)" + ], + }, + "transform-origin": { + domProp: "transformOrigin", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* no subproperties */ + prerequisites: { "width": "10px", "height": "10px", "display": "block"}, + initial_values: [ "50% 50%", "center", "center center" ], + other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", + "top", "bottom","top left", "top right", + "top center", "center left", "center right", + "bottom left", "bottom right", "bottom center", + "20% center", "6px center", "13in bottom", + "left 50px", "right 13%", "center 40px", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)", + "6px 5px 5px", + "top center 10px" + ], + invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff", + "border", "center red", "right diagonal", + "#00ffff bottom"] + }, + "perspective-origin": { + domProp: "perspectiveOrigin", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* no subproperties */ + prerequisites: { "width": "10px", "height": "10px", "display": "block"}, + initial_values: [ "50% 50%", "center", "center center" ], + other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", + "top", "bottom","top left", "top right", + "top center", "center left", "center right", + "bottom left", "bottom right", "bottom center", + "20% center", "6px center", "13in bottom", + "left 50px", "right 13%", "center 40px", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)" ], + invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff", + "border", "center red", "right diagonal", + "#00ffff bottom"] + }, + "perspective": { + domProp: "perspective", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "1000px", "500.2px" ], + invalid_values: [ "pants", "200", "0", "-100px", "-27.2em", "0px" ] + }, + "backface-visibility": { + domProp: "backfaceVisibility", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "visible" ], + other_values: [ "hidden" ], + invalid_values: [ "collapse" ] + }, + "transform-style": { + domProp: "transformStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "flat" ], + other_values: [ "preserve-3d" ], + invalid_values: [] + }, + "-moz-user-focus": { + domProp: "MozUserFocus", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "normal", "ignore", "select-all", "select-before", "select-after", "select-same", "select-menu" ], + invalid_values: [] + }, + "-moz-user-input": { + domProp: "MozUserInput", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "none", "enabled", "disabled" ], + invalid_values: [] + }, + "-moz-user-modify": { + domProp: "MozUserModify", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "read-only" ], + other_values: [ "read-write", "write-only" ], + invalid_values: [] + }, + "-moz-user-select": { + domProp: "MozUserSelect", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "none", "text", "element", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ], + invalid_values: [] + }, + "-moz-window-shadow": { + domProp: "MozWindowShadow", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "default" ], + other_values: [ "none", "menu", "tooltip", "sheet" ], + invalid_values: [] + }, + "background": { + domProp: "background", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "background-attachment", "background-color", "background-image", "background-position", "background-repeat", "background-clip", "background-origin", "background-size" ], + initial_values: [ "transparent", "none", "repeat", "scroll", "0% 0%", "top left", "left top", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto", + "transparent none", "top left none", "left top none", "none left top", "none top left", "none 0% 0%", "left top / auto none", "left top / auto auto none", + "transparent none repeat scroll top left", "left top repeat none scroll transparent", "transparent none repeat scroll top left / auto", "left top / auto repeat none scroll transparent", "none repeat scroll 0% 0% / auto auto transparent" ], + other_values: [ + /* without multiple backgrounds */ + "green", + "none green repeat scroll left top", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", + "repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') transparent left top scroll", + "repeat-x", + "repeat-y", + "no-repeat", + "none repeat-y transparent scroll 0% 0%", + "fixed", + "0% top transparent fixed repeat none", + "top", + "left", + "50% 50%", + "center", + "top / 100px", + "left / contain", + "left / cover", + "10px / 10%", + "10em / calc(20px)", + "top left / 100px 100px", + "top left / 100px auto", + "top left / 100px 10%", + "top left / 100px calc(20px)", + "bottom right scroll none transparent repeat", + "50% transparent", + "transparent 50%", + "50%", + "-moz-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat", + "-moz-linear-gradient(10px 10px -45deg, red, blue) repeat", + "-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat", + "-moz-repeating-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat", + "-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat", + "-moz-element(#test) lime", + /* multiple backgrounds */ + "url(404.png), url(404.png)", + "url(404.png), url(404.png) transparent", + "url(404.png), url(404.png) red", + "repeat-x, fixed, none", + "0% top url(404.png), url(404.png) 0% top", + "fixed repeat-y top left url(404.png), repeat-x green", + "url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) black", + "top left / contain, bottom right / cover", + /* test cases with clip+origin in the shorthand */ + "url(404.png) green padding-box", + "url(404.png) border-box transparent", + "content-box url(404.png) blue", + "url(404.png) green padding-box padding-box", + "url(404.png) green padding-box border-box", + "content-box border-box url(404.png) blue", + ], + invalid_values: [ + /* mixes with keywords have to be in correct order */ + "50% left", "top 50%", + /* no quirks mode colors */ + "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat", + /* no quirks mode lengths */ + "-moz-linear-gradient(10 10px -45deg, red, blue) repeat", + "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", + "linear-gradient(red -99, yellow, green, blue 120%)", + /* bug 258080: don't accept background-position separated */ + "left url(404.png) top", "top url(404.png) left", + /* not allowed to have color in non-bottom layer */ + "url(404.png) transparent, url(404.png)", + "url(404.png) red, url(404.png)", + "url(404.png) transparent, url(404.png) transparent", + "url(404.png) transparent red, url(404.png) transparent red", + "url(404.png) red, url(404.png) red", + "url(404.png) rgba(0, 0, 0, 0), url(404.png)", + "url(404.png) rgb(255, 0, 0), url(404.png)", + "url(404.png) rgba(0, 0, 0, 0), url(404.png) rgba(0, 0, 0, 0)", + "url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0), url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0)", + "url(404.png) rgb(255, 0, 0), url(404.png) rgb(255, 0, 0)", + /* bug 513395: old syntax for gradients */ + "-moz-radial-gradient(10% bottom, 30px, 20px 20px, 10px, from(#ffffff), to(black)) scroll no-repeat", + "-moz-linear-gradient(10px 10px, 20px 20px, from(red), to(blue)) repeat", + /* clip and origin separated in the shorthand */ + "url(404.png) padding-box green border-box", + "url(404.png) padding-box green padding-box", + "transparent padding-box url(404.png) border-box", + "transparent padding-box url(404.png) padding-box", + ] + }, + "background-attachment": { + domProp: "backgroundAttachment", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "scroll" ], + other_values: [ "fixed", "local", "scroll,scroll", "fixed, scroll", "scroll, fixed, local, scroll", "fixed, fixed" ], + invalid_values: [] + }, + "background-clip": { + /* + * When we rename this to 'background-clip', we also + * need to rename the values to match the spec. + */ + domProp: "backgroundClip", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "border-box" ], + other_values: [ "content-box", "padding-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], + invalid_values: [ "margin-box", "border-box border-box" ] + }, + "background-color": { + domProp: "backgroundColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "transparent", "rgba(255, 127, 15, 0)", "hsla(240, 97%, 50%, 0.0)", "rgba(0, 0, 0, 0)", "rgba(255,255,255,-3.7)" ], + other_values: [ "green", "rgb(255, 0, 128)", "#fc2", "#96ed2a", "black", "rgba(255,255,0,3)", "hsl(240, 50%, 50%)", "rgb(50%, 50%, 50%)", "-moz-default-background-color" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "rgb(100, 100.0, 100)" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "background-image": { + domProp: "backgroundImage", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + "none, none", + "none, none, none, none, none", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", + "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", + ].concat(validGradientAndElementValues), + invalid_values: [ + ].concat(invalidGradientAndElementValues), + unbalanced_values: [ + ].concat(unbalancedGradientAndElementValues) + }, + "background-origin": { + domProp: "backgroundOrigin", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "padding-box" ], + other_values: [ "border-box", "content-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], + invalid_values: [ "margin-box", "padding-box padding-box" ] + }, + "background-position": { + domProp: "backgroundPosition", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "top 0% left 0%", "top 0% left", "top left", "left top", "0% 0%", "0% top", "left 0%" ], + other_values: [ "top", "left", "right", "bottom", "center", "center bottom", "bottom center", "center right", "right center", "center top", "top center", "center left", "left center", "right bottom", "bottom right", "50%", "top left, top left", "top left, top right", "top right, top left", "left top, 0% 0%", "10% 20%, 30%, 40%", "top left, bottom right", "right bottom, left top", "0%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)", + "0px 0px", + "right 20px top 60px", + "right 20px bottom 60px", + "left 20px top 60px", + "left 20px bottom 60px", + "right -50px top -50px", + "left -50px bottom -50px", + "right 20px top -50px", + "right -20px top 50px", + "right 3em bottom 10px", + "bottom 3em right 10px", + "top 3em right 10px", + "left 15px", + "10px top", + "left top 15px", + "left 10px top", + "left 20%", + "right 20%" + ], + invalid_values: [ "center 10px center 4px", "center 10px center", + "top 20%", "bottom 20%", "50% left", "top 50%", + "50% bottom 10%", "right 10% 50%", "left right", + "top bottom", "left 10% right", + "top 20px bottom 20px", "left left", "20 20" ] + }, + "background-repeat": { + domProp: "backgroundRepeat", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "repeat", "repeat repeat" ], + other_values: [ "repeat-x", "repeat-y", "no-repeat", + "repeat-x, repeat-x", + "repeat, no-repeat", + "repeat-y, no-repeat, repeat-y", + "repeat, repeat, repeat", + "repeat no-repeat", + "no-repeat repeat", + "no-repeat no-repeat", + "repeat repeat, repeat repeat", + ], + invalid_values: [ "repeat repeat repeat", + "repeat-x repeat-y", + "repeat repeat-x", + "repeat repeat-y", + "repeat-x repeat", + "repeat-y repeat" ] + }, + "background-size": { + domProp: "backgroundSize", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto", "auto auto" ], + other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)" + ], + invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3" ] + }, + "border": { + domProp: "border", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-right-color", "border-right-style", "border-right-width", "border-top-color", "border-top-style", "border-top-width", "-moz-border-top-colors", "-moz-border-right-colors", "-moz-border-bottom-colors", "-moz-border-left-colors", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor", "calc(4px - 1px) none" ], + other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid", "calc(2px) solid blue" ], + invalid_values: [ "5%", "medium solid ff00ff", "5 solid green" ] + }, + "border-bottom": { + domProp: "borderBottom", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 solid green" ] + }, + "border-bottom-color": { + domProp: "borderBottomColor", + 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" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "border-bottom-style": { + domProp: "borderBottomStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "border-bottom-width": { + domProp: "borderBottomWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "border-bottom-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%" ], + quirks_values: { "5": "5px" }, + }, + "border-collapse": { + domProp: "borderCollapse", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "separate" ], + other_values: [ "collapse" ], + invalid_values: [] + }, + "border-color": { + domProp: "borderColor", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-top-color", "border-right-color", "border-bottom-color", "border-left-color" ], + initial_values: [ "currentColor", "currentColor currentColor", "currentColor currentColor currentColor", "currentColor currentColor currentcolor CURRENTcolor" ], + other_values: [ "green", "currentColor green", "currentColor currentColor green", "currentColor currentColor currentColor green", "rgba(255,128,0,0.5)", "transparent" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "border-left": { + domProp: "borderLeft", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-left-color", "border-left-style", "border-left-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 solid green" ] + }, + "border-left-color": { + domProp: "borderLeftColor", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_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" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "border-left-style": { + domProp: "borderLeftStyle", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "border-left-width": { + domProp: "borderLeftWidth", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + prerequisites: { "border-left-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%" ], + quirks_values: { "5": "5px" }, + }, + "border-right": { + domProp: "borderRight", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-right-color", "border-right-style", "border-right-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 solid green" ] + }, + "border-right-color": { + domProp: "borderRightColor", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_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" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "border-right-style": { + domProp: "borderRightStyle", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "border-right-width": { + domProp: "borderRightWidth", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + prerequisites: { "border-right-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%" ], + quirks_values: { "5": "5px" }, + }, + "border-spacing": { + domProp: "borderSpacing", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0 0", "0px", "0 0px", "calc(0px)", "calc(0px) calc(0em)", "calc(2em - 2em) calc(3px + 7px - 10px)", "calc(-5px)", "calc(-5px) calc(-5px)" ], + other_values: [ "3px", "4em 2px", "4em 0", "0px 2px", "calc(7px)", "0 calc(7px)", "calc(7px) 0", "calc(0px) calc(7px)", "calc(7px) calc(0px)", "7px calc(0px)", "calc(0px) 7px", "7px calc(0px)", "3px calc(2em)" ], + invalid_values: [ "0%", "0 0%", "-5px", "-5px -5px", "0 -5px", "-5px 0" ] + }, + "border-style": { + domProp: "borderStyle", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-top-style", "border-right-style", "border-bottom-style", "border-left-style" ], + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none", "none none", "none none none", "none none none none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge", "none solid", "none none solid", "none none none solid", "groove none none none", "none ridge none none", "none none double none", "none none none dotted" ], + invalid_values: [] + }, + "border-top": { + domProp: "borderTop", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-top-color", "border-top-style", "border-top-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 solid green" ] + }, + "border-top-color": { + domProp: "borderTopColor", + 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" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "border-top-style": { + domProp: "borderTopStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "border-top-width": { + domProp: "borderTopWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "border-top-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%" ], + quirks_values: { "5": "5px" }, + }, + "border-width": { + domProp: "borderWidth", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-top-width", "border-right-width", "border-bottom-width", "border-left-width" ], + prerequisites: { "border-style": "solid" }, + initial_values: [ "medium", "3px", "medium medium", "3px medium medium", "medium 3px medium medium", "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)" ], + other_values: [ "thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)" ], + invalid_values: [ "5%" ], + quirks_values: { "5": "5px" }, + }, + "bottom": { + domProp: "bottom", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* FIXME: run tests with multiple prerequisites */ + prerequisites: { "position": "relative" }, + /* XXX 0 may or may not be equal to auto */ + initial_values: [ "auto" ], + other_values: [ "32px", "-3em", "12%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "box-shadow": { + domProp: "boxShadow", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + prerequisites: { "color": "blue" }, + other_values: [ "2px 2px", "2px 2px 1px", "2px 2px 2px 2px", "blue 3px 2px", "2px 2px 1px 5px green", "2px 2px red", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange", "3px 0 0 0", "inset 2px 2px 3px 4px black", "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px", + /* calc() values */ + "2px 2px calc(-5px)", /* clamped */ + "calc(3em - 2px) 2px green", + "green calc(3em - 2px) 2px", + "2px calc(2px + 0.2em)", + "blue 2px calc(2px + 0.2em)", + "2px calc(2px + 0.2em) blue", + "calc(-2px) calc(-2px)", + "-2px -2px", + "calc(2px) calc(2px)", + "calc(2px) calc(2px) calc(2px)", + "calc(2px) calc(2px) calc(2px) calc(2px)" + ], + invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none", "3 3", "3px 3", "3 3px", "3px 3px 3", "3px 3px 3px 3" ] + }, + "caption-side": { + domProp: "captionSide", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "top" ], + other_values: [ "right", "left", "bottom", "top-outside", "bottom-outside" ], + invalid_values: [] + }, + "clear": { + domProp: "clear", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "left", "right", "both" ], + invalid_values: [] + }, + "clip": { + domProp: "clip", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "rect(0 0 0 0)", "rect(auto,auto,auto,auto)", "rect(3px, 4px, 4em, 0)", "rect(auto, 3em, 4pt, 2px)", "rect(2px 3px 4px 5px)" ], + invalid_values: [ "rect(auto, 3em, 2%, 5px)" ], + quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" }, + }, + "color": { + domProp: "color", + inherited: true, + type: CSS_TYPE_LONGHAND, + /* XXX should test currentColor, but may or may not be initial */ + initial_values: [ "black", "#000", "-moz-default-color" ], + other_values: [ "green", "#f3c", "#fed292", "rgba(45,300,12,2)", "transparent", "-moz-nativehyperlinktext", "rgba(255,128,0,0.5)" ], + invalid_values: [ "#f", "#ff", "#ffff", "#fffff", "#fffffff", "#ffffffff", "#fffffffff" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a", "fff": "#ffffff", "ffffff": "#ffffff", }, + }, + "content": { + domProp: "content", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX needs to be on pseudo-elements */ + initial_values: [ "normal", "none" ], + other_values: [ '""', "''", '"hello"', "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'counter(foo)', 'counter(bar, upper-roman)', 'counters(foo, ".")', "counters(bar, '-', lower-greek)", "'-' counter(foo) '.'", "attr(title)", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "close-quote attr(title) counters(foo, '.', upper-alpha)", "counter(foo, none)", "counters(bar, '.', none)", "attr(\\32)", "attr(\\2)", "attr(-\\2)", "attr(-\\32)", "counter(\\2)", "counters(\\32, '.')", "counter(-\\32, upper-roman)", "counters(-\\2, '-', lower-greek)", "counter(\\()", "counters(a\\+b, '.')", "counter(\\}, upper-alpha)", "-moz-alt-content" ], + invalid_values: [ 'counters(foo)', 'counter(foo, ".")', 'attr("title")', "attr('title')", "attr(2)", "attr(-2)", "counter(2)", "counters(-2, '.')", "-moz-alt-content 'foo'", "'foo' -moz-alt-content" ] + }, + "counter-increment": { + domProp: "counterIncrement", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ], + invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ], + unbalanced_values: [ "foo 1 (" ] + }, + "counter-reset": { + domProp: "counterReset", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ], + invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ] + }, + "cursor": { + domProp: "cursor", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress", "copy", "alias", "context-menu", "cell", "not-allowed", "col-resize", "row-resize", "no-drop", "vertical-text", "all-scroll", "nesw-resize", "nwse-resize", "ns-resize", "ew-resize", "none", "grab", "grabbing", "zoom-in", "zoom-out", "-moz-grab", "-moz-grabbing", "-moz-zoom-in", "-moz-zoom-out", "url(foo.png), move", "url(foo.png) 5 7, move", "url(foo.png) 12 3, url(bar.png), no-drop", "url(foo.png), url(bar.png) 7 2, wait", "url(foo.png) 3 2, url(bar.png) 7 9, pointer" ], + invalid_values: [ "url(foo.png)", "url(foo.png) 5 5" ] + }, + "direction": { + domProp: "direction", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "ltr" ], + other_values: [ "rtl" ], + invalid_values: [] + }, + "display": { + domProp: "display", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "inline" ], + /* XXX none will really mess with other properties */ + prerequisites: { "float": "none", "position": "static" }, + other_values: [ + "block", + "flex", + "inline-flex", + "list-item", + "inline-block", + "table", + "inline-table", + "table-row-group", + "table-header-group", + "table-footer-group", + "table-row", + "table-column-group", + "table-column", + "table-cell", + "table-caption", + "none" + ], + invalid_values: [] + }, + "empty-cells": { + domProp: "emptyCells", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "show" ], + other_values: [ "hide", "-moz-show-background" ], + invalid_values: [] + }, + "float": { + domProp: "cssFloat", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "left", "right" ], + invalid_values: [] + }, + "font": { + domProp: "font", + inherited: true, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch", "font-size-adjust", "-moz-font-feature-settings", "-moz-font-language-override" ], + initial_values: [ (gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif") ], + other_values: [ "large serif", "9px fantasy", "bold italic small-caps 24px/1.4 Times New Roman, serif", "small inherit roman", "small roman inherit", + // system fonts + "caption", "icon", "menu", "message-box", "small-caption", "status-bar", + // Gecko-specific system fonts + "-moz-window", "-moz-document", "-moz-desktop", "-moz-info", "-moz-dialog", "-moz-button", "-moz-pull-down-menu", "-moz-list", "-moz-field", "-moz-workspace", + ], + invalid_values: [ "9 fantasy", "-2px fantasy" ] + }, + "font-family": { + domProp: "fontFamily", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ (gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif") ], + other_values: [ (gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif"), "Times New Roman, serif", "'Times New Roman', serif", "cursive", "fantasy", "\\\"Times New Roman", "\"Times New Roman\"", "Times, \\\"Times New Roman", "Times, \"Times New Roman\"", "-no-such-font-installed", "inherit roman", "roman inherit", "Times, inherit roman", "inherit roman, Times", "roman inherit, Times", "Times, roman inherit" ], + invalid_values: [ "\"Times New\" Roman", "\"Times New Roman\n", "Times, \"Times New Roman\n" ] + }, + "-moz-font-feature-settings": { + domProp: "MozFontFeatureSettings", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ + "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", + "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', + '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', + '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', + '"liga" ,"smcp" 0 , "blah"' + ], + invalid_values: [ + 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', + 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", + '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', + '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' + ] + }, + "-moz-font-language-override": { + domProp: "MozFontLanguageOverride", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], + invalid_values: [ "TRK", "ja" ] + }, + "font-size": { + domProp: "fontSize", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "medium", + "1rem", + "calc(1rem)", + "calc(0.75rem + 200% - 125% + 0.25rem - 75%)" + ], + other_values: [ "large", "2em", "50%", "xx-small", "36pt", "8px", "larger", "smaller", + "0px", + "0%", + "calc(2em)", + "calc(36pt + 75% + (30% + 2em + 2px))", + "calc(-2em)", + "calc(-50%)", + "calc(-1px)" + ], + invalid_values: [ "-2em", "-50%", "-1px" ], + quirks_values: { "5": "5px" }, + }, + "font-size-adjust": { + domProp: "fontSizeAdjust", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "0.3", "0.5", "0.7" ], + invalid_values: [] + }, + "font-stretch": { + domProp: "fontStretch", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" ], + invalid_values: [ "narrower", "wider" ] + }, + "font-style": { + domProp: "fontStyle", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "italic", "oblique" ], + invalid_values: [] + }, + "font-variant": { + domProp: "fontVariant", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "small-caps" ], + invalid_values: [ "small-caps normal" ] + }, + "font-weight": { + domProp: "fontWeight", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal", "400" ], + other_values: [ "bold", "100", "200", "300", "500", "600", "700", "800", "900", "bolder", "lighter" ], + invalid_values: [ "0", "100.0", "107", "399", "401", "699", "710", "1000" ] + }, + "height": { + domProp: "height", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* FIXME: test zero, and test calc clamping */ + initial_values: [ " auto" ], + /* computed value tests for height test more with display:block */ + prerequisites: { "display": "block" }, + other_values: [ "15px", "3em", "15%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ], + quirks_values: { "5": "5px" }, + }, + "ime-mode": { + domProp: "imeMode", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "normal", "disabled", "active", "inactive" ], + invalid_values: [ "none", "enabled", "1px" ] + }, + "left": { + domProp: "left", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* FIXME: run tests with multiple prerequisites */ + prerequisites: { "position": "relative" }, + /* XXX 0 may or may not be equal to auto */ + initial_values: [ "auto" ], + other_values: [ "32px", "-3em", "12%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "letter-spacing": { + domProp: "letterSpacing", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "0", "0px", "1em", "2px", "-3px", + "calc(0px)", "calc(1em)", "calc(1em + 3px)", + "calc(15px / 2)", "calc(15px/2)", "calc(-3px)" + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "line-height": { + domProp: "lineHeight", + inherited: true, + type: CSS_TYPE_LONGHAND, + /* + * Inheritance tests require consistent font size, since + * getComputedStyle (which uses the CSS2 computed value, or + * CSS2.1 used value) doesn't match what the CSS2.1 computed + * value is. And they even require consistent font metrics for + * computation of 'normal'. -moz-block-height requires height + * on a block. + */ + prerequisites: { "font-size": "19px", "font-size-adjust": "none", "font-family": "serif", "font-weight": "normal", "font-style": "normal", "height": "18px", "display": "block"}, + initial_values: [ "normal" ], + other_values: [ "1.0", "1", "1em", "47px", "-moz-block-height" ], + invalid_values: [] + }, + "list-style": { + domProp: "listStyle", + inherited: true, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "list-style-type", "list-style-position", "list-style-image" ], + initial_values: [ "outside", "disc", "disc outside", "outside disc", "disc none", "none disc", "none disc outside", "none outside disc", "disc none outside", "disc outside none", "outside none disc", "outside disc none" ], + other_values: [ "inside none", "none inside", "none none inside", "square", "none", "none none", "outside none none", "none outside none", "none none outside", "none outside", "outside none", + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none', + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside', + 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + 'outside none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none', + 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside', + 'none outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside none', + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside' + ], + invalid_values: [ "outside outside", "disc disc", "unknown value", "none none none", "none disc url(404.png)", "none url(404.png) disc", "disc none url(404.png)", "disc url(404.png) none", "url(404.png) none disc", "url(404.png) disc none", "none disc outside url(404.png)" ] + }, + "list-style-image": { + domProp: "listStyleImage", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + // Add some tests for interesting url() values here to test serialization, etc. + "url(\'data:text/plain,\"\')", + "url(\"data:text/plain,\'\")", + "url(\'data:text/plain,\\\'\')", + "url(\"data:text/plain,\\\"\")", + "url(\'data:text/plain,\\\"\')", + "url(\"data:text/plain,\\\'\")", + "url(data:text/plain,\\\\)", + ], + invalid_values: [] + }, + "list-style-position": { + domProp: "listStylePosition", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "outside" ], + other_values: [ "inside" ], + invalid_values: [] + }, + "list-style-type": { + domProp: "listStyleType", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "disc" ], + other_values: [ "none", "circle", "square", + "decimal", "decimal-leading-zero", + "lower-roman", "upper-roman", "lower-greek", + "lower-alpha", "lower-latin", "upper-alpha", "upper-latin", + "hebrew", "armenian", "georgian", + "cjk-decimal", "cjk-ideographic", + "hiragana", "katakana", "hiragana-iroha", "katakana-iroha", + "japanese-informal", "japanese-formal", "korean-hangul-formal", + "korean-hanja-informal", "korean-hanja-formal", + "simp-chinese-informal", "simp-chinese-formal", + "trad-chinese-informal", "trad-chinese-formal", + "-moz-cjk-heavenly-stem", "-moz-cjk-earthly-branch", + "-moz-trad-chinese-informal", "-moz-trad-chinese-formal", + "-moz-simp-chinese-informal", "-moz-simp-chinese-formal", + "-moz-japanese-informal", "-moz-japanese-formal", + "-moz-arabic-indic", "-moz-persian", "-moz-urdu", + "-moz-devanagari", "-moz-gurmukhi", "-moz-gujarati", + "-moz-oriya", "-moz-kannada", "-moz-malayalam", "-moz-bengali", + "-moz-tamil", "-moz-telugu", "-moz-thai", "-moz-lao", + "-moz-myanmar", "-moz-khmer", + "-moz-hangul", "-moz-hangul-consonant", + "-moz-ethiopic-halehame", "-moz-ethiopic-numeric", + "-moz-ethiopic-halehame-am", + "-moz-ethiopic-halehame-ti-er", "-moz-ethiopic-halehame-ti-et" + ], + invalid_values: [] + }, + "margin": { + domProp: "margin", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "margin-top", "margin-right", "margin-bottom", "margin-left" ], + initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt" ], + other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ], + invalid_values: [], + quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, + }, + "margin-bottom": { + domProp: "marginBottom", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX testing auto has prerequisites */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "margin-left": { + domProp: "marginLeft", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* no subproperties */ + /* XXX testing auto has prerequisites */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "2em", "5%", ".5px", "+32px", "+.789px", "-.328px", "+0.56px", "-0.974px", "237px", "-289px", "-056px", "1987.45px", "-84.32px", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], + quirks_values: { "5": "5px" }, + }, + "margin-right": { + domProp: "marginRight", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* no subproperties */ + /* XXX testing auto has prerequisites */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "margin-top": { + domProp: "marginTop", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX testing auto has prerequisites */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "marker-offset": { + domProp: "markerOffset", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "6em", "-1px", "calc(0px)", "calc(3em + 2px - 4px)", "calc(-2em)" ], + invalid_values: [] + }, + "marks": { + /* XXX not a real property; applies only to page context */ + domProp: "marks", + inherited: false, + backend_only: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "crop", "cross", "crop cross", "cross crop" ], + invalid_values: [ "none none", "crop none", "none crop", "cross none", "none cross" ] + }, + "max-height": { + domProp: "maxHeight", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block" }, + initial_values: [ "none" ], + other_values: [ "30px", "50%", "0", + "calc(2px)", + "calc(-2px)", + "calc(0px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "auto", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ] + }, + "max-width": { + domProp: "maxWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block" }, + initial_values: [ "none" ], + other_values: [ "30px", "50%", "0", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "calc(2px)", + "calc(-2px)", + "calc(0px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "auto", "5" ] + }, + "min-height": { + domProp: "minHeight", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block" }, + initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ], + other_values: [ "30px", "50%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "auto", "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ] + }, + "min-width": { + domProp: "minWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block" }, + initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ], + other_values: [ "30px", "50%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "auto", "none", "5" ] + }, - "opacity": { - domProp: "opacity", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "17", "397.376", "3e1", "3e+1", "3e0", "3e+0", "3e-0" ], - other_values: [ "0", "0.4", "0.0000", "-3", "3e-1" ], - invalid_values: [ "0px", "1px" ] - }, - "-moz-orient": { - domProp: "MozOrient", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "horizontal", "vertical" ], - invalid_values: [ "none" ] - }, - "orphans": { - domProp: "orphans", - inherited: true, - backend_only: true, - type: CSS_TYPE_LONGHAND, - // XXX requires display:block - initial_values: [ "2" ], - other_values: [ "1", "7" ], - invalid_values: [ "0", "-1", "0px", "3px", "3e1" ] - }, - "outline": { - domProp: "outline", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "outline-color", "outline-style", "outline-width" ], - initial_values: [ - "none", "medium", "thin", - // XXX Should be invert, but currently currentcolor. - //"invert", "none medium invert" - "currentColor", "none medium currentcolor" - ], - other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid" ], - invalid_values: [ "5%", "5", "5 solid green" ] - }, - "outline-color": { - domProp: "outlineColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor", "-moz-use-text-color" ], // XXX should be invert - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000", "cc00ff" ] - }, - "outline-offset": { - domProp: "outlineOffset", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "-0", "calc(0px)", "calc(3em + 2px - 2px - 3em)", "calc(-0em)" ], - other_values: [ "-3px", "1em", "calc(3em)", "calc(7pt + 3 * 2em)", "calc(-3px)" ], - invalid_values: [ "5%" ] - }, - "outline-style": { - domProp: "outlineStyle", - inherited: false, - type: CSS_TYPE_LONGHAND, - // XXX Should 'hidden' be the same as initial? - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "outline-width": { - domProp: "outlineWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "outline-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0px)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%", "5" ] - }, - "overflow": { - domProp: "overflow", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - prerequisites: { "display": "block" }, - subproperties: [ "overflow-x", "overflow-y" ], - initial_values: [ "visible" ], - other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable", "-moz-scrollbars-none" ], - invalid_values: [] - }, - "overflow-x": { - domProp: "overflowX", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block", "overflow-y": "visible" }, - initial_values: [ "visible" ], - other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable" ], - invalid_values: [] - }, - "overflow-y": { - domProp: "overflowY", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block", "overflow-x": "visible" }, - initial_values: [ "visible" ], - other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable" ], - invalid_values: [] - }, - "padding": { - domProp: "padding", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "padding-top", "padding-right", "padding-bottom", "padding-left" ], - initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt", "calc(0px) calc(0em) calc(-2px) calc(-1%)" ], - other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ], - invalid_values: [], - quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, - }, - "padding-bottom": { - domProp: "paddingBottom", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "padding-left": { - domProp: "paddingLeft", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* no subproperties */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "padding-right": { - domProp: "paddingRight", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* no subproperties */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "padding-top": { - domProp: "paddingTop", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "page": { - domProp: "page", - inherited: true, - backend_only: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "foo", "bar" ], - invalid_values: [ "3px" ] - }, - "page-break-after": { - domProp: "pageBreakAfter", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "always", "avoid", "left", "right" ], - invalid_values: [] - }, - "page-break-before": { - domProp: "pageBreakBefore", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "always", "avoid", "left", "right" ], - invalid_values: [] - }, - "page-break-inside": { - domProp: "pageBreakInside", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "avoid" ], - invalid_values: [ "left", "right" ] - }, - "pointer-events": { - domProp: "pointerEvents", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "visiblePainted", "visibleFill", "visibleStroke", "visible", - "painted", "fill", "stroke", "all", "none" ], - invalid_values: [] - }, - "position": { - domProp: "position", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "static" ], - other_values: [ "relative", "absolute", "fixed" ], - invalid_values: [] - }, - "quotes": { - domProp: "quotes", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ '"\u201C" "\u201D" "\u2018" "\u2019"', - '"\\201C" "\\201D" "\\2018" "\\2019"' ], - other_values: [ "none", "'\"' '\"'" ], - invalid_values: [] - }, - "right": { - domProp: "right", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, - /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "size": { - /* XXX not a real property; applies only to page context */ - domProp: "size", - inherited: false, - backend_only: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "landscape", "portrait", "8.5in 11in", "14in 11in", "297mm 210mm", "21cm 29.7cm", "100mm" ], - invalid_values: [ - // XXX spec unclear on 0s and negatives - "100mm 100mm 100mm" - ] - }, - "table-layout": { - domProp: "tableLayout", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "fixed" ], - invalid_values: [] - }, - "text-align": { - domProp: "textAlign", - inherited: true, - type: CSS_TYPE_LONGHAND, - // don't know whether left and right are same as start - initial_values: [ "start" ], - other_values: [ "center", "justify", "end" ], - invalid_values: [ "true", "true true" ] - }, - "-moz-text-align-last": { - domProp: "MozTextAlignLast", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "center", "justify", "start", "end", "left", "right" ], - invalid_values: [] - }, - "text-decoration": { - domProp: "textDecoration", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - subproperties: [ "-moz-text-decoration-color", "-moz-text-decoration-line", "-moz-text-decoration-style" ], - initial_values: [ "none" ], - other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ], - invalid_values: [ "none none", "underline none", "none underline", "blink none", "none blink", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink", - "underline red solid", "underline #ff0000", "solid underline", "red underline", "#ff0000 underline" ] - }, - "-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", "000000", "ff00ff" ] - }, - "-moz-text-decoration-line": { - domProp: "MozTextDecorationLine", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ], - invalid_values: [ "none none", "underline none", "none underline", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink" ] - }, - "-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, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "calc(3em - 5em + 2px + 2em - 2px)" ], - other_values: [ "2em", "5%", "-10px", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "text-overflow": { - domProp: "textOverflow", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "clip" ], - other_values: [ "ellipsis", '""', "''", '"hello"', 'clip clip', 'ellipsis ellipsis', 'clip ellipsis', 'clip ""', '"hello" ""', '"" ellipsis' ], - invalid_values: [ "none", "auto", '"hello" inherit', 'inherit "hello"', 'clip initial', 'initial clip', 'initial inherit', 'inherit initial', 'inherit none'] - }, - "text-shadow": { - domProp: "textShadow", - inherited: true, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "none" ], - other_values: [ "2px 2px", "2px 2px 1px", "2px 2px green", "2px 2px 1px green", "green 2px 2px", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px", - /* calc() values */ - "2px 2px calc(-5px)", /* clamped */ - "calc(3em - 2px) 2px green", - "green calc(3em - 2px) 2px", - "2px calc(2px + 0.2em)", - "blue 2px calc(2px + 0.2em)", - "2px calc(2px + 0.2em) blue", - "calc(-2px) calc(-2px)", - "-2px -2px", - "calc(2px) calc(2px)", - "calc(2px) calc(2px) calc(2px)", - ], - invalid_values: [ "3% 3%", "2px 2px -5px", "2px 2px 2px 2px", "2px 2px, none", "none, 2px 2px", "inherit, 2px 2px", "2px 2px, inherit", "2 2px", "2px 2", "2px 2px 2", "2px 2px 2px 2", - "calc(2px) calc(2px) calc(2px) calc(2px)" - ] - }, - "text-transform": { - domProp: "textTransform", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "capitalize", "uppercase", "lowercase", "full-width" ], - invalid_values: [] - }, - "top": { - domProp: "top", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, - /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "transition": { - domProp: "transition", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], - initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ], - other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all" ], - invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial", "1s width,,2s color", "1s width, ,2s color" ] - }, - "transition-delay": { - domProp: "transitionDelay", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px" ] - }, - "transition-duration": { - domProp: "transitionDuration", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px", "-1ms", "-2s" ] - }, - "transition-property": { - domProp: "transitionProperty", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "all" ], - other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all" ], - invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ] - }, - "transition-timing-function": { - domProp: "transitionTimingFunction", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], - other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], - invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] - }, - "unicode-bidi": { - domProp: "unicodeBidi", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "embed", "bidi-override", "-moz-isolate", "-moz-plaintext", "-moz-isolate-override" ], - invalid_values: [ "auto", "none" ] - }, - "vertical-align": { - domProp: "verticalAlign", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "baseline" ], - other_values: [ "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom", "-moz-middle-with-baseline", "15%", "3px", "0.2em", "-5px", "-3%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "visibility": { - domProp: "visibility", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "visible" ], - other_values: [ "hidden", "collapse" ], - invalid_values: [] - }, - "white-space": { - domProp: "whiteSpace", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "pre", "nowrap", "pre-wrap", "pre-line", "-moz-pre-discard-newlines" ], - invalid_values: [] - }, - "widows": { - domProp: "widows", - inherited: true, - backend_only: true, - type: CSS_TYPE_LONGHAND, - // XXX requires display:block - initial_values: [ "2" ], - other_values: [ "1", "7" ], - invalid_values: [ "0", "-1", "0px", "3px", "3e1" ] - }, - "width": { - domProp: "width", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* computed value tests for width test more with display:block */ - prerequisites: { "display": "block" }, - initial_values: [ " auto" ], - /* XXX these have prerequisites */ - other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", - "3e1px", "3e+1px", "3e0px", "3e+0px", "3e-0px", "3e-1px", - "3.2e1px", "3.2e+1px", "3.2e0px", "3.2e+0px", "3.2e-0px", "3.2e-1px", - "3e1%", "3e+1%", "3e0%", "3e+0%", "3e-0%", "3e-1%", - "3.2e1%", "3.2e+1%", "3.2e0%", "3.2e+0%", "3.2e-0%", "3.2e-1%", - /* valid -moz-calc() values */ - "-moz-calc(-2px)", - "-moz-calc(2px)", - "-moz-calc(50%)", - "-moz-calc(50% + 2px)", - "-moz-calc( 50% + 2px)", - "-moz-calc(50% + 2px )", - "-moz-calc( 50% + 2px )", - "-moz-calc(50% - -2px)", - "-moz-calc(2px - -50%)", - "-moz-calc(3*25px)", - "-moz-calc(3 *25px)", - "-moz-calc(3 * 25px)", - "-moz-calc(3* 25px)", - "-moz-calc(25px*3)", - "-moz-calc(25px *3)", - "-moz-calc(25px* 3)", - "-moz-calc(25px * 3)", - "-moz-calc(3*25px + 50%)", - "-moz-calc(50% - 3em + 2px)", - "-moz-calc(50% - (3em + 2px))", - "-moz-calc((50% - 3em) + 2px)", - "-moz-calc(2em)", - "-moz-calc(50%)", - "-moz-calc(50px/2)", - "-moz-calc(50px/(2 - 1))", - /* valid calc() values */ - "calc(-2px)", - "calc(2px)", - "calc(50%)", - "calc(50% + 2px)", - "calc( 50% + 2px)", - "calc(50% + 2px )", - "calc( 50% + 2px )", - "calc(50% - -2px)", - "calc(2px - -50%)", - "calc(3*25px)", - "calc(3 *25px)", - "calc(3 * 25px)", - "calc(3* 25px)", - "calc(25px*3)", - "calc(25px *3)", - "calc(25px* 3)", - "calc(25px * 3)", - "calc(3*25px + 50%)", - "calc(50% - 3em + 2px)", - "calc(50% - (3em + 2px))", - "calc((50% - 3em) + 2px)", - "calc(2em)", - "calc(50%)", - "calc(50px/2)", - "calc(50px/(2 - 1))", - ], - invalid_values: [ "none", "-2px", - /* invalid -moz-calc() values */ - "-moz-calc(50%+ 2px)", - "-moz-calc(50% +2px)", - "-moz-calc(50%+2px)", - /* invalid calc() values */ - "calc(50%+ 2px)", - "calc(50% +2px)", - "calc(50%+2px)", - "-moz-min()", - "calc(min())", - "-moz-max()", - "calc(max())", - "-moz-min(5px)", - "calc(min(5px))", - "-moz-max(5px)", - "calc(max(5px))", - "-moz-min(5px,2em)", - "calc(min(5px,2em))", - "-moz-max(5px,2em)", - "calc(max(5px,2em))", - "calc(50px/(2 - 2))", - /* If we ever support division by values, which is - * complicated for the reasons described in - * http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html - * , we should support all 4 of these as described in - * http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html - */ - "calc((3em / 100%) * 3em)", - "calc(3em / 100% * 3em)", - "calc(3em * (3em / 100%))", - "calc(3em * 3em / 100%)", - ], - quirks_values: { "5": "5px" }, - }, - "word-break": { - domProp: "wordBreak", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "break-all", "keep-all" ], - invalid_values: [] - }, - "word-spacing": { - domProp: "wordSpacing", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal", "0", "0px", "-0em", - "calc(-0px)", "calc(0em)" - ], - other_values: [ "1em", "2px", "-3px", - "calc(1em)", "calc(1em + 3px)", - "calc(15px / 2)", "calc(15px/2)", - "calc(-2em)" - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "word-wrap": { - domProp: "wordWrap", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "break-word" ], - invalid_values: [] - }, - "-moz-hyphens": { - domProp: "MozHyphens", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "manual" ], - other_values: [ "none", "auto" ], - invalid_values: [] - }, - "z-index": { - domProp: "zIndex", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX requires position */ - initial_values: [ "auto" ], - other_values: [ "0", "3", "-7000", "12000" ], - invalid_values: [ "3.0", "17.5", "3e1" ] - } - , - "clip-path": { - domProp: "clipPath", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mypath)", "url('404.svg#mypath')" ], - invalid_values: [] - }, - "clip-rule": { - domProp: "clipRule", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "nonzero" ], - other_values: [ "evenodd" ], - invalid_values: [] - }, - "color-interpolation": { - domProp: "colorInterpolation", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "sRGB" ], - other_values: [ "auto", "linearRGB" ], - invalid_values: [] - }, - "color-interpolation-filters": { - domProp: "colorInterpolationFilters", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "linearRGB" ], - other_values: [ "sRGB", "auto" ], - invalid_values: [] - }, - "dominant-baseline": { - domProp: "dominantBaseline", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "use-script", "no-change", "reset-size", "ideographic", "alphabetic", "hanging", "mathematical", "central", "middle", "text-after-edge", "text-before-edge" ], - invalid_values: [] - }, - "fill": { - domProp: "fill", - inherited: true, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], - other_values: [ "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "none", "currentColor", "context-fill", "context-stroke" ], - invalid_values: [ "000000", "ff00ff" ] - }, - "fill-opacity": { - domProp: "fillOpacity", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000", "context-fill-opacity", "context-stroke-opacity" ], - other_values: [ "0", "0.3", "-7.3" ], - invalid_values: [] - }, - "fill-rule": { - domProp: "fillRule", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "nonzero" ], - other_values: [ "evenodd" ], - invalid_values: [] - }, - "filter": { - domProp: "filter", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#myfilt)" ], - invalid_values: [ "url(#myfilt) none" ] - }, - "flood-color": { - domProp: "floodColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], - other_values: [ "green", "#fc3", "currentColor" ], - invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] - }, - "flood-opacity": { - domProp: "floodOpacity", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000" ], - other_values: [ "0", "0.3", "-7.3" ], - invalid_values: [] - }, - "image-rendering": { - domProp: "imageRendering", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "optimizeSpeed", "optimizeQuality", "-moz-crisp-edges" ], - invalid_values: [] - }, - "lighting-color": { - domProp: "lightingColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "white", "#fff", "#ffffff", "rgb(255,255,255)", "rgba(255,255,255,1.0)", "rgba(255,255,255,42.0)" ], - other_values: [ "green", "#fc3", "currentColor" ], - invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] - }, - "marker": { - domProp: "marker", - inherited: true, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "marker-start", "marker-mid", "marker-end" ], - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [ "none none", "url(#mysym) url(#mysym)", "none url(#mysym)", "url(#mysym) none" ] - }, - "marker-end": { - domProp: "markerEnd", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [] - }, - "marker-mid": { - domProp: "markerMid", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [] - }, - "marker-start": { - domProp: "markerStart", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [] - }, - "mask": { - domProp: "mask", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mymask)" ], - invalid_values: [] - }, - "shape-rendering": { - domProp: "shapeRendering", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "optimizeSpeed", "crispEdges", "geometricPrecision" ], - invalid_values: [] - }, - "stop-color": { - domProp: "stopColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], - other_values: [ "green", "#fc3", "currentColor" ], - invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] - }, - "stop-opacity": { - domProp: "stopOpacity", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000" ], - other_values: [ "0", "0.3", "-7.3" ], - invalid_values: [] - }, - "stroke": { - domProp: "stroke", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)", "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "currentColor", "context-fill", "context-stroke" ], - invalid_values: [ "000000", "ff00ff" ] - }, - "stroke-dasharray": { - domProp: "strokeDasharray", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none", "context-value" ], - other_values: [ "5px,3px,2px", "5px 3px 2px", " 5px ,3px , 2px ", "1px", "5%", "3em" ], - invalid_values: [ "-5px,3px,2px", "5px,3px,-2px" ] - }, - "stroke-dashoffset": { - domProp: "strokeDashoffset", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "-0px", "0em", "context-value" ], - other_values: [ "3px", "3%", "1em" ], - invalid_values: [] - }, - "stroke-linecap": { - domProp: "strokeLinecap", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "butt" ], - other_values: [ "round", "square" ], - invalid_values: [] - }, - "stroke-linejoin": { - domProp: "strokeLinejoin", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "miter" ], - other_values: [ "round", "bevel" ], - invalid_values: [] - }, - "stroke-miterlimit": { - domProp: "strokeMiterlimit", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "4" ], - other_values: [ "1", "7", "5000", "1.1" ], - invalid_values: [ "0.9", "0", "-1", "3px", "-0.3" ] - }, - "stroke-opacity": { - domProp: "strokeOpacity", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000", "context-fill-opacity", "context-stroke-opacity" ], - other_values: [ "0", "0.3", "-7.3" ], - invalid_values: [] - }, - "stroke-width": { - domProp: "strokeWidth", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1px", "context-value" ], - other_values: [ "0", "0px", "-0em", "17px", "0.2em" ], - invalid_values: [ "-0.1px", "-3px" ] - }, - "text-anchor": { - domProp: "textAnchor", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "start" ], - other_values: [ "middle", "end" ], - invalid_values: [] - }, - "text-rendering": { - domProp: "textRendering", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "optimizeSpeed", "optimizeLegibility", "geometricPrecision" ], - invalid_values: [] - }, - "vector-effect": { - domProp: "vectorEffect", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "non-scaling-stroke" ], - invalid_values: [] - }, - "align-content": { - domProp: "alignContent", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch" ], - other_values: [ - "flex-start", - "flex-end", - "center", - "space-between", - "space-around" - ], - invalid_values: [ "abc", "30px", "0", "auto" ] - }, - "align-items": { - domProp: "alignItems", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch" ], - other_values: [ "flex-start", "flex-end", "center", "baseline" ], - invalid_values: [ "space-between", "abc", "30px" ] - }, - "align-self": { - domProp: "alignSelf", - inherited: false, - type: CSS_TYPE_LONGHAND, - // (Assuming defaults on the parent, 'auto' will compute to 'stretch'.) - initial_values: [ "auto", "stretch" ], - other_values: [ "flex-start", "flex-end", "center", "baseline" ], - invalid_values: [ "space-between", "abc", "30px" ] - }, - "flex": { - domProp: "flex", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "flex-grow", - "flex-shrink", - "flex-basis" - ], - initial_values: [ "0 1 auto", "auto 0 1", "0 auto", "auto 0" ], - other_values: [ - "none", - "1", - "0", - "0 1", - "0.5", - "1.2 3.4", - "0 0 0", - "0 0 0px", - "0px 0 0", - "5px 0 0", - "2 auto", - "auto 4", - "auto 5.6 7.8", - "-moz-max-content", - "1 -moz-max-content", - "1 2 -moz-max-content", - "-moz-max-content 1", - "-moz-max-content 1 2", - "-0" - ], - invalid_values: [ - "1 2px 3", - "1 auto 3", - "1px 2 3px", - "1px 2 3 4px", - "-1", - "1 -1" - ] - }, - "flex-basis": { - domProp: "flexBasis", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ " auto" ], + "opacity": { + domProp: "opacity", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "17", "397.376", "3e1", "3e+1", "3e0", "3e+0", "3e-0" ], + other_values: [ "0", "0.4", "0.0000", "-3", "3e-1" ], + invalid_values: [ "0px", "1px" ] + }, + "-moz-orient": { + domProp: "MozOrient", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "horizontal", "vertical" ], + invalid_values: [ "none" ] + }, + "orphans": { + domProp: "orphans", + inherited: true, + backend_only: true, + type: CSS_TYPE_LONGHAND, + // XXX requires display:block + initial_values: [ "2" ], + other_values: [ "1", "7" ], + invalid_values: [ "0", "-1", "0px", "3px", "3e1" ] + }, + "outline": { + domProp: "outline", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "outline-color", "outline-style", "outline-width" ], + initial_values: [ + "none", "medium", "thin", + // XXX Should be invert, but currently currentcolor. + //"invert", "none medium invert" + "currentColor", "none medium currentcolor" + ], + other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid" ], + invalid_values: [ "5%", "5", "5 solid green" ] + }, + "outline-color": { + domProp: "outlineColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "black" }, + initial_values: [ "currentColor", "-moz-use-text-color" ], // XXX should be invert + other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000", "cc00ff" ] + }, + "outline-offset": { + domProp: "outlineOffset", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0px", "-0", "calc(0px)", "calc(3em + 2px - 2px - 3em)", "calc(-0em)" ], + other_values: [ "-3px", "1em", "calc(3em)", "calc(7pt + 3 * 2em)", "calc(-3px)" ], + invalid_values: [ "5%" ] + }, + "outline-style": { + domProp: "outlineStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + // XXX Should 'hidden' be the same as initial? + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "outline-width": { + domProp: "outlineWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "outline-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0px)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%", "5" ] + }, + "overflow": { + domProp: "overflow", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + prerequisites: { "display": "block" }, + subproperties: [ "overflow-x", "overflow-y" ], + initial_values: [ "visible" ], + other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable", "-moz-scrollbars-none" ], + invalid_values: [] + }, + "overflow-x": { + domProp: "overflowX", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block", "overflow-y": "visible" }, + initial_values: [ "visible" ], + other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable" ], + invalid_values: [] + }, + "overflow-y": { + domProp: "overflowY", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block", "overflow-x": "visible" }, + initial_values: [ "visible" ], + other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable" ], + invalid_values: [] + }, + "padding": { + domProp: "padding", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "padding-top", "padding-right", "padding-bottom", "padding-left" ], + initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt", "calc(0px) calc(0em) calc(-2px) calc(-1%)" ], + other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ], + invalid_values: [], + quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, + }, + "padding-bottom": { + domProp: "paddingBottom", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "padding-left": { + domProp: "paddingLeft", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* no subproperties */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "padding-right": { + domProp: "paddingRight", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* no subproperties */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "padding-top": { + domProp: "paddingTop", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "page": { + domProp: "page", + inherited: true, + backend_only: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "foo", "bar" ], + invalid_values: [ "3px" ] + }, + "page-break-after": { + domProp: "pageBreakAfter", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "always", "avoid", "left", "right" ], + invalid_values: [] + }, + "page-break-before": { + domProp: "pageBreakBefore", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "always", "avoid", "left", "right" ], + invalid_values: [] + }, + "page-break-inside": { + domProp: "pageBreakInside", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "avoid" ], + invalid_values: [ "left", "right" ] + }, + "pointer-events": { + domProp: "pointerEvents", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "visiblePainted", "visibleFill", "visibleStroke", "visible", + "painted", "fill", "stroke", "all", "none" ], + invalid_values: [] + }, + "position": { + domProp: "position", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "static" ], + other_values: [ "relative", "absolute", "fixed" ], + invalid_values: [] + }, + "quotes": { + domProp: "quotes", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ '"\u201C" "\u201D" "\u2018" "\u2019"', + '"\\201C" "\\201D" "\\2018" "\\2019"' ], + other_values: [ "none", "'\"' '\"'" ], + invalid_values: [] + }, + "right": { + domProp: "right", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* FIXME: run tests with multiple prerequisites */ + prerequisites: { "position": "relative" }, + /* XXX 0 may or may not be equal to auto */ + initial_values: [ "auto" ], + other_values: [ "32px", "-3em", "12%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "size": { + /* XXX not a real property; applies only to page context */ + domProp: "size", + inherited: false, + backend_only: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "landscape", "portrait", "8.5in 11in", "14in 11in", "297mm 210mm", "21cm 29.7cm", "100mm" ], + invalid_values: [ + // XXX spec unclear on 0s and negatives + "100mm 100mm 100mm" + ] + }, + "table-layout": { + domProp: "tableLayout", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "fixed" ], + invalid_values: [] + }, + "text-align": { + domProp: "textAlign", + inherited: true, + type: CSS_TYPE_LONGHAND, + // don't know whether left and right are same as start + initial_values: [ "start" ], + other_values: [ "center", "justify", "end" ], + invalid_values: [ "true", "true true" ] + }, + "-moz-text-align-last": { + domProp: "MozTextAlignLast", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "center", "justify", "start", "end", "left", "right" ], + invalid_values: [] + }, + "text-decoration": { + domProp: "textDecoration", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + subproperties: [ "-moz-text-decoration-color", "-moz-text-decoration-line", "-moz-text-decoration-style" ], + initial_values: [ "none" ], + other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ], + invalid_values: [ "none none", "underline none", "none underline", "blink none", "none blink", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink", + "underline red solid", "underline #ff0000", "solid underline", "red underline", "#ff0000 underline" ] + }, + "-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", "000000", "ff00ff" ] + }, + "-moz-text-decoration-line": { + domProp: "MozTextDecorationLine", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ], + invalid_values: [ "none none", "underline none", "none underline", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink" ] + }, + "-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, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "calc(3em - 5em + 2px + 2em - 2px)" ], + other_values: [ "2em", "5%", "-10px", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "text-overflow": { + domProp: "textOverflow", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "clip" ], + other_values: [ "ellipsis", '""', "''", '"hello"', 'clip clip', 'ellipsis ellipsis', 'clip ellipsis', 'clip ""', '"hello" ""', '"" ellipsis' ], + invalid_values: [ "none", "auto", '"hello" inherit', 'inherit "hello"', 'clip initial', 'initial clip', 'initial inherit', 'inherit initial', 'inherit none'] + }, + "text-shadow": { + domProp: "textShadow", + inherited: true, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "blue" }, + initial_values: [ "none" ], + other_values: [ "2px 2px", "2px 2px 1px", "2px 2px green", "2px 2px 1px green", "green 2px 2px", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px", + /* calc() values */ + "2px 2px calc(-5px)", /* clamped */ + "calc(3em - 2px) 2px green", + "green calc(3em - 2px) 2px", + "2px calc(2px + 0.2em)", + "blue 2px calc(2px + 0.2em)", + "2px calc(2px + 0.2em) blue", + "calc(-2px) calc(-2px)", + "-2px -2px", + "calc(2px) calc(2px)", + "calc(2px) calc(2px) calc(2px)", + ], + invalid_values: [ "3% 3%", "2px 2px -5px", "2px 2px 2px 2px", "2px 2px, none", "none, 2px 2px", "inherit, 2px 2px", "2px 2px, inherit", "2 2px", "2px 2", "2px 2px 2", "2px 2px 2px 2", + "calc(2px) calc(2px) calc(2px) calc(2px)" + ] + }, + "text-transform": { + domProp: "textTransform", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "capitalize", "uppercase", "lowercase", "full-width" ], + invalid_values: [] + }, + "top": { + domProp: "top", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* FIXME: run tests with multiple prerequisites */ + prerequisites: { "position": "relative" }, + /* XXX 0 may or may not be equal to auto */ + initial_values: [ "auto" ], + other_values: [ "32px", "-3em", "12%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "transition": { + domProp: "transition", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], + initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ], + other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all" ], + invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial", "1s width,,2s color", "1s width, ,2s color" ] + }, + "transition-delay": { + domProp: "transitionDelay", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px" ] + }, + "transition-duration": { + domProp: "transitionDuration", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px", "-1ms", "-2s" ] + }, + "transition-property": { + domProp: "transitionProperty", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "all" ], + other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all" ], + invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ] + }, + "transition-timing-function": { + domProp: "transitionTimingFunction", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], + other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], + invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + }, + "unicode-bidi": { + domProp: "unicodeBidi", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "embed", "bidi-override", "-moz-isolate", "-moz-plaintext", "-moz-isolate-override" ], + invalid_values: [ "auto", "none" ] + }, + "vertical-align": { + domProp: "verticalAlign", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "baseline" ], + other_values: [ "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom", "-moz-middle-with-baseline", "15%", "3px", "0.2em", "-5px", "-3%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "visibility": { + domProp: "visibility", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "visible" ], + other_values: [ "hidden", "collapse" ], + invalid_values: [] + }, + "white-space": { + domProp: "whiteSpace", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "pre", "nowrap", "pre-wrap", "pre-line", "-moz-pre-discard-newlines" ], + invalid_values: [] + }, + "widows": { + domProp: "widows", + inherited: true, + backend_only: true, + type: CSS_TYPE_LONGHAND, + // XXX requires display:block + initial_values: [ "2" ], + other_values: [ "1", "7" ], + invalid_values: [ "0", "-1", "0px", "3px", "3e1" ] + }, + "width": { + domProp: "width", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* computed value tests for width test more with display:block */ + prerequisites: { "display": "block" }, + initial_values: [ " auto" ], + /* XXX these have prerequisites */ + other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "3e1px", "3e+1px", "3e0px", "3e+0px", "3e-0px", "3e-1px", + "3.2e1px", "3.2e+1px", "3.2e0px", "3.2e+0px", "3.2e-0px", "3.2e-1px", + "3e1%", "3e+1%", "3e0%", "3e+0%", "3e-0%", "3e-1%", + "3.2e1%", "3.2e+1%", "3.2e0%", "3.2e+0%", "3.2e-0%", "3.2e-1%", + /* valid -moz-calc() values */ + "-moz-calc(-2px)", + "-moz-calc(2px)", + "-moz-calc(50%)", + "-moz-calc(50% + 2px)", + "-moz-calc( 50% + 2px)", + "-moz-calc(50% + 2px )", + "-moz-calc( 50% + 2px )", + "-moz-calc(50% - -2px)", + "-moz-calc(2px - -50%)", + "-moz-calc(3*25px)", + "-moz-calc(3 *25px)", + "-moz-calc(3 * 25px)", + "-moz-calc(3* 25px)", + "-moz-calc(25px*3)", + "-moz-calc(25px *3)", + "-moz-calc(25px* 3)", + "-moz-calc(25px * 3)", + "-moz-calc(3*25px + 50%)", + "-moz-calc(50% - 3em + 2px)", + "-moz-calc(50% - (3em + 2px))", + "-moz-calc((50% - 3em) + 2px)", + "-moz-calc(2em)", + "-moz-calc(50%)", + "-moz-calc(50px/2)", + "-moz-calc(50px/(2 - 1))", + /* valid calc() values */ + "calc(-2px)", + "calc(2px)", + "calc(50%)", + "calc(50% + 2px)", + "calc( 50% + 2px)", + "calc(50% + 2px )", + "calc( 50% + 2px )", + "calc(50% - -2px)", + "calc(2px - -50%)", + "calc(3*25px)", + "calc(3 *25px)", + "calc(3 * 25px)", + "calc(3* 25px)", + "calc(25px*3)", + "calc(25px *3)", + "calc(25px* 3)", + "calc(25px * 3)", + "calc(3*25px + 50%)", + "calc(50% - 3em + 2px)", + "calc(50% - (3em + 2px))", + "calc((50% - 3em) + 2px)", + "calc(2em)", + "calc(50%)", + "calc(50px/2)", + "calc(50px/(2 - 1))", + ], + invalid_values: [ "none", "-2px", + /* invalid -moz-calc() values */ + "-moz-calc(50%+ 2px)", + "-moz-calc(50% +2px)", + "-moz-calc(50%+2px)", + /* invalid calc() values */ + "calc(50%+ 2px)", + "calc(50% +2px)", + "calc(50%+2px)", + "-moz-min()", + "calc(min())", + "-moz-max()", + "calc(max())", + "-moz-min(5px)", + "calc(min(5px))", + "-moz-max(5px)", + "calc(max(5px))", + "-moz-min(5px,2em)", + "calc(min(5px,2em))", + "-moz-max(5px,2em)", + "calc(max(5px,2em))", + "calc(50px/(2 - 2))", + /* If we ever support division by values, which is + * complicated for the reasons described in + * http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html + * , we should support all 4 of these as described in + * http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html + */ + "calc((3em / 100%) * 3em)", + "calc(3em / 100% * 3em)", + "calc(3em * (3em / 100%))", + "calc(3em * 3em / 100%)", + ], + quirks_values: { "5": "5px" }, + }, + "word-break": { + domProp: "wordBreak", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "break-all", "keep-all" ], + invalid_values: [] + }, + "word-spacing": { + domProp: "wordSpacing", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal", "0", "0px", "-0em", + "calc(-0px)", "calc(0em)" + ], + other_values: [ "1em", "2px", "-3px", + "calc(1em)", "calc(1em + 3px)", + "calc(15px / 2)", "calc(15px/2)", + "calc(-2em)" + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "word-wrap": { + domProp: "wordWrap", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "break-word" ], + invalid_values: [] + }, + "-moz-hyphens": { + domProp: "MozHyphens", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "manual" ], + other_values: [ "none", "auto" ], + invalid_values: [] + }, + "z-index": { + domProp: "zIndex", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX requires position */ + initial_values: [ "auto" ], + other_values: [ "0", "3", "-7000", "12000" ], + invalid_values: [ "3.0", "17.5", "3e1" ] + } + , + "clip-path": { + domProp: "clipPath", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#mypath)", "url('404.svg#mypath')" ], + invalid_values: [] + }, + "clip-rule": { + domProp: "clipRule", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "nonzero" ], + other_values: [ "evenodd" ], + invalid_values: [] + }, + "color-interpolation": { + domProp: "colorInterpolation", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "sRGB" ], + other_values: [ "auto", "linearRGB" ], + invalid_values: [] + }, + "color-interpolation-filters": { + domProp: "colorInterpolationFilters", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "linearRGB" ], + other_values: [ "sRGB", "auto" ], + invalid_values: [] + }, + "dominant-baseline": { + domProp: "dominantBaseline", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "use-script", "no-change", "reset-size", "ideographic", "alphabetic", "hanging", "mathematical", "central", "middle", "text-after-edge", "text-before-edge" ], + invalid_values: [] + }, + "fill": { + domProp: "fill", + inherited: true, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "blue" }, + initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], + other_values: [ "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "none", "currentColor", "context-fill", "context-stroke" ], + invalid_values: [ "000000", "ff00ff" ] + }, + "fill-opacity": { + domProp: "fillOpacity", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "2.8", "1.000", "context-fill-opacity", "context-stroke-opacity" ], + other_values: [ "0", "0.3", "-7.3" ], + invalid_values: [] + }, + "fill-rule": { + domProp: "fillRule", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "nonzero" ], + other_values: [ "evenodd" ], + invalid_values: [] + }, + "filter": { + domProp: "filter", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#myfilt)" ], + invalid_values: [ "url(#myfilt) none" ] + }, + "flood-color": { + domProp: "floodColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "blue" }, + initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], + other_values: [ "green", "#fc3", "currentColor" ], + invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] + }, + "flood-opacity": { + domProp: "floodOpacity", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "2.8", "1.000" ], + other_values: [ "0", "0.3", "-7.3" ], + invalid_values: [] + }, + "image-rendering": { + domProp: "imageRendering", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "optimizeSpeed", "optimizeQuality", "-moz-crisp-edges" ], + invalid_values: [] + }, + "lighting-color": { + domProp: "lightingColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "blue" }, + initial_values: [ "white", "#fff", "#ffffff", "rgb(255,255,255)", "rgba(255,255,255,1.0)", "rgba(255,255,255,42.0)" ], + other_values: [ "green", "#fc3", "currentColor" ], + invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] + }, + "marker": { + domProp: "marker", + inherited: true, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "marker-start", "marker-mid", "marker-end" ], + initial_values: [ "none" ], + other_values: [ "url(#mysym)" ], + invalid_values: [ "none none", "url(#mysym) url(#mysym)", "none url(#mysym)", "url(#mysym) none" ] + }, + "marker-end": { + domProp: "markerEnd", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#mysym)" ], + invalid_values: [] + }, + "marker-mid": { + domProp: "markerMid", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#mysym)" ], + invalid_values: [] + }, + "marker-start": { + domProp: "markerStart", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#mysym)" ], + invalid_values: [] + }, + "mask": { + domProp: "mask", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#mymask)" ], + invalid_values: [] + }, + "shape-rendering": { + domProp: "shapeRendering", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "optimizeSpeed", "crispEdges", "geometricPrecision" ], + invalid_values: [] + }, + "stop-color": { + domProp: "stopColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "blue" }, + initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], + other_values: [ "green", "#fc3", "currentColor" ], + invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] + }, + "stop-opacity": { + domProp: "stopOpacity", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "2.8", "1.000" ], + other_values: [ "0", "0.3", "-7.3" ], + invalid_values: [] + }, + "stroke": { + domProp: "stroke", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)", "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "currentColor", "context-fill", "context-stroke" ], + invalid_values: [ "000000", "ff00ff" ] + }, + "stroke-dasharray": { + domProp: "strokeDasharray", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none", "context-value" ], + other_values: [ "5px,3px,2px", "5px 3px 2px", " 5px ,3px , 2px ", "1px", "5%", "3em" ], + invalid_values: [ "-5px,3px,2px", "5px,3px,-2px" ] + }, + "stroke-dashoffset": { + domProp: "strokeDashoffset", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "-0px", "0em", "context-value" ], + other_values: [ "3px", "3%", "1em" ], + invalid_values: [] + }, + "stroke-linecap": { + domProp: "strokeLinecap", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "butt" ], + other_values: [ "round", "square" ], + invalid_values: [] + }, + "stroke-linejoin": { + domProp: "strokeLinejoin", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "miter" ], + other_values: [ "round", "bevel" ], + invalid_values: [] + }, + "stroke-miterlimit": { + domProp: "strokeMiterlimit", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "4" ], + other_values: [ "1", "7", "5000", "1.1" ], + invalid_values: [ "0.9", "0", "-1", "3px", "-0.3" ] + }, + "stroke-opacity": { + domProp: "strokeOpacity", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "2.8", "1.000", "context-fill-opacity", "context-stroke-opacity" ], + other_values: [ "0", "0.3", "-7.3" ], + invalid_values: [] + }, + "stroke-width": { + domProp: "strokeWidth", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1px", "context-value" ], + other_values: [ "0", "0px", "-0em", "17px", "0.2em" ], + invalid_values: [ "-0.1px", "-3px" ] + }, + "text-anchor": { + domProp: "textAnchor", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "start" ], + other_values: [ "middle", "end" ], + invalid_values: [] + }, + "text-rendering": { + domProp: "textRendering", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "optimizeSpeed", "optimizeLegibility", "geometricPrecision" ], + invalid_values: [] + }, + "vector-effect": { + domProp: "vectorEffect", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "non-scaling-stroke" ], + invalid_values: [] + }, + "align-content": { + domProp: "alignContent", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "stretch" ], + other_values: [ + "flex-start", + "flex-end", + "center", + "space-between", + "space-around" + ], + invalid_values: [ "abc", "30px", "0", "auto" ] + }, + "align-items": { + domProp: "alignItems", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "stretch" ], + other_values: [ "flex-start", "flex-end", "center", "baseline" ], + invalid_values: [ "space-between", "abc", "30px" ] + }, + "align-self": { + domProp: "alignSelf", + inherited: false, + type: CSS_TYPE_LONGHAND, + // (Assuming defaults on the parent, 'auto' will compute to 'stretch'.) + initial_values: [ "auto", "stretch" ], + other_values: [ "flex-start", "flex-end", "center", "baseline" ], + invalid_values: [ "space-between", "abc", "30px" ] + }, + "flex": { + domProp: "flex", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "flex-grow", + "flex-shrink", + "flex-basis" + ], + initial_values: [ "0 1 auto", "auto 0 1", "0 auto", "auto 0" ], + other_values: [ + "none", + "1", + "0", + "0 1", + "0.5", + "1.2 3.4", + "0 0 0", + "0 0 0px", + "0px 0 0", + "5px 0 0", + "2 auto", + "auto 4", + "auto 5.6 7.8", + "-moz-max-content", + "1 -moz-max-content", + "1 2 -moz-max-content", + "-moz-max-content 1", + "-moz-max-content 1 2", + "-0" + ], + invalid_values: [ + "1 2px 3", + "1 auto 3", + "1px 2 3px", + "1px 2 3 4px", + "-1", + "1 -1" + ] + }, + "flex-basis": { + domProp: "flexBasis", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ " auto" ], // NOTE: This is cribbed directly from the "width" chunk, since this // property takes the exact same values as width (albeit with // different semantics on 'auto'). // XXXdholbert (Maybe these should get separated out into // a reusable array defined at the top of this file?) - other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", - // valid calc() values - "calc(-2px)", - "calc(2px)", - "calc(50%)", - "calc(50% + 2px)", - "calc( 50% + 2px)", - "calc(50% + 2px )", - "calc( 50% + 2px )", - "calc(50% - -2px)", - "calc(2px - -50%)", - "calc(3*25px)", - "calc(3 *25px)", - "calc(3 * 25px)", - "calc(3* 25px)", - "calc(25px*3)", - "calc(25px *3)", - "calc(25px* 3)", - "calc(25px * 3)", - "calc(3*25px + 50%)", - "calc(50% - 3em + 2px)", - "calc(50% - (3em + 2px))", - "calc((50% - 3em) + 2px)", - "calc(2em)", - "calc(50%)", - "calc(50px/2)", - "calc(50px/(2 - 1))" - ], - invalid_values: [ "none", "-2px", - // invalid calc() values - "calc(50%+ 2px)", - "calc(50% +2px)", - "calc(50%+2px)", - "-moz-min()", - "calc(min())", - "-moz-max()", - "calc(max())", - "-moz-min(5px)", - "calc(min(5px))", - "-moz-max(5px)", - "calc(max(5px))", - "-moz-min(5px,2em)", - "calc(min(5px,2em))", - "-moz-max(5px,2em)", - "calc(max(5px,2em))", - "calc(50px/(2 - 2))", - // If we ever support division by values, which is - // complicated for the reasons described in - // http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html - // , we should support all 4 of these as described in - // http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html - "calc((3em / 100%) * 3em)", - "calc(3em / 100% * 3em)", - "calc(3em * (3em / 100%))", - "calc(3em * 3em / 100%)" - ] - }, - "flex-direction": { - domProp: "flexDirection", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "row" ], - other_values: [ "row-reverse", "column", "column-reverse" ], - invalid_values: [ "10px", "30%", "justify", "column wrap" ] - }, - "flex-flow": { - domProp: "flexFlow", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "flex-direction", - "flex-wrap" - ], - initial_values: [ "row nowrap", "nowrap row", "row", "nowrap" ], - other_values: [ - // only specifying one property: - "column", - "wrap", - "wrap-reverse", - // specifying both properties, 'flex-direction' first: - "row wrap", - "row wrap-reverse", - "column wrap", - "column wrap-reverse", - // specifying both properties, 'flex-wrap' first: - "wrap row", - "wrap column", - "wrap-reverse row", - "wrap-reverse column", - ], - invalid_values: [ - // specifying flex-direction twice (invalid): - "row column", - "row column nowrap", - "row nowrap column", - "nowrap row column", - // specifying flex-wrap twice (invalid): - "nowrap wrap-reverse", - "nowrap wrap-reverse row", - "nowrap row wrap-reverse", - "row nowrap wrap-reverse", - // Invalid data-type / invalid keyword type: - "1px", "5%", "justify", "none" - ] - }, - "flex-grow": { - domProp: "flexGrow", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0" ], - other_values: [ "3", "1", "1.0", "2.5", "123" ], - invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ] - }, - "flex-shrink": { - domProp: "flexShrink", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1" ], - other_values: [ "3", "0", "0.0", "2.5", "123" ], - invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ] - }, - "flex-wrap": { - domProp: "flexWrap", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "nowrap" ], - other_values: [ "wrap", "wrap-reverse" ], - invalid_values: [ "10px", "30%", "justify", "column wrap", "auto" ] - }, - "order": { - domProp: "order", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0" ], - other_values: [ "1", "99999", "-1", "-50" ], - invalid_values: [ "0px", "1.0", "1.", "1%", "0.2", "3em", "stretch" ] - }, - "justify-content": { - domProp: "justifyContent", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "flex-start" ], - other_values: [ "flex-end", "center", "space-between", "space-around" ], - invalid_values: [ "baseline", "stretch", "30px", "5%" ] - }, + other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + // valid calc() values + "calc(-2px)", + "calc(2px)", + "calc(50%)", + "calc(50% + 2px)", + "calc( 50% + 2px)", + "calc(50% + 2px )", + "calc( 50% + 2px )", + "calc(50% - -2px)", + "calc(2px - -50%)", + "calc(3*25px)", + "calc(3 *25px)", + "calc(3 * 25px)", + "calc(3* 25px)", + "calc(25px*3)", + "calc(25px *3)", + "calc(25px* 3)", + "calc(25px * 3)", + "calc(3*25px + 50%)", + "calc(50% - 3em + 2px)", + "calc(50% - (3em + 2px))", + "calc((50% - 3em) + 2px)", + "calc(2em)", + "calc(50%)", + "calc(50px/2)", + "calc(50px/(2 - 1))" + ], + invalid_values: [ "none", "-2px", + // invalid calc() values + "calc(50%+ 2px)", + "calc(50% +2px)", + "calc(50%+2px)", + "-moz-min()", + "calc(min())", + "-moz-max()", + "calc(max())", + "-moz-min(5px)", + "calc(min(5px))", + "-moz-max(5px)", + "calc(max(5px))", + "-moz-min(5px,2em)", + "calc(min(5px,2em))", + "-moz-max(5px,2em)", + "calc(max(5px,2em))", + "calc(50px/(2 - 2))", + // If we ever support division by values, which is + // complicated for the reasons described in + // http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html + // , we should support all 4 of these as described in + // http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html + "calc((3em / 100%) * 3em)", + "calc(3em / 100% * 3em)", + "calc(3em * (3em / 100%))", + "calc(3em * 3em / 100%)" + ] + }, + "flex-direction": { + domProp: "flexDirection", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "row" ], + other_values: [ "row-reverse", "column", "column-reverse" ], + invalid_values: [ "10px", "30%", "justify", "column wrap" ] + }, + "flex-flow": { + domProp: "flexFlow", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "flex-direction", + "flex-wrap" + ], + initial_values: [ "row nowrap", "nowrap row", "row", "nowrap" ], + other_values: [ + // only specifying one property: + "column", + "wrap", + "wrap-reverse", + // specifying both properties, 'flex-direction' first: + "row wrap", + "row wrap-reverse", + "column wrap", + "column wrap-reverse", + // specifying both properties, 'flex-wrap' first: + "wrap row", + "wrap column", + "wrap-reverse row", + "wrap-reverse column", + ], + invalid_values: [ + // specifying flex-direction twice (invalid): + "row column", + "row column nowrap", + "row nowrap column", + "nowrap row column", + // specifying flex-wrap twice (invalid): + "nowrap wrap-reverse", + "nowrap wrap-reverse row", + "nowrap row wrap-reverse", + "row nowrap wrap-reverse", + // Invalid data-type / invalid keyword type: + "1px", "5%", "justify", "none" + ] + }, + "flex-grow": { + domProp: "flexGrow", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0" ], + other_values: [ "3", "1", "1.0", "2.5", "123" ], + invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ] + }, + "flex-shrink": { + domProp: "flexShrink", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1" ], + other_values: [ "3", "0", "0.0", "2.5", "123" ], + invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ] + }, + "flex-wrap": { + domProp: "flexWrap", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "nowrap" ], + other_values: [ "wrap", "wrap-reverse" ], + invalid_values: [ "10px", "30%", "justify", "column wrap", "auto" ] + }, + "order": { + domProp: "order", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0" ], + other_values: [ "1", "99999", "-1", "-50" ], + invalid_values: [ "0px", "1.0", "1.", "1%", "0.2", "3em", "stretch" ] + }, + "justify-content": { + domProp: "justifyContent", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "flex-start" ], + other_values: [ "flex-end", "center", "space-between", "space-around" ], + invalid_values: [ "baseline", "stretch", "30px", "5%" ] + }, - // Aliases - "-moz-transform": { - domProp: "MozTransform", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transform", - subproperties: [ "transform" ], - prerequisites: { "width": "300px", "height": "50px" }, - initial_values: [ "none" ], - other_values: [ "translatex(1px)", "translatex(4em)", - "translatex(-4px)", "translatex(3px)", - "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", - "translatey(4em)", "translate(3px)", "translate(10px, -3px)", - "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", - "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", - "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", - "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", - "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", - "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", - "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", - "translatex(50%)", "translatey(50%)", "translate(50%)", - "translate(3%, 5px)", "translate(5px, 3%)", - "matrix(1, 2, 3, 4, 5, 6)", - /* valid calc() values */ - "translatex(calc(5px + 10%))", - "translatey(calc(0.25 * 5px + 10% / 3))", - "translate(calc(5px - 10% * 3))", - "translate(calc(5px - 3 * 10%), 50px)", - "translate(-50px, calc(5px - 10% * 3))", - /* valid only when prefixed */ - "matrix(1, 2, 3, 4, 5px, 6%)", - "matrix(1, 2, 3, 4, 5%, 6px)", - "matrix(1, 2, 3, 4, 5%, 6%)", - "matrix(1, 2, 3, 4, 5px, 6em)", - "matrix(1, 0, 0, 1, calc(5px * 3), calc(10% - 3px))", - "translatez(1px)", "translatez(4em)", "translatez(-4px)", - "translatez(0px)", "translatez(2px) translatez(5px)", - "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", - "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", - "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", - "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", - "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", - "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", - /* valid only when prefixed */ - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)", - ], - invalid_values: ["1px", "#0000ff", "red", "auto", - "translatex(1)", "translatey(1)", "translate(2)", - "translate(-3, -4)", - "translatex(1px 1px)", "translatex(translatex(1px))", - "translatex(#0000ff)", "translatex(red)", "translatey()", - "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", - "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", - "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", - "matrix(0, 1, 2, 3%, 4%, 5%)", - /* invalid calc() values */ - "translatey(-moz-min(5px,10%))", - "translatex(-moz-max(5px,10%))", - "translate(10px, calc(min(5px,10%)))", - "translate(calc(max(5px,10%)), 10%)", - "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))", - "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", - "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)", - ], - }, - "-moz-transform-origin": { - domProp: "MozTransformOrigin", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transform-origin", - subproperties: [ "transform-origin" ], - prerequisites: { "width": "10px", "height": "10px", "display": "block"}, - initial_values: [ "50% 50%", "center", "center center" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", - "top", "bottom","top left", "top right", - "top center", "center left", "center right", - "bottom left", "bottom right", "bottom center", - "20% center", "6px center", "13in bottom", - "left 50px", "right 13%", "center 40px", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)", - "6px 5px 5px", - "top center 10px" - ], - invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff", - "border", "center red", "right diagonal", - "#00ffff bottom"] - }, - "-moz-perspective-origin": { - domProp: "MozPerspectiveOrigin", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "perspective-origin", - subproperties: [ "perspective-origin" ], - prerequisites: { "width": "10px", "height": "10px", "display": "block"}, - initial_values: [ "50% 50%", "center", "center center" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", - "top", "bottom","top left", "top right", - "top center", "center left", "center right", - "bottom left", "bottom right", "bottom center", - "20% center", "6px center", "13in bottom", - "left 50px", "right 13%", "center 40px", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)" ], - invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff", - "border", "center red", "right diagonal", - "#00ffff bottom"] - }, - "-moz-perspective": { - domProp: "MozPerspective", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "perspective", - subproperties: [ "perspective" ], - initial_values: [ "none" ], - other_values: [ "1000px", "500.2px" ], - invalid_values: [ "pants", "200", "0", "-100px", "-27.2em" ] - }, - "-moz-backface-visibility": { - domProp: "MozBackfaceVisibility", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "backface-visibility", - subproperties: [ "backface-visibility" ], - initial_values: [ "visible" ], - other_values: [ "hidden" ], - invalid_values: [ "collapse" ] - }, - "-moz-transform-style": { - domProp: "MozTransformStyle", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transform-style", - subproperties: [ "transform-style" ], - initial_values: [ "flat" ], - other_values: [ "preserve-3d" ], - invalid_values: [] - }, - "-moz-border-image": { - domProp: "MozBorderImage", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - alias_for: "border-image", - subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], - initial_values: [ "none" ], - other_values: [ "url('border.png') 27 27 27 27", - "url('border.png') 27", - "stretch url('border.png')", - "url('border.png') 27 fill", - "url('border.png') 27 27 27 27 repeat", - "repeat url('border.png') 27 27 27 27", - "url('border.png') repeat 27 27 27 27", - "url('border.png') fill 27 27 27 27 repeat", - "url('border.png') 27 27 27 27 / 1em", - "27 27 27 27 / 1em url('border.png') ", - "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat", - "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')", - "url('border.png') 27 27 27 27 / / 10 10 1em", - "fill 27 27 27 27 / / 10 10 1em url('border.png')", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ], - invalid_values: [ "url('border.png') 27 27 27 27 27", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em", - "url('border.png') 27 27 27 27 /", - "url('border.png') fill", - "url('border.png') fill repeat", - "fill repeat", - "url('border.png') fill / 1em", - "url('border.png') / repeat", - "url('border.png') 1 /", - "url('border.png') 1 / /", - "1 / url('border.png')", - "url('border.png') / 1", - "url('border.png') / / 1"] - }, - "-moz-transition": { - domProp: "MozTransition", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - alias_for: "transition", - subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], - initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ], - other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all" ], - invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial" ] - }, - "-moz-transition-delay": { - domProp: "MozTransitionDelay", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transition-delay", - subproperties: [ "transition-delay" ], - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px" ] - }, - "-moz-transition-duration": { - domProp: "MozTransitionDuration", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transition-duration", - subproperties: [ "transition-duration" ], - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px", "-1ms", "-2s" ] - }, - "-moz-transition-property": { - domProp: "MozTransitionProperty", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transition-property", - subproperties: [ "transition-property" ], - initial_values: [ "all" ], - other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all" ], - invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ] - }, - "-moz-transition-timing-function": { - domProp: "MozTransitionTimingFunction", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transition-timing-function", - subproperties: [ "transition-timing-function" ], - initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], - other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], - invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] - }, - "-moz-animation": { - domProp: "MozAnimation", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - alias_for: "animation", - subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ], - initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ], - other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ], - invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial" ] - }, - "-moz-animation-delay": { - domProp: "MozAnimationDelay", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-delay", - subproperties: [ "animation-delay" ], - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px" ] - }, - "-moz-animation-direction": { - domProp: "MozAnimationDirection", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-direction", - subproperties: [ "animation-direction" ], - initial_values: [ "normal" ], - other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ], - invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ] - }, - "-moz-animation-duration": { - domProp: "MozAnimationDuration", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-duration", - subproperties: [ "animation-duration" ], - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px", "-1ms", "-2s" ] - }, - "-moz-animation-fill-mode": { - domProp: "MozAnimationFillMode", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-fill-mode", - subproperties: [ "animation-fill-mode" ], - initial_values: [ "none" ], - other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ], - invalid_values: [ "all"] - }, - "-moz-animation-iteration-count": { - domProp: "MozAnimationIterationCount", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-iteration-count", - subproperties: [ "animation-iteration-count" ], - initial_values: [ "1" ], - other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ], - // negatives forbidden per - // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html - invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ] - }, - "-moz-animation-name": { - domProp: "MozAnimationName", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-name", - subproperties: [ "animation-name" ], - initial_values: [ "none" ], - other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ], - invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ] - }, - "-moz-animation-play-state": { - domProp: "MozAnimationPlayState", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-play-state", - subproperties: [ "animation-play-state" ], - initial_values: [ "running" ], - other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ], - invalid_values: [ "0" ] - }, - "-moz-animation-timing-function": { - domProp: "MozAnimationTimingFunction", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-timing-function", - subproperties: [ "animation-timing-function" ], - initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], - other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], - invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] - } + // Aliases + "-moz-transform": { + domProp: "MozTransform", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transform", + subproperties: [ "transform" ], + prerequisites: { "width": "300px", "height": "50px" }, + initial_values: [ "none" ], + other_values: [ "translatex(1px)", "translatex(4em)", + "translatex(-4px)", "translatex(3px)", + "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", + "translatey(4em)", "translate(3px)", "translate(10px, -3px)", + "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", + "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", + "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", + "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", + "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", + "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", + "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", + "translatex(50%)", "translatey(50%)", "translate(50%)", + "translate(3%, 5px)", "translate(5px, 3%)", + "matrix(1, 2, 3, 4, 5, 6)", + /* valid calc() values */ + "translatex(calc(5px + 10%))", + "translatey(calc(0.25 * 5px + 10% / 3))", + "translate(calc(5px - 10% * 3))", + "translate(calc(5px - 3 * 10%), 50px)", + "translate(-50px, calc(5px - 10% * 3))", + /* valid only when prefixed */ + "matrix(1, 2, 3, 4, 5px, 6%)", + "matrix(1, 2, 3, 4, 5%, 6px)", + "matrix(1, 2, 3, 4, 5%, 6%)", + "matrix(1, 2, 3, 4, 5px, 6em)", + "matrix(1, 0, 0, 1, calc(5px * 3), calc(10% - 3px))", + "translatez(1px)", "translatez(4em)", "translatez(-4px)", + "translatez(0px)", "translatez(2px) translatez(5px)", + "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", + "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", + "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", + "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", + "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", + "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", + /* valid only when prefixed */ + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)", + ], + invalid_values: ["1px", "#0000ff", "red", "auto", + "translatex(1)", "translatey(1)", "translate(2)", + "translate(-3, -4)", + "translatex(1px 1px)", "translatex(translatex(1px))", + "translatex(#0000ff)", "translatex(red)", "translatey()", + "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", + "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", + "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", + "matrix(0, 1, 2, 3%, 4%, 5%)", + /* invalid calc() values */ + "translatey(-moz-min(5px,10%))", + "translatex(-moz-max(5px,10%))", + "translate(10px, calc(min(5px,10%)))", + "translate(calc(max(5px,10%)), 10%)", + "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))", + "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", + "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)", + ], + }, + "-moz-transform-origin": { + domProp: "MozTransformOrigin", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transform-origin", + subproperties: [ "transform-origin" ], + prerequisites: { "width": "10px", "height": "10px", "display": "block"}, + initial_values: [ "50% 50%", "center", "center center" ], + other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", + "top", "bottom","top left", "top right", + "top center", "center left", "center right", + "bottom left", "bottom right", "bottom center", + "20% center", "6px center", "13in bottom", + "left 50px", "right 13%", "center 40px", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)", + "6px 5px 5px", + "top center 10px" + ], + invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff", + "border", "center red", "right diagonal", + "#00ffff bottom"] + }, + "-moz-perspective-origin": { + domProp: "MozPerspectiveOrigin", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "perspective-origin", + subproperties: [ "perspective-origin" ], + prerequisites: { "width": "10px", "height": "10px", "display": "block"}, + initial_values: [ "50% 50%", "center", "center center" ], + other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", + "top", "bottom","top left", "top right", + "top center", "center left", "center right", + "bottom left", "bottom right", "bottom center", + "20% center", "6px center", "13in bottom", + "left 50px", "right 13%", "center 40px", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)" ], + invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff", + "border", "center red", "right diagonal", + "#00ffff bottom"] + }, + "-moz-perspective": { + domProp: "MozPerspective", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "perspective", + subproperties: [ "perspective" ], + initial_values: [ "none" ], + other_values: [ "1000px", "500.2px" ], + invalid_values: [ "pants", "200", "0", "-100px", "-27.2em" ] + }, + "-moz-backface-visibility": { + domProp: "MozBackfaceVisibility", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "backface-visibility", + subproperties: [ "backface-visibility" ], + initial_values: [ "visible" ], + other_values: [ "hidden" ], + invalid_values: [ "collapse" ] + }, + "-moz-transform-style": { + domProp: "MozTransformStyle", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transform-style", + subproperties: [ "transform-style" ], + initial_values: [ "flat" ], + other_values: [ "preserve-3d" ], + invalid_values: [] + }, + "-moz-border-image": { + domProp: "MozBorderImage", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + alias_for: "border-image", + subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], + initial_values: [ "none" ], + other_values: [ "url('border.png') 27 27 27 27", + "url('border.png') 27", + "stretch url('border.png')", + "url('border.png') 27 fill", + "url('border.png') 27 27 27 27 repeat", + "repeat url('border.png') 27 27 27 27", + "url('border.png') repeat 27 27 27 27", + "url('border.png') fill 27 27 27 27 repeat", + "url('border.png') 27 27 27 27 / 1em", + "27 27 27 27 / 1em url('border.png') ", + "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat", + "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')", + "url('border.png') 27 27 27 27 / / 10 10 1em", + "fill 27 27 27 27 / / 10 10 1em url('border.png')", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ], + invalid_values: [ "url('border.png') 27 27 27 27 27", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em", + "url('border.png') 27 27 27 27 /", + "url('border.png') fill", + "url('border.png') fill repeat", + "fill repeat", + "url('border.png') fill / 1em", + "url('border.png') / repeat", + "url('border.png') 1 /", + "url('border.png') 1 / /", + "1 / url('border.png')", + "url('border.png') / 1", + "url('border.png') / / 1"] + }, + "-moz-transition": { + domProp: "MozTransition", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + alias_for: "transition", + subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], + initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ], + other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all" ], + invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial" ] + }, + "-moz-transition-delay": { + domProp: "MozTransitionDelay", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transition-delay", + subproperties: [ "transition-delay" ], + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px" ] + }, + "-moz-transition-duration": { + domProp: "MozTransitionDuration", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transition-duration", + subproperties: [ "transition-duration" ], + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px", "-1ms", "-2s" ] + }, + "-moz-transition-property": { + domProp: "MozTransitionProperty", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transition-property", + subproperties: [ "transition-property" ], + initial_values: [ "all" ], + other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all" ], + invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ] + }, + "-moz-transition-timing-function": { + domProp: "MozTransitionTimingFunction", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transition-timing-function", + subproperties: [ "transition-timing-function" ], + initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], + other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], + invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + }, + "-moz-animation": { + domProp: "MozAnimation", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + alias_for: "animation", + subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ], + initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ], + other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ], + invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial" ] + }, + "-moz-animation-delay": { + domProp: "MozAnimationDelay", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-delay", + subproperties: [ "animation-delay" ], + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px" ] + }, + "-moz-animation-direction": { + domProp: "MozAnimationDirection", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-direction", + subproperties: [ "animation-direction" ], + initial_values: [ "normal" ], + other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ], + invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ] + }, + "-moz-animation-duration": { + domProp: "MozAnimationDuration", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-duration", + subproperties: [ "animation-duration" ], + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px", "-1ms", "-2s" ] + }, + "-moz-animation-fill-mode": { + domProp: "MozAnimationFillMode", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-fill-mode", + subproperties: [ "animation-fill-mode" ], + initial_values: [ "none" ], + other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ], + invalid_values: [ "all"] + }, + "-moz-animation-iteration-count": { + domProp: "MozAnimationIterationCount", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-iteration-count", + subproperties: [ "animation-iteration-count" ], + initial_values: [ "1" ], + other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ], + // negatives forbidden per + // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html + invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ] + }, + "-moz-animation-name": { + domProp: "MozAnimationName", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-name", + subproperties: [ "animation-name" ], + initial_values: [ "none" ], + other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ], + invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ] + }, + "-moz-animation-play-state": { + domProp: "MozAnimationPlayState", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-play-state", + subproperties: [ "animation-play-state" ], + initial_values: [ "running" ], + other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ], + invalid_values: [ "0" ] + }, + "-moz-animation-timing-function": { + domProp: "MozAnimationTimingFunction", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-timing-function", + subproperties: [ "animation-timing-function" ], + initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], + other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], + invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + } } function logical_box_prop_get_computed(cs, property) { - if (! /^-moz-/.test(property)) - throw "Unexpected property"; - property = property.substring(5); - if (cs.getPropertyValue("direction") == "ltr") - property = property.replace("-start", "-left").replace("-end", "-right"); - else - property = property.replace("-start", "-right").replace("-end", "-left"); - return cs.getPropertyValue(property); + if (! /^-moz-/.test(property)) + throw "Unexpected property"; + property = property.substring(5); + if (cs.getPropertyValue("direction") == "ltr") + property = property.replace("-start", "-left").replace("-end", "-right"); + else + property = property.replace("-start", "-right").replace("-end", "-left"); + return cs.getPropertyValue(property); } // Get the computed value for a property. For shorthands, return the // computed values of all the subproperties, delimited by " ; ". function get_computed_value(cs, property) { - var info = gCSSProperties[property]; - if (info.type == CSS_TYPE_TRUE_SHORTHAND || - (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND && - property == "text-decoration")) { - var results = []; - for (var idx in info.subproperties) { - var subprop = info.subproperties[idx]; - results.push(get_computed_value(cs, subprop)); - } - return results.join(" ; "); - } - if (info.get_computed) - return info.get_computed(cs, property); - return cs.getPropertyValue(property); + var info = gCSSProperties[property]; + if (info.type == CSS_TYPE_TRUE_SHORTHAND || + (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND && + property == "text-decoration")) { + var results = []; + for (var idx in info.subproperties) { + var subprop = info.subproperties[idx]; + results.push(get_computed_value(cs, subprop)); + } + return results.join(" ; "); + } + if (info.get_computed) + return info.get_computed(cs, property); + return cs.getPropertyValue(property); } if (SpecialPowers.getBoolPref("layout.css.touch_action.enabled")) { @@ -4367,178 +4367,178 @@ if (SpecialPowers.getBoolPref("layout.css.touch_action.enabled")) { initial_values: ["auto"], other_values: ["none", "pan-x", "pan-y", "pan-x pan-y", "pan-y pan-x"], invalid_values: ["zoom", "pinch", "tap", "10px", "2", "auto pan-x", "pan-x auto", "none pan-x", "pan-x none", - "auto pan-y", "pan-y auto", "none pan-y", "pan-y none", - "pan-x pan-y none", "none pan-x pan-y", "pan-x pan-y auto", "auto pan-x pan-y"] + "auto pan-y", "pan-y auto", "none pan-y", "pan-y none", + "pan-x pan-y none", "none pan-x pan-y", "pan-x pan-y auto", "auto pan-x pan-y"] }; } if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) { - var verticalTextProperties = { - "writing-mode": { - domProp: "writingMode", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "horizontal-tb" ], - other_values: [ "vertical-lr", "vertical-rl" ], - invalid_values: [ "10px", "30%", "justify", "auto", "1em" ] - }, - "text-orientation": { - domProp: "textOrientation", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "upright", "sideways" ], - invalid_values: [ "none", "3em" ] - }, - "text-combine-upright": { - domProp: "textCombineUpright", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "all", "digits", "digits 2", "digits 3", "digits 4", "digits 3" ], - invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0", - "digits 12", "none 3", "digits 3.1415", "digits3", "digits 1", - "digits 3 all", "digits foo", "digits all", "digits 3.0" ] - } - }; - for (var prop in verticalTextProperties) { - gCSSProperties[prop] = verticalTextProperties[prop]; - } + var verticalTextProperties = { + "writing-mode": { + domProp: "writingMode", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "horizontal-tb" ], + other_values: [ "vertical-lr", "vertical-rl" ], + invalid_values: [ "10px", "30%", "justify", "auto", "1em" ] + }, + "text-orientation": { + domProp: "textOrientation", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "upright", "sideways" ], + invalid_values: [ "none", "3em" ] + }, + "text-combine-upright": { + domProp: "textCombineUpright", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "all", "digits", "digits 2", "digits 3", "digits 4", "digits 3" ], + invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0", + "digits 12", "none 3", "digits 3.1415", "digits3", "digits 1", + "digits 3 all", "digits foo", "digits all", "digits 3.0" ] + } + }; + for (var prop in verticalTextProperties) { + gCSSProperties[prop] = verticalTextProperties[prop]; + } } if (SpecialPowers.getBoolPref("layout.css.font-features.enabled")) { - var fontFeatureProperties = { - "font-kerning": { - domProp: "fontKerning", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "normal", "none" ], - invalid_values: [ "on" ] - }, - "font-variant-alternates": { - domProp: "fontVariantAlternates", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "historical-forms", - "styleset(alt-a, alt-b)", "character-variant(a, b, c)", "annotation(circled)", - "swash(squishy)", "styleset(complex\\ blob, a)", "annotation(\\62 lah)" ], - invalid_values: [ "historical-forms normal", "historical-forms historical-forms", - "swash", "swash(3)", "annotation(a, b)", "ornaments(a,b)", - "styleset(1234blah)", "annotation(a), annotation(b)", "annotation(a) normal" ] - }, - "font-variant-caps": { - domProp: "fontVariantCaps", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "titling-caps", "unicase" ], - invalid_values: [ "normal small-caps", "petite-caps normal", "unicase unicase" ] - }, - "font-variant-east-asian": { - domProp: "fontVariantEastAsian", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "jis78", "jis83", "jis90", "jis04", "simplified", "traditional", "full-width", "proportional-width", "ruby", - "jis78 full-width", "jis78 full-width ruby", "simplified proportional-width", "ruby simplified" ], - invalid_values: [ "jis78 normal", "jis90 jis04", "simplified traditional", "full-width proportional-width", - "ruby simplified ruby", "jis78 ruby simplified" ] - }, - "font-variant-ligatures": { - domProp: "fontVariantLigatures", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", - "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual", - "common-ligatures no-discretionary-ligatures", "contextual no-discretionary-ligatures", - "historical-ligatures no-common-ligatures", "no-historical-ligatures discretionary-ligatures", - "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual" ], - invalid_values: [ "common-ligatures normal", "common-ligatures no-common-ligatures", "common-ligatures common-ligatures", - "no-historical-ligatures historical-ligatures", "no-discretionary-ligatures discretionary-ligatures", - "no-contextual contextual", "common-ligatures no-discretionary-ligatures no-common-ligatures", - "common-ligatures none", "no-discretionary-ligatures none", "none common-ligatures" ] - }, - "font-variant-numeric": { - domProp: "fontVariantNumeric", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", - "stacked-fractions", "slashed-zero", "ordinal", "lining-nums diagonal-fractions", - "tabular-nums stacked-fractions", "tabular-nums slashed-zero stacked-fractions", - "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal" ], - invalid_values: [ "lining-nums normal", "lining-nums oldstyle-nums", "lining-nums normal slashed-zero ordinal", - "proportional-nums tabular-nums", "diagonal-fractions stacked-fractions", "slashed-zero diagonal-fractions slashed-zero", - "lining-nums slashed-zero diagonal-fractions oldstyle-nums", "diagonal-fractions diagonal-fractions" ] - }, - "font-variant-position": { - domProp: "fontVariantPosition", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "super", "sub" ], - invalid_values: [ "normal sub", "super sub" ] - }, - "font-synthesis": { - domProp: "fontSynthesis", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "weight style" ], - other_values: [ "none", "weight", "style" ], - invalid_values: [ "weight none", "style none", "none style", "weight 10px", "weight weight", "style style" ] - }, - // aliases for prefixed properties - "font-feature-settings": { - domProp: "fontFeatureSettings", - inherited: true, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "-moz-font-feature-settings", - subproperties: [ "-moz-font-feature-settings" ], - initial_values: [ "normal" ], - other_values: [ - "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", - "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', - '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', - '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', - '"liga" ,"smcp" 0 , "blah"' - ], - invalid_values: [ - 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', - 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", - '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', - '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' - ] - }, - "font-language-override": { - domProp: "fontLanguageOverride", - inherited: true, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "-moz-font-language-override", - subproperties: [ "-moz-font-language-override" ], - initial_values: [ "normal" ], - other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], - invalid_values: [ "TRK", "ja" ] - } - }; - for (var prop in fontFeatureProperties) { - gCSSProperties[prop] = fontFeatureProperties[prop]; - } - var fontAdditions = [ "font-kerning", "font-synthesis", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position" ]; - gCSSProperties["font"].subproperties = gCSSProperties["font"].subproperties.concat(fontAdditions); + var fontFeatureProperties = { + "font-kerning": { + domProp: "fontKerning", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "normal", "none" ], + invalid_values: [ "on" ] + }, + "font-variant-alternates": { + domProp: "fontVariantAlternates", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "historical-forms", + "styleset(alt-a, alt-b)", "character-variant(a, b, c)", "annotation(circled)", + "swash(squishy)", "styleset(complex\\ blob, a)", "annotation(\\62 lah)" ], + invalid_values: [ "historical-forms normal", "historical-forms historical-forms", + "swash", "swash(3)", "annotation(a, b)", "ornaments(a,b)", + "styleset(1234blah)", "annotation(a), annotation(b)", "annotation(a) normal" ] + }, + "font-variant-caps": { + domProp: "fontVariantCaps", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "titling-caps", "unicase" ], + invalid_values: [ "normal small-caps", "petite-caps normal", "unicase unicase" ] + }, + "font-variant-east-asian": { + domProp: "fontVariantEastAsian", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "jis78", "jis83", "jis90", "jis04", "simplified", "traditional", "full-width", "proportional-width", "ruby", + "jis78 full-width", "jis78 full-width ruby", "simplified proportional-width", "ruby simplified" ], + invalid_values: [ "jis78 normal", "jis90 jis04", "simplified traditional", "full-width proportional-width", + "ruby simplified ruby", "jis78 ruby simplified" ] + }, + "font-variant-ligatures": { + domProp: "fontVariantLigatures", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", + "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual", + "common-ligatures no-discretionary-ligatures", "contextual no-discretionary-ligatures", + "historical-ligatures no-common-ligatures", "no-historical-ligatures discretionary-ligatures", + "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual" ], + invalid_values: [ "common-ligatures normal", "common-ligatures no-common-ligatures", "common-ligatures common-ligatures", + "no-historical-ligatures historical-ligatures", "no-discretionary-ligatures discretionary-ligatures", + "no-contextual contextual", "common-ligatures no-discretionary-ligatures no-common-ligatures", + "common-ligatures none", "no-discretionary-ligatures none", "none common-ligatures" ] + }, + "font-variant-numeric": { + domProp: "fontVariantNumeric", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", + "stacked-fractions", "slashed-zero", "ordinal", "lining-nums diagonal-fractions", + "tabular-nums stacked-fractions", "tabular-nums slashed-zero stacked-fractions", + "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal" ], + invalid_values: [ "lining-nums normal", "lining-nums oldstyle-nums", "lining-nums normal slashed-zero ordinal", + "proportional-nums tabular-nums", "diagonal-fractions stacked-fractions", "slashed-zero diagonal-fractions slashed-zero", + "lining-nums slashed-zero diagonal-fractions oldstyle-nums", "diagonal-fractions diagonal-fractions" ] + }, + "font-variant-position": { + domProp: "fontVariantPosition", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "super", "sub" ], + invalid_values: [ "normal sub", "super sub" ] + }, + "font-synthesis": { + domProp: "fontSynthesis", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "weight style" ], + other_values: [ "none", "weight", "style" ], + invalid_values: [ "weight none", "style none", "none style", "weight 10px", "weight weight", "style style" ] + }, + // aliases for prefixed properties + "font-feature-settings": { + domProp: "fontFeatureSettings", + inherited: true, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "-moz-font-feature-settings", + subproperties: [ "-moz-font-feature-settings" ], + initial_values: [ "normal" ], + other_values: [ + "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", + "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', + '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', + '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', + '"liga" ,"smcp" 0 , "blah"' + ], + invalid_values: [ + 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', + 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", + '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', + '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' + ] + }, + "font-language-override": { + domProp: "fontLanguageOverride", + inherited: true, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "-moz-font-language-override", + subproperties: [ "-moz-font-language-override" ], + initial_values: [ "normal" ], + other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], + invalid_values: [ "TRK", "ja" ] + } + }; + for (var prop in fontFeatureProperties) { + gCSSProperties[prop] = fontFeatureProperties[prop]; + } + var fontAdditions = [ "font-kerning", "font-synthesis", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position" ]; + gCSSProperties["font"].subproperties = gCSSProperties["font"].subproperties.concat(fontAdditions); } if (SpecialPowers.getBoolPref("layout.css.masking.enabled")) { - gCSSProperties["mask-type"] = { - domProp: "maskType", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "luminance" ], - other_values: [ "alpha" ], - invalid_values: [] - }; + gCSSProperties["mask-type"] = { + domProp: "maskType", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "luminance" ], + other_values: [ "alpha" ], + invalid_values: [] + }; } if (SpecialPowers.getBoolPref("svg.paint-order.enabled")) { @@ -4553,784 +4553,784 @@ if (SpecialPowers.getBoolPref("svg.paint-order.enabled")) { } if (SpecialPowers.getBoolPref("layout.css.filters.enabled")) { - gCSSProperties["filter"] = { - domProp: "filter", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - // SVG reference filters - "url(#my-filter)", - "url(#my-filter-1) url(#my-filter-2)", + gCSSProperties["filter"] = { + domProp: "filter", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + // SVG reference filters + "url(#my-filter)", + "url(#my-filter-1) url(#my-filter-2)", - // Filter functions - "opacity(50%) saturate(1.0)", - "invert(50%) sepia(0.1) brightness(90%)", + // Filter functions + "opacity(50%) saturate(1.0)", + "invert(50%) sepia(0.1) brightness(90%)", - // Mixed SVG reference filters and filter functions - "grayscale(1) url(#my-filter-1)", - "url(#my-filter-1) brightness(50%) contrast(0.9)", + // Mixed SVG reference filters and filter functions + "grayscale(1) url(#my-filter-1)", + "url(#my-filter-1) brightness(50%) contrast(0.9)", - // The CSS parser will accept these weird URLs. However, we'll fail - // to resolve them when computing style, so we'll fall back to the - // initial value ("none"). - "url('feed:javascript:5')", - "blur(3px) url('feed:javascript:5') grayscale(50%)", + // The CSS parser will accept these weird URLs. However, we'll fail + // to resolve them when computing style, so we'll fall back to the + // initial value ("none"). + "url('feed:javascript:5')", + "blur(3px) url('feed:javascript:5') grayscale(50%)", - "blur(0)", - "blur(0px)", - "blur(0.5px)", - "blur(3px)", - "blur(100px)", - "blur(0.1em)", - "blur(calc(-1px))", // Parses and becomes blur(0px). - "blur(calc(0px))", - "blur(calc(5px))", - "blur(calc(2 * 5px))", + "blur(0)", + "blur(0px)", + "blur(0.5px)", + "blur(3px)", + "blur(100px)", + "blur(0.1em)", + "blur(calc(-1px))", // Parses and becomes blur(0px). + "blur(calc(0px))", + "blur(calc(5px))", + "blur(calc(2 * 5px))", - "brightness(0)", - "brightness(50%)", - "brightness(1)", - "brightness(1.0)", - "brightness(2)", - "brightness(350%)", - "brightness(4.567)", + "brightness(0)", + "brightness(50%)", + "brightness(1)", + "brightness(1.0)", + "brightness(2)", + "brightness(350%)", + "brightness(4.567)", - "contrast(0)", - "contrast(50%)", - "contrast(1)", - "contrast(1.0)", - "contrast(2)", - "contrast(350%)", - "contrast(4.567)", + "contrast(0)", + "contrast(50%)", + "contrast(1)", + "contrast(1.0)", + "contrast(2)", + "contrast(350%)", + "contrast(4.567)", - "drop-shadow(2px 2px)", - "drop-shadow(2px 2px 1px)", - "drop-shadow(2px 2px green)", - "drop-shadow(2px 2px 1px green)", - "drop-shadow(green 2px 2px)", - "drop-shadow(green 2px 2px 1px)", - "drop-shadow(currentColor 3px 3px)", - "drop-shadow(2px 2px calc(-5px))", /* clamped */ - "drop-shadow(calc(3em - 2px) 2px green)", - "drop-shadow(green calc(3em - 2px) 2px)", - "drop-shadow(2px calc(2px + 0.2em))", - "drop-shadow(blue 2px calc(2px + 0.2em))", - "drop-shadow(2px calc(2px + 0.2em) blue)", - "drop-shadow(calc(-2px) calc(-2px))", - "drop-shadow(-2px -2px)", - "drop-shadow(calc(2px) calc(2px))", - "drop-shadow(calc(2px) calc(2px) calc(2px))", + "drop-shadow(2px 2px)", + "drop-shadow(2px 2px 1px)", + "drop-shadow(2px 2px green)", + "drop-shadow(2px 2px 1px green)", + "drop-shadow(green 2px 2px)", + "drop-shadow(green 2px 2px 1px)", + "drop-shadow(currentColor 3px 3px)", + "drop-shadow(2px 2px calc(-5px))", /* clamped */ + "drop-shadow(calc(3em - 2px) 2px green)", + "drop-shadow(green calc(3em - 2px) 2px)", + "drop-shadow(2px calc(2px + 0.2em))", + "drop-shadow(blue 2px calc(2px + 0.2em))", + "drop-shadow(2px calc(2px + 0.2em) blue)", + "drop-shadow(calc(-2px) calc(-2px))", + "drop-shadow(-2px -2px)", + "drop-shadow(calc(2px) calc(2px))", + "drop-shadow(calc(2px) calc(2px) calc(2px))", - "grayscale(0)", - "grayscale(50%)", - "grayscale(1)", - "grayscale(1.0)", - "grayscale(2)", - "grayscale(350%)", - "grayscale(4.567)", + "grayscale(0)", + "grayscale(50%)", + "grayscale(1)", + "grayscale(1.0)", + "grayscale(2)", + "grayscale(350%)", + "grayscale(4.567)", - "hue-rotate(0deg)", - "hue-rotate(90deg)", - "hue-rotate(540deg)", - "hue-rotate(-90deg)", - "hue-rotate(10grad)", - "hue-rotate(1.6rad)", - "hue-rotate(-1.6rad)", - "hue-rotate(0.5turn)", - "hue-rotate(-2turn)", + "hue-rotate(0deg)", + "hue-rotate(90deg)", + "hue-rotate(540deg)", + "hue-rotate(-90deg)", + "hue-rotate(10grad)", + "hue-rotate(1.6rad)", + "hue-rotate(-1.6rad)", + "hue-rotate(0.5turn)", + "hue-rotate(-2turn)", - "invert(0)", - "invert(50%)", - "invert(1)", - "invert(1.0)", - "invert(2)", - "invert(350%)", - "invert(4.567)", + "invert(0)", + "invert(50%)", + "invert(1)", + "invert(1.0)", + "invert(2)", + "invert(350%)", + "invert(4.567)", - "opacity(0)", - "opacity(50%)", - "opacity(1)", - "opacity(1.0)", - "opacity(2)", - "opacity(350%)", - "opacity(4.567)", + "opacity(0)", + "opacity(50%)", + "opacity(1)", + "opacity(1.0)", + "opacity(2)", + "opacity(350%)", + "opacity(4.567)", - "saturate(0)", - "saturate(50%)", - "saturate(1)", - "saturate(1.0)", - "saturate(2)", - "saturate(350%)", - "saturate(4.567)", + "saturate(0)", + "saturate(50%)", + "saturate(1)", + "saturate(1.0)", + "saturate(2)", + "saturate(350%)", + "saturate(4.567)", - "sepia(0)", - "sepia(50%)", - "sepia(1)", - "sepia(1.0)", - "sepia(2)", - "sepia(350%)", - "sepia(4.567)", - ], - invalid_values: [ - // none - "none none", - "url(#my-filter) none", - "none url(#my-filter)", - "blur(2px) none url(#my-filter)", + "sepia(0)", + "sepia(50%)", + "sepia(1)", + "sepia(1.0)", + "sepia(2)", + "sepia(350%)", + "sepia(4.567)", + ], + invalid_values: [ + // none + "none none", + "url(#my-filter) none", + "none url(#my-filter)", + "blur(2px) none url(#my-filter)", - // Nested filters - "grayscale(invert(1.0))", + // Nested filters + "grayscale(invert(1.0))", - // Comma delimited filters - "url(#my-filter),", - "invert(50%), url(#my-filter), brightness(90%)", + // Comma delimited filters + "url(#my-filter),", + "invert(50%), url(#my-filter), brightness(90%)", - // Test the following situations for each filter function: - // - Invalid number of arguments - // - Comma delimited arguments - // - Wrong argument type - // - Argument value out of range - "blur()", - "blur(3px 5px)", - "blur(3px,)", - "blur(3px, 5px)", - "blur(#my-filter)", - "blur(0.5)", - "blur(50%)", - "blur(calc(0))", // Unitless zero in calc is not a valid length. - "blur(calc(0.1))", - "blur(calc(10%))", - "blur(calc(20px - 5%))", - "blur(-3px)", + // Test the following situations for each filter function: + // - Invalid number of arguments + // - Comma delimited arguments + // - Wrong argument type + // - Argument value out of range + "blur()", + "blur(3px 5px)", + "blur(3px,)", + "blur(3px, 5px)", + "blur(#my-filter)", + "blur(0.5)", + "blur(50%)", + "blur(calc(0))", // Unitless zero in calc is not a valid length. + "blur(calc(0.1))", + "blur(calc(10%))", + "blur(calc(20px - 5%))", + "blur(-3px)", - "brightness()", - "brightness(0.5 0.5)", - "brightness(0.5,)", - "brightness(0.5, 0.5)", - "brightness(#my-filter)", - "brightness(10px)", - "brightness(-1)", + "brightness()", + "brightness(0.5 0.5)", + "brightness(0.5,)", + "brightness(0.5, 0.5)", + "brightness(#my-filter)", + "brightness(10px)", + "brightness(-1)", - "contrast()", - "contrast(0.5 0.5)", - "contrast(0.5,)", - "contrast(0.5, 0.5)", - "contrast(#my-filter)", - "contrast(10px)", - "contrast(-1)", + "contrast()", + "contrast(0.5 0.5)", + "contrast(0.5,)", + "contrast(0.5, 0.5)", + "contrast(#my-filter)", + "contrast(10px)", + "contrast(-1)", - "drop-shadow()", - "drop-shadow(3% 3%)", - "drop-shadow(2px 2px -5px)", - "drop-shadow(2px 2px 2px 2px)", - "drop-shadow(2px 2px, none)", - "drop-shadow(none, 2px 2px)", - "drop-shadow(inherit, 2px 2px)", - "drop-shadow(2px 2px, inherit)", - "drop-shadow(2 2px)", - "drop-shadow(2px 2)", - "drop-shadow(2px 2px 2)", - "drop-shadow(2px 2px 2px 2)", - "drop-shadow(calc(2px) calc(2px) calc(2px) calc(2px))", - "drop-shadow(green 2px 2px, blue 1px 3px 4px)", - "drop-shadow(blue 2px 2px, currentColor 1px 2px)", + "drop-shadow()", + "drop-shadow(3% 3%)", + "drop-shadow(2px 2px -5px)", + "drop-shadow(2px 2px 2px 2px)", + "drop-shadow(2px 2px, none)", + "drop-shadow(none, 2px 2px)", + "drop-shadow(inherit, 2px 2px)", + "drop-shadow(2px 2px, inherit)", + "drop-shadow(2 2px)", + "drop-shadow(2px 2)", + "drop-shadow(2px 2px 2)", + "drop-shadow(2px 2px 2px 2)", + "drop-shadow(calc(2px) calc(2px) calc(2px) calc(2px))", + "drop-shadow(green 2px 2px, blue 1px 3px 4px)", + "drop-shadow(blue 2px 2px, currentColor 1px 2px)", - "grayscale()", - "grayscale(0.5 0.5)", - "grayscale(0.5,)", - "grayscale(0.5, 0.5)", - "grayscale(#my-filter)", - "grayscale(10px)", - "grayscale(-1)", + "grayscale()", + "grayscale(0.5 0.5)", + "grayscale(0.5,)", + "grayscale(0.5, 0.5)", + "grayscale(#my-filter)", + "grayscale(10px)", + "grayscale(-1)", - "hue-rotate()", - "hue-rotate(0)", - "hue-rotate(0.5 0.5)", - "hue-rotate(0.5,)", - "hue-rotate(0.5, 0.5)", - "hue-rotate(#my-filter)", - "hue-rotate(10px)", - "hue-rotate(-1)", - "hue-rotate(45deg,)", + "hue-rotate()", + "hue-rotate(0)", + "hue-rotate(0.5 0.5)", + "hue-rotate(0.5,)", + "hue-rotate(0.5, 0.5)", + "hue-rotate(#my-filter)", + "hue-rotate(10px)", + "hue-rotate(-1)", + "hue-rotate(45deg,)", - "invert()", - "invert(0.5 0.5)", - "invert(0.5,)", - "invert(0.5, 0.5)", - "invert(#my-filter)", - "invert(10px)", - "invert(-1)", + "invert()", + "invert(0.5 0.5)", + "invert(0.5,)", + "invert(0.5, 0.5)", + "invert(#my-filter)", + "invert(10px)", + "invert(-1)", - "opacity()", - "opacity(0.5 0.5)", - "opacity(0.5,)", - "opacity(0.5, 0.5)", - "opacity(#my-filter)", - "opacity(10px)", - "opacity(-1)", + "opacity()", + "opacity(0.5 0.5)", + "opacity(0.5,)", + "opacity(0.5, 0.5)", + "opacity(#my-filter)", + "opacity(10px)", + "opacity(-1)", - "saturate()", - "saturate(0.5 0.5)", - "saturate(0.5,)", - "saturate(0.5, 0.5)", - "saturate(#my-filter)", - "saturate(10px)", - "saturate(-1)", + "saturate()", + "saturate(0.5 0.5)", + "saturate(0.5,)", + "saturate(0.5, 0.5)", + "saturate(#my-filter)", + "saturate(10px)", + "saturate(-1)", - "sepia()", - "sepia(0.5 0.5)", - "sepia(0.5,)", - "sepia(0.5, 0.5)", - "sepia(#my-filter)", - "sepia(10px)", - "sepia(-1)", - ] - }; + "sepia()", + "sepia(0.5 0.5)", + "sepia(0.5,)", + "sepia(0.5, 0.5)", + "sepia(#my-filter)", + "sepia(10px)", + "sepia(-1)", + ] + }; } if (SpecialPowers.getBoolPref("layout.css.grid.enabled")) { - gCSSProperties["display"].other_values.push("grid", "inline-grid"); - gCSSProperties["grid-auto-flow"] = { - domProp: "gridAutoFlow", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "column", - "row", - "column dense", - "row dense", - "dense column", - "dense row", - ], - invalid_values: [ - "", - "auto", - "10px", - "dense", - "none row", - "none dense", - "column row", - "dense row dense", - ] - }; + gCSSProperties["display"].other_values.push("grid", "inline-grid"); + gCSSProperties["grid-auto-flow"] = { + domProp: "gridAutoFlow", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + "column", + "row", + "column dense", + "row dense", + "dense column", + "dense row", + ], + invalid_values: [ + "", + "auto", + "10px", + "dense", + "none row", + "none dense", + "column row", + "dense row dense", + ] + }; - gCSSProperties["grid-auto-columns"] = { - domProp: "gridAutoColumns", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ - "40px", - "2em", - "2.5fr", - "12%", - "min-content", - "max-content", - "calc(20px + 10%)", - "minmax(20px, max-content)", - "m\\69nmax(20px, 4Fr)", - "MinMax(min-content, calc(20px + 10%))", - ], - invalid_values: [ - "", - "normal", - "40ms", - "-40px", - "-12%", - "-2em", - "-2.5fr", - "minmax()", - "minmax(20px)", - "mİnmax(20px, 100px)", - "minmax(20px, 100px, 200px)", - "maxmin(100px, 20px)", - "minmax(min-content, auto)", - "minmax(min-content, minmax(30px, max-content))", - ] - }; - gCSSProperties["grid-auto-rows"] = { - domProp: "gridAutoRows", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: gCSSProperties["grid-auto-columns"].initial_values, - other_values: gCSSProperties["grid-auto-columns"].other_values, - invalid_values: gCSSProperties["grid-auto-columns"].invalid_values - }; + gCSSProperties["grid-auto-columns"] = { + domProp: "gridAutoColumns", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ + "40px", + "2em", + "2.5fr", + "12%", + "min-content", + "max-content", + "calc(20px + 10%)", + "minmax(20px, max-content)", + "m\\69nmax(20px, 4Fr)", + "MinMax(min-content, calc(20px + 10%))", + ], + invalid_values: [ + "", + "normal", + "40ms", + "-40px", + "-12%", + "-2em", + "-2.5fr", + "minmax()", + "minmax(20px)", + "mİnmax(20px, 100px)", + "minmax(20px, 100px, 200px)", + "maxmin(100px, 20px)", + "minmax(min-content, auto)", + "minmax(min-content, minmax(30px, max-content))", + ] + }; + gCSSProperties["grid-auto-rows"] = { + domProp: "gridAutoRows", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: gCSSProperties["grid-auto-columns"].initial_values, + other_values: gCSSProperties["grid-auto-columns"].other_values, + invalid_values: gCSSProperties["grid-auto-columns"].invalid_values + }; - gCSSProperties["grid-template-columns"] = { - domProp: "gridTemplateColumns", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "auto", - "40px", - "2.5fr", - "(normal) 40px () auto ( ) 12%", - "(foo) 40px min-content ( bar ) calc(20px + 10%) max-content", - "40px min-content calc(20px + 10%) max-content", - "m\\69nmax(20px, 4Fr)", - "40px MinMax(min-content, calc(20px + 10%)) max-content", - "40px 2em", - "() 40px (-foo) 2em (bar baz This\ is\ one\ ident)", - // TODO bug 978478: "(a) repeat(3, (b) 20px (c) 40px (d)) (e)", - "repeat(1, 20px)", - "repeat(1, (a) 20px)", - "(a) Repeat(4, (a) 20px () auto (b c)) (d)", - "(a) 2.5fr Repeat(4, (a) 20px () auto (b c)) (d)", - "(a) 2.5fr (z) Repeat(4, (a) 20px () auto (b c)) (d)", - "(a) 2.5fr (z) Repeat(4, (a) 20px () auto) (d)", - "(a) 2.5fr (z) Repeat(4, 20px (b c) auto (b c)) (d)", - "(a) 2.5fr (z) Repeat(4, 20px auto) (d)", + gCSSProperties["grid-template-columns"] = { + domProp: "gridTemplateColumns", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + "auto", + "40px", + "2.5fr", + "(normal) 40px () auto ( ) 12%", + "(foo) 40px min-content ( bar ) calc(20px + 10%) max-content", + "40px min-content calc(20px + 10%) max-content", + "m\\69nmax(20px, 4Fr)", + "40px MinMax(min-content, calc(20px + 10%)) max-content", + "40px 2em", + "() 40px (-foo) 2em (bar baz This\ is\ one\ ident)", + // TODO bug 978478: "(a) repeat(3, (b) 20px (c) 40px (d)) (e)", + "repeat(1, 20px)", + "repeat(1, (a) 20px)", + "(a) Repeat(4, (a) 20px () auto (b c)) (d)", + "(a) 2.5fr Repeat(4, (a) 20px () auto (b c)) (d)", + "(a) 2.5fr (z) Repeat(4, (a) 20px () auto (b c)) (d)", + "(a) 2.5fr (z) Repeat(4, (a) 20px () auto) (d)", + "(a) 2.5fr (z) Repeat(4, 20px (b c) auto (b c)) (d)", + "(a) 2.5fr (z) Repeat(4, 20px auto) (d)", - // See https://bugzilla.mozilla.org/show_bug.cgi?id=981300 - "(none auto subgrid min-content max-content foo) 40px", + // See https://bugzilla.mozilla.org/show_bug.cgi?id=981300 + "(none auto subgrid min-content max-content foo) 40px", - "subgrid", - "subgrid () (foo bar)", - "subgrid repeat(1, ())", - "subgrid Repeat(4, (a) (b c) () (d))", - ], - invalid_values: [ - "", - "normal", - "40ms", - "-40px", - "-12%", - "-2fr", - "(foo)", - "(inherit) 40px", - "(initial) 40px", - "(unset) 40px", - "(default) 40px", - "(6%) 40px", - "(5th) 40px", - "(foo() bar) 40px", - "(foo)) 40px", - "[foo] 40px", - "(foo) (bar) 40px", - "40px (foo) (bar)", - "minmax()", - "minmax(20px)", - "mİnmax(20px, 100px)", - "minmax(20px, 100px, 200px)", - "maxmin(100px, 20px)", - "minmax(min-content, auto)", - "minmax(min-content, minmax(30px, max-content))", - "repeat(0, 20px)", - "repeat(-3, 20px)", - "rêpeat(1, 20px)", - "repeat(1)", - "repeat(1, )", - "repeat(3px, 20px)", - "repeat(2.0, 20px)", - "repeat(2.5, 20px)", - "repeat(2, (foo))", - "repeat(2, foo)", - "subgrid (foo) 40px", - "subgrid (foo 40px)", - "(foo) subgrid", - "subgrid rêpeat(1, ())", - "subgrid repeat(0, ())", - "subgrid repeat(-3, ())", - "subgrid repeat(2.0, ())", - "subgrid repeat(2.5, ())", - "subgrid repeat(3px, ())", - "subgrid repeat(1)", - "subgrid repeat(1, )", - "subgrid repeat(2, (40px))", - "subgrid repeat(2, foo)", - ], - unbalanced_values: [ - "(foo] 40px", - ] - }; - gCSSProperties["grid-template-rows"] = { - domProp: "gridTemplateRows", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: gCSSProperties["grid-template-columns"].initial_values, - other_values: gCSSProperties["grid-template-columns"].other_values, - invalid_values: gCSSProperties["grid-template-columns"].invalid_values - }; - gCSSProperties["grid-template-areas"] = { - domProp: "gridTemplateAreas", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "''", - "'' ''", - "'1a-é_ .' \"b .\"", - "' Z\t\\aZ' 'Z Z'", - " '. . a b' '..a b' ", - ], - invalid_values: [ - "'a b' 'a/b'", - "'a . a'", - "'. a a' 'a a a'", - "'a a .' 'a a a'", - "'a a' 'a .'", - "'a a'\n'..'\n'a a'", - ] - }; + "subgrid", + "subgrid () (foo bar)", + "subgrid repeat(1, ())", + "subgrid Repeat(4, (a) (b c) () (d))", + ], + invalid_values: [ + "", + "normal", + "40ms", + "-40px", + "-12%", + "-2fr", + "(foo)", + "(inherit) 40px", + "(initial) 40px", + "(unset) 40px", + "(default) 40px", + "(6%) 40px", + "(5th) 40px", + "(foo() bar) 40px", + "(foo)) 40px", + "[foo] 40px", + "(foo) (bar) 40px", + "40px (foo) (bar)", + "minmax()", + "minmax(20px)", + "mİnmax(20px, 100px)", + "minmax(20px, 100px, 200px)", + "maxmin(100px, 20px)", + "minmax(min-content, auto)", + "minmax(min-content, minmax(30px, max-content))", + "repeat(0, 20px)", + "repeat(-3, 20px)", + "rêpeat(1, 20px)", + "repeat(1)", + "repeat(1, )", + "repeat(3px, 20px)", + "repeat(2.0, 20px)", + "repeat(2.5, 20px)", + "repeat(2, (foo))", + "repeat(2, foo)", + "subgrid (foo) 40px", + "subgrid (foo 40px)", + "(foo) subgrid", + "subgrid rêpeat(1, ())", + "subgrid repeat(0, ())", + "subgrid repeat(-3, ())", + "subgrid repeat(2.0, ())", + "subgrid repeat(2.5, ())", + "subgrid repeat(3px, ())", + "subgrid repeat(1)", + "subgrid repeat(1, )", + "subgrid repeat(2, (40px))", + "subgrid repeat(2, foo)", + ], + unbalanced_values: [ + "(foo] 40px", + ] + }; + gCSSProperties["grid-template-rows"] = { + domProp: "gridTemplateRows", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: gCSSProperties["grid-template-columns"].initial_values, + other_values: gCSSProperties["grid-template-columns"].other_values, + invalid_values: gCSSProperties["grid-template-columns"].invalid_values + }; + gCSSProperties["grid-template-areas"] = { + domProp: "gridTemplateAreas", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + "''", + "'' ''", + "'1a-é_ .' \"b .\"", + "' Z\t\\aZ' 'Z Z'", + " '. . a b' '..a b' ", + ], + invalid_values: [ + "'a b' 'a/b'", + "'a . a'", + "'. a a' 'a a a'", + "'a a .' 'a a a'", + "'a a' 'a .'", + "'a a'\n'..'\n'a a'", + ] + }; - gCSSProperties["grid-template"] = { - domProp: "gridTemplate", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-template-areas", - "grid-template-columns", - "grid-template-rows", - ], - initial_values: [ - "none", - "none / none", - ], - other_values: [ - "subgrid", - // <'grid-template-columns'> / <'grid-template-rows'> - "40px / 100px", - "(foo) 40px (bar) / (baz) 100px (fizz)", - " none/100px", - "40px/none", - "subgrid/40px 20px", - "subgrid (foo) () (bar baz) / 40px 20px", - "40px 20px/subgrid", - "40px 20px/subgrid (foo) () repeat(3, (a) (b)) (bar baz)", - "subgrid/subgrid", - "subgrid (foo) () (bar baz)/subgrid (foo) () (bar baz)", - // [ / ]? [ ? ? ? ]+ - "'fizz'", - "(bar) 'fizz'", - "(foo) 40px / 'fizz'", - "(foo) 40px / (bar) 'fizz'", - "(foo) 40px / 'fizz' 100px", - "(foo) 40px / (bar) 'fizz' 100px", - "(foo) 40px / (bar) 'fizz' 100px (buzz)", - "(foo) 40px / (bar) 'fizz' 100px (buzz) \n (a) '.' 200px (b)", - ], - invalid_values: [ - "subgrid ()", - "subgrid () / 'fizz'", - "subgrid / 'fizz'", - "(foo) (bar) 40px / 100px", - "40px / (fizz) (buzz) 100px", - "40px / (fizz) (buzz) 'foo'", - "none / 'foo'" - ] - }; + gCSSProperties["grid-template"] = { + domProp: "gridTemplate", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "grid-template-areas", + "grid-template-columns", + "grid-template-rows", + ], + initial_values: [ + "none", + "none / none", + ], + other_values: [ + "subgrid", + // <'grid-template-columns'> / <'grid-template-rows'> + "40px / 100px", + "(foo) 40px (bar) / (baz) 100px (fizz)", + " none/100px", + "40px/none", + "subgrid/40px 20px", + "subgrid (foo) () (bar baz) / 40px 20px", + "40px 20px/subgrid", + "40px 20px/subgrid (foo) () repeat(3, (a) (b)) (bar baz)", + "subgrid/subgrid", + "subgrid (foo) () (bar baz)/subgrid (foo) () (bar baz)", + // [ / ]? [ ? ? ? ]+ + "'fizz'", + "(bar) 'fizz'", + "(foo) 40px / 'fizz'", + "(foo) 40px / (bar) 'fizz'", + "(foo) 40px / 'fizz' 100px", + "(foo) 40px / (bar) 'fizz' 100px", + "(foo) 40px / (bar) 'fizz' 100px (buzz)", + "(foo) 40px / (bar) 'fizz' 100px (buzz) \n (a) '.' 200px (b)", + ], + invalid_values: [ + "subgrid ()", + "subgrid () / 'fizz'", + "subgrid / 'fizz'", + "(foo) (bar) 40px / 100px", + "40px / (fizz) (buzz) 100px", + "40px / (fizz) (buzz) 'foo'", + "none / 'foo'" + ] + }; - gCSSProperties["grid"] = { - domProp: "grid", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-template-areas", - "grid-template-columns", - "grid-template-rows", - "grid-auto-flow", - "grid-auto-columns", - "grid-auto-rows", - ], - initial_values: [ - "none", - "none / none", - "none auto", - "none auto / auto", - ], - other_values: [ - "row", - "none 40px", - "column dense auto", - "dense row minmax(min-content, 2fr)", - "row 40px / 100px", - ].concat( - gCSSProperties["grid-template"].other_values, - gCSSProperties["grid-auto-flow"].other_values - ), - invalid_values: [ - "row column 40px", - "row -20px", - "row 200ms", - "row 40px 100px", - ].concat( - gCSSProperties["grid-template"].invalid_values, - gCSSProperties["grid-auto-flow"].invalid_values - ) - }; + gCSSProperties["grid"] = { + domProp: "grid", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "grid-template-areas", + "grid-template-columns", + "grid-template-rows", + "grid-auto-flow", + "grid-auto-columns", + "grid-auto-rows", + ], + initial_values: [ + "none", + "none / none", + "none auto", + "none auto / auto", + ], + other_values: [ + "row", + "none 40px", + "column dense auto", + "dense row minmax(min-content, 2fr)", + "row 40px / 100px", + ].concat( + gCSSProperties["grid-template"].other_values, + gCSSProperties["grid-auto-flow"].other_values + ), + invalid_values: [ + "row column 40px", + "row -20px", + "row 200ms", + "row 40px 100px", + ].concat( + gCSSProperties["grid-template"].invalid_values, + gCSSProperties["grid-auto-flow"].invalid_values + ) + }; - var gridLineOtherValues = [ - "foo", - "2", - "2 foo", - "foo 2", - "-3", - "-3 bar", - "bar -3", - "span 2", - "2 span", - "span foo", - "foo span", - "span 2 foo", - "span foo 2", - "2 foo span", - "foo 2 span", - ]; - var gridLineInvalidValues = [ - "", - "4th", - "span", - "inherit 2", - "2 inherit", - "20px", - "2 3", - "2.5", - "2.0", - "0", - "0 foo", - "span 0", - "2 foo 3", - "foo 2 foo", - "2 span foo", - "foo span 2", - "span -3", - "span -3 bar", - "span 2 span", - "span foo span", - "span 2 foo span", - ]; + var gridLineOtherValues = [ + "foo", + "2", + "2 foo", + "foo 2", + "-3", + "-3 bar", + "bar -3", + "span 2", + "2 span", + "span foo", + "foo span", + "span 2 foo", + "span foo 2", + "2 foo span", + "foo 2 span", + ]; + var gridLineInvalidValues = [ + "", + "4th", + "span", + "inherit 2", + "2 inherit", + "20px", + "2 3", + "2.5", + "2.0", + "0", + "0 foo", + "span 0", + "2 foo 3", + "foo 2 foo", + "2 span foo", + "foo span 2", + "span -3", + "span -3 bar", + "span 2 span", + "span foo span", + "span 2 foo span", + ]; - gCSSProperties["grid-column-start"] = { - domProp: "gridColumnStart", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues - }; - gCSSProperties["grid-column-end"] = { - domProp: "gridColumnEnd", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues - }; - gCSSProperties["grid-row-start"] = { - domProp: "gridRowStart", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues - }; - gCSSProperties["grid-row-end"] = { - domProp: "gridRowEnd", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues - }; + gCSSProperties["grid-column-start"] = { + domProp: "gridColumnStart", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: gridLineOtherValues, + invalid_values: gridLineInvalidValues + }; + gCSSProperties["grid-column-end"] = { + domProp: "gridColumnEnd", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: gridLineOtherValues, + invalid_values: gridLineInvalidValues + }; + gCSSProperties["grid-row-start"] = { + domProp: "gridRowStart", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: gridLineOtherValues, + invalid_values: gridLineInvalidValues + }; + gCSSProperties["grid-row-end"] = { + domProp: "gridRowEnd", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: gridLineOtherValues, + invalid_values: gridLineInvalidValues + }; - var gridAutoPositionOtherValues = []; - gridLineOtherValues.concat([ "auto" ]).forEach(function(val) { - gridAutoPositionOtherValues.push(" foo / " + val); - gridAutoPositionOtherValues.push(val + "/2"); - }); - var gridAutoPositionInvalidValues = [ - "foo", - "foo, bar", - "foo / bar / baz", - ]; - gridLineInvalidValues.forEach(function(val) { - gridAutoPositionInvalidValues.push("span 3 / " + val); - gridAutoPositionInvalidValues.push(val + " / foo"); - }); - gCSSProperties["grid-auto-position"] = { - domProp: "gridAutoPosition", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1 / 1" ], - other_values: gridAutoPositionOtherValues, - invalid_values: gridAutoPositionInvalidValues - }; + var gridAutoPositionOtherValues = []; + gridLineOtherValues.concat([ "auto" ]).forEach(function(val) { + gridAutoPositionOtherValues.push(" foo / " + val); + gridAutoPositionOtherValues.push(val + "/2"); + }); + var gridAutoPositionInvalidValues = [ + "foo", + "foo, bar", + "foo / bar / baz", + ]; + gridLineInvalidValues.forEach(function(val) { + gridAutoPositionInvalidValues.push("span 3 / " + val); + gridAutoPositionInvalidValues.push(val + " / foo"); + }); + gCSSProperties["grid-auto-position"] = { + domProp: "gridAutoPosition", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1 / 1" ], + other_values: gridAutoPositionOtherValues, + invalid_values: gridAutoPositionInvalidValues + }; - // The grid-column and grid-row shorthands take values of the form - // [ / ]? - // which is equivalent to: - // | [ / ] - // which is equivalent to: - // | <'grid-auto-position'> - var gridColumnRowOtherValues = [].concat( - gridLineOtherValues, - gridAutoPositionOtherValues); - var gridColumnRowInvalidValues = [].concat( - gridLineInvalidValues, - gridAutoPositionInvalidValues); - // A single is invalid for grid-auto-position, - // but not for grid-column or grid-row: - gridColumnRowInvalidValues.splice( - gridColumnRowInvalidValues.indexOf("foo"), - 1); - gCSSProperties["grid-column"] = { - domProp: "gridColumn", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-column-start", - "grid-column-end" - ], - initial_values: [ "auto", "auto / auto" ], - other_values: gridColumnRowOtherValues, - invalid_values: gridColumnRowInvalidValues - }; - gCSSProperties["grid-row"] = { - domProp: "gridRow", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-row-start", - "grid-row-end" - ], - initial_values: [ "auto", "auto / auto" ], - other_values: gridColumnRowOtherValues, - invalid_values: gridColumnRowInvalidValues - }; + // The grid-column and grid-row shorthands take values of the form + // [ / ]? + // which is equivalent to: + // | [ / ] + // which is equivalent to: + // | <'grid-auto-position'> + var gridColumnRowOtherValues = [].concat( + gridLineOtherValues, + gridAutoPositionOtherValues); + var gridColumnRowInvalidValues = [].concat( + gridLineInvalidValues, + gridAutoPositionInvalidValues); + // A single is invalid for grid-auto-position, + // but not for grid-column or grid-row: + gridColumnRowInvalidValues.splice( + gridColumnRowInvalidValues.indexOf("foo"), + 1); + gCSSProperties["grid-column"] = { + domProp: "gridColumn", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "grid-column-start", + "grid-column-end" + ], + initial_values: [ "auto", "auto / auto" ], + other_values: gridColumnRowOtherValues, + invalid_values: gridColumnRowInvalidValues + }; + gCSSProperties["grid-row"] = { + domProp: "gridRow", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "grid-row-start", + "grid-row-end" + ], + initial_values: [ "auto", "auto / auto" ], + other_values: gridColumnRowOtherValues, + invalid_values: gridColumnRowInvalidValues + }; - var gridAreaOtherValues = gridLineOtherValues.slice(); - gridLineOtherValues.forEach(function(val) { - gridAreaOtherValues.push("foo / " + val); - gridAreaOtherValues.push(val + "/2/3"); - gridAreaOtherValues.push("foo / bar / " + val + " / baz"); - }); - var gridAreaInvalidValues = [ - "foo, bar", - "foo / bar / baz / fizz / buzz", - "default / foo / bar / baz", - "foo / initial / bar / baz", - "foo / bar / inherit / baz", - "foo / bar / baz / unset", - ].concat(gridLineInvalidValues); - gridLineInvalidValues.forEach(function(val) { - gridAreaInvalidValues.push("foo / " + val); - gridAreaInvalidValues.push("foo / bar / " + val); - gridAreaInvalidValues.push("foo / 4 / bar / " + val); - }); + var gridAreaOtherValues = gridLineOtherValues.slice(); + gridLineOtherValues.forEach(function(val) { + gridAreaOtherValues.push("foo / " + val); + gridAreaOtherValues.push(val + "/2/3"); + gridAreaOtherValues.push("foo / bar / " + val + " / baz"); + }); + var gridAreaInvalidValues = [ + "foo, bar", + "foo / bar / baz / fizz / buzz", + "default / foo / bar / baz", + "foo / initial / bar / baz", + "foo / bar / inherit / baz", + "foo / bar / baz / unset", + ].concat(gridLineInvalidValues); + gridLineInvalidValues.forEach(function(val) { + gridAreaInvalidValues.push("foo / " + val); + gridAreaInvalidValues.push("foo / bar / " + val); + gridAreaInvalidValues.push("foo / 4 / bar / " + val); + }); - gCSSProperties["grid-area"] = { - domProp: "gridArea", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-row-start", - "grid-column-start", - "grid-row-end", - "grid-column-end" - ], - initial_values: [ - "auto", - "auto / auto", - "auto / auto / auto", - "auto / auto / auto / auto" - ], - other_values: gridAreaOtherValues, - invalid_values: gridAreaInvalidValues - }; + gCSSProperties["grid-area"] = { + domProp: "gridArea", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "grid-row-start", + "grid-column-start", + "grid-row-end", + "grid-column-end" + ], + initial_values: [ + "auto", + "auto / auto", + "auto / auto / auto", + "auto / auto / auto / auto" + ], + other_values: gridAreaOtherValues, + invalid_values: gridAreaInvalidValues + }; } if (SpecialPowers.getBoolPref("layout.css.image-orientation.enabled")) { - gCSSProperties["image-orientation"] = { - domProp: "imageOrientation", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ - "0deg", - "0grad", - "0rad", - "0turn", + gCSSProperties["image-orientation"] = { + domProp: "imageOrientation", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ + "0deg", + "0grad", + "0rad", + "0turn", - // Rounded initial values. - "-90deg", - "15deg", - "360deg", - ], - other_values: [ - "0deg flip", - "90deg", - "90deg flip", - "180deg", - "180deg flip", - "270deg", - "270deg flip", - "flip", - "from-image", + // Rounded initial values. + "-90deg", + "15deg", + "360deg", + ], + other_values: [ + "0deg flip", + "90deg", + "90deg flip", + "180deg", + "180deg flip", + "270deg", + "270deg flip", + "flip", + "from-image", - // Grad units. - "0grad flip", - "100grad", - "100grad flip", - "200grad", - "200grad flip", - "300grad", - "300grad flip", + // Grad units. + "0grad flip", + "100grad", + "100grad flip", + "200grad", + "200grad flip", + "300grad", + "300grad flip", - // Radian units. - "0rad flip", - "1.57079633rad", - "1.57079633rad flip", - "3.14159265rad", - "3.14159265rad flip", - "4.71238898rad", - "4.71238898rad flip", + // Radian units. + "0rad flip", + "1.57079633rad", + "1.57079633rad flip", + "3.14159265rad", + "3.14159265rad flip", + "4.71238898rad", + "4.71238898rad flip", - // Turn units. - "0turn flip", - "0.25turn", - "0.25turn flip", - "0.5turn", - "0.5turn flip", - "0.75turn", - "0.75turn flip", + // Turn units. + "0turn flip", + "0.25turn", + "0.25turn flip", + "0.5turn", + "0.5turn flip", + "0.75turn", + "0.75turn flip", - // Rounded values. - "-45deg flip", - "65deg flip", - "400deg flip", - ], - invalid_values: [ - "none", - "0deg none", - "flip 0deg", - "flip 0deg", - "0", - "0 flip", - "flip 0", - "0deg from-image", - "from-image 0deg", - "flip from-image", - "from-image flip", - ] - }; + // Rounded values. + "-45deg flip", + "65deg flip", + "400deg flip", + ], + invalid_values: [ + "none", + "0deg none", + "flip 0deg", + "flip 0deg", + "0", + "0 flip", + "flip 0", + "0deg from-image", + "from-image 0deg", + "flip from-image", + "from-image flip", + ] + }; } if (SpecialPowers.getBoolPref("layout.css.osx-font-smoothing.enabled")) { - gCSSProperties["-moz-osx-font-smoothing"] = { - domProp: "MozOSXFontSmoothing", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "grayscale" ], - invalid_values: [ "none", "subpixel-antialiased", "antialiased" ] - }; + gCSSProperties["-moz-osx-font-smoothing"] = { + domProp: "MozOSXFontSmoothing", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "grayscale" ], + invalid_values: [ "none", "subpixel-antialiased", "antialiased" ] + }; } if (SpecialPowers.getBoolPref("layout.css.sticky.enabled")) { - gCSSProperties["position"].other_values.push("sticky"); + gCSSProperties["position"].other_values.push("sticky"); } if (SpecialPowers.getBoolPref("layout.css.mix-blend-mode.enabled")) { @@ -5346,48 +5346,48 @@ if (SpecialPowers.getBoolPref("layout.css.mix-blend-mode.enabled")) { } if (SpecialPowers.getBoolPref("layout.css.background-blend-mode.enabled")) { - gCSSProperties["background-blend-mode"] = { - domProp: "backgroundBlendMode", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", - "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity" ], - invalid_values: ["none", "10px", "multiply multiply"] - }; + gCSSProperties["background-blend-mode"] = { + domProp: "backgroundBlendMode", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", + "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity" ], + invalid_values: ["none", "10px", "multiply multiply"] + }; } if (SpecialPowers.getBoolPref("layout.css.will-change.enabled")) { - gCSSProperties["will-change"] = { - domProp: "willChange", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "scroll-position", "contents", "transform", "opacity", "scroll-position, transform", "transform, opacity", "contents, transform", "property-that-doesnt-exist-yet" ], - invalid_values: [ "none", "all", "default", "auto, scroll-position", "scroll-position, auto", "transform scroll-position", ",", "trailing," ] - }; + gCSSProperties["will-change"] = { + domProp: "willChange", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "scroll-position", "contents", "transform", "opacity", "scroll-position, transform", "transform, opacity", "contents, transform", "property-that-doesnt-exist-yet" ], + invalid_values: [ "none", "all", "default", "auto, scroll-position", "scroll-position, auto", "transform scroll-position", ",", "trailing," ] + }; } if (SpecialPowers.getBoolPref("layout.css.overflow-clip-box.enabled")) { - gCSSProperties["overflow-clip-box"] = { - domProp: "overflowClipBox", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "padding-box" ], - other_values: [ "content-box" ], - invalid_values: [ "none", "auto", "border-box", "0" ] - }; + gCSSProperties["overflow-clip-box"] = { + domProp: "overflowClipBox", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "padding-box" ], + other_values: [ "content-box" ], + invalid_values: [ "none", "auto", "border-box", "0" ] + }; } if (SpecialPowers.getBoolPref("layout.css.box-decoration-break.enabled")) { - gCSSProperties["box-decoration-break"] = { - domProp: "boxDecorationBreak", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "slice" ], - other_values: [ "clone" ], - invalid_values: [ "auto", "none", "1px" ] - }; + gCSSProperties["box-decoration-break"] = { + domProp: "boxDecorationBreak", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "slice" ], + other_values: [ "clone" ], + invalid_values: [ "auto", "none", "1px" ] + }; } if (SpecialPowers.getBoolPref("layout.css.unset-value.enabled")) { From 4c2b48068bd1bae111e8c8d3de21a50146ca0f21 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Thu, 17 Apr 2014 12:11:08 +0000 Subject: [PATCH 48/79] Bug 613659 - Minor whitespace fixes. r=cam --- layout/style/test/property_database.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index a6ec6a090449..c2939b106f76 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -3684,7 +3684,7 @@ var gCSSProperties = { inherited: true, type: CSS_TYPE_LONGHAND, initial_values: [ "none", "context-value" ], - other_values: [ "5px,3px,2px", "5px 3px 2px", " 5px ,3px , 2px ", "1px", "5%", "3em" ], + other_values: [ "5px,3px,2px", "5px 3px 2px", " 5px ,3px\t, 2px ", "1px", "5%", "3em" ], invalid_values: [ "-5px,3px,2px", "5px,3px,-2px" ] }, "stroke-dashoffset": { @@ -5334,15 +5334,15 @@ if (SpecialPowers.getBoolPref("layout.css.sticky.enabled")) { } if (SpecialPowers.getBoolPref("layout.css.mix-blend-mode.enabled")) { - gCSSProperties["mix-blend-mode"] = { - domProp: "mixBlendMode", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: ["multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", - "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], - invalid_values: [] - }; + gCSSProperties["mix-blend-mode"] = { + domProp: "mixBlendMode", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: ["multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", + "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], + invalid_values: [] + }; } if (SpecialPowers.getBoolPref("layout.css.background-blend-mode.enabled")) { From ed231bac61562226abf88bb193b7034b7acb613b Mon Sep 17 00:00:00 2001 From: Ben Kelly Date: Thu, 17 Apr 2014 10:59:54 -0400 Subject: [PATCH 49/79] Bug 993591: Eagerly free nsStreamLoader data. r=mcmanus --- netwerk/base/public/nsIStreamLoader.idl | 6 +++--- netwerk/base/src/nsStreamLoader.cpp | 21 ++++++++++++++------- netwerk/base/src/nsStreamLoader.h | 4 ++++ 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/netwerk/base/public/nsIStreamLoader.idl b/netwerk/base/public/nsIStreamLoader.idl index 2ac5986214f2..877e5b252fcf 100644 --- a/netwerk/base/public/nsIStreamLoader.idl +++ b/netwerk/base/public/nsIStreamLoader.idl @@ -27,9 +27,9 @@ interface nsIStreamLoaderObserver : nsISupports * If the observer wants to take over responsibility for the * data buffer (result), it returns NS_SUCCESS_ADOPTED_DATA * in place of NS_OK as its success code. The loader will then - * "forget" about the data, and not NS_Free() it in its own - * destructor; observer must call NS_Free() when the data is - * no longer required. + * "forget" about the data and not NS_Free() it after + * onStreamComplete() returns; observer must call NS_Free() + * when the data is no longer required. */ void onStreamComplete(in nsIStreamLoader loader, in nsISupports ctxt, diff --git a/netwerk/base/src/nsStreamLoader.cpp b/netwerk/base/src/nsStreamLoader.cpp index a0f62e96f1f7..d695b6ee8c21 100644 --- a/netwerk/base/src/nsStreamLoader.cpp +++ b/netwerk/base/src/nsStreamLoader.cpp @@ -18,9 +18,7 @@ nsStreamLoader::nsStreamLoader() nsStreamLoader::~nsStreamLoader() { - if (mData) { - NS_Free(mData); - } + ReleaseData(); } NS_IMETHODIMP @@ -103,10 +101,9 @@ nsStreamLoader::OnStopRequest(nsIRequest* request, nsISupports *ctxt, // the observer now owns the data buffer, and the loader must // not deallocate it mData = nullptr; - mLength = 0; - mAllocated = 0; } // done.. cleanup + ReleaseData(); mRequest = 0; mObserver = 0; mContext = 0; @@ -132,8 +129,7 @@ nsStreamLoader::WriteSegmentFun(nsIInputStream *inStr, self->mData = static_cast(NS_Realloc(self->mData, self->mLength + count)); if (!self->mData) { - self->mLength = 0; - self->mAllocated = 0; + self->ReleaseData(); return NS_ERROR_OUT_OF_MEMORY; } self->mAllocated = self->mLength + count; @@ -155,3 +151,14 @@ nsStreamLoader::OnDataAvailable(nsIRequest* request, nsISupports *ctxt, uint32_t countRead; return inStr->ReadSegments(WriteSegmentFun, this, count, &countRead); } + +void +nsStreamLoader::ReleaseData() +{ + if (mData) { + NS_Free(mData); + mData = nullptr; + } + mLength = 0; + mAllocated = 0; +} diff --git a/netwerk/base/src/nsStreamLoader.h b/netwerk/base/src/nsStreamLoader.h index c35bf70a794e..259881975ac2 100644 --- a/netwerk/base/src/nsStreamLoader.h +++ b/netwerk/base/src/nsStreamLoader.h @@ -30,6 +30,10 @@ protected: static NS_METHOD WriteSegmentFun(nsIInputStream *, void *, const char *, uint32_t, uint32_t, uint32_t *); + // Utility method to free mData, if present, and update other state to + // reflect that no data has been allocated. + void ReleaseData(); + nsCOMPtr mObserver; nsCOMPtr mContext; // the observer's context nsCOMPtr mRequest; From e9e164706452e9b3eef3d3a44d05e462cc464f24 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Thu, 17 Apr 2014 15:09:18 +0000 Subject: [PATCH 50/79] Back out bug 613659 for build failure on B2G Windows. --HG-- rename : layout/reftests/backgrounds/background-size-slice.html => layout/reftests/backgrounds/background-size-continuous.html rename : layout/reftests/backgrounds/background-size-cover-slice.html => layout/reftests/backgrounds/background-size-cover-continuous.html rename : layout/reftests/backgrounds/background-size-cover-clone.html => layout/reftests/backgrounds/background-size-cover-each-box.html rename : layout/reftests/backgrounds/background-size-clone.html => layout/reftests/backgrounds/background-size-each-box.html --- gfx/thebes/gfxContext.h | 12 +- layout/base/nsCSSRendering.cpp | 544 +- layout/base/nsCSSRendering.h | 3 + layout/base/nsCSSRenderingBorders.cpp | 2 + layout/base/nsCSSRenderingBorders.h | 4 +- layout/base/nsDisplayList.cpp | 33 +- layout/generic/crashtests/383089-1.html | 2 +- layout/generic/nsContainerFrame.cpp | 32 +- layout/generic/nsFrame.cpp | 14 +- layout/generic/nsGfxScrollFrame.cpp | 9 +- layout/generic/nsGfxScrollFrame.h | 13 +- layout/generic/nsIFrame.h | 15 +- layout/generic/nsImageFrame.cpp | 4 - layout/generic/nsInlineFrame.cpp | 37 +- layout/generic/nsLineLayout.cpp | 18 +- layout/generic/nsSplittableFrame.cpp | 6 +- .../background-size-bounding-box.html | 36 + ...e.html => background-size-continuous.html} | 6 +- .../background-size-cover-bounding-box.html | 37 + ... => background-size-cover-continuous.html} | 6 +- ...ml => background-size-cover-each-box.html} | 6 +- ...one.html => background-size-each-box.html} | 6 +- layout/reftests/backgrounds/reftest.list | 18 +- layout/reftests/bugs/368020-3-ref.html | 2 +- layout/reftests/bugs/368020-3.html | 2 +- layout/reftests/bugs/368020-4-ref.html | 15 + layout/reftests/bugs/368020-4.html | 15 + layout/reftests/bugs/368020-5-ref.html | 2 +- layout/reftests/bugs/368020-5.html | 2 +- layout/reftests/bugs/reftest.list | 5 +- .../css-break/box-decoration-break-1-ref.html | 67 - .../css-break/box-decoration-break-1.html | 71 - ...ion-break-with-inset-box-shadow-1-ref.html | 132 - ...oration-break-with-inset-box-shadow-1.html | 134 - ...on-break-with-outset-box-shadow-1-ref.html | 131 - ...ration-break-with-outset-box-shadow-1.html | 133 - .../css-break/green-circle-alpha-32x32.png | Bin 396 -> 0 bytes layout/reftests/css-break/reftest.list | 4 - layout/reftests/reftest.list | 3 - layout/style/nsCSSKeywordList.h | 4 +- layout/style/nsCSSPropList.h | 26 +- layout/style/nsCSSProps.cpp | 13 +- layout/style/nsCSSProps.h | 2 +- layout/style/nsComputedDOMStyle.cpp | 20 +- layout/style/nsComputedDOMStyle.h | 2 +- layout/style/nsComputedDOMStylePropertyList.h | 1 + layout/style/nsRuleNode.cpp | 15 +- layout/style/nsStyleConsts.h | 4 - layout/style/nsStyleStruct.cpp | 11 +- layout/style/nsStyleStruct.h | 6 +- layout/style/test/property_database.js | 10313 ++++++++-------- .../test/test_shorthand_property_getters.html | 4 + layout/tables/nsTableCellFrame.cpp | 10 +- layout/tables/nsTableCellFrame.h | 5 +- layout/tables/nsTableColGroupFrame.cpp | 5 - layout/tables/nsTableFrame.cpp | 5 - layout/tables/nsTableRowFrame.cpp | 5 - layout/tables/nsTableRowGroupFrame.cpp | 5 - modules/libpref/src/init/all.js | 3 - 59 files changed, 5615 insertions(+), 6425 deletions(-) create mode 100644 layout/reftests/backgrounds/background-size-bounding-box.html rename layout/reftests/backgrounds/{background-size-slice.html => background-size-continuous.html} (75%) create mode 100644 layout/reftests/backgrounds/background-size-cover-bounding-box.html rename layout/reftests/backgrounds/{background-size-cover-slice.html => background-size-cover-continuous.html} (73%) rename layout/reftests/backgrounds/{background-size-cover-clone.html => background-size-cover-each-box.html} (74%) rename layout/reftests/backgrounds/{background-size-clone.html => background-size-each-box.html} (75%) create mode 100644 layout/reftests/bugs/368020-4-ref.html create mode 100644 layout/reftests/bugs/368020-4.html delete mode 100644 layout/reftests/css-break/box-decoration-break-1-ref.html delete mode 100644 layout/reftests/css-break/box-decoration-break-1.html delete mode 100644 layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1-ref.html delete mode 100644 layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1.html delete mode 100644 layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1-ref.html delete mode 100644 layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1.html delete mode 100644 layout/reftests/css-break/green-circle-alpha-32x32.png delete mode 100644 layout/reftests/css-break/reftest.list diff --git a/gfx/thebes/gfxContext.h b/gfx/thebes/gfxContext.h index bbff91847eae..bdc6821117aa 100644 --- a/gfx/thebes/gfxContext.h +++ b/gfx/thebes/gfxContext.h @@ -831,12 +831,14 @@ public: mContext->Save(); } - void EnsureSaved(gfxContext *aContext) { - MOZ_ASSERT(!mContext || mContext == aContext, "wrong context"); - if (!mContext) { - mContext = aContext; - mContext->Save(); + void Reset(gfxContext *aContext) { + // Do the equivalent of destroying and re-creating this object. + NS_PRECONDITION(aContext, "must provide a context"); + if (mContext) { + mContext->Restore(); } + mContext = aContext; + mContext->Save(); } private: diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index fde893c6137e..2d8bb4616daa 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -61,19 +61,6 @@ using mozilla::CSSSizeOrRatio; static int gFrameTreeLockCount = 0; -static void -ApplySkipSides(int aSkipSides, nsMargin* aMargin) -{ - if (aSkipSides & SIDE_BIT_LEFT) - aMargin->left = 0; - if (aSkipSides & SIDE_BIT_TOP) - aMargin->top = 0; - if (aSkipSides & SIDE_BIT_RIGHT) - aMargin->right = 0; - if (aSkipSides & SIDE_BIT_BOTTOM) - aMargin->bottom = 0; -} - // To avoid storing this data on nsInlineFrame (bloat) and to avoid // recalculating this for each frame in a continuation (perf), hold // a cache of various coordinate information that we need in order @@ -94,18 +81,10 @@ struct InlineBackgroundData mBoundingBox.SetRect(0,0,0,0); mContinuationPoint = mLineContinuationPoint = mUnbrokenWidth = 0; mFrame = mBlockFrame = nullptr; - mLeftBorderData.Reset(); } - /** - * Return a continuous rect for (an inline) aFrame relative to the - * continuation that draws the left-most part of the background. - * This is used when painting backgrounds. - */ nsRect GetContinuousRect(nsIFrame* aFrame) { - MOZ_ASSERT(aFrame->GetType() == nsGkAtoms::inlineFrame); - SetFrame(aFrame); nscoord x; @@ -119,9 +98,12 @@ struct InlineBackgroundData NS_STYLE_DIRECTION_RTL); nscoord curOffset = aFrame->GetOffsetTo(mBlockFrame).x; + // No need to use our GetPrevContinuation/GetNextContinuation methods + // here, since ib-split siblings are certainly not on the same line. + + nsIFrame* inlineFrame = aFrame->GetPrevContinuation(); // If the continuation is fluid we know inlineFrame is not on the same line. // If it's not fluid, we need to test further to be sure. - nsIFrame* inlineFrame = aFrame->GetPrevContinuation(); while (inlineFrame && !inlineFrame->GetNextInFlow() && AreOnSameLine(aFrame, inlineFrame)) { nscoord frameXOffset = inlineFrame->GetOffsetTo(mBlockFrame).x; @@ -158,39 +140,6 @@ struct InlineBackgroundData return nsRect(-x, 0, mUnbrokenWidth, mFrame->GetSize().height); } - /** - * Return a continuous rect for (an inline) aFrame relative to the - * continuation that should draw the left-border. This is used when painting - * borders and clipping backgrounds. This may NOT be the same continuous rect - * as for drawing backgrounds; the continuation with the left-border might be - * somewhere in the middle of that rect (e.g. BIDI), in those cases we need - * the reverse background order starting at the left-border continuation. - */ - nsRect GetBorderContinuousRect(nsIFrame* aFrame, nsRect aBorderArea) - { - // Calling GetContinuousRect(aFrame) here may lead to Reset/Init which - // resets our mLeftBorderData so we save it ... - LeftBorderData saved(mLeftBorderData); - nsRect joinedBorderArea = GetContinuousRect(aFrame); - if (!saved.mIsValid || saved.mFrame != mLeftBorderData.mFrame) { - if (aFrame == mLeftBorderData.mFrame) { - mLeftBorderData.SetX(joinedBorderArea.x); - } else if (mLeftBorderData.mFrame) { - mLeftBorderData.SetX(GetContinuousRect(mLeftBorderData.mFrame).x); - } - } else { - // ... and restore it when possible. - mLeftBorderData.mX = saved.mX; - } - if (joinedBorderArea.x > mLeftBorderData.mX) { - joinedBorderArea.x = - -(mUnbrokenWidth + joinedBorderArea.x - aBorderArea.width); - } else { - joinedBorderArea.x -= mLeftBorderData.mX; - } - return joinedBorderArea; - } - nsRect GetBoundingRect(nsIFrame* aFrame) { SetFrame(aFrame); @@ -208,22 +157,13 @@ struct InlineBackgroundData } protected: - struct LeftBorderData { - nsIFrame* mFrame; // the continuation that may have a left-border - nscoord mX; // cached GetContinuousRect(mFrame).x - bool mIsValid; // true if mX is valid - void Reset() { mFrame = nullptr; mIsValid = false; } - void SetX(nscoord aX) { mX = aX; mIsValid = true; } - }; - - nsIFrame* mFrame; - nsBlockFrame* mBlockFrame; - nsRect mBoundingBox; - nscoord mContinuationPoint; - nscoord mUnbrokenWidth; - nscoord mLineContinuationPoint; - LeftBorderData mLeftBorderData; - bool mBidiEnabled; + nsIFrame* mFrame; + nsBlockFrame* mBlockFrame; + nsRect mBoundingBox; + nscoord mContinuationPoint; + nscoord mUnbrokenWidth; + nscoord mLineContinuationPoint; + bool mBidiEnabled; void SetFrame(nsIFrame* aFrame) { @@ -296,7 +236,6 @@ protected: void Init(nsIFrame* aFrame) { - mLeftBorderData.Reset(); mBidiEnabled = aFrame->PresContext()->BidiEnabled(); if (mBidiEnabled) { // Find the containing block frame @@ -313,11 +252,8 @@ protected: // Start with the previous flow frame as our continuation point // is the total of the widths of the previous frames. nsIFrame* inlineFrame = GetPrevContinuation(aFrame); + while (inlineFrame) { - if (!mLeftBorderData.mFrame && - !(inlineFrame->GetSkipSides() & SIDE_BIT_LEFT)) { - mLeftBorderData.mFrame = inlineFrame; - } nsRect rect = inlineFrame->GetRect(); mContinuationPoint += rect.width; if (mBidiEnabled && !AreOnSameLine(aFrame, inlineFrame)) { @@ -332,10 +268,6 @@ protected: // unbroken width. inlineFrame = aFrame; while (inlineFrame) { - if (!mLeftBorderData.mFrame && - !(inlineFrame->GetSkipSides() & SIDE_BIT_LEFT)) { - mLeftBorderData.mFrame = inlineFrame; - } nsRect rect = inlineFrame->GetRect(); mUnbrokenWidth += rect.width; mBoundingBox.UnionRect(mBoundingBox, rect); @@ -439,106 +371,6 @@ MakeBevelColor(mozilla::css::Side whichSide, uint8_t style, return theColor; } -static bool -GetRadii(nsIFrame* aForFrame, const nsStyleBorder& aBorder, - const nsRect& aOrigBorderArea, const nsRect& aBorderArea, - gfxCornerSizes* aBgRadii) -{ - nscoord radii[8]; - bool haveRoundedCorners; - nsSize sz = aBorderArea.Size(); - nsSize frameSize = aForFrame->GetSize(); - if (&aBorder == aForFrame->StyleBorder() && - frameSize == aOrigBorderArea.Size()) { - haveRoundedCorners = aForFrame->GetBorderRadii(sz, sz, 0, radii); - } else { - haveRoundedCorners = - nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius, frameSize, sz, 0, radii); - } - if (haveRoundedCorners) { - auto d2a = aForFrame->PresContext()->AppUnitsPerDevPixel(); - nsCSSRendering::ComputePixelRadii(radii, d2a, aBgRadii); - } - return haveRoundedCorners; -} - -static nsRect -JoinBoxesForVerticalSlice(nsIFrame* aFrame, const nsRect& aBorderArea) -{ - // Inflate vertically as if our continuations were laid out vertically - // adjacent. Note that we don't touch the width. - nsRect borderArea = aBorderArea; - nscoord h = 0; - nsIFrame* f = aFrame->GetNextContinuation(); - for (; f; f = f->GetNextContinuation()) { - MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_PART_OF_IBSPLIT), - "anonymous ib-split block shouldn't have border/background"); - h += f->GetRect().height; - } - borderArea.height += h; - h = 0; - f = aFrame->GetPrevContinuation(); - for (; f; f = f->GetPrevContinuation()) { - MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_PART_OF_IBSPLIT), - "anonymous ib-split block shouldn't have border/background"); - h += f->GetRect().height; - } - borderArea.y -= h; - borderArea.height += h; - return borderArea; -} - -/** - * Inflate aBorderArea which is relative to aFrame's origin to calculate - * a hypothetical non-split frame area for all the continuations. - * See "Joining Boxes for 'slice'" in - * http://dev.w3.org/csswg/css-break/#break-decoration - */ -enum InlineBoxOrder { eForBorder, eForBackground }; -static nsRect -JoinBoxesForSlice(nsIFrame* aFrame, const nsRect& aBorderArea, - InlineBoxOrder aOrder) -{ - if (aFrame->GetType() == nsGkAtoms::inlineFrame) { - return (aOrder == eForBorder - ? gInlineBGData->GetBorderContinuousRect(aFrame, aBorderArea) - : gInlineBGData->GetContinuousRect(aFrame)) + - aBorderArea.TopLeft(); - } - return JoinBoxesForVerticalSlice(aFrame, aBorderArea); -} - -static bool -IsBoxDecorationSlice(const nsStyleBorder& aStyleBorder) -{ - return aStyleBorder.mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_SLICE; -} - -static nsRect -BoxDecorationRectForBorder(nsIFrame* aFrame, const nsRect& aBorderArea, - const nsStyleBorder* aStyleBorder = nullptr) -{ - if (!aStyleBorder) { - aStyleBorder = aFrame->StyleBorder(); - } - return ::IsBoxDecorationSlice(*aStyleBorder) - ? ::JoinBoxesForSlice(aFrame, aBorderArea, eForBorder) - : aBorderArea; -} - -static nsRect -BoxDecorationRectForBackground(nsIFrame* aFrame, const nsRect& aBorderArea, - const nsStyleBorder* aStyleBorder = nullptr) -{ - if (!aStyleBorder) { - aStyleBorder = aFrame->StyleBorder(); - } - return ::IsBoxDecorationSlice(*aStyleBorder) - ? ::JoinBoxesForSlice(aFrame, aBorderArea, eForBackground) - : aBorderArea; -} - //---------------------------------------------------------------------- // Thebes Border Rendering Code Start @@ -617,6 +449,10 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext, nsStyleContext* aStyleContext, int aSkipSides) { + nsMargin border; + nscoord twipsRadii[8]; + nsCompatibility compatMode = aPresContext->CompatibilityMode(); + SN("++ PaintBorder"); // Check to see if we have an appearance defined. If so, we let the theme @@ -638,67 +474,59 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext, // Get our style context's color struct. const nsStyleColor* ourColor = aStyleContext->StyleColor(); - // In NavQuirks mode we want to use the parent's context as a starting point - // for determining the background color. - bool quirks = aPresContext->CompatibilityMode() == eCompatibility_NavQuirks; - nsIFrame* bgFrame = FindNonTransparentBackgroundFrame(aForFrame, quirks); + // in NavQuirks mode we want to use the parent's context as a starting point + // for determining the background color + nsIFrame* bgFrame = nsCSSRendering::FindNonTransparentBackgroundFrame + (aForFrame, compatMode == eCompatibility_NavQuirks ? true : false); nsStyleContext* bgContext = bgFrame->StyleContext(); nscolor bgColor = bgContext->GetVisitedDependentColor(eCSSProperty_background_color); - nsMargin border = aStyleBorder.GetComputedBorder(); + border = aStyleBorder.GetComputedBorder(); if ((0 == border.left) && (0 == border.right) && (0 == border.top) && (0 == border.bottom)) { // Empty border area return; } - // Compute the outermost boundary of the area that might be painted. - // Same coordinate space as aBorderArea & aBGClipRect. - nsRect joinedBorderArea = - ::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aStyleBorder); - gfxCornerSizes bgRadii; - ::GetRadii(aForFrame, aStyleBorder, aBorderArea, joinedBorderArea, &bgRadii); - - - SF(" joinedBorderArea: %d %d %d %d\n", joinedBorderArea.x, joinedBorderArea.y, - joinedBorderArea.width, joinedBorderArea.height); - - // start drawing - gfxContext* ctx = aRenderingContext.ThebesContext(); - ctx->Save(); - - if (::IsBoxDecorationSlice(aStyleBorder)) { - if (aSkipSides == 0) { - // No continuations most likely, or ::first-letter that wants all border- - // sides on the first continuation. - joinedBorderArea = aBorderArea; - } else if (joinedBorderArea.IsEqualEdges(aBorderArea)) { - // No need for a clip, just skip the sides we don't want. - ::ApplySkipSides(aSkipSides, &border); - } else { - // We're drawing borders around the joined continuation boxes so we need - // to clip that to the slice that we want for this frame. - aRenderingContext.IntersectClip(aBorderArea); - } + nsSize frameSize = aForFrame->GetSize(); + if (&aStyleBorder == aForFrame->StyleBorder() && + frameSize == aBorderArea.Size()) { + aForFrame->GetBorderRadii(twipsRadii); } else { - MOZ_ASSERT(joinedBorderArea.IsEqualEdges(aBorderArea), - "Should use aBorderArea for box-decoration-break:clone"); - MOZ_ASSERT(aForFrame->GetSkipSides() == 0, - "Should not skip sides for box-decoration-break:clone except " - "::first-letter/line continuations or other frame types that " - "don't have borders but those shouldn't reach this point."); + nsIFrame::ComputeBorderRadii(aStyleBorder.mBorderRadius, frameSize, + aBorderArea.Size(), aSkipSides, twipsRadii); } - // Convert to dev pixels. + // Turn off rendering for all of the zero sized sides + if (aSkipSides & SIDE_BIT_TOP) border.top = 0; + if (aSkipSides & SIDE_BIT_RIGHT) border.right = 0; + if (aSkipSides & SIDE_BIT_BOTTOM) border.bottom = 0; + if (aSkipSides & SIDE_BIT_LEFT) border.left = 0; + + // get the inside and outside parts of the border + nsRect outerRect(aBorderArea); + + SF(" outerRect: %d %d %d %d\n", outerRect.x, outerRect.y, outerRect.width, outerRect.height); + + // we can assume that we're already clipped to aDirtyRect -- I think? (!?) + + // Get our conversion values nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1); - gfxRect joinedBorderAreaPx = - nsLayoutUtils::RectToGfxRect(joinedBorderArea, twipsPerPixel); + + // convert outer and inner rects + gfxRect oRect(nsLayoutUtils::RectToGfxRect(outerRect, twipsPerPixel)); + + // convert the border widths gfxFloat borderWidths[4] = { gfxFloat(border.top / twipsPerPixel), gfxFloat(border.right / twipsPerPixel), gfxFloat(border.bottom / twipsPerPixel), gfxFloat(border.left / twipsPerPixel) }; + // convert the radii + gfxCornerSizes borderRadii; + ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii); + uint8_t borderStyles[4]; nscolor borderColors[4]; nsBorderColors *compositeColors[4]; @@ -715,25 +543,32 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext, } SF(" borderStyles: %d %d %d %d\n", borderStyles[0], borderStyles[1], borderStyles[2], borderStyles[3]); - //SF ("bgRadii: %f %f %f %f\n", bgRadii[0], bgRadii[1], bgRadii[2], bgRadii[3]); + + // start drawing + gfxContext *ctx = aRenderingContext.ThebesContext(); + + ctx->Save(); #if 0 - // this will draw a transparent red backround underneath the border area + // this will draw a transparent red backround underneath the oRect area ctx->Save(); - ctx->Rectangle(joinedBorderAreaPx); + ctx->Rectangle(oRect); ctx->SetColor(gfxRGBA(1.0, 0.0, 0.0, 0.5)); ctx->Fill(); ctx->Restore(); #endif + //SF ("borderRadii: %f %f %f %f\n", borderRadii[0], borderRadii[1], borderRadii[2], borderRadii[3]); + nsCSSBorderRenderer br(twipsPerPixel, ctx, - joinedBorderAreaPx, + oRect, borderStyles, borderWidths, - bgRadii, + borderRadii, borderColors, compositeColors, + aSkipSides, bgColor); br.DrawBorders(); @@ -853,7 +688,7 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext, outlineWidths, outlineRadii, outlineColors, - nullptr, + nullptr, 0, bgColor); br.DrawBorders(); @@ -906,7 +741,7 @@ nsCSSRendering::PaintFocus(nsPresContext* aPresContext, focusWidths, focusRadii, focusColors, - nullptr, + nullptr, 0, NS_RGB(255, 0, 0)); br.DrawBorders(); @@ -1161,10 +996,13 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, nsCSSShadowArray* shadows = styleBorder->mBoxShadow; if (!shadows) return; + nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1); - gfxContextAutoSaveRestore gfxStateRestorer; bool hasBorderRadius; bool nativeTheme; // mutually exclusive with hasBorderRadius + gfxCornerSizes borderRadii; + + // Get any border radius, since box-shadow must also have rounded corners if the frame does const nsStyleDisplay* styleDisplay = aForFrame->StyleDisplay(); nsITheme::Transparency transparency; if (aForFrame->IsThemed(styleDisplay, &transparency)) { @@ -1175,29 +1013,17 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, nativeTheme = transparency != nsITheme::eOpaque; } else { nativeTheme = false; - hasBorderRadius = true; // we'll update this below - } - - nsRect frameRect = nativeTheme ? - aForFrame->GetVisualOverflowRectRelativeToSelf() + aFrameArea.TopLeft() : - aFrameArea; - frameRect = ::BoxDecorationRectForBorder(aForFrame, frameRect); - - // Get any border radius, since box-shadow must also have rounded corners if - // the frame does. - gfxCornerSizes borderRadii; - const nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1); - if (hasBorderRadius) { nscoord twipsRadii[8]; NS_ASSERTION(aFrameArea.Size() == aForFrame->VisualBorderRectRelativeToSelf().Size(), "unexpected size"); - nsSize sz = frameRect.Size(); - hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, 0, twipsRadii); + hasBorderRadius = aForFrame->GetBorderRadii(twipsRadii); if (hasBorderRadius) { ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii); } } + nsRect frameRect = + nativeTheme ? aForFrame->GetVisualOverflowRectRelativeToSelf() + aFrameArea.TopLeft() : aFrameArea; gfxRect frameGfxRect(nsLayoutUtils::RectToGfxRect(frameRect, twipsPerPixel)); frameGfxRect.Round(); @@ -1221,7 +1047,6 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, std::max(borderRadii[C_BL].height, borderRadii[C_BR].height), 0)); } - int skipSides = aForFrame->GetSkipSides(); for (uint32_t i = shadows->Length(); i > 0; --i) { nsCSSShadowItem* shadowItem = shadows->ShadowAt(i - 1); if (shadowItem->mInset) @@ -1302,7 +1127,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, } else { renderContext->Save(); // Clip out the area of the actual frame so the shadow is not shown within - // the frame. + // the frame renderContext->NewPath(); renderContext->Rectangle(shadowGfxRectPlusBlur); if (hasBorderRadius) { @@ -1314,36 +1139,6 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, renderContext->SetFillRule(gfxContext::FILL_RULE_EVEN_ODD); renderContext->Clip(); - // Clip the shadow so that we only get the part that applies to aForFrame. - nsRect fragmentClip = shadowRectPlusBlur; - if (skipSides) { - if (skipSides & SIDE_BIT_LEFT) { - nscoord xmost = fragmentClip.XMost(); - fragmentClip.x = aFrameArea.x; - fragmentClip.width = xmost - fragmentClip.x; - } - if (skipSides & SIDE_BIT_RIGHT) { - nscoord xmost = fragmentClip.XMost(); - nscoord overflow = xmost - aFrameArea.XMost(); - if (overflow > 0) { - fragmentClip.width -= overflow; - } - } - if (skipSides & SIDE_BIT_TOP) { - nscoord ymost = fragmentClip.YMost(); - fragmentClip.y = aFrameArea.y; - fragmentClip.height = ymost - fragmentClip.y; - } - if (skipSides & SIDE_BIT_BOTTOM) { - nscoord ymost = fragmentClip.YMost(); - nscoord overflow = ymost - aFrameArea.YMost(); - if (overflow > 0) { - fragmentClip.height -= overflow; - } - } - } - aRenderingContext.IntersectClip(fragmentClip); - gfxCornerSizes clipRectRadii; if (hasBorderRadius) { gfxFloat spreadDistance = shadowItem->mSpread / twipsPerPixel; @@ -1393,20 +1188,18 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext, return; } - NS_ASSERTION(aForFrame->GetType() == nsGkAtoms::fieldSetFrame || - aFrameArea.Size() == aForFrame->GetSize(), "unexpected size"); - - nsRect frameRect = ::BoxDecorationRectForBorder(aForFrame, aFrameArea); - nsRect paddingRect = frameRect; - nsMargin border = aForFrame->GetUsedBorder(); - paddingRect.Deflate(border); - // Get any border radius, since box-shadow must also have rounded corners // if the frame does. nscoord twipsRadii[8]; - nsSize sz = frameRect.Size(); - bool hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, 0, twipsRadii); - const nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1); + NS_ASSERTION(aForFrame->GetType() == nsGkAtoms::fieldSetFrame || + aFrameArea.Size() == aForFrame->GetSize(), "unexpected size"); + bool hasBorderRadius = aForFrame->GetBorderRadii(twipsRadii); + nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1); + + nsRect paddingRect = aFrameArea; + nsMargin border = aForFrame->GetUsedBorder(); + aForFrame->ApplySkipSides(border); + paddingRect.Deflate(border); gfxCornerSizes innerRadii; if (hasBorderRadius) { @@ -1428,9 +1221,13 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext, if (!shadowItem->mInset) continue; - // shadowPaintRect: the area to paint on the temp surface - // shadowClipRect: the area on the temporary surface within shadowPaintRect - // that we will NOT paint in + /* + * shadowRect: the frame's padding rect + * shadowPaintRect: the area to paint on the temp surface, larger than shadowRect + * so that blurs still happen properly near the edges + * shadowClipRect: the area on the temporary surface within shadowPaintRect + * that we will NOT paint in + */ nscoord blurRadius = shadowItem->mRadius; nsMargin blurMargin = nsContextBoxBlur::GetBlurRadiusMargin(blurRadius, twipsPerPixel); @@ -1709,7 +1506,6 @@ GetBackgroundClip(gfxContext *aCtx, uint8_t aBackgroundClip, aClipState->mCustomClip = false; aClipState->mRadiiAreOuter = true; aClipState->mClippedRadii = aBGRadii; - if (aForFrame->GetType() == nsGkAtoms::scrollFrame && NS_STYLE_BG_ATTACHMENT_LOCAL == aBackgroundAttachment) { // As of this writing, this is still in discussion in the CSS Working Group @@ -1808,13 +1604,15 @@ SetupBackgroundClip(BackgroundClipState& aClipState, gfxContext *aCtx, // as above with bgArea, arguably a bug, but table painting seems // to depend on it. + if (aHaveRoundedCorners || aClipState.mHasAdditionalBGClipArea) { + aAutoSR->Reset(aCtx); + } + if (aClipState.mHasAdditionalBGClipArea) { gfxRect bgAreaGfx = nsLayoutUtils::RectToGfxRect( aClipState.mAdditionalBGClipArea, aAppUnitsPerPixel); bgAreaGfx.Round(); bgAreaGfx.Condition(); - - aAutoSR->EnsureSaved(aCtx); aCtx->NewPath(); aCtx->Rectangle(bgAreaGfx, true); aCtx->Clip(); @@ -1835,7 +1633,6 @@ SetupBackgroundClip(BackgroundClipState& aClipState, gfxContext *aCtx, return; } - aAutoSR->EnsureSaved(aCtx); aCtx->NewPath(); aCtx->RoundedRectangle(bgAreaGfx, aClipState.mClippedRadii, aClipState.mRadiiAreOuter); aCtx->Clip(); @@ -2610,14 +2407,26 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, return; // Compute the outermost boundary of the area that might be painted. - // Same coordinate space as aBorderArea & aBGClipRect. - nsRect paintBorderArea = - ::BoxDecorationRectForBackground(aForFrame, aBorderArea, &aBorder); - nsRect clipBorderArea = - ::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aBorder); + gfxContext *ctx = aRenderingContext.ThebesContext(); + nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel(); + + // Same coordinate space as aBorderArea & aBGClipRect gfxCornerSizes bgRadii; - bool haveRoundedCorners = - ::GetRadii(aForFrame, aBorder, aBorderArea, clipBorderArea, &bgRadii); + bool haveRoundedCorners; + { + nscoord radii[8]; + nsSize frameSize = aForFrame->GetSize(); + if (&aBorder == aForFrame->StyleBorder() && + frameSize == aBorderArea.Size()) { + haveRoundedCorners = aForFrame->GetBorderRadii(radii); + } else { + haveRoundedCorners = nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius, + frameSize, aBorderArea.Size(), + aForFrame->GetSkipSides(), radii); + } + if (haveRoundedCorners) + ComputePixelRadii(radii, appUnitsPerPixel, &bgRadii); + } // The 'bgClipArea' (used only by the image tiling logic, far below) // is the caller-provided aBGClipRect if any, or else the area @@ -2625,8 +2434,6 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, // SetupCurrentBackgroundClip. (Arguably it should be the // intersection, but that breaks the table painter -- in particular, // taking the intersection breaks reftests/bugs/403249-1[ab].) - gfxContext* ctx = aRenderingContext.ThebesContext(); - nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel(); BackgroundClipState clipState; uint8_t currentBackgroundClip; bool isSolidBorder; @@ -2656,7 +2463,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, } GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment, - aForFrame, clipBorderArea, + aForFrame, aBorderArea, aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel, &clipState); } @@ -2665,8 +2472,6 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, if (drawBackgroundColor && !isCanvasFrame) ctx->SetColor(gfxRGBA(bgColor)); - // NOTE: no Save() yet, we do that later by calling autoSR.EnsureSaved(ctx) - // in the cases we need it. gfxContextAutoSaveRestore autoSR; // If there is no background image, draw a color. (If there is @@ -2726,30 +2531,19 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, // already called GetBackgroundClip above and it stored its results // in clipState. if (clipSet) { - autoSR = gfxContextAutoSaveRestore(); // reset the previous one GetBackgroundClip(ctx, currentBackgroundClip, layer.mAttachment, aForFrame, - clipBorderArea, aDirtyRect, haveRoundedCorners, + aBorderArea, aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel, &clipState); } SetupBackgroundClip(clipState, ctx, haveRoundedCorners, appUnitsPerPixel, &autoSR); clipSet = true; - if (!clipBorderArea.IsEqualEdges(aBorderArea)) { - // We're drawing the background for the joined continuation boxes - // so we need to clip that to the slice that we want for this frame. - gfxRect clip = - nsLayoutUtils::RectToGfxRect(aBorderArea, appUnitsPerPixel); - autoSR.EnsureSaved(ctx); - ctx->NewPath(); - ctx->SnappedRectangle(clip); - ctx->Clip(); - } } } if ((aLayer < 0 || i == (uint32_t)startLayer) && !clipState.mDirtyRectGfx.IsEmpty()) { nsBackgroundLayerState state = PrepareBackgroundLayer(aPresContext, aForFrame, - aFlags, paintBorderArea, clipState.mBGClipArea, layer); + aFlags, aBorderArea, clipState.mBGClipArea, *bg, layer); if (!state.mFillArea.IsEmpty()) { if (state.mCompositingOp != gfxContext::OPERATOR_OVER) { NS_ASSERTION(ctx->CurrentOperator() == gfxContext::OPERATOR_OVER, @@ -2758,7 +2552,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, } state.mImageRenderer.DrawBackground(aPresContext, aRenderingContext, state.mDestArea, state.mFillArea, - state.mAnchor + paintBorderArea.TopLeft(), + state.mAnchor + aBorderArea.TopLeft(), clipState.mDirtyRect); if (state.mCompositingOp != gfxContext::OPERATOR_OVER) { ctx->SetOperator(gfxContext::OPERATOR_OVER); @@ -2813,12 +2607,26 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext, } // Compute the outermost boundary of the area that might be painted. - // Same coordinate space as aBorderArea. - nsRect clipBorderArea = - ::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aBorder); + gfxContext *ctx = aRenderingContext.ThebesContext(); + nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel(); + + // Same coordinate space as aBorderArea gfxCornerSizes bgRadii; - bool haveRoundedCorners = - ::GetRadii(aForFrame, aBorder, aBorderArea, clipBorderArea, &bgRadii); + bool haveRoundedCorners; + { + nscoord radii[8]; + nsSize frameSize = aForFrame->GetSize(); + if (&aBorder == aForFrame->StyleBorder() && + frameSize == aBorderArea.Size()) { + haveRoundedCorners = aForFrame->GetBorderRadii(radii); + } else { + haveRoundedCorners = nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius, + frameSize, aBorderArea.Size(), + aForFrame->GetSkipSides(), radii); + } + if (haveRoundedCorners) + ComputePixelRadii(radii, appUnitsPerPixel, &bgRadii); + } // The background is rendered over the 'background-clip' area, // which is normally equal to the border area but may be reduced @@ -2828,8 +2636,6 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext, // radii as the border code will. // The background-color is drawn based on the bottom // background-clip. - gfxContext* ctx = aRenderingContext.ThebesContext(); - nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel(); const nsStyleBackground *bg = aBackgroundSC->StyleBackground(); uint8_t currentBackgroundClip = bg->BottomLayer().mClip; bool isSolidBorder = @@ -2844,7 +2650,7 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext, BackgroundClipState clipState; GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment, - aForFrame, clipBorderArea, + aForFrame, aBorderArea, aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel, &clipState); @@ -2869,17 +2675,47 @@ nsRect nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext, nsIFrame* aForFrame, const nsRect& aBorderArea, + const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer, nsIFrame** aAttachedToFrame) { // Compute background origin area relative to aBorderArea now as we may need // it to compute the effective image size for a CSS gradient. - nsRect bgPositioningArea; + nsRect bgPositioningArea(0, 0, 0, 0); nsIAtom* frameType = aForFrame->GetType(); nsIFrame* geometryFrame = aForFrame; - if (MOZ_UNLIKELY(frameType == nsGkAtoms::scrollFrame && - NS_STYLE_BG_ATTACHMENT_LOCAL == aLayer.mAttachment)) { + if (frameType == nsGkAtoms::inlineFrame) { + // XXXjwalden Strictly speaking this is not quite faithful to how + // background-break is supposed to interact with background-origin values, + // but it's a non-trivial amount of work to make it fully conformant, and + // until the specification is more finalized (and assuming background-break + // even makes the cut) it doesn't make sense to hammer out exact behavior. + switch (aBackground.mBackgroundInlinePolicy) { + case NS_STYLE_BG_INLINE_POLICY_EACH_BOX: + bgPositioningArea = nsRect(nsPoint(0,0), aBorderArea.Size()); + break; + case NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX: + bgPositioningArea = gInlineBGData->GetBoundingRect(aForFrame); + break; + default: + NS_ERROR("Unknown background-inline-policy value! " + "Please, teach me what to do."); + case NS_STYLE_BG_INLINE_POLICY_CONTINUOUS: + bgPositioningArea = gInlineBGData->GetContinuousRect(aForFrame); + break; + } + } else if (frameType == nsGkAtoms::canvasFrame) { + geometryFrame = aForFrame->GetFirstPrincipalChild(); + // geometryFrame might be null if this canvas is a page created + // as an overflow container (e.g. the in-flow content has already + // finished and this page only displays the continuations of + // absolutely positioned content). + if (geometryFrame) { + bgPositioningArea = geometryFrame->GetRect(); + } + } else if (frameType == nsGkAtoms::scrollFrame && + NS_STYLE_BG_ATTACHMENT_LOCAL == aLayer.mAttachment) { nsIScrollableFrame* scrollableFrame = do_QueryFrame(aForFrame); bgPositioningArea = nsRect( scrollableFrame->GetScrolledFrame()->GetPosition() @@ -2903,17 +2739,6 @@ nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext, } *aAttachedToFrame = aForFrame; return bgPositioningArea; - } - - if (MOZ_UNLIKELY(frameType == nsGkAtoms::canvasFrame)) { - geometryFrame = aForFrame->GetFirstPrincipalChild(); - // geometryFrame might be null if this canvas is a page created - // as an overflow container (e.g. the in-flow content has already - // finished and this page only displays the continuations of - // absolutely positioned content). - if (geometryFrame) { - bgPositioningArea = geometryFrame->GetRect(); - } } else { bgPositioningArea = nsRect(nsPoint(0,0), aBorderArea.Size()); } @@ -2927,6 +2752,7 @@ nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext, NS_ASSERTION(aLayer.mOrigin == NS_STYLE_BG_ORIGIN_CONTENT, "unknown background-origin value"); } + geometryFrame->ApplySkipSides(border); bgPositioningArea.Deflate(border); } @@ -3010,10 +2836,11 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext, uint32_t aFlags, const nsRect& aBorderArea, const nsRect& aBGClipRect, + const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer) { /* - * The properties we need to keep in mind when drawing background + * The background properties we need to keep in mind when drawing background * layers are: * * background-image @@ -3023,8 +2850,8 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext, * background-clip * background-origin * background-size + * background-break (-moz-background-inline-policy) * background-blend-mode - * box-decoration-break * * (background-color applies to the entire element and not to individual * layers, so it is irrelevant to this method.) @@ -3047,21 +2874,22 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext, * depends upon background-attachment (only in the case where that value * is 'fixed') * background-size - * depends upon box-decoration-break (for the background positioning area - * for resolving percentages), background-image (for the image's intrinsic + * depends upon background-break (for the background positioning area for + * resolving percentages), background-image (for the image's intrinsic * size), background-repeat (if that value is 'round'), and * background-origin (for the background painting area, when * background-repeat is 'round') - * box-decoration-break - * no dependencies + * background-break + * depends upon background-origin (specifying how the boxes making up the + * background positioning area are determined) * * As a result of only-if dependencies we don't strictly do a topological * sort of the above properties when processing, but it's pretty close to one: * * background-clip (by caller) * background-image - * box-decoration-break, background-origin - * background-attachment (postfix for background-origin if 'fixed') + * background-break, background-origin + * background-attachment (postfix for background-{origin,break} if 'fixed') * background-size * background-position * background-repeat @@ -3087,7 +2915,7 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext, // it to compute the effective image size for a CSS gradient. nsRect bgPositioningArea = ComputeBackgroundPositioningArea(aPresContext, aForFrame, aBorderArea, - aLayer, &attachedToFrame); + aBackground, aLayer, &attachedToFrame); // For background-attachment:fixed backgrounds, we'll limit the area // where the background can be drawn to the viewport. @@ -3157,13 +2985,13 @@ nsCSSRendering::GetBackgroundLayerRect(nsPresContext* aPresContext, nsIFrame* aForFrame, const nsRect& aBorderArea, const nsRect& aClipRect, + const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer, uint32_t aFlags) { - nsRect borderArea = ::BoxDecorationRectForBackground(aForFrame, aBorderArea); nsBackgroundLayerState state = - PrepareBackgroundLayer(aPresContext, aForFrame, aFlags, borderArea, - aClipRect, aLayer); + PrepareBackgroundLayer(aPresContext, aForFrame, aFlags, aBorderArea, + aClipRect, aBackground, aLayer); return state.mFillArea; } @@ -5107,8 +4935,10 @@ nsContextBoxBlur::GetBlurRadiusMargin(nscoord aBlurRadius, gfxIntSize blurRadius = ComputeBlurRadius(aBlurRadius, aAppUnitsPerDevPixel); nsMargin result; - result.top = result.bottom = blurRadius.height * aAppUnitsPerDevPixel; - result.left = result.right = blurRadius.width * aAppUnitsPerDevPixel; + result.top = blurRadius.height * aAppUnitsPerDevPixel; + result.right = blurRadius.width * aAppUnitsPerDevPixel; + result.bottom = blurRadius.height * aAppUnitsPerDevPixel; + result.left = blurRadius.width * aAppUnitsPerDevPixel; return result; } diff --git a/layout/base/nsCSSRendering.h b/layout/base/nsCSSRendering.h index f6e668f38576..7fd615791a51 100644 --- a/layout/base/nsCSSRendering.h +++ b/layout/base/nsCSSRendering.h @@ -456,6 +456,7 @@ struct nsCSSRendering { ComputeBackgroundPositioningArea(nsPresContext* aPresContext, nsIFrame* aForFrame, const nsRect& aBorderArea, + const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer, nsIFrame** aAttachedToFrame); @@ -465,6 +466,7 @@ struct nsCSSRendering { uint32_t aFlags, const nsRect& aBorderArea, const nsRect& aBGClipRect, + const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer); /** @@ -540,6 +542,7 @@ struct nsCSSRendering { nsIFrame* aForFrame, const nsRect& aBorderArea, const nsRect& aClipRect, + const nsStyleBackground& aBackground, const nsStyleBackground::Layer& aLayer, uint32_t aFlags); diff --git a/layout/base/nsCSSRenderingBorders.cpp b/layout/base/nsCSSRenderingBorders.cpp index 05f361953717..405eb1bca272 100644 --- a/layout/base/nsCSSRenderingBorders.cpp +++ b/layout/base/nsCSSRenderingBorders.cpp @@ -120,6 +120,7 @@ nsCSSBorderRenderer::nsCSSBorderRenderer(int32_t aAppUnitsPerPixel, gfxCornerSizes& aBorderRadii, const nscolor* aBorderColors, nsBorderColors* const* aCompositeColors, + int aSkipSides, nscolor aBackgroundColor) : mContext(aDestContext), mOuterRect(aOuterRect), @@ -129,6 +130,7 @@ nsCSSBorderRenderer::nsCSSBorderRenderer(int32_t aAppUnitsPerPixel, mBorderColors(aBorderColors), mCompositeColors(aCompositeColors), mAUPP(aAppUnitsPerPixel), + mSkipSides(aSkipSides), mBackgroundColor(aBackgroundColor) { if (!mCompositeColors) { diff --git a/layout/base/nsCSSRenderingBorders.h b/layout/base/nsCSSRenderingBorders.h index 461a765abd3a..41a2415b4ece 100644 --- a/layout/base/nsCSSRenderingBorders.h +++ b/layout/base/nsCSSRenderingBorders.h @@ -79,6 +79,7 @@ struct nsCSSBorderRenderer { gfxCornerSizes& aBorderRadii, const nscolor* aBorderColors, nsBorderColors* const* aCompositeColors, + int aSkipSides, nscolor aBackgroundColor); gfxCornerSizes mBorderCornerDimensions; @@ -104,7 +105,8 @@ struct nsCSSBorderRenderer { // core app units per pixel int32_t mAUPP; - // the background color + // misc -- which sides to skip, the background color + int mSkipSides; nscolor mBackgroundColor; // calculated values diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 81955631bdc6..9dddee0f9074 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -1934,8 +1934,14 @@ nsDisplayBackgroundImage::IsSingleFixedPositionImage(nsDisplayListBuilder* aBuil return false; nsBackgroundLayerState state = - nsCSSRendering::PrepareBackgroundLayer(presContext, mFrame, flags, - borderArea, aClipRect, layer); + nsCSSRendering::PrepareBackgroundLayer(presContext, + mFrame, + flags, + borderArea, + aClipRect, + *mBackgroundStyle, + layer); + nsImageRenderer* imageRenderer = &state.mImageRenderer; // We only care about images here, not gradients. if (!imageRenderer->IsRasterImage()) @@ -1968,8 +1974,14 @@ nsDisplayBackgroundImage::TryOptimizeToImageLayer(LayerManager* aManager, } nsBackgroundLayerState state = - nsCSSRendering::PrepareBackgroundLayer(presContext, mFrame, flags, - borderArea, borderArea, layer); + nsCSSRendering::PrepareBackgroundLayer(presContext, + mFrame, + flags, + borderArea, + borderArea, + *mBackgroundStyle, + layer); + nsImageRenderer* imageRenderer = &state.mImageRenderer; // We only care about images here, not gradients. if (!imageRenderer->IsRasterImage()) @@ -2182,13 +2194,12 @@ nsDisplayBackgroundImage::GetOpaqueRegion(nsDisplayListBuilder* aBuilder, *aSnap = true; - // For NS_STYLE_BOX_DECORATION_BREAK_SLICE, don't try to optimize here, since + // For policies other than EACH_BOX, don't try to optimize here, since // this could easily lead to O(N^2) behavior inside InlineBackgroundData, // which expects frames to be sent to it in content order, not reverse // content order which we'll produce here. // Of course, if there's only one frame in the flow, it doesn't matter. - if (mFrame->StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE || + if (mBackgroundStyle->mBackgroundInlinePolicy == NS_STYLE_BG_INLINE_POLICY_EACH_BOX || (!mFrame->GetPrevContinuation() && !mFrame->GetNextContinuation())) { const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer]; if (layer.mImage.IsOpaque() && layer.mBlendMode == NS_STYLE_BLEND_NORMAL) { @@ -2236,7 +2247,7 @@ nsDisplayBackgroundImage::GetPositioningArea() return nsCSSRendering::ComputeBackgroundPositioningArea( mFrame->PresContext(), mFrame, nsRect(ToReferenceFrame(), mFrame->GetSize()), - mBackgroundStyle->mLayers[mLayer], + *mBackgroundStyle, mBackgroundStyle->mLayers[mLayer], &attachedToFrame) + ToReferenceFrame(); } @@ -2350,7 +2361,8 @@ nsDisplayBackgroundImage::GetBoundsInternal(nsDisplayListBuilder* aBuilder) { } const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer]; return nsCSSRendering::GetBackgroundLayerRect(presContext, mFrame, - borderBox, clipRect, layer, + borderBox, clipRect, + *mBackgroundStyle, layer, aBuilder->GetBackgroundPaintFlags()); } @@ -2827,8 +2839,11 @@ nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder, PROFILER_LABEL("nsDisplayBoxShadowOuter", "Paint"); for (uint32_t i = 0; i < rects.Length(); ++i) { + aCtx->PushState(); + aCtx->IntersectClip(rects[i]); nsCSSRendering::PaintBoxShadowOuter(presContext, *aCtx, mFrame, borderRect, rects[i], mOpacity); + aCtx->PopState(); } } diff --git a/layout/generic/crashtests/383089-1.html b/layout/generic/crashtests/383089-1.html index c6497719bd82..f73c1a8dfb6c 100644 --- a/layout/generic/crashtests/383089-1.html +++ b/layout/generic/crashtests/383089-1.html @@ -78,7 +78,7 @@ function foo()


-
+


x
diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index 472245db0914..0fd9e7225a44 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -849,31 +849,12 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext, // This frame is a first-in-flow, but it might have a previous bidi // continuation, in which case that continuation should handle the startSide // border. - // For box-decoration-break:clone we setup clonePBM = startPBM + endPBM and - // add that to each line. For box-decoration-break:slice clonePBM is zero. - nscoord clonePBM = 0; // PBM = PaddingBorderMargin - const bool sliceBreak = - styleBorder->mBoxDecorationBreak == NS_STYLE_BOX_DECORATION_BREAK_SLICE; if (!GetPrevContinuation()) { - nscoord startPBM = + aData->currentLine += // clamp negative calc() to 0 std::max(GetCoord(stylePadding->mPadding.Get(startSide), 0), 0) + styleBorder->GetComputedBorderWidth(startSide) + GetCoord(styleMargin->mMargin.Get(startSide), 0); - if (MOZ_LIKELY(sliceBreak)) { - aData->currentLine += startPBM; - } else { - clonePBM = startPBM; - } - } - - nscoord endPBM = - // clamp negative calc() to 0 - std::max(GetCoord(stylePadding->mPadding.Get(endSide), 0), 0) + - styleBorder->GetComputedBorderWidth(endSide) + - GetCoord(styleMargin->mMargin.Get(endSide), 0); - if (MOZ_UNLIKELY(!sliceBreak)) { - clonePBM += endPBM; } const nsLineList_iterator* savedLine = aData->line; @@ -882,9 +863,6 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext, nsContainerFrame *lastInFlow; for (nsContainerFrame *nif = this; nif; nif = static_cast(nif->GetNextInFlow())) { - if (aData->currentLine == 0) { - aData->currentLine = clonePBM; - } for (nsIFrame *kid = nif->mFrames.FirstChild(); kid; kid = kid->GetNextSibling()) { if (aType == nsLayoutUtils::MIN_WIDTH) @@ -913,8 +891,12 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext, // We reached the last-in-flow, but it might have a next bidi // continuation, in which case that continuation should handle // the endSide border. - if (MOZ_LIKELY(!lastInFlow->GetNextContinuation() && sliceBreak)) { - aData->currentLine += endPBM; + if (!lastInFlow->GetNextContinuation()) { + aData->currentLine += + // clamp negative calc() to 0 + std::max(GetCoord(stylePadding->mPadding.Get(endSide), 0), 0) + + styleBorder->GetComputedBorderWidth(endSide) + + GetCoord(styleMargin->mMargin.Get(endSide), 0); } } diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 22d835ed6804..8f0915c615f0 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -953,11 +953,6 @@ nsIFrame::GetUsedPadding() const int nsIFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const { - if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { - return 0; - } - // Convert the logical skip sides to physical sides using the frame's // writing mode WritingMode writingMode = GetWritingMode(); @@ -1282,8 +1277,7 @@ nsIFrame::OutsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets) } /* virtual */ bool -nsIFrame::GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea, - int aSkipSides, nscoord aRadii[8]) const +nsIFrame::GetBorderRadii(nscoord aRadii[8]) const { if (IsThemed()) { // When we're themed, the native theme code draws the border and @@ -1298,9 +1292,9 @@ nsIFrame::GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea, } return false; } - return ComputeBorderRadii(StyleBorder()->mBorderRadius, - aFrameSize, aBorderArea, - aSkipSides, aRadii); + nsSize size = GetSize(); + return ComputeBorderRadii(StyleBorder()->mBorderRadius, size, size, + GetSkipSides(), aRadii); } bool diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 4b9e2ccfbe2b..144f3a01b393 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -4366,15 +4366,10 @@ ReduceRadii(nscoord aXBorder, nscoord aYBorder, * have scrollbars. */ bool -ScrollFrameHelper::GetBorderRadii(const nsSize& aFrameSize, - const nsSize& aBorderArea, - int aSkipSides, - nscoord aRadii[8]) const +ScrollFrameHelper::GetBorderRadii(nscoord aRadii[8]) const { - if (!mOuter->nsContainerFrame::GetBorderRadii(aFrameSize, aBorderArea, - aSkipSides, aRadii)) { + if (!mOuter->nsContainerFrame::GetBorderRadii(aRadii)) return false; - } // Since we can use GetActualScrollbarSizes (rather than // GetDesiredScrollbarSizes) since this doesn't affect reflow, we diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index 2d593f239815..338003b89801 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -71,8 +71,7 @@ public: bool& aCreateLayer, bool aPositioned); - bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea, - int aSkipSides, nscoord aRadii[8]) const; + bool GetBorderRadii(nscoord aRadii[8]) const; // nsIReflowCallback virtual bool ReflowFinished() MOZ_OVERRIDE; @@ -472,9 +471,8 @@ public: const nsPoint& aScrollPosition); nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext); - virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea, - int aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE { - return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii); + virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE { + return mHelper.GetBorderRadii(aRadii); } virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE; @@ -810,9 +808,8 @@ public: NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE; - virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea, - int aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE { - return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii); + virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE { + return mHelper.GetBorderRadii(aRadii); } nsresult Layout(nsBoxLayoutState& aState); diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 7e03c54ad0e2..4bfcf121feaf 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -1042,19 +1042,12 @@ public: static void OutsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets); /** - * Fill in border radii for this frame. Return whether any are nonzero. + * Fill in border radii for this frame. Return whether any are + * nonzero. + * * Indices into aRadii are the NS_CORNER_* constants in nsStyleConsts.h - * aSkipSides is a union of SIDE_BIT_LEFT/RIGHT/TOP/BOTTOM bits that says - * which side(s) to skip. */ - virtual bool GetBorderRadii(const nsSize& aFrameSize, - const nsSize& aBorderArea, - int aSkipSides, - nscoord aRadii[8]) const; - bool GetBorderRadii(nscoord aRadii[8]) const { - nsSize sz = GetSize(); - return GetBorderRadii(sz, sz, GetSkipSides(), aRadii); - } + virtual bool GetBorderRadii(nscoord aRadii[8]) const; bool GetPaddingBoxBorderRadii(nscoord aRadii[8]) const; bool GetContentBoxBorderRadii(nscoord aRadii[8]) const; diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 62f4cb9c5037..435e7f0a3537 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -1782,10 +1782,6 @@ nsImageFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const int nsImageFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { - if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { - return 0; - } int skip = 0; if (nullptr != GetPrevInFlow()) { skip |= LOGICAL_SIDE_B_START; diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp index a59003c8d03c..526041e63646 100644 --- a/layout/generic/nsInlineFrame.cpp +++ b/layout/generic/nsInlineFrame.cpp @@ -115,11 +115,7 @@ nsInlineFrame::IsSelfEmpty() !nsLayoutUtils::IsPaddingZero(padding->mPadding.GetLeft()) || !IsMarginZero(margin->mMargin.GetLeft()); if (haveLeft || haveRight) { - // We skip this block and return false for box-decoration-break:clone since - // in that case all the continuations will have the border/padding/margin. - if ((GetStateBits() & NS_FRAME_PART_OF_IBSPLIT) && - StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_SLICE) { + if (GetStateBits() & NS_FRAME_PART_OF_IBSPLIT) { bool haveStart, haveEnd; if (NS_STYLE_DIRECTION_LTR == StyleVisibility()->mDirection) { haveStart = haveLeft; @@ -495,15 +491,9 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext, RestyleManager* restyleManager = aPresContext->RestyleManager(); WritingMode wm = aReflowState.GetWritingMode(); nscoord startEdge = 0; - const bool boxDecorationBreakClone = - MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE); // Don't offset by our start borderpadding if we have a prev continuation or - // if we're in a part of an {ib} split other than the first one. For - // box-decoration-break:clone we always offset our start since all - // continuations have border/padding. - if ((!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) || - boxDecorationBreakClone) { + // if we're in a part of an {ib} split other than the first one. + if (!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) { startEdge = aReflowState.ComputedLogicalBorderPadding().IStart(wm); } nscoord availableISize = aReflowState.AvailableISize(); @@ -664,10 +654,8 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext, // Make sure to not include our start border and padding if we have a prev // continuation or if we're in a part of an {ib} split other than the first - // one. For box-decoration-break:clone we always include our start border - // and padding since all continuations have them. - if ((!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) || - boxDecorationBreakClone) { + // one. + if (!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) { aMetrics.ISize() += aReflowState.ComputedLogicalBorderPadding().IStart(wm); } @@ -676,13 +664,11 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext, * continuation and either not in an {ib} split or the last part of it. To * be the last continuation we have to be complete (so that we won't get a * next-in-flow) and have no non-fluid continuations on our continuation - * chain. For box-decoration-break:clone we always apply the end border and - * padding since all continuations have them. + * chain. */ - if ((NS_FRAME_IS_COMPLETE(aStatus) && - !LastInFlow()->GetNextContinuation() && - !FrameIsNonLastInIBSplit()) || - boxDecorationBreakClone) { + if (NS_FRAME_IS_COMPLETE(aStatus) && + !LastInFlow()->GetNextContinuation() && + !FrameIsNonLastInIBSplit()) { aMetrics.Width() += aReflowState.ComputedLogicalBorderPadding().IEnd(wm); } @@ -886,11 +872,6 @@ nsInlineFrame::PushFrames(nsPresContext* aPresContext, int nsInlineFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { - if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { - return 0; - } - int skip = 0; if (!IsFirst()) { nsInlineFrame* prev = (nsInlineFrame*) GetPrevContinuation(); diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index 9b74ede0278a..fffcfbfc76ce 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -1076,12 +1076,9 @@ nsLineLayout::ApplyStartMargin(PerFrameData* pfd, // in an ib split. Note that the ib sibling (block-in-inline // sibling) annotations only live on the first continuation, but we // don't want to apply the start margin for later continuations - // anyway. For box-decoration-break:clone we apply the start-margin - // on all continuations. - if ((pfd->mFrame->GetPrevContinuation() || - pfd->mFrame->FrameIsNonFirstInIBSplit()) && - aReflowState.mStyleBorder->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_SLICE) { + // anyway. + if (pfd->mFrame->GetPrevContinuation() || + pfd->mFrame->FrameIsNonFirstInIBSplit()) { // Zero this out so that when we compute the max-element-width of // the frame we will properly avoid adding in the starting margin. pfd->mMargin.IStart(frameWM) = 0; @@ -1163,9 +1160,6 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd, * 3) The frame is in an {ib} split and is not the last part. * * However, none of that applies if this is a letter frame (XXXbz why?) - * - * For box-decoration-break:clone we apply the end margin on all - * continuations (that are not letter frames). */ if (pfd->mFrame->GetPrevContinuation() || pfd->mFrame->FrameIsNonFirstInIBSplit()) { @@ -1173,10 +1167,8 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd, } if ((NS_FRAME_IS_NOT_COMPLETE(aStatus) || pfd->mFrame->LastInFlow()->GetNextContinuation() || - pfd->mFrame->FrameIsNonLastInIBSplit()) && - !pfd->GetFlag(PFD_ISLETTERFRAME) && - pfd->mFrame->StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_SLICE) { + pfd->mFrame->FrameIsNonLastInIBSplit()) + && !pfd->GetFlag(PFD_ISLETTERFRAME)) { pfd->mMargin.IEnd(frameWM) = 0; } LogicalMargin usedMargins = pfd->mMargin.ConvertTo(lineWM, frameWM); diff --git a/layout/generic/nsSplittableFrame.cpp b/layout/generic/nsSplittableFrame.cpp index 8a83e85574ce..6f35289b3da1 100644 --- a/layout/generic/nsSplittableFrame.cpp +++ b/layout/generic/nsSplittableFrame.cpp @@ -253,12 +253,8 @@ nsSplittableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) co return LOGICAL_SIDES_B_BOTH; } - if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { - return 0; - } - int skip = 0; + if (GetPrevInFlow()) { skip |= LOGICAL_SIDE_B_START; } diff --git a/layout/reftests/backgrounds/background-size-bounding-box.html b/layout/reftests/backgrounds/background-size-bounding-box.html new file mode 100644 index 000000000000..6136a3729cf9 --- /dev/null +++ b/layout/reftests/backgrounds/background-size-bounding-box.html @@ -0,0 +1,36 @@ + + + + background-break: bounding-box + + + +
+ + + + +
+ + diff --git a/layout/reftests/backgrounds/background-size-slice.html b/layout/reftests/backgrounds/background-size-continuous.html similarity index 75% rename from layout/reftests/backgrounds/background-size-slice.html rename to layout/reftests/backgrounds/background-size-continuous.html index 94fe4d862434..4373cdcd238a 100644 --- a/layout/reftests/backgrounds/background-size-slice.html +++ b/layout/reftests/backgrounds/background-size-continuous.html @@ -1,7 +1,7 @@ - box-decoration-break: slice + background-break: continuous
- +
diff --git a/layout/reftests/backgrounds/background-size-cover-bounding-box.html b/layout/reftests/backgrounds/background-size-cover-bounding-box.html new file mode 100644 index 000000000000..97a11096c0c3 --- /dev/null +++ b/layout/reftests/backgrounds/background-size-cover-bounding-box.html @@ -0,0 +1,37 @@ + + + + background-size: cover; background-break: bounding-box + + + +
+ + + + +
+ + diff --git a/layout/reftests/backgrounds/background-size-cover-slice.html b/layout/reftests/backgrounds/background-size-cover-continuous.html similarity index 73% rename from layout/reftests/backgrounds/background-size-cover-slice.html rename to layout/reftests/backgrounds/background-size-cover-continuous.html index 9969971f29a3..2d749675add0 100644 --- a/layout/reftests/backgrounds/background-size-cover-slice.html +++ b/layout/reftests/backgrounds/background-size-cover-continuous.html @@ -1,7 +1,7 @@ - background-size: cover; box-decoration-break: slice + background-size: cover; background-break: continuous
- +
diff --git a/layout/reftests/backgrounds/background-size-cover-clone.html b/layout/reftests/backgrounds/background-size-cover-each-box.html similarity index 74% rename from layout/reftests/backgrounds/background-size-cover-clone.html rename to layout/reftests/backgrounds/background-size-cover-each-box.html index 8abd119d26a8..d639f4ed5dbb 100644 --- a/layout/reftests/backgrounds/background-size-cover-clone.html +++ b/layout/reftests/backgrounds/background-size-cover-each-box.html @@ -1,7 +1,7 @@ - background-size: cover; box-decoration-break: clone + background-size: cover; background-break: each-box
- +
diff --git a/layout/reftests/backgrounds/background-size-clone.html b/layout/reftests/backgrounds/background-size-each-box.html similarity index 75% rename from layout/reftests/backgrounds/background-size-clone.html rename to layout/reftests/backgrounds/background-size-each-box.html index af6fdef42304..35c1a205a77c 100644 --- a/layout/reftests/backgrounds/background-size-clone.html +++ b/layout/reftests/backgrounds/background-size-each-box.html @@ -1,7 +1,7 @@ - box-decoration-break: clone + background-break: each-box
- +
diff --git a/layout/reftests/backgrounds/reftest.list b/layout/reftests/backgrounds/reftest.list index c7deefd86107..1edd270ffbbe 100644 --- a/layout/reftests/backgrounds/reftest.list +++ b/layout/reftests/backgrounds/reftest.list @@ -90,15 +90,19 @@ fails-if(smallScreen&&Android) != background-size-body-contain-no-repeat.html ba skip-if(B2G) == background-layers-1a.html background-layers-1-ref.html # bug 773482 == background-layers-1b.html background-layers-1-ref.html -# box-decoration-break's effect on backgrounds is touchy and hard to test due to stretching -# artifacts and the difficulty of covering exact lines, so just make sure -# background-size results in a different rendering when present. -pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-slice.html background-size-slice.html -pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-clone.html background-size-clone.html +# -moz-background-inline-policy is touchy and hard to test due to stretching +# artifacts and the difficulty of covering exact lines, and its CSS3 analog is +# on the chopping block at the moment, so just make sure background-size results +# in a different rendering when present. +!= background-size-cover-continuous.html background-size-continuous.html +!= background-size-cover-each-box.html background-size-each-box.html +!= background-size-cover-bounding-box.html background-size-bounding-box.html # ...and make sure each rendering with background-size is different from the -# other -pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-slice.html background-size-cover-clone.html +# others +!= background-size-cover-continuous.html background-size-cover-each-box.html +!= background-size-cover-continuous.html background-size-cover-bounding-box.html +!= background-size-cover-each-box.html background-size-cover-bounding-box.html == background-size-monster-ch.html background-size-monster-ref.html == background-size-monster-cm.html background-size-monster-ref.html diff --git a/layout/reftests/bugs/368020-3-ref.html b/layout/reftests/bugs/368020-3-ref.html index 7a95a6c4d429..0d2775826a45 100644 --- a/layout/reftests/bugs/368020-3-ref.html +++ b/layout/reftests/bugs/368020-3-ref.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/368020-3.html b/layout/reftests/bugs/368020-3.html index d04165527d86..9b324eb4aeaf 100644 --- a/layout/reftests/bugs/368020-3.html +++ b/layout/reftests/bugs/368020-3.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/368020-4-ref.html b/layout/reftests/bugs/368020-4-ref.html new file mode 100644 index 000000000000..473f3e256f1a --- /dev/null +++ b/layout/reftests/bugs/368020-4-ref.html @@ -0,0 +1,15 @@ + + + +Testcase, bug 368020 + + + + + blah
+ blah
+ blah +
+ + + diff --git a/layout/reftests/bugs/368020-4.html b/layout/reftests/bugs/368020-4.html new file mode 100644 index 000000000000..40537301469e --- /dev/null +++ b/layout/reftests/bugs/368020-4.html @@ -0,0 +1,15 @@ + + + +Testcase, bug 368020 + + + + + blah
+ blah
+ blah +
+ + + diff --git a/layout/reftests/bugs/368020-5-ref.html b/layout/reftests/bugs/368020-5-ref.html index 0cc7180afed4..d60b1e3c67b6 100644 --- a/layout/reftests/bugs/368020-5-ref.html +++ b/layout/reftests/bugs/368020-5-ref.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/368020-5.html b/layout/reftests/bugs/368020-5.html index 013708cad03e..e120e842c82d 100644 --- a/layout/reftests/bugs/368020-5.html +++ b/layout/reftests/bugs/368020-5.html @@ -5,7 +5,7 @@ - + blah
blah
blah diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index be07854f9e36..58f86e2bb857 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -595,8 +595,9 @@ skip-if(B2G) == 367247-l-scroll.html 367247-l-auto.html != 367612-1g.html 367612-1-ref.html skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == 368020-1.html 368020-1-ref.html == 368020-2.html 368020-2-ref.html -== 368020-3.html 368020-3-ref.html -pref(layout.css.box-decoration-break.enabled,true) == 368020-5.html 368020-5-ref.html +fails == 368020-3.html 368020-3-ref.html # bug 368085 +fails == 368020-4.html 368020-4-ref.html # bug 368085 +== 368020-5.html 368020-5-ref.html == 368155-1.xhtml 368155-1-ref.xhtml asserts(4) == 368155-negative-margins-1.html 368155-negative-margins-1-ref.html # bug 387205 / bug 457397 # we can't test this because there's antialiasing involved, and our comparison diff --git a/layout/reftests/css-break/box-decoration-break-1-ref.html b/layout/reftests/css-break/box-decoration-break-1-ref.html deleted file mode 100644 index 431c499a1f66..000000000000 --- a/layout/reftests/css-break/box-decoration-break-1-ref.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - CSS Test: Testing box-decoration-break:clone - - - - - - - - - - - -
  a  
  b  
  c  
  a  
  b  
  c  
  a  
  b  
  c  
- -
- - - - - - -
  a  
  b  
  c  
  a  
  b  
  c  
  a  
  b  
  c  
- - - diff --git a/layout/reftests/css-break/box-decoration-break-1.html b/layout/reftests/css-break/box-decoration-break-1.html deleted file mode 100644 index e0326ccc1fa2..000000000000 --- a/layout/reftests/css-break/box-decoration-break-1.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - CSS Test: Testing box-decoration-break:clone - - - - - - - - - - - - - -
  a  
  b  
  c  
  a  
  b  
  c  
  a  
  b  
  c  
- -
- - - - - - -
  a  
  b  
  c  

  a  
  b  
  c  

  a  
  b  
  c  

- - - diff --git a/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1-ref.html b/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1-ref.html deleted file mode 100644 index f372a0f920ed..000000000000 --- a/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1-ref.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - CSS Test: Testing box-decoration-break:clone with inset box-shadow - - - - - - -
- -
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
- -
- - -
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-
- -
- - - diff --git a/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1.html b/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1.html deleted file mode 100644 index 97e64700cc9b..000000000000 --- a/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - CSS Test: Testing box-decoration-break:clone with inset box-shadow - - - - - - - - -
- -
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
- -
- - -
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-
- -
- - - diff --git a/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1-ref.html b/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1-ref.html deleted file mode 100644 index 938fc391480f..000000000000 --- a/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1-ref.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - CSS Test: Testing box-decoration-break:clone with outset box-shadow - - - - - - -
- -
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
- -
- - -
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-  a  
  b  
  c  
-  a  
  b  
  c  
-  a  
  b  
  c  
-
-
- -
- - diff --git a/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1.html b/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1.html deleted file mode 100644 index 417bf76ca434..000000000000 --- a/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - CSS Test: Testing box-decoration-break:clone with outset box-shadow - - - - - - - - -
- -
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
- -
- - -
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-  a  
  b  
  c  

-  a  
  b  
  c  

-  a  
  b  
  c  

-
-
- -
- - diff --git a/layout/reftests/css-break/green-circle-alpha-32x32.png b/layout/reftests/css-break/green-circle-alpha-32x32.png deleted file mode 100644 index a007675a176123cab7291d684537dde8961ecec7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 396 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$v_d#0*}aI z1_o|n5N2eUHAey{$X?><>&kwIla1GcWoG4q7eFD|%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6^dDE`6I#W5t}@YCsrLd^;SuJV~G+fV4eS);RcoA>LzHtnHS z{Rz{fGqi#h82epO>Di%p@}Jj%pY!>3xc^jZJh$gjS6~cMkc*ODz^13M?q8~u5>Gmh z>@(F}i8)WYZK|6~cyC^d43|FP9`Y_P;?p(epB>kHTjtL^KUW~4__^)Ev}?}$KVQ7A zk@xuc!-bm#PS_qbX18*9ud~3taE^6?@f@)N2mYANsva!s8&W(Sv@{fAg#@^{IYXATM diff --git a/layout/reftests/css-break/reftest.list b/layout/reftests/css-break/reftest.list deleted file mode 100644 index 2935df26bb25..000000000000 --- a/layout/reftests/css-break/reftest.list +++ /dev/null @@ -1,4 +0,0 @@ -pref(layout.css.box-decoration-break.enabled,true) == box-decoration-break-1.html box-decoration-break-1-ref.html - -fuzzy(1,20) pref(layout.css.box-decoration-break.enabled,true) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html -fuzzy(16,460) pref(layout.css.box-decoration-break.enabled,true) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html diff --git a/layout/reftests/reftest.list b/layout/reftests/reftest.list index b540cec8a284..c461d65d00bb 100644 --- a/layout/reftests/reftest.list +++ b/layout/reftests/reftest.list @@ -56,9 +56,6 @@ include css-animations/reftest.list # blending/ include css-blending/reftest.list -# Tests for the css-break spec -include css-break/reftest.list - # css calc() tests include css-calc/reftest.list diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index 5ae84e997d7e..606023d9b5ae 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -188,6 +188,7 @@ CSS_KEY(border-box, border_box) CSS_KEY(both, both) CSS_KEY(bottom, bottom) CSS_KEY(bottom-outside, bottom_outside) +CSS_KEY(bounding-box, bounding_box) CSS_KEY(break-all, break_all) CSS_KEY(break-word, break_word) CSS_KEY(brightness, brightness) @@ -207,7 +208,6 @@ CSS_KEY(circle, circle) CSS_KEY(cjk-decimal, cjk_decimal) CSS_KEY(cjk-ideographic, cjk_ideographic) CSS_KEY(clip, clip) -CSS_KEY(clone, clone) CSS_KEY(close-quote, close_quote) CSS_KEY(closest-corner, closest_corner) CSS_KEY(closest-side, closest_side) @@ -257,6 +257,7 @@ CSS_KEY(double, double) CSS_KEY(double-struck, double_struck) CSS_KEY(drop-shadow, drop_shadow) CSS_KEY(e-resize, e_resize) +CSS_KEY(each-box, each_box) CSS_KEY(ease, ease) CSS_KEY(ease-in, ease_in) CSS_KEY(ease-in-out, ease_in_out) @@ -495,7 +496,6 @@ CSS_KEY(skew, skew) CSS_KEY(skewx, skewx) CSS_KEY(skewy, skewy) CSS_KEY(slashed-zero, slashed_zero) -CSS_KEY(slice, slice) CSS_KEY(small, small) CSS_KEY(small-caps, small_caps) CSS_KEY(small-caption, small_caption) diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index b92c078bc735..b78ac87fdb61 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -274,6 +274,10 @@ // 'text-shadow' (see above) and 'box-shadow' (which is like the // border properties). +// We include '-moz-background-inline-policy' (css3-background's +// 'background-break') in both as a background property, although this +// is somewhat questionable. + CSS_PROP_DISPLAY( -moz-appearance, appearance, @@ -533,6 +537,18 @@ CSS_PROP_BACKGROUND( nullptr, CSS_PROP_NO_OFFSET, eStyleAnimType_None) +CSS_PROP_BACKGROUND( + -moz-background-inline-policy, + _moz_background_inline_policy, + CSS_PROP_DOMPROP_PREFIXED(BackgroundInlinePolicy), + CSS_PROPERTY_PARSE_VALUE | + CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | + CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, + "", + VARIANT_HK, + kBackgroundInlinePolicyKTable, + CSS_PROP_NO_OFFSET, + eStyleAnimType_None) CSS_PROP_BACKGROUND( background-blend-mode, background_blend_mode, @@ -1349,16 +1365,6 @@ CSS_PROP_POSITION( nullptr, offsetof(nsStylePosition, mOffset), eStyleAnimType_Sides_Bottom) -CSS_PROP_BORDER( - box-decoration-break, - box_decoration_break, - BoxDecorationBreak, - CSS_PROPERTY_PARSE_VALUE, - "layout.css.box-decoration-break.enabled", - VARIANT_HK, - kBoxDecorationBreakKTable, - CSS_PROP_NO_OFFSET, - eStyleAnimType_None) CSS_PROP_BORDER( box-shadow, box_shadow, diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index a02f54138c1b..886407141b64 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -676,6 +676,13 @@ const KTableValue nsCSSProps::kBackgroundAttachmentKTable[] = { eCSSKeyword_UNKNOWN,-1 }; +const KTableValue nsCSSProps::kBackgroundInlinePolicyKTable[] = { + eCSSKeyword_each_box, NS_STYLE_BG_INLINE_POLICY_EACH_BOX, + eCSSKeyword_continuous, NS_STYLE_BG_INLINE_POLICY_CONTINUOUS, + eCSSKeyword_bounding_box, NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX, + eCSSKeyword_UNKNOWN,-1 +}; + static_assert(NS_STYLE_BG_CLIP_BORDER == NS_STYLE_BG_ORIGIN_BORDER && NS_STYLE_BG_CLIP_PADDING == NS_STYLE_BG_ORIGIN_PADDING && NS_STYLE_BG_CLIP_CONTENT == NS_STYLE_BG_ORIGIN_CONTENT, @@ -789,12 +796,6 @@ const KTableValue nsCSSProps::kBoxPropSourceKTable[] = { eCSSKeyword_UNKNOWN,-1 }; -const KTableValue nsCSSProps::kBoxDecorationBreakKTable[] = { - eCSSKeyword_slice, NS_STYLE_BOX_DECORATION_BREAK_SLICE, - eCSSKeyword_clone, NS_STYLE_BOX_DECORATION_BREAK_CLONE, - eCSSKeyword_UNKNOWN,-1 -}; - const KTableValue nsCSSProps::kBoxShadowTypeKTable[] = { eCSSKeyword_inset, NS_STYLE_BOX_SHADOW_INSET, eCSSKeyword_UNKNOWN,-1 diff --git a/layout/style/nsCSSProps.h b/layout/style/nsCSSProps.h index 0a6a4e5ec447..84d90baa03de 100644 --- a/layout/style/nsCSSProps.h +++ b/layout/style/nsCSSProps.h @@ -506,6 +506,7 @@ public: static const KTableValue kBackfaceVisibilityKTable[]; static const KTableValue kTransformStyleKTable[]; static const KTableValue kBackgroundAttachmentKTable[]; + static const KTableValue kBackgroundInlinePolicyKTable[]; static const KTableValue kBackgroundOriginKTable[]; static const KTableValue kBackgroundPositionKTable[]; static const KTableValue kBackgroundRepeatKTable[]; @@ -519,7 +520,6 @@ public: static const KTableValue kBorderStyleKTable[]; static const KTableValue kBorderWidthKTable[]; static const KTableValue kBoxAlignKTable[]; - static const KTableValue kBoxDecorationBreakKTable[]; static const KTableValue kBoxDirectionKTable[]; static const KTableValue kBoxOrientKTable[]; static const KTableValue kBoxPackKTable[]; diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 31d435558434..dcf90381c5e0 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -2073,6 +2073,16 @@ nsComputedDOMStyle::DoGetBackgroundImage() return valueList; } +CSSValue* +nsComputedDOMStyle::DoGetBackgroundInlinePolicy() +{ + nsROCSSPrimitiveValue *val = new nsROCSSPrimitiveValue; + val->SetIdent(nsCSSProps::ValueToKeywordEnum( + StyleBackground()->mBackgroundInlinePolicy, + nsCSSProps::kBackgroundInlinePolicyKTable)); + return val; +} + CSSValue* nsComputedDOMStyle::DoGetBackgroundBlendMode() { @@ -2970,16 +2980,6 @@ nsComputedDOMStyle::GetCSSShadowArray(nsCSSShadowArray* aArray, return valueList; } -CSSValue* -nsComputedDOMStyle::DoGetBoxDecorationBreak() -{ - nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue; - val->SetIdent( - nsCSSProps::ValueToKeywordEnum(StyleBorder()->mBoxDecorationBreak, - nsCSSProps::kBoxDecorationBreakKTable)); - return val; -} - CSSValue* nsComputedDOMStyle::DoGetBoxShadow() { diff --git a/layout/style/nsComputedDOMStyle.h b/layout/style/nsComputedDOMStyle.h index 48183456dd21..f4a3a8de174f 100644 --- a/layout/style/nsComputedDOMStyle.h +++ b/layout/style/nsComputedDOMStyle.h @@ -222,7 +222,6 @@ private: /* Box properties */ mozilla::dom::CSSValue* DoGetBoxAlign(); - mozilla::dom::CSSValue* DoGetBoxDecorationBreak(); mozilla::dom::CSSValue* DoGetBoxDirection(); mozilla::dom::CSSValue* DoGetBoxFlex(); mozilla::dom::CSSValue* DoGetBoxOrdinalGroup(); @@ -284,6 +283,7 @@ private: mozilla::dom::CSSValue* DoGetBackgroundPosition(); mozilla::dom::CSSValue* DoGetBackgroundRepeat(); mozilla::dom::CSSValue* DoGetBackgroundClip(); + mozilla::dom::CSSValue* DoGetBackgroundInlinePolicy(); mozilla::dom::CSSValue* DoGetBackgroundBlendMode(); mozilla::dom::CSSValue* DoGetBackgroundOrigin(); mozilla::dom::CSSValue* DoGetBackgroundSize(); diff --git a/layout/style/nsComputedDOMStylePropertyList.h b/layout/style/nsComputedDOMStylePropertyList.h index c66cc7c692d6..e83473a4dc8f 100644 --- a/layout/style/nsComputedDOMStylePropertyList.h +++ b/layout/style/nsComputedDOMStylePropertyList.h @@ -230,6 +230,7 @@ COMPUTED_STYLE_PROP(z_index, ZIndex) \* ******************************* */ COMPUTED_STYLE_PROP(appearance, Appearance) +COMPUTED_STYLE_PROP(_moz_background_inline_policy, BackgroundInlinePolicy) COMPUTED_STYLE_PROP(binding, Binding) COMPUTED_STYLE_PROP(border_bottom_colors, BorderBottomColors) COMPUTED_STYLE_PROP(border_left_colors, BorderLeftColors) diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 4c45bcfe5eff..9f1e295ffc6d 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -6239,6 +6239,14 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, uint8_t(NS_STYLE_BG_CLIP_BORDER), parentBG->mClipCount, bg->mClipCount, maxItemCount, rebuild, canStoreInRuleTree); + // background-inline-policy: enum, inherit, initial + SetDiscrete(*aRuleData->ValueForBackgroundInlinePolicy(), + bg->mBackgroundInlinePolicy, + canStoreInRuleTree, + SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, + parentBG->mBackgroundInlinePolicy, + NS_STYLE_BG_INLINE_POLICY_CONTINUOUS, 0, 0, 0, 0); + // background-blend-mode: enum, inherit, initial [list] SetBackgroundList(aContext, *aRuleData->ValueForBackgroundBlendMode(), bg->mLayers, @@ -6437,13 +6445,6 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, { COMPUTE_START_RESET(Border, (mPresContext), border, parentBorder) - // box-decoration-break: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForBoxDecorationBreak(), - border->mBoxDecorationBreak, canStoreInRuleTree, - SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, - parentBorder->mBoxDecorationBreak, - NS_STYLE_BOX_DECORATION_BREAK_SLICE, 0, 0, 0, 0); - // box-shadow: none, list, inherit, initial const nsCSSValue* boxShadowValue = aRuleData->ValueForBoxShadow(); switch (boxShadowValue->GetUnit()) { diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index 1b1d7774fa08..e2de9998afea 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -117,10 +117,6 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) { #define NS_STYLE_BOX_PACK_END 2 #define NS_STYLE_BOX_PACK_JUSTIFY 3 -// box-decoration-break -#define NS_STYLE_BOX_DECORATION_BREAK_SLICE 0 -#define NS_STYLE_BOX_DECORATION_BREAK_CLONE 1 - // box-direction #define NS_STYLE_BOX_DIRECTION_NORMAL 0 #define NS_STYLE_BOX_DIRECTION_REVERSE 1 diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 6f5d49392a36..12592d5472a6 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -388,7 +388,6 @@ nsStyleBorder::nsStyleBorder(nsPresContext* aPresContext) mBorderImageRepeatH(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH), mBorderImageRepeatV(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH), mFloatEdge(NS_STYLE_FLOAT_EDGE_CONTENT), - mBoxDecorationBreak(NS_STYLE_BOX_DECORATION_BREAK_SLICE), mComputedBorder(0, 0, 0, 0) { MOZ_COUNT_CTOR(nsStyleBorder); @@ -440,7 +439,6 @@ nsStyleBorder::nsStyleBorder(const nsStyleBorder& aSrc) mBorderImageRepeatH(aSrc.mBorderImageRepeatH), mBorderImageRepeatV(aSrc.mBorderImageRepeatV), mFloatEdge(aSrc.mFloatEdge), - mBoxDecorationBreak(aSrc.mBoxDecorationBreak), mComputedBorder(aSrc.mComputedBorder), mBorder(aSrc.mBorder), mTwipsPerPixel(aSrc.mTwipsPerPixel) @@ -530,8 +528,7 @@ nsChangeHint nsStyleBorder::CalcDifference(const nsStyleBorder& aOther) const GetComputedBorder() != aOther.GetComputedBorder() || mFloatEdge != aOther.mFloatEdge || mBorderImageOutset != aOther.mBorderImageOutset || - (shadowDifference & nsChangeHint_NeedReflow) || - mBoxDecorationBreak != aOther.mBoxDecorationBreak) + (shadowDifference & nsChangeHint_NeedReflow)) return NS_STYLE_HINT_REFLOW; NS_FOR_CSS_SIDES(ix) { @@ -1971,6 +1968,7 @@ nsStyleBackground::nsStyleBackground() , mSizeCount(1) , mBlendModeCount(1) , mBackgroundColor(NS_RGBA(0, 0, 0, 0)) + , mBackgroundInlinePolicy(NS_STYLE_BG_INLINE_POLICY_CONTINUOUS) { MOZ_COUNT_CTOR(nsStyleBackground); Layer *onlyLayer = mLayers.AppendElement(); @@ -1989,6 +1987,7 @@ nsStyleBackground::nsStyleBackground(const nsStyleBackground& aSource) , mBlendModeCount(aSource.mBlendModeCount) , mLayers(aSource.mLayers) // deep copy , mBackgroundColor(aSource.mBackgroundColor) + , mBackgroundInlinePolicy(aSource.mBackgroundInlinePolicy) { MOZ_COUNT_CTOR(nsStyleBackground); // If the deep copy of mLayers failed, truncate the counts. @@ -2046,7 +2045,9 @@ nsChangeHint nsStyleBackground::CalcDifference(const nsStyleBackground& aOther) } } - if (hasVisualDifference || mBackgroundColor != aOther.mBackgroundColor) + if (hasVisualDifference || + mBackgroundColor != aOther.mBackgroundColor || + mBackgroundInlinePolicy != aOther.mBackgroundInlinePolicy) return NS_STYLE_HINT_VISUAL; return NS_STYLE_HINT_NONE; diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 5e05bf832829..df7287e69de8 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -539,6 +539,11 @@ struct nsStyleBackground { nscolor mBackgroundColor; // [reset] + // FIXME: This (now background-break in css3-background) should + // probably move into a different struct so that everything in + // nsStyleBackground is set by the background shorthand. + uint8_t mBackgroundInlinePolicy; // [reset] See nsStyleConsts.h + // True if this background is completely transparent. bool IsTransparent() const; @@ -981,7 +986,6 @@ public: uint8_t mBorderImageRepeatH; // [reset] see nsStyleConsts.h uint8_t mBorderImageRepeatV; // [reset] uint8_t mFloatEdge; // [reset] - uint8_t mBoxDecorationBreak; // [reset] see nsStyleConsts.h protected: // mComputedBorder holds the CSS2.1 computed border-width values. diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index c2939b106f76..b5ba594a87f1 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -1,5 +1,5 @@ -/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=2 sw=2 sts=2 et: */ +/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* vim: set shiftwidth=4 tabstop=4 autoindent cindent noexpandtab: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -15,1038 +15,1046 @@ const CSS_TYPE_TRUE_SHORTHAND = 1; const CSS_TYPE_SHORTHAND_AND_LONGHAND = 2; // Each property has the following fields: -// domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties -// inherited: Whether the property is inherited by default (stated as -// yes or no in the property header in all CSS specs) -// type: see above -// alias_for: optional, indicates that the property is an alias for -// some other property that is the preferred serialization. (Type -// must not be CSS_TYPE_LONGHAND.) -// get_computed: if present, the property's computed value shows up on -// another property, and this is a function used to get it -// initial_values: Values whose computed value should be the same as the -// computed value for the property's initial value. -// other_values: Values whose computed value should be different from the -// computed value for the property's initial value. -// XXX Should have a third field for values whose computed value may or -// may not be the same as for the property's initial value. -// invalid_values: Things that are not values for the property and -// should be rejected, but which are balanced and should not absorb -// what follows -// quirks_values: Values that should be accepted in quirks mode only, -// mapped to the values they are equivalent to. -// unbalanced_values: Things that are not values for the property and -// should be rejected, and which also contain unbalanced constructs -// that should absorb what follows +// domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties +// inherited: Whether the property is inherited by default (stated as +// yes or no in the property header in all CSS specs) +// type: see above +// alias_for: optional, indicates that the property is an alias for +// some other property that is the preferred serialization. (Type +// must not be CSS_TYPE_LONGHAND.) +// get_computed: if present, the property's computed value shows up on +// another property, and this is a function used to get it +// initial_values: Values whose computed value should be the same as the +// computed value for the property's initial value. +// other_values: Values whose computed value should be different from the +// computed value for the property's initial value. +// XXX Should have a third field for values whose computed value may or +// may not be the same as for the property's initial value. +// invalid_values: Things that are not values for the property and +// should be rejected, but which are balanced and should not absorb +// what follows +// quirks_values: Values that should be accepted in quirks mode only, +// mapped to the values they are equivalent to. +// unbalanced_values: Things that are not values for the property and +// should be rejected, and which also contain unbalanced constructs +// that should absorb what follows // Helper functions used to construct gCSSProperties. function initial_font_family_is_sans_serif() { - // The initial value of 'font-family' might be 'serif' or - // 'sans-serif'. - var div = document.createElement("div"); - div.setAttribute("style", "font: initial"); - return getComputedStyle(div, "").fontFamily == "sans-serif"; + // The initial value of 'font-family' might be 'serif' or + // 'sans-serif'. + var div = document.createElement("div"); + div.setAttribute("style", "font: initial"); + return getComputedStyle(div, "").fontFamily == "sans-serif"; } var gInitialFontFamilyIsSansSerif = initial_font_family_is_sans_serif(); // shared by background-image and border-image-source var validGradientAndElementValues = [ - "-moz-element(#a)", - "-moz-element( #a )", - "-moz-element(#a-1)", - "-moz-element(#a\\:1)", - /* gradient torture test */ - "linear-gradient(red, blue)", - "linear-gradient(red, yellow, blue)", - "linear-gradient(red 1px, yellow 20%, blue 24em, green)", - "linear-gradient(red, yellow, green, blue 50%)", - "linear-gradient(red -50%, yellow -25%, green, blue)", - "linear-gradient(red -99px, yellow, green, blue 120%)", - "linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "-moz-element(#a)", + "-moz-element( #a )", + "-moz-element(#a-1)", + "-moz-element(#a\\:1)", + /* gradient torture test */ + "linear-gradient(red, blue)", + "linear-gradient(red, yellow, blue)", + "linear-gradient(red 1px, yellow 20%, blue 24em, green)", + "linear-gradient(red, yellow, green, blue 50%)", + "linear-gradient(red -50%, yellow -25%, green, blue)", + "linear-gradient(red -99px, yellow, green, blue 120%)", + "linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "linear-gradient(to top, red, blue)", - "linear-gradient(to bottom, red, blue)", - "linear-gradient(to left, red, blue)", - "linear-gradient(to right, red, blue)", - "linear-gradient(to top left, red, blue)", - "linear-gradient(to top right, red, blue)", - "linear-gradient(to bottom left, red, blue)", - "linear-gradient(to bottom right, red, blue)", - "linear-gradient(to left top, red, blue)", - "linear-gradient(to left bottom, red, blue)", - "linear-gradient(to right top, red, blue)", - "linear-gradient(to right bottom, red, blue)", + "linear-gradient(to top, red, blue)", + "linear-gradient(to bottom, red, blue)", + "linear-gradient(to left, red, blue)", + "linear-gradient(to right, red, blue)", + "linear-gradient(to top left, red, blue)", + "linear-gradient(to top right, red, blue)", + "linear-gradient(to bottom left, red, blue)", + "linear-gradient(to bottom right, red, blue)", + "linear-gradient(to left top, red, blue)", + "linear-gradient(to left bottom, red, blue)", + "linear-gradient(to right top, red, blue)", + "linear-gradient(to right bottom, red, blue)", - "linear-gradient(-33deg, red, blue)", - "linear-gradient(30grad, red, blue)", - "linear-gradient(10deg, red, blue)", - "linear-gradient(1turn, red, blue)", - "linear-gradient(.414rad, red, blue)", + "linear-gradient(-33deg, red, blue)", + "linear-gradient(30grad, red, blue)", + "linear-gradient(10deg, red, blue)", + "linear-gradient(1turn, red, blue)", + "linear-gradient(.414rad, red, blue)", - "-moz-linear-gradient(red, blue)", - "-moz-linear-gradient(red, yellow, blue)", - "-moz-linear-gradient(red 1px, yellow 20%, blue 24em, green)", - "-moz-linear-gradient(red, yellow, green, blue 50%)", - "-moz-linear-gradient(red -50%, yellow -25%, green, blue)", - "-moz-linear-gradient(red -99px, yellow, green, blue 120%)", - "-moz-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "-moz-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "-moz-linear-gradient(red, blue)", + "-moz-linear-gradient(red, yellow, blue)", + "-moz-linear-gradient(red 1px, yellow 20%, blue 24em, green)", + "-moz-linear-gradient(red, yellow, green, blue 50%)", + "-moz-linear-gradient(red -50%, yellow -25%, green, blue)", + "-moz-linear-gradient(red -99px, yellow, green, blue 120%)", + "-moz-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "-moz-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "-moz-linear-gradient(to top, red, blue)", - "-moz-linear-gradient(to bottom, red, blue)", - "-moz-linear-gradient(to left, red, blue)", - "-moz-linear-gradient(to right, red, blue)", - "-moz-linear-gradient(to top left, red, blue)", - "-moz-linear-gradient(to top right, red, blue)", - "-moz-linear-gradient(to bottom left, red, blue)", - "-moz-linear-gradient(to bottom right, red, blue)", - "-moz-linear-gradient(to left top, red, blue)", - "-moz-linear-gradient(to left bottom, red, blue)", - "-moz-linear-gradient(to right top, red, blue)", - "-moz-linear-gradient(to right bottom, red, blue)", + "-moz-linear-gradient(to top, red, blue)", + "-moz-linear-gradient(to bottom, red, blue)", + "-moz-linear-gradient(to left, red, blue)", + "-moz-linear-gradient(to right, red, blue)", + "-moz-linear-gradient(to top left, red, blue)", + "-moz-linear-gradient(to top right, red, blue)", + "-moz-linear-gradient(to bottom left, red, blue)", + "-moz-linear-gradient(to bottom right, red, blue)", + "-moz-linear-gradient(to left top, red, blue)", + "-moz-linear-gradient(to left bottom, red, blue)", + "-moz-linear-gradient(to right top, red, blue)", + "-moz-linear-gradient(to right bottom, red, blue)", - "-moz-linear-gradient(top left, red, blue)", - "-moz-linear-gradient(0 0, red, blue)", - "-moz-linear-gradient(20% bottom, red, blue)", - "-moz-linear-gradient(center 20%, red, blue)", - "-moz-linear-gradient(left 35px, red, blue)", - "-moz-linear-gradient(10% 10em, red, blue)", - "-moz-linear-gradient(44px top, red, blue)", + "-moz-linear-gradient(top left, red, blue)", + "-moz-linear-gradient(0 0, red, blue)", + "-moz-linear-gradient(20% bottom, red, blue)", + "-moz-linear-gradient(center 20%, red, blue)", + "-moz-linear-gradient(left 35px, red, blue)", + "-moz-linear-gradient(10% 10em, red, blue)", + "-moz-linear-gradient(44px top, red, blue)", - "-moz-linear-gradient(top left 45deg, red, blue)", - "-moz-linear-gradient(20% bottom -300deg, red, blue)", - "-moz-linear-gradient(center 20% 1.95929rad, red, blue)", - "-moz-linear-gradient(left 35px 30grad, red, blue)", - "-moz-linear-gradient(left 35px 0.1turn, red, blue)", - "-moz-linear-gradient(10% 10em 99999deg, red, blue)", - "-moz-linear-gradient(44px top -33deg, red, blue)", + "-moz-linear-gradient(top left 45deg, red, blue)", + "-moz-linear-gradient(20% bottom -300deg, red, blue)", + "-moz-linear-gradient(center 20% 1.95929rad, red, blue)", + "-moz-linear-gradient(left 35px 30grad, red, blue)", + "-moz-linear-gradient(left 35px 0.1turn, red, blue)", + "-moz-linear-gradient(10% 10em 99999deg, red, blue)", + "-moz-linear-gradient(44px top -33deg, red, blue)", - "-moz-linear-gradient(-33deg, red, blue)", - "-moz-linear-gradient(30grad left 35px, red, blue)", - "-moz-linear-gradient(10deg 20px, red, blue)", - "-moz-linear-gradient(1turn 20px, red, blue)", - "-moz-linear-gradient(.414rad bottom, red, blue)", + "-moz-linear-gradient(-33deg, red, blue)", + "-moz-linear-gradient(30grad left 35px, red, blue)", + "-moz-linear-gradient(10deg 20px, red, blue)", + "-moz-linear-gradient(1turn 20px, red, blue)", + "-moz-linear-gradient(.414rad bottom, red, blue)", - "-moz-linear-gradient(blue calc(0px) ,green calc(25%) ,red calc(40px) ,blue calc(60px) , yellow calc(100px))", - "-moz-linear-gradient(-33deg, blue calc(-25%) ,red 40px)", - "-moz-linear-gradient(10deg, blue calc(100px + -25%),red calc(40px))", - "-moz-linear-gradient(10deg, blue calc(-25px),red calc(100%))", - "-moz-linear-gradient(.414rad, blue calc(100px + -25px) ,green calc(100px + -25px) ,red calc(100px + -25%) ,blue calc(-25px) , yellow calc(-25px))", - "-moz-linear-gradient(1turn, blue calc(-25%) ,green calc(25px) ,red calc(25%),blue calc(0px),white 50px, yellow calc(-25px))", + "-moz-linear-gradient(blue calc(0px) ,green calc(25%) ,red calc(40px) ,blue calc(60px) , yellow calc(100px))", + "-moz-linear-gradient(-33deg, blue calc(-25%) ,red 40px)", + "-moz-linear-gradient(10deg, blue calc(100px + -25%),red calc(40px))", + "-moz-linear-gradient(10deg, blue calc(-25px),red calc(100%))", + "-moz-linear-gradient(.414rad, blue calc(100px + -25px) ,green calc(100px + -25px) ,red calc(100px + -25%) ,blue calc(-25px) , yellow calc(-25px))", + "-moz-linear-gradient(1turn, blue calc(-25%) ,green calc(25px) ,red calc(25%),blue calc(0px),white 50px, yellow calc(-25px))", - "radial-gradient(red, blue)", - "radial-gradient(red, yellow, blue)", - "radial-gradient(red 1px, yellow 20%, blue 24em, green)", - "radial-gradient(red, yellow, green, blue 50%)", - "radial-gradient(red -50%, yellow -25%, green, blue)", - "radial-gradient(red -99px, yellow, green, blue 120%)", - "radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "radial-gradient(red, blue)", + "radial-gradient(red, yellow, blue)", + "radial-gradient(red 1px, yellow 20%, blue 24em, green)", + "radial-gradient(red, yellow, green, blue 50%)", + "radial-gradient(red -50%, yellow -25%, green, blue)", + "radial-gradient(red -99px, yellow, green, blue 120%)", + "radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "radial-gradient(0 0, red, blue)", - "radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "radial-gradient(0 0, red, blue)", + "radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "radial-gradient(at top left, red, blue)", - "radial-gradient(at 20% bottom, red, blue)", - "radial-gradient(at center 20%, red, blue)", - "radial-gradient(at left 35px, red, blue)", - "radial-gradient(at 10% 10em, red, blue)", - "radial-gradient(at 44px top, red, blue)", - "radial-gradient(at 0 0, red, blue)", + "radial-gradient(at top left, red, blue)", + "radial-gradient(at 20% bottom, red, blue)", + "radial-gradient(at center 20%, red, blue)", + "radial-gradient(at left 35px, red, blue)", + "radial-gradient(at 10% 10em, red, blue)", + "radial-gradient(at 44px top, red, blue)", + "radial-gradient(at 0 0, red, blue)", - "radial-gradient(farthest-corner, red, blue)", - "radial-gradient(circle, red, blue)", - "radial-gradient(ellipse closest-corner, red, blue)", - "radial-gradient(closest-corner ellipse, red, blue)", + "radial-gradient(farthest-corner, red, blue)", + "radial-gradient(circle, red, blue)", + "radial-gradient(ellipse closest-corner, red, blue)", + "radial-gradient(closest-corner ellipse, red, blue)", - "radial-gradient(43px, red, blue)", - "radial-gradient(43px 43px, red, blue)", - "radial-gradient(50% 50%, red, blue)", - "radial-gradient(43px 50%, red, blue)", - "radial-gradient(50% 43px, red, blue)", - "radial-gradient(circle 43px, red, blue)", - "radial-gradient(43px circle, red, blue)", - "radial-gradient(ellipse 43px 43px, red, blue)", - "radial-gradient(ellipse 50% 50%, red, blue)", - "radial-gradient(ellipse 43px 50%, red, blue)", - "radial-gradient(ellipse 50% 43px, red, blue)", - "radial-gradient(50% 43px ellipse, red, blue)", + "radial-gradient(43px, red, blue)", + "radial-gradient(43px 43px, red, blue)", + "radial-gradient(50% 50%, red, blue)", + "radial-gradient(43px 50%, red, blue)", + "radial-gradient(50% 43px, red, blue)", + "radial-gradient(circle 43px, red, blue)", + "radial-gradient(43px circle, red, blue)", + "radial-gradient(ellipse 43px 43px, red, blue)", + "radial-gradient(ellipse 50% 50%, red, blue)", + "radial-gradient(ellipse 43px 50%, red, blue)", + "radial-gradient(ellipse 50% 43px, red, blue)", + "radial-gradient(50% 43px ellipse, red, blue)", - "radial-gradient(farthest-corner at top left, red, blue)", - "radial-gradient(ellipse closest-corner at 45px, red, blue)", - "radial-gradient(circle farthest-side at 45px, red, blue)", - "radial-gradient(closest-side ellipse at 50%, red, blue)", - "radial-gradient(farthest-corner circle at 4em, red, blue)", + "radial-gradient(farthest-corner at top left, red, blue)", + "radial-gradient(ellipse closest-corner at 45px, red, blue)", + "radial-gradient(circle farthest-side at 45px, red, blue)", + "radial-gradient(closest-side ellipse at 50%, red, blue)", + "radial-gradient(farthest-corner circle at 4em, red, blue)", - "radial-gradient(30% 40% at top left, red, blue)", - "radial-gradient(50px 60px at 15% 20%, red, blue)", - "radial-gradient(7em 8em at 45px, red, blue)", + "radial-gradient(30% 40% at top left, red, blue)", + "radial-gradient(50px 60px at 15% 20%, red, blue)", + "radial-gradient(7em 8em at 45px, red, blue)", - "-moz-radial-gradient(red, blue)", - "-moz-radial-gradient(red, yellow, blue)", - "-moz-radial-gradient(red 1px, yellow 20%, blue 24em, green)", - "-moz-radial-gradient(red, yellow, green, blue 50%)", - "-moz-radial-gradient(red -50%, yellow -25%, green, blue)", - "-moz-radial-gradient(red -99px, yellow, green, blue 120%)", - "-moz-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "-moz-radial-gradient(red, blue)", + "-moz-radial-gradient(red, yellow, blue)", + "-moz-radial-gradient(red 1px, yellow 20%, blue 24em, green)", + "-moz-radial-gradient(red, yellow, green, blue 50%)", + "-moz-radial-gradient(red -50%, yellow -25%, green, blue)", + "-moz-radial-gradient(red -99px, yellow, green, blue 120%)", + "-moz-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "-moz-radial-gradient(top left, red, blue)", - "-moz-radial-gradient(20% bottom, red, blue)", - "-moz-radial-gradient(center 20%, red, blue)", - "-moz-radial-gradient(left 35px, red, blue)", - "-moz-radial-gradient(10% 10em, red, blue)", - "-moz-radial-gradient(44px top, red, blue)", + "-moz-radial-gradient(top left, red, blue)", + "-moz-radial-gradient(20% bottom, red, blue)", + "-moz-radial-gradient(center 20%, red, blue)", + "-moz-radial-gradient(left 35px, red, blue)", + "-moz-radial-gradient(10% 10em, red, blue)", + "-moz-radial-gradient(44px top, red, blue)", - "-moz-radial-gradient(top left 45deg, red, blue)", - "-moz-radial-gradient(0 0, red, blue)", - "-moz-radial-gradient(20% bottom -300deg, red, blue)", - "-moz-radial-gradient(center 20% 1.95929rad, red, blue)", - "-moz-radial-gradient(left 35px 30grad, red, blue)", - "-moz-radial-gradient(10% 10em 99999deg, red, blue)", - "-moz-radial-gradient(44px top -33deg, red, blue)", - "-moz-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "-moz-radial-gradient(top left 45deg, red, blue)", + "-moz-radial-gradient(0 0, red, blue)", + "-moz-radial-gradient(20% bottom -300deg, red, blue)", + "-moz-radial-gradient(center 20% 1.95929rad, red, blue)", + "-moz-radial-gradient(left 35px 30grad, red, blue)", + "-moz-radial-gradient(10% 10em 99999deg, red, blue)", + "-moz-radial-gradient(44px top -33deg, red, blue)", + "-moz-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "-moz-radial-gradient(-33deg, red, blue)", - "-moz-radial-gradient(30grad left 35px, red, blue)", - "-moz-radial-gradient(10deg 20px, red, blue)", - "-moz-radial-gradient(.414rad bottom, red, blue)", + "-moz-radial-gradient(-33deg, red, blue)", + "-moz-radial-gradient(30grad left 35px, red, blue)", + "-moz-radial-gradient(10deg 20px, red, blue)", + "-moz-radial-gradient(.414rad bottom, red, blue)", - "-moz-radial-gradient(cover, red, blue)", - "-moz-radial-gradient(circle, red, blue)", - "-moz-radial-gradient(ellipse closest-corner, red, blue)", - "-moz-radial-gradient(farthest-side circle, red, blue)", + "-moz-radial-gradient(cover, red, blue)", + "-moz-radial-gradient(circle, red, blue)", + "-moz-radial-gradient(ellipse closest-corner, red, blue)", + "-moz-radial-gradient(farthest-side circle, red, blue)", - "-moz-radial-gradient(top left, cover, red, blue)", - "-moz-radial-gradient(15% 20%, circle, red, blue)", - "-moz-radial-gradient(45px, ellipse closest-corner, red, blue)", - "-moz-radial-gradient(45px, farthest-side circle, red, blue)", + "-moz-radial-gradient(top left, cover, red, blue)", + "-moz-radial-gradient(15% 20%, circle, red, blue)", + "-moz-radial-gradient(45px, ellipse closest-corner, red, blue)", + "-moz-radial-gradient(45px, farthest-side circle, red, blue)", - "-moz-radial-gradient(99deg, cover, red, blue)", - "-moz-radial-gradient(-1.2345rad, circle, red, blue)", - "-moz-radial-gradient(399grad, ellipse closest-corner, red, blue)", - "-moz-radial-gradient(399grad, farthest-side circle, red, blue)", + "-moz-radial-gradient(99deg, cover, red, blue)", + "-moz-radial-gradient(-1.2345rad, circle, red, blue)", + "-moz-radial-gradient(399grad, ellipse closest-corner, red, blue)", + "-moz-radial-gradient(399grad, farthest-side circle, red, blue)", - "-moz-radial-gradient(top left 99deg, cover, red, blue)", - "-moz-radial-gradient(15% 20% -1.2345rad, circle, red, blue)", - "-moz-radial-gradient(45px 399grad, ellipse closest-corner, red, blue)", - "-moz-radial-gradient(45px 399grad, farthest-side circle, red, blue)", + "-moz-radial-gradient(top left 99deg, cover, red, blue)", + "-moz-radial-gradient(15% 20% -1.2345rad, circle, red, blue)", + "-moz-radial-gradient(45px 399grad, ellipse closest-corner, red, blue)", + "-moz-radial-gradient(45px 399grad, farthest-side circle, red, blue)", - "-moz-repeating-linear-gradient(red, blue)", - "-moz-repeating-linear-gradient(red, yellow, blue)", - "-moz-repeating-linear-gradient(red 1px, yellow 20%, blue 24em, green)", - "-moz-repeating-linear-gradient(red, yellow, green, blue 50%)", - "-moz-repeating-linear-gradient(red -50%, yellow -25%, green, blue)", - "-moz-repeating-linear-gradient(red -99px, yellow, green, blue 120%)", - "-moz-repeating-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "-moz-repeating-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "-moz-repeating-linear-gradient(red, blue)", + "-moz-repeating-linear-gradient(red, yellow, blue)", + "-moz-repeating-linear-gradient(red 1px, yellow 20%, blue 24em, green)", + "-moz-repeating-linear-gradient(red, yellow, green, blue 50%)", + "-moz-repeating-linear-gradient(red -50%, yellow -25%, green, blue)", + "-moz-repeating-linear-gradient(red -99px, yellow, green, blue 120%)", + "-moz-repeating-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "-moz-repeating-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "-moz-repeating-linear-gradient(to top, red, blue)", - "-moz-repeating-linear-gradient(to bottom, red, blue)", - "-moz-repeating-linear-gradient(to left, red, blue)", - "-moz-repeating-linear-gradient(to right, red, blue)", - "-moz-repeating-linear-gradient(to top left, red, blue)", - "-moz-repeating-linear-gradient(to top right, red, blue)", - "-moz-repeating-linear-gradient(to bottom left, red, blue)", - "-moz-repeating-linear-gradient(to bottom right, red, blue)", - "-moz-repeating-linear-gradient(to left top, red, blue)", - "-moz-repeating-linear-gradient(to left bottom, red, blue)", - "-moz-repeating-linear-gradient(to right top, red, blue)", - "-moz-repeating-linear-gradient(to right bottom, red, blue)", + "-moz-repeating-linear-gradient(to top, red, blue)", + "-moz-repeating-linear-gradient(to bottom, red, blue)", + "-moz-repeating-linear-gradient(to left, red, blue)", + "-moz-repeating-linear-gradient(to right, red, blue)", + "-moz-repeating-linear-gradient(to top left, red, blue)", + "-moz-repeating-linear-gradient(to top right, red, blue)", + "-moz-repeating-linear-gradient(to bottom left, red, blue)", + "-moz-repeating-linear-gradient(to bottom right, red, blue)", + "-moz-repeating-linear-gradient(to left top, red, blue)", + "-moz-repeating-linear-gradient(to left bottom, red, blue)", + "-moz-repeating-linear-gradient(to right top, red, blue)", + "-moz-repeating-linear-gradient(to right bottom, red, blue)", - "-moz-repeating-linear-gradient(top left, red, blue)", - "-moz-repeating-linear-gradient(0 0, red, blue)", - "-moz-repeating-linear-gradient(20% bottom, red, blue)", - "-moz-repeating-linear-gradient(center 20%, red, blue)", - "-moz-repeating-linear-gradient(left 35px, red, blue)", - "-moz-repeating-linear-gradient(10% 10em, red, blue)", - "-moz-repeating-linear-gradient(44px top, red, blue)", + "-moz-repeating-linear-gradient(top left, red, blue)", + "-moz-repeating-linear-gradient(0 0, red, blue)", + "-moz-repeating-linear-gradient(20% bottom, red, blue)", + "-moz-repeating-linear-gradient(center 20%, red, blue)", + "-moz-repeating-linear-gradient(left 35px, red, blue)", + "-moz-repeating-linear-gradient(10% 10em, red, blue)", + "-moz-repeating-linear-gradient(44px top, red, blue)", - "-moz-repeating-linear-gradient(top left 45deg, red, blue)", - "-moz-repeating-linear-gradient(20% bottom -300deg, red, blue)", - "-moz-repeating-linear-gradient(center 20% 1.95929rad, red, blue)", - "-moz-repeating-linear-gradient(left 35px 30grad, red, blue)", - "-moz-repeating-linear-gradient(10% 10em 99999deg, red, blue)", - "-moz-repeating-linear-gradient(44px top -33deg, red, blue)", + "-moz-repeating-linear-gradient(top left 45deg, red, blue)", + "-moz-repeating-linear-gradient(20% bottom -300deg, red, blue)", + "-moz-repeating-linear-gradient(center 20% 1.95929rad, red, blue)", + "-moz-repeating-linear-gradient(left 35px 30grad, red, blue)", + "-moz-repeating-linear-gradient(10% 10em 99999deg, red, blue)", + "-moz-repeating-linear-gradient(44px top -33deg, red, blue)", - "-moz-repeating-linear-gradient(-33deg, red, blue)", - "-moz-repeating-linear-gradient(30grad left 35px, red, blue)", - "-moz-repeating-linear-gradient(10deg 20px, red, blue)", - "-moz-repeating-linear-gradient(.414rad bottom, red, blue)", + "-moz-repeating-linear-gradient(-33deg, red, blue)", + "-moz-repeating-linear-gradient(30grad left 35px, red, blue)", + "-moz-repeating-linear-gradient(10deg 20px, red, blue)", + "-moz-repeating-linear-gradient(.414rad bottom, red, blue)", - "-moz-repeating-radial-gradient(red, blue)", - "-moz-repeating-radial-gradient(red, yellow, blue)", - "-moz-repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)", - "-moz-repeating-radial-gradient(red, yellow, green, blue 50%)", - "-moz-repeating-radial-gradient(red -50%, yellow -25%, green, blue)", - "-moz-repeating-radial-gradient(red -99px, yellow, green, blue 120%)", - "-moz-repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", - "-moz-repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", + "-moz-repeating-radial-gradient(red, blue)", + "-moz-repeating-radial-gradient(red, yellow, blue)", + "-moz-repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)", + "-moz-repeating-radial-gradient(red, yellow, green, blue 50%)", + "-moz-repeating-radial-gradient(red -50%, yellow -25%, green, blue)", + "-moz-repeating-radial-gradient(red -99px, yellow, green, blue 120%)", + "-moz-repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))", + "-moz-repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)", - "repeating-radial-gradient(at top left, red, blue)", - "repeating-radial-gradient(at 0 0, red, blue)", - "repeating-radial-gradient(at 20% bottom, red, blue)", - "repeating-radial-gradient(at center 20%, red, blue)", - "repeating-radial-gradient(at left 35px, red, blue)", - "repeating-radial-gradient(at 10% 10em, red, blue)", - "repeating-radial-gradient(at 44px top, red, blue)", + "repeating-radial-gradient(at top left, red, blue)", + "repeating-radial-gradient(at 0 0, red, blue)", + "repeating-radial-gradient(at 20% bottom, red, blue)", + "repeating-radial-gradient(at center 20%, red, blue)", + "repeating-radial-gradient(at left 35px, red, blue)", + "repeating-radial-gradient(at 10% 10em, red, blue)", + "repeating-radial-gradient(at 44px top, red, blue)", - "-moz-repeating-radial-gradient(farthest-corner, red, blue)", - "-moz-repeating-radial-gradient(circle, red, blue)", - "-moz-repeating-radial-gradient(ellipse closest-corner, red, blue)", + "-moz-repeating-radial-gradient(farthest-corner, red, blue)", + "-moz-repeating-radial-gradient(circle, red, blue)", + "-moz-repeating-radial-gradient(ellipse closest-corner, red, blue)", - "repeating-radial-gradient(farthest-corner at top left, red, blue)", - "repeating-radial-gradient(closest-corner ellipse at 45px, red, blue)", - "repeating-radial-gradient(farthest-side circle at 45px, red, blue)", - "repeating-radial-gradient(ellipse closest-side at 50%, red, blue)", - "repeating-radial-gradient(circle farthest-corner at 4em, red, blue)", + "repeating-radial-gradient(farthest-corner at top left, red, blue)", + "repeating-radial-gradient(closest-corner ellipse at 45px, red, blue)", + "repeating-radial-gradient(farthest-side circle at 45px, red, blue)", + "repeating-radial-gradient(ellipse closest-side at 50%, red, blue)", + "repeating-radial-gradient(circle farthest-corner at 4em, red, blue)", - "repeating-radial-gradient(30% 40% at top left, red, blue)", - "repeating-radial-gradient(50px 60px at 15% 20%, red, blue)", - "repeating-radial-gradient(7em 8em at 45px, red, blue)", + "repeating-radial-gradient(30% 40% at top left, red, blue)", + "repeating-radial-gradient(50px 60px at 15% 20%, red, blue)", + "repeating-radial-gradient(7em 8em at 45px, red, blue)", - "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 2, 10, 10, 2)", - "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10%, 50%, 30%, 0%)", - "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10, 50%, 30%, 0)", + "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 2, 10, 10, 2)", + "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10%, 50%, 30%, 0%)", + "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10, 50%, 30%, 0)", - "-moz-radial-gradient(calc(25%) top, red, blue)", - "-moz-radial-gradient(left calc(25%), red, blue)", - "-moz-radial-gradient(calc(25px) top, red, blue)", - "-moz-radial-gradient(left calc(25px), red, blue)", - "-moz-radial-gradient(calc(-25%) top, red, blue)", - "-moz-radial-gradient(left calc(-25%), red, blue)", - "-moz-radial-gradient(calc(-25px) top, red, blue)", - "-moz-radial-gradient(left calc(-25px), red, blue)", - "-moz-radial-gradient(calc(100px + -25%) top, red, blue)", - "-moz-radial-gradient(left calc(100px + -25%), red, blue)", - "-moz-radial-gradient(calc(100px + -25px) top, red, blue)", - "-moz-radial-gradient(left calc(100px + -25px), red, blue)" + "-moz-radial-gradient(calc(25%) top, red, blue)", + "-moz-radial-gradient(left calc(25%), red, blue)", + "-moz-radial-gradient(calc(25px) top, red, blue)", + "-moz-radial-gradient(left calc(25px), red, blue)", + "-moz-radial-gradient(calc(-25%) top, red, blue)", + "-moz-radial-gradient(left calc(-25%), red, blue)", + "-moz-radial-gradient(calc(-25px) top, red, blue)", + "-moz-radial-gradient(left calc(-25px), red, blue)", + "-moz-radial-gradient(calc(100px + -25%) top, red, blue)", + "-moz-radial-gradient(left calc(100px + -25%), red, blue)", + "-moz-radial-gradient(calc(100px + -25px) top, red, blue)", + "-moz-radial-gradient(left calc(100px + -25px), red, blue)" ]; var invalidGradientAndElementValues = [ - "-moz-element(#a:1)", - "-moz-element(a#a)", - "-moz-element(#a a)", - "-moz-element(#a+a)", - "-moz-element(#a())", - /* no quirks mode colors */ - "linear-gradient(red, ff00ff)", - /* no quirks mode colors */ - "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat", - /* no quirks mode lengths */ - "-moz-linear-gradient(10 10px -45deg, red, blue) repeat", - "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", - "linear-gradient(red -99, yellow, green, blue 120%)", - /* Old syntax */ - "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, from(blue), to(red))", - "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", - "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", - "-moz-linear-gradient(10px, 20px, 30px, 40px, color-stop(0.5, #00ccff))", - "-moz-linear-gradient(20px 20px, from(blue), to(red))", - "-moz-linear-gradient(40px 40px, 10px 10px, from(blue) to(red) color-stop(10%, fuchsia))", - "-moz-linear-gradient(20px 20px 30px, 10px 10px, from(red), to(#ff0000))", - "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", - "-moz-linear-gradient(left left, top top, from(blue))", - "-moz-linear-gradient(inherit, 10px 10px, from(blue))", - /* New syntax */ - "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)", - "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", - "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", - "-moz-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)", - "-moz-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)", - "-moz-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)", - "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", - "-moz-linear-gradient(left left, top top, blue 0)", - "-moz-linear-gradient(inherit, 10px 10px, blue 0)", - "-moz-linear-gradient(left left blue red)", - "-moz-linear-gradient(left left blue, red)", - "-moz-linear-gradient()", - "-moz-linear-gradient(cover, red, blue)", - "-moz-linear-gradient(auto, red, blue)", - "-moz-linear-gradient(22 top, red, blue)", - "-moz-linear-gradient(10% red blue)", - "-moz-linear-gradient(10%, red blue)", - "-moz-linear-gradient(10%,, red, blue)", - "-moz-linear-gradient(45px, center, red, blue)", - "-moz-linear-gradient(45px, center red, blue)", - "-moz-radial-gradient(contain, ellipse, red, blue)", - "-moz-radial-gradient(10deg contain, red, blue)", - "-moz-radial-gradient(10deg, contain,, red, blue)", - "-moz-radial-gradient(contain contain, red, blue)", - "-moz-radial-gradient(ellipse circle, red, blue)", - "-moz-radial-gradient(to top left, red, blue)", - "-moz-radial-gradient(center, 10%, red, blue)", - "-moz-radial-gradient(5rad, 20px, red, blue)", - "-moz-radial-gradient(40%, -100px -10%, red, blue)", + "-moz-element(#a:1)", + "-moz-element(a#a)", + "-moz-element(#a a)", + "-moz-element(#a+a)", + "-moz-element(#a())", + /* no quirks mode colors */ + "linear-gradient(red, ff00ff)", + /* no quirks mode colors */ + "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat", + /* no quirks mode lengths */ + "-moz-linear-gradient(10 10px -45deg, red, blue) repeat", + "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", + "linear-gradient(red -99, yellow, green, blue 120%)", + /* Old syntax */ + "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, from(blue), to(red))", + "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", + "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", + "-moz-linear-gradient(10px, 20px, 30px, 40px, color-stop(0.5, #00ccff))", + "-moz-linear-gradient(20px 20px, from(blue), to(red))", + "-moz-linear-gradient(40px 40px, 10px 10px, from(blue) to(red) color-stop(10%, fuchsia))", + "-moz-linear-gradient(20px 20px 30px, 10px 10px, from(red), to(#ff0000))", + "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", + "-moz-linear-gradient(left left, top top, from(blue))", + "-moz-linear-gradient(inherit, 10px 10px, from(blue))", + /* New syntax */ + "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)", + "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", + "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", + "-moz-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)", + "-moz-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)", + "-moz-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)", + "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", + "-moz-linear-gradient(left left, top top, blue 0)", + "-moz-linear-gradient(inherit, 10px 10px, blue 0)", + "-moz-linear-gradient(left left blue red)", + "-moz-linear-gradient(left left blue, red)", + "-moz-linear-gradient()", + "-moz-linear-gradient(cover, red, blue)", + "-moz-linear-gradient(auto, red, blue)", + "-moz-linear-gradient(22 top, red, blue)", + "-moz-linear-gradient(10% red blue)", + "-moz-linear-gradient(10%, red blue)", + "-moz-linear-gradient(10%,, red, blue)", + "-moz-linear-gradient(45px, center, red, blue)", + "-moz-linear-gradient(45px, center red, blue)", + "-moz-radial-gradient(contain, ellipse, red, blue)", + "-moz-radial-gradient(10deg contain, red, blue)", + "-moz-radial-gradient(10deg, contain,, red, blue)", + "-moz-radial-gradient(contain contain, red, blue)", + "-moz-radial-gradient(ellipse circle, red, blue)", + "-moz-radial-gradient(to top left, red, blue)", + "-moz-radial-gradient(center, 10%, red, blue)", + "-moz-radial-gradient(5rad, 20px, red, blue)", + "-moz-radial-gradient(40%, -100px -10%, red, blue)", - "-moz-radial-gradient(at top left to cover, red, blue)", - "-moz-radial-gradient(at 15% 20% circle, red, blue)", + "-moz-radial-gradient(at top left to cover, red, blue)", + "-moz-radial-gradient(at 15% 20% circle, red, blue)", - "-moz-radial-gradient(to cover, red, blue)", - "-moz-radial-gradient(to contain, red, blue)", - "-moz-radial-gradient(to closest-side circle, red, blue)", - "-moz-radial-gradient(to farthest-corner ellipse, red, blue)", + "-moz-radial-gradient(to cover, red, blue)", + "-moz-radial-gradient(to contain, red, blue)", + "-moz-radial-gradient(to closest-side circle, red, blue)", + "-moz-radial-gradient(to farthest-corner ellipse, red, blue)", - "-moz-radial-gradient(ellipse at 45px closest-corner, red, blue)", - "-moz-radial-gradient(circle at 45px farthest-side, red, blue)", - "-moz-radial-gradient(ellipse 45px, closest-side, red, blue)", - "-moz-radial-gradient(circle 45px, farthest-corner, red, blue)", - "-moz-radial-gradient(ellipse, ellipse closest-side, red, blue)", - "-moz-radial-gradient(circle, circle farthest-corner, red, blue)", + "-moz-radial-gradient(ellipse at 45px closest-corner, red, blue)", + "-moz-radial-gradient(circle at 45px farthest-side, red, blue)", + "-moz-radial-gradient(ellipse 45px, closest-side, red, blue)", + "-moz-radial-gradient(circle 45px, farthest-corner, red, blue)", + "-moz-radial-gradient(ellipse, ellipse closest-side, red, blue)", + "-moz-radial-gradient(circle, circle farthest-corner, red, blue)", - "-moz-radial-gradient(99deg to farthest-corner, red, blue)", - "-moz-radial-gradient(-1.2345rad circle, red, blue)", - "-moz-radial-gradient(ellipse 399grad to closest-corner, red, blue)", - "-moz-radial-gradient(circle 399grad to farthest-side, red, blue)", + "-moz-radial-gradient(99deg to farthest-corner, red, blue)", + "-moz-radial-gradient(-1.2345rad circle, red, blue)", + "-moz-radial-gradient(ellipse 399grad to closest-corner, red, blue)", + "-moz-radial-gradient(circle 399grad to farthest-side, red, blue)", - "-moz-radial-gradient(at top left 99deg, to farthest-corner, red, blue)", - "-moz-radial-gradient(circle at 15% 20% -1.2345rad, red, blue)", - "-moz-radial-gradient(to top left at 30% 40%, red, blue)", - "-moz-radial-gradient(ellipse at 45px 399grad, to closest-corner, red, blue)", - "-moz-radial-gradient(at 45px 399grad to farthest-side circle, red, blue)", + "-moz-radial-gradient(at top left 99deg, to farthest-corner, red, blue)", + "-moz-radial-gradient(circle at 15% 20% -1.2345rad, red, blue)", + "-moz-radial-gradient(to top left at 30% 40%, red, blue)", + "-moz-radial-gradient(ellipse at 45px 399grad, to closest-corner, red, blue)", + "-moz-radial-gradient(at 45px 399grad to farthest-side circle, red, blue)", - "-moz-radial-gradient(to 50%, red, blue)", - "-moz-radial-gradient(circle to 50%, red, blue)", - "-moz-radial-gradient(circle to 43px 43px, red, blue)", - "-moz-radial-gradient(circle to 50% 50%, red, blue)", - "-moz-radial-gradient(circle to 43px 50%, red, blue)", - "-moz-radial-gradient(circle to 50% 43px, red, blue)", - "-moz-radial-gradient(ellipse to 43px, red, blue)", - "-moz-radial-gradient(ellipse to 50%, red, blue)", + "-moz-radial-gradient(to 50%, red, blue)", + "-moz-radial-gradient(circle to 50%, red, blue)", + "-moz-radial-gradient(circle to 43px 43px, red, blue)", + "-moz-radial-gradient(circle to 50% 50%, red, blue)", + "-moz-radial-gradient(circle to 43px 50%, red, blue)", + "-moz-radial-gradient(circle to 50% 43px, red, blue)", + "-moz-radial-gradient(ellipse to 43px, red, blue)", + "-moz-radial-gradient(ellipse to 50%, red, blue)", - "-moz-linear-gradient(to 0 0, red, blue)", - "-moz-linear-gradient(to 20% bottom, red, blue)", - "-moz-linear-gradient(to center 20%, red, blue)", - "-moz-linear-gradient(to left 35px, red, blue)", - "-moz-linear-gradient(to 10% 10em, red, blue)", - "-moz-linear-gradient(to 44px top, red, blue)", - "-moz-linear-gradient(to top left 45deg, red, blue)", - "-moz-linear-gradient(to 20% bottom -300deg, red, blue)", - "-moz-linear-gradient(to center 20% 1.95929rad, red, blue)", - "-moz-linear-gradient(to left 35px 30grad, red, blue)", - "-moz-linear-gradient(to 10% 10em 99999deg, red, blue)", - "-moz-linear-gradient(to 44px top -33deg, red, blue)", - "-moz-linear-gradient(to -33deg, red, blue)", - "-moz-linear-gradient(to 30grad left 35px, red, blue)", - "-moz-linear-gradient(to 10deg 20px, red, blue)", - "-moz-linear-gradient(to .414rad bottom, red, blue)", + "-moz-linear-gradient(to 0 0, red, blue)", + "-moz-linear-gradient(to 20% bottom, red, blue)", + "-moz-linear-gradient(to center 20%, red, blue)", + "-moz-linear-gradient(to left 35px, red, blue)", + "-moz-linear-gradient(to 10% 10em, red, blue)", + "-moz-linear-gradient(to 44px top, red, blue)", + "-moz-linear-gradient(to top left 45deg, red, blue)", + "-moz-linear-gradient(to 20% bottom -300deg, red, blue)", + "-moz-linear-gradient(to center 20% 1.95929rad, red, blue)", + "-moz-linear-gradient(to left 35px 30grad, red, blue)", + "-moz-linear-gradient(to 10% 10em 99999deg, red, blue)", + "-moz-linear-gradient(to 44px top -33deg, red, blue)", + "-moz-linear-gradient(to -33deg, red, blue)", + "-moz-linear-gradient(to 30grad left 35px, red, blue)", + "-moz-linear-gradient(to 10deg 20px, red, blue)", + "-moz-linear-gradient(to .414rad bottom, red, blue)", - "-moz-linear-gradient(to top top, red, blue)", - "-moz-linear-gradient(to bottom bottom, red, blue)", - "-moz-linear-gradient(to left left, red, blue)", - "-moz-linear-gradient(to right right, red, blue)", + "-moz-linear-gradient(to top top, red, blue)", + "-moz-linear-gradient(to bottom bottom, red, blue)", + "-moz-linear-gradient(to left left, red, blue)", + "-moz-linear-gradient(to right right, red, blue)", - "-moz-repeating-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)", - "-moz-repeating-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", - "-moz-repeating-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", - "-moz-repeating-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)", - "-moz-repeating-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)", - "-moz-repeating-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)", - "-moz-repeating-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", - "-moz-repeating-linear-gradient(left left, top top, blue 0)", - "-moz-repeating-linear-gradient(inherit, 10px 10px, blue 0)", - "-moz-repeating-linear-gradient(left left blue red)", - "-moz-repeating-linear-gradient()", + "-moz-repeating-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)", + "-moz-repeating-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))", + "-moz-repeating-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))", + "-moz-repeating-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)", + "-moz-repeating-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)", + "-moz-repeating-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)", + "-moz-repeating-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))", + "-moz-repeating-linear-gradient(left left, top top, blue 0)", + "-moz-repeating-linear-gradient(inherit, 10px 10px, blue 0)", + "-moz-repeating-linear-gradient(left left blue red)", + "-moz-repeating-linear-gradient()", - "-moz-repeating-linear-gradient(to 0 0, red, blue)", - "-moz-repeating-linear-gradient(to 20% bottom, red, blue)", - "-moz-repeating-linear-gradient(to center 20%, red, blue)", - "-moz-repeating-linear-gradient(to left 35px, red, blue)", - "-moz-repeating-linear-gradient(to 10% 10em, red, blue)", - "-moz-repeating-linear-gradient(to 44px top, red, blue)", - "-moz-repeating-linear-gradient(to top left 45deg, red, blue)", - "-moz-repeating-linear-gradient(to 20% bottom -300deg, red, blue)", - "-moz-repeating-linear-gradient(to center 20% 1.95929rad, red, blue)", - "-moz-repeating-linear-gradient(to left 35px 30grad, red, blue)", - "-moz-repeating-linear-gradient(to 10% 10em 99999deg, red, blue)", - "-moz-repeating-linear-gradient(to 44px top -33deg, red, blue)", - "-moz-repeating-linear-gradient(to -33deg, red, blue)", - "-moz-repeating-linear-gradient(to 30grad left 35px, red, blue)", - "-moz-repeating-linear-gradient(to 10deg 20px, red, blue)", - "-moz-repeating-linear-gradient(to .414rad bottom, red, blue)", + "-moz-repeating-linear-gradient(to 0 0, red, blue)", + "-moz-repeating-linear-gradient(to 20% bottom, red, blue)", + "-moz-repeating-linear-gradient(to center 20%, red, blue)", + "-moz-repeating-linear-gradient(to left 35px, red, blue)", + "-moz-repeating-linear-gradient(to 10% 10em, red, blue)", + "-moz-repeating-linear-gradient(to 44px top, red, blue)", + "-moz-repeating-linear-gradient(to top left 45deg, red, blue)", + "-moz-repeating-linear-gradient(to 20% bottom -300deg, red, blue)", + "-moz-repeating-linear-gradient(to center 20% 1.95929rad, red, blue)", + "-moz-repeating-linear-gradient(to left 35px 30grad, red, blue)", + "-moz-repeating-linear-gradient(to 10% 10em 99999deg, red, blue)", + "-moz-repeating-linear-gradient(to 44px top -33deg, red, blue)", + "-moz-repeating-linear-gradient(to -33deg, red, blue)", + "-moz-repeating-linear-gradient(to 30grad left 35px, red, blue)", + "-moz-repeating-linear-gradient(to 10deg 20px, red, blue)", + "-moz-repeating-linear-gradient(to .414rad bottom, red, blue)", - "-moz-repeating-linear-gradient(to top top, red, blue)", - "-moz-repeating-linear-gradient(to bottom bottom, red, blue)", - "-moz-repeating-linear-gradient(to left left, red, blue)", - "-moz-repeating-linear-gradient(to right right, red, blue)", + "-moz-repeating-linear-gradient(to top top, red, blue)", + "-moz-repeating-linear-gradient(to bottom bottom, red, blue)", + "-moz-repeating-linear-gradient(to left left, red, blue)", + "-moz-repeating-linear-gradient(to right right, red, blue)", - "-moz-repeating-radial-gradient(to top left at 30% 40%, red, blue)", - "-moz-repeating-radial-gradient(ellipse at 45px closest-corner, red, blue)", - "-moz-repeating-radial-gradient(circle at 45px farthest-side, red, blue)", + "-moz-repeating-radial-gradient(to top left at 30% 40%, red, blue)", + "-moz-repeating-radial-gradient(ellipse at 45px closest-corner, red, blue)", + "-moz-repeating-radial-gradient(circle at 45px farthest-side, red, blue)", - "radial-gradient(circle 175px 20px, black, white)", - "radial-gradient(175px 20px circle, black, white)", - "radial-gradient(ellipse 175px, black, white)", - "radial-gradient(175px ellipse, black, white)", - "radial-gradient(50%, red, blue)", - "radial-gradient(circle 50%, red, blue)", - "radial-gradient(50% circle, red, blue)", + "radial-gradient(circle 175px 20px, black, white)", + "radial-gradient(175px 20px circle, black, white)", + "radial-gradient(ellipse 175px, black, white)", + "radial-gradient(175px ellipse, black, white)", + "radial-gradient(50%, red, blue)", + "radial-gradient(circle 50%, red, blue)", + "radial-gradient(50% circle, red, blue)", - /* Valid only when prefixed */ - "linear-gradient(top left, red, blue)", - "linear-gradient(0 0, red, blue)", - "linear-gradient(20% bottom, red, blue)", - "linear-gradient(center 20%, red, blue)", - "linear-gradient(left 35px, red, blue)", - "linear-gradient(10% 10em, red, blue)", - "linear-gradient(44px top, red, blue)", + /* Valid only when prefixed */ + "linear-gradient(top left, red, blue)", + "linear-gradient(0 0, red, blue)", + "linear-gradient(20% bottom, red, blue)", + "linear-gradient(center 20%, red, blue)", + "linear-gradient(left 35px, red, blue)", + "linear-gradient(10% 10em, red, blue)", + "linear-gradient(44px top, red, blue)", - "linear-gradient(top left 45deg, red, blue)", - "linear-gradient(20% bottom -300deg, red, blue)", - "linear-gradient(center 20% 1.95929rad, red, blue)", - "linear-gradient(left 35px 30grad, red, blue)", - "linear-gradient(left 35px 0.1turn, red, blue)", - "linear-gradient(10% 10em 99999deg, red, blue)", - "linear-gradient(44px top -33deg, red, blue)", + "linear-gradient(top left 45deg, red, blue)", + "linear-gradient(20% bottom -300deg, red, blue)", + "linear-gradient(center 20% 1.95929rad, red, blue)", + "linear-gradient(left 35px 30grad, red, blue)", + "linear-gradient(left 35px 0.1turn, red, blue)", + "linear-gradient(10% 10em 99999deg, red, blue)", + "linear-gradient(44px top -33deg, red, blue)", - "linear-gradient(30grad left 35px, red, blue)", - "linear-gradient(10deg 20px, red, blue)", - "linear-gradient(1turn 20px, red, blue)", - "linear-gradient(.414rad bottom, red, blue)", + "linear-gradient(30grad left 35px, red, blue)", + "linear-gradient(10deg 20px, red, blue)", + "linear-gradient(1turn 20px, red, blue)", + "linear-gradient(.414rad bottom, red, blue)", - "radial-gradient(top left 45deg, red, blue)", - "radial-gradient(20% bottom -300deg, red, blue)", - "radial-gradient(center 20% 1.95929rad, red, blue)", - "radial-gradient(left 35px 30grad, red, blue)", - "radial-gradient(10% 10em 99999deg, red, blue)", - "radial-gradient(44px top -33deg, red, blue)", + "radial-gradient(top left 45deg, red, blue)", + "radial-gradient(20% bottom -300deg, red, blue)", + "radial-gradient(center 20% 1.95929rad, red, blue)", + "radial-gradient(left 35px 30grad, red, blue)", + "radial-gradient(10% 10em 99999deg, red, blue)", + "radial-gradient(44px top -33deg, red, blue)", - "radial-gradient(-33deg, red, blue)", - "radial-gradient(30grad left 35px, red, blue)", - "radial-gradient(10deg 20px, red, blue)", - "radial-gradient(.414rad bottom, red, blue)", + "radial-gradient(-33deg, red, blue)", + "radial-gradient(30grad left 35px, red, blue)", + "radial-gradient(10deg 20px, red, blue)", + "radial-gradient(.414rad bottom, red, blue)", - "radial-gradient(cover, red, blue)", - "radial-gradient(ellipse contain, red, blue)", - "radial-gradient(cover circle, red, blue)", + "radial-gradient(cover, red, blue)", + "radial-gradient(ellipse contain, red, blue)", + "radial-gradient(cover circle, red, blue)", - "radial-gradient(top left, cover, red, blue)", - "radial-gradient(15% 20%, circle, red, blue)", - "radial-gradient(45px, ellipse closest-corner, red, blue)", - "radial-gradient(45px, farthest-side circle, red, blue)", + "radial-gradient(top left, cover, red, blue)", + "radial-gradient(15% 20%, circle, red, blue)", + "radial-gradient(45px, ellipse closest-corner, red, blue)", + "radial-gradient(45px, farthest-side circle, red, blue)", - "radial-gradient(99deg, cover, red, blue)", - "radial-gradient(-1.2345rad, circle, red, blue)", - "radial-gradient(399grad, ellipse closest-corner, red, blue)", - "radial-gradient(399grad, farthest-side circle, red, blue)", + "radial-gradient(99deg, cover, red, blue)", + "radial-gradient(-1.2345rad, circle, red, blue)", + "radial-gradient(399grad, ellipse closest-corner, red, blue)", + "radial-gradient(399grad, farthest-side circle, red, blue)", - "radial-gradient(top left 99deg, cover, red, blue)", - "radial-gradient(15% 20% -1.2345rad, circle, red, blue)", - "radial-gradient(45px 399grad, ellipse closest-corner, red, blue)", - "radial-gradient(45px 399grad, farthest-side circle, red, blue)", + "radial-gradient(top left 99deg, cover, red, blue)", + "radial-gradient(15% 20% -1.2345rad, circle, red, blue)", + "radial-gradient(45px 399grad, ellipse closest-corner, red, blue)", + "radial-gradient(45px 399grad, farthest-side circle, red, blue)", - /* Valid only when unprefixed */ - "-moz-radial-gradient(at top left, red, blue)", - "-moz-radial-gradient(at 20% bottom, red, blue)", - "-moz-radial-gradient(at center 20%, red, blue)", - "-moz-radial-gradient(at left 35px, red, blue)", - "-moz-radial-gradient(at 10% 10em, red, blue)", - "-moz-radial-gradient(at 44px top, red, blue)", - "-moz-radial-gradient(at 0 0, red, blue)", + /* Valid only when unprefixed */ + "-moz-radial-gradient(at top left, red, blue)", + "-moz-radial-gradient(at 20% bottom, red, blue)", + "-moz-radial-gradient(at center 20%, red, blue)", + "-moz-radial-gradient(at left 35px, red, blue)", + "-moz-radial-gradient(at 10% 10em, red, blue)", + "-moz-radial-gradient(at 44px top, red, blue)", + "-moz-radial-gradient(at 0 0, red, blue)", - "-moz-radial-gradient(circle 43px, red, blue)", - "-moz-radial-gradient(ellipse 43px 43px, red, blue)", - "-moz-radial-gradient(ellipse 50% 50%, red, blue)", - "-moz-radial-gradient(ellipse 43px 50%, red, blue)", - "-moz-radial-gradient(ellipse 50% 43px, red, blue)", + "-moz-radial-gradient(circle 43px, red, blue)", + "-moz-radial-gradient(ellipse 43px 43px, red, blue)", + "-moz-radial-gradient(ellipse 50% 50%, red, blue)", + "-moz-radial-gradient(ellipse 43px 50%, red, blue)", + "-moz-radial-gradient(ellipse 50% 43px, red, blue)", - "-moz-radial-gradient(farthest-corner at top left, red, blue)", - "-moz-radial-gradient(ellipse closest-corner at 45px, red, blue)", - "-moz-radial-gradient(circle farthest-side at 45px, red, blue)", - "-moz-radial-gradient(closest-side ellipse at 50%, red, blue)", - "-moz-radial-gradient(farthest-corner circle at 4em, red, blue)", + "-moz-radial-gradient(farthest-corner at top left, red, blue)", + "-moz-radial-gradient(ellipse closest-corner at 45px, red, blue)", + "-moz-radial-gradient(circle farthest-side at 45px, red, blue)", + "-moz-radial-gradient(closest-side ellipse at 50%, red, blue)", + "-moz-radial-gradient(farthest-corner circle at 4em, red, blue)", - "-moz-radial-gradient(30% 40% at top left, red, blue)", - "-moz-radial-gradient(50px 60px at 15% 20%, red, blue)", - "-moz-radial-gradient(7em 8em at 45px, red, blue)" + "-moz-radial-gradient(30% 40% at top left, red, blue)", + "-moz-radial-gradient(50px 60px at 15% 20%, red, blue)", + "-moz-radial-gradient(7em 8em at 45px, red, blue)" ]; var unbalancedGradientAndElementValues = [ - "-moz-element(#a()", + "-moz-element(#a()", ]; var gCSSProperties = { - "animation": { - domProp: "animation", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ], - initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ], - other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ], - invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial", "2s all,, 1s bounce", "2s all, , 1s bounce" ] - }, - "animation-delay": { - domProp: "animationDelay", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px" ] - }, - "animation-direction": { - domProp: "animationDirection", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ], - invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ] - }, - "animation-duration": { - domProp: "animationDuration", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px", "-1ms", "-2s" ] - }, - "animation-fill-mode": { - domProp: "animationFillMode", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ], - invalid_values: [ "all"] - }, - "animation-iteration-count": { - domProp: "animationIterationCount", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1" ], - other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ], - // negatives forbidden per - // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html - invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ] - }, - "animation-name": { - domProp: "animationName", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ], - invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ] - }, - "animation-play-state": { - domProp: "animationPlayState", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "running" ], - other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ], - invalid_values: [ "0" ] - }, - "animation-timing-function": { - domProp: "animationTimingFunction", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], - other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], - invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] - }, - "-moz-appearance": { - domProp: "MozAppearance", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "radio", "menulist" ], - invalid_values: [] - }, - "-moz-binding": { - domProp: "MozBinding", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(foo.xml)" ], - invalid_values: [] - }, - "-moz-border-bottom-colors": { - domProp: "MozBorderBottomColors", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] - }, - "-moz-border-end": { - domProp: "MozBorderEnd", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 green none" ] - }, - "-moz-border-end-color": { - domProp: "MozBorderEndColor", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ] - }, - "-moz-border-end-style": { - domProp: "MozBorderEndStyle", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "-moz-border-end-width": { - domProp: "MozBorderEndWidth", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - prerequisites: { "-moz-border-end-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%", "5" ] - }, - "border-image": { - domProp: "borderImage", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], - initial_values: [ "none" ], - other_values: [ "url('border.png') 27 27 27 27", - "url('border.png') 27", - "stretch url('border.png')", - "url('border.png') 27 fill", - "url('border.png') 27 27 27 27 repeat", - "repeat url('border.png') 27 27 27 27", - "url('border.png') repeat 27 27 27 27", - "url('border.png') fill 27 27 27 27 repeat", - "url('border.png') 27 27 27 27 / 1em", - "27 27 27 27 / 1em url('border.png') ", - "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat", - "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')", - "url('border.png') 27 27 27 27 / / 10 10 1em", - "fill 27 27 27 27 / / 10 10 1em url('border.png')", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ], - invalid_values: [ "url('border.png') 27 27 27 27 27", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em", - "url('border.png') 27 27 27 27 /", - "url('border.png') fill", - "url('border.png') fill repeat", - "fill repeat", - "url('border.png') fill / 1em", - "url('border.png') / repeat", - "url('border.png') 1 /", - "url('border.png') 1 / /", - "1 / url('border.png')", - "url('border.png') / 1", - "url('border.png') / / 1"] - }, - "border-image-source": { - domProp: "borderImageSource", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "url('border.png')" - ].concat(validGradientAndElementValues), - invalid_values: [ - "url('border.png') url('border.png')", - ].concat(invalidGradientAndElementValues), - unbalanced_values: [ - ].concat(unbalancedGradientAndElementValues) - }, - "border-image-slice": { - domProp: "borderImageSlice", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "100%", "100% 100% 100% 100%" ], - other_values: [ "0%", "10", "10 100% 0 2", "0 0 0 0", "fill 10 10", "10 10 fill" ], - invalid_values: [ "-10%", "-10", "10 10 10 10 10", "10 10 10 10 -10", "10px", "-10px", "fill", "fill fill 10px", "10px fill fill" ] - }, - "border-image-width": { - domProp: "borderImageWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "1 1 1 1" ], - other_values: [ "0", "0%", "0px", "auto auto auto auto", "10 10% auto 15px", "10px 10px 10px 10px", "10", "10 10", "10 10 10" ], - invalid_values: [ "-10", "-10px", "-10%", "10 10 10 10 10", "10 10 10 10 auto", "auto auto auto auto auto" ] - }, - "border-image-outset": { - domProp: "borderImageOutset", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0 0 0 0" ], - other_values: [ "10px", "10", "10 10", "10 10 10", "10 10 10 10", "10px 10 10 10px" ], - invalid_values: [ "-10", "-10px", "-10%", "10%", "10 10 10 10 10" ] - }, - "border-image-repeat": { - domProp: "borderImageRepeat", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch", "stretch stretch" ], - other_values: [ "round", "repeat", "stretch round", "repeat round", "stretch repeat", "round round", "repeat repeat" ], - invalid_values: [ "none", "stretch stretch stretch", "0", "10", "0%", "0px" ] - }, - "-moz-border-left-colors": { - domProp: "MozBorderLeftColors", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] - }, - "border-radius": { - domProp: "borderRadius", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ], - initial_values: [ "0", "0px", "0%", "0px 0 0 0px", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ], - other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular - "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - "2px 2px calc(2px + 1%) 2px", - "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px", - ], - invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ] - }, - "border-bottom-left-radius": { - domProp: "borderBottomLeftRadius", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "border-bottom-right-radius": { - domProp: "borderBottomRightRadius", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "border-top-left-radius": { - domProp: "borderTopLeftRadius", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "border-top-right-radius": { - domProp: "borderTopRightRadius", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "-moz-border-right-colors": { - domProp: "MozBorderRightColors", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] - }, - "-moz-border-start": { - domProp: "MozBorderStart", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 green solid" ] - }, - "-moz-border-start-color": { - domProp: "MozBorderStartColor", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ] - }, - "-moz-border-start-style": { - domProp: "MozBorderStartStyle", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "-moz-border-start-width": { - domProp: "MozBorderStartWidth", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - prerequisites: { "-moz-border-start-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%", "5" ] - }, - "-moz-border-top-colors": { - domProp: "MozBorderTopColors", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] - }, - "-moz-box-align": { - domProp: "MozBoxAlign", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch" ], - other_values: [ "start", "center", "baseline", "end" ], - invalid_values: [] - }, - "-moz-box-direction": { - domProp: "MozBoxDirection", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "reverse" ], - invalid_values: [] - }, - "-moz-box-flex": { - domProp: "MozBoxFlex", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0.0", "-0.0" ], - other_values: [ "1", "100", "0.1" ], - invalid_values: [ "10px", "-1" ] - }, - "-moz-box-ordinal-group": { - domProp: "MozBoxOrdinalGroup", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1" ], - other_values: [ "2", "100", "0" ], - invalid_values: [ "1.0", "-1", "-1000" ] - }, - "-moz-box-orient": { - domProp: "MozBoxOrient", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "horizontal", "inline-axis" ], - other_values: [ "vertical", "block-axis" ], - invalid_values: [] - }, - "-moz-box-pack": { - domProp: "MozBoxPack", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "start" ], - other_values: [ "center", "end", "justify" ], - invalid_values: [] - }, - "box-sizing": { - domProp: "boxSizing", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "content-box" ], - other_values: [ "border-box", "padding-box" ], - invalid_values: [ "margin-box", "content", "padding", "border", "margin" ] - }, - "-moz-box-sizing": { - domProp: "MozBoxSizing", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "box-sizing", - subproperties: [ "box-sizing" ], - initial_values: [ "content-box" ], - other_values: [ "border-box", "padding-box" ], - invalid_values: [ "margin-box", "content", "padding", "border", "margin" ] - }, - "-moz-columns": { - domProp: "MozColumns", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "-moz-column-count", "-moz-column-width" ], - initial_values: [ "auto", "auto auto" ], - other_values: [ "3", "20px", "2 10px", "10px 2", "2 auto", "auto 2", "auto 50px", "50px auto" ], - invalid_values: [ "5%", "-1px", "-1", "3 5", "10px 4px", "10 2px 5in", "30px -1", - "auto 3 5px", "5 auto 20px", "auto auto auto" ] - }, - "-moz-column-count": { - domProp: "MozColumnCount", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "1", "17" ], - // negative and zero invalid per editor's draft - invalid_values: [ "-1", "0", "3px" ] - }, + "animation": { + domProp: "animation", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ], + initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ], + other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ], + invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial", "2s all,, 1s bounce", "2s all, , 1s bounce" ] + }, + "animation-delay": { + domProp: "animationDelay", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px" ] + }, + "animation-direction": { + domProp: "animationDirection", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ], + invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ] + }, + "animation-duration": { + domProp: "animationDuration", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px", "-1ms", "-2s" ] + }, + "animation-fill-mode": { + domProp: "animationFillMode", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ], + invalid_values: [ "all"] + }, + "animation-iteration-count": { + domProp: "animationIterationCount", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1" ], + other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ], + // negatives forbidden per + // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html + invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ] + }, + "animation-name": { + domProp: "animationName", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ], + invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ] + }, + "animation-play-state": { + domProp: "animationPlayState", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "running" ], + other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ], + invalid_values: [ "0" ] + }, + "animation-timing-function": { + domProp: "animationTimingFunction", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], + other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], + invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + }, + "-moz-appearance": { + domProp: "MozAppearance", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "radio", "menulist" ], + invalid_values: [] + }, + "-moz-background-inline-policy": { + domProp: "MozBackgroundInlinePolicy", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "continuous" ], + other_values: ["bounding-box", "each-box" ], + invalid_values: [] + }, + "-moz-binding": { + domProp: "MozBinding", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(foo.xml)" ], + invalid_values: [] + }, + "-moz-border-bottom-colors": { + domProp: "MozBorderBottomColors", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], + invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + }, + "-moz-border-end": { + domProp: "MozBorderEnd", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 green none" ] + }, + "-moz-border-end-color": { + domProp: "MozBorderEndColor", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + initial_values: [ "currentColor" ], + other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ] + }, + "-moz-border-end-style": { + domProp: "MozBorderEndStyle", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "-moz-border-end-width": { + domProp: "MozBorderEndWidth", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + prerequisites: { "-moz-border-end-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%", "5" ] + }, + "border-image": { + domProp: "borderImage", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], + initial_values: [ "none" ], + other_values: [ "url('border.png') 27 27 27 27", + "url('border.png') 27", + "stretch url('border.png')", + "url('border.png') 27 fill", + "url('border.png') 27 27 27 27 repeat", + "repeat url('border.png') 27 27 27 27", + "url('border.png') repeat 27 27 27 27", + "url('border.png') fill 27 27 27 27 repeat", + "url('border.png') 27 27 27 27 / 1em", + "27 27 27 27 / 1em url('border.png') ", + "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat", + "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')", + "url('border.png') 27 27 27 27 / / 10 10 1em", + "fill 27 27 27 27 / / 10 10 1em url('border.png')", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ], + invalid_values: [ "url('border.png') 27 27 27 27 27", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em", + "url('border.png') 27 27 27 27 /", + "url('border.png') fill", + "url('border.png') fill repeat", + "fill repeat", + "url('border.png') fill / 1em", + "url('border.png') / repeat", + "url('border.png') 1 /", + "url('border.png') 1 / /", + "1 / url('border.png')", + "url('border.png') / 1", + "url('border.png') / / 1"] + }, + "border-image-source": { + domProp: "borderImageSource", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + "url('border.png')" + ].concat(validGradientAndElementValues), + invalid_values: [ + "url('border.png') url('border.png')", + ].concat(invalidGradientAndElementValues), + unbalanced_values: [ + ].concat(unbalancedGradientAndElementValues) + }, + "border-image-slice": { + domProp: "borderImageSlice", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "100%", "100% 100% 100% 100%" ], + other_values: [ "0%", "10", "10 100% 0 2", "0 0 0 0", "fill 10 10", "10 10 fill" ], + invalid_values: [ "-10%", "-10", "10 10 10 10 10", "10 10 10 10 -10", "10px", "-10px", "fill", "fill fill 10px", "10px fill fill" ] + }, + "border-image-width": { + domProp: "borderImageWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "1 1 1 1" ], + other_values: [ "0", "0%", "0px", "auto auto auto auto", "10 10% auto 15px", "10px 10px 10px 10px", "10", "10 10", "10 10 10" ], + invalid_values: [ "-10", "-10px", "-10%", "10 10 10 10 10", "10 10 10 10 auto", "auto auto auto auto auto" ] + }, + "border-image-outset": { + domProp: "borderImageOutset", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0 0 0 0" ], + other_values: [ "10px", "10", "10 10", "10 10 10", "10 10 10 10", "10px 10 10 10px" ], + invalid_values: [ "-10", "-10px", "-10%", "10%", "10 10 10 10 10" ] + }, + "border-image-repeat": { + domProp: "borderImageRepeat", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "stretch", "stretch stretch" ], + other_values: [ "round", "repeat", "stretch round", "repeat round", "stretch repeat", "round round", "repeat repeat" ], + invalid_values: [ "none", "stretch stretch stretch", "0", "10", "0%", "0px" ] + }, + "-moz-border-left-colors": { + domProp: "MozBorderLeftColors", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], + invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + }, + "border-radius": { + domProp: "borderRadius", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ], + initial_values: [ "0", "0px", "0%", "0px 0 0 0px", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ], + other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular + "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + "2px 2px calc(2px + 1%) 2px", + "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px", + ], + invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ] + }, + "border-bottom-left-radius": { + domProp: "borderBottomLeftRadius", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "border-bottom-right-radius": { + domProp: "borderBottomRightRadius", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "border-top-left-radius": { + domProp: "borderTopLeftRadius", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "border-top-right-radius": { + domProp: "borderTopRightRadius", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "-moz-border-right-colors": { + domProp: "MozBorderRightColors", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], + invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + }, + "-moz-border-start": { + domProp: "MozBorderStart", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 green solid" ] + }, + "-moz-border-start-color": { + domProp: "MozBorderStartColor", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + initial_values: [ "currentColor" ], + other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ] + }, + "-moz-border-start-style": { + domProp: "MozBorderStartStyle", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "-moz-border-start-width": { + domProp: "MozBorderStartWidth", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + prerequisites: { "-moz-border-start-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%", "5" ] + }, + "-moz-border-top-colors": { + domProp: "MozBorderTopColors", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], + invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + }, + "-moz-box-align": { + domProp: "MozBoxAlign", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "stretch" ], + other_values: [ "start", "center", "baseline", "end" ], + invalid_values: [] + }, + "-moz-box-direction": { + domProp: "MozBoxDirection", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "reverse" ], + invalid_values: [] + }, + "-moz-box-flex": { + domProp: "MozBoxFlex", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0.0", "-0.0" ], + other_values: [ "1", "100", "0.1" ], + invalid_values: [ "10px", "-1" ] + }, + "-moz-box-ordinal-group": { + domProp: "MozBoxOrdinalGroup", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1" ], + other_values: [ "2", "100", "0" ], + invalid_values: [ "1.0", "-1", "-1000" ] + }, + "-moz-box-orient": { + domProp: "MozBoxOrient", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "horizontal", "inline-axis" ], + other_values: [ "vertical", "block-axis" ], + invalid_values: [] + }, + "-moz-box-pack": { + domProp: "MozBoxPack", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "start" ], + other_values: [ "center", "end", "justify" ], + invalid_values: [] + }, + "box-sizing": { + domProp: "boxSizing", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "content-box" ], + other_values: [ "border-box", "padding-box" ], + invalid_values: [ "margin-box", "content", "padding", "border", "margin" ] + }, + "-moz-box-sizing": { + domProp: "MozBoxSizing", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "box-sizing", + subproperties: [ "box-sizing" ], + initial_values: [ "content-box" ], + other_values: [ "border-box", "padding-box" ], + invalid_values: [ "margin-box", "content", "padding", "border", "margin" ] + }, + "-moz-columns": { + domProp: "MozColumns", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "-moz-column-count", "-moz-column-width" ], + initial_values: [ "auto", "auto auto" ], + other_values: [ "3", "20px", "2 10px", "10px 2", "2 auto", "auto 2", "auto 50px", "50px auto" ], + invalid_values: [ "5%", "-1px", "-1", "3 5", "10px 4px", "10 2px 5in", "30px -1", + "auto 3 5px", "5 auto 20px", "auto auto auto" ] + }, + "-moz-column-count": { + domProp: "MozColumnCount", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "1", "17" ], + // negative and zero invalid per editor's draft + invalid_values: [ "-1", "0", "3px" ] + }, "-moz-column-fill": { domProp: "MozColumnFill", inherited: false, @@ -1055,3308 +1063,3308 @@ var gCSSProperties = { other_values: [ "auto" ], invalid_values: [ "2px", "dotted", "5em" ] }, - "-moz-column-gap": { - domProp: "MozColumnGap", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal", "1em", "calc(-2em + 3em)" ], - other_values: [ "2px", "4em", - "calc(2px)", - "calc(-2px)", - "calc(0px)", - "calc(0pt)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "3%", "-1px", "4" ] - }, - "-moz-column-rule": { - domProp: "MozColumnRule", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "color": "green" }, - subproperties: [ "-moz-column-rule-width", "-moz-column-rule-style", "-moz-column-rule-color" ], - initial_values: [ "medium none currentColor", "none", "medium", "currentColor" ], - other_values: [ "2px blue solid", "red dotted 1px", "ridge 4px orange", "5px solid" ], - invalid_values: [ "2px 3px 4px red", "dotted dashed", "5px dashed green 3px", "5 solid", "5 green solid" ] - }, - "-moz-column-rule-width": { - domProp: "MozColumnRuleWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "-moz-column-rule-style": "solid" }, - initial_values: [ - "medium", - "3px", - "-moz-calc(3px)", - "-moz-calc(5em + 3px - 5em)", - "calc(3px)", - "calc(5em + 3px - 5em)", - ], - other_values: [ "thin", "15px", - /* valid -moz-calc() values */ - "-moz-calc(-2px)", - "-moz-calc(2px)", - "-moz-calc(3em)", - "-moz-calc(3em + 2px)", - "-moz-calc( 3em + 2px)", - "-moz-calc(3em + 2px )", - "-moz-calc( 3em + 2px )", - "-moz-calc(3*25px)", - "-moz-calc(3 *25px)", - "-moz-calc(3 * 25px)", - "-moz-calc(3* 25px)", - "-moz-calc(25px*3)", - "-moz-calc(25px *3)", - "-moz-calc(25px* 3)", - "-moz-calc(25px * 3)", - "-moz-calc(25px * 3 / 4)", - "-moz-calc((25px * 3) / 4)", - "-moz-calc(25px * (3 / 4))", - "-moz-calc(3 * 25px / 4)", - "-moz-calc((3 * 25px) / 4)", - "-moz-calc(3 * (25px / 4))", - "-moz-calc(3em + 25px * 3 / 4)", - "-moz-calc(3em + (25px * 3) / 4)", - "-moz-calc(3em + 25px * (3 / 4))", - "-moz-calc(25px * 3 / 4 + 3em)", - "-moz-calc((25px * 3) / 4 + 3em)", - "-moz-calc(25px * (3 / 4) + 3em)", - "-moz-calc(3em + (25px * 3 / 4))", - "-moz-calc(3em + ((25px * 3) / 4))", - "-moz-calc(3em + (25px * (3 / 4)))", - "-moz-calc((25px * 3 / 4) + 3em)", - "-moz-calc(((25px * 3) / 4) + 3em)", - "-moz-calc((25px * (3 / 4)) + 3em)", - "-moz-calc(3*25px + 1in)", - "-moz-calc(1in - 3em + 2px)", - "-moz-calc(1in - (3em + 2px))", - "-moz-calc((1in - 3em) + 2px)", - "-moz-calc(50px/2)", - "-moz-calc(50px/(2 - 1))", - "-moz-calc(-3px)", - /* numeric reduction cases */ - "-moz-calc(5 * 3 * 2em)", - "-moz-calc(2em * 5 * 3)", - "-moz-calc((5 * 3) * 2em)", - "-moz-calc(2em * (5 * 3))", - "-moz-calc((5 + 3) * 2em)", - "-moz-calc(2em * (5 + 3))", - "-moz-calc(2em / (5 + 3))", - "-moz-calc(2em * (5*2 + 3))", - "-moz-calc(2em * ((5*2) + 3))", - "-moz-calc(2em * (5*(2 + 3)))", + "-moz-column-gap": { + domProp: "MozColumnGap", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal", "1em", "calc(-2em + 3em)" ], + other_values: [ "2px", "4em", + "calc(2px)", + "calc(-2px)", + "calc(0px)", + "calc(0pt)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "3%", "-1px", "4" ] + }, + "-moz-column-rule": { + domProp: "MozColumnRule", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + prerequisites: { "color": "green" }, + subproperties: [ "-moz-column-rule-width", "-moz-column-rule-style", "-moz-column-rule-color" ], + initial_values: [ "medium none currentColor", "none", "medium", "currentColor" ], + other_values: [ "2px blue solid", "red dotted 1px", "ridge 4px orange", "5px solid" ], + invalid_values: [ "2px 3px 4px red", "dotted dashed", "5px dashed green 3px", "5 solid", "5 green solid" ] + }, + "-moz-column-rule-width": { + domProp: "MozColumnRuleWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "-moz-column-rule-style": "solid" }, + initial_values: [ + "medium", + "3px", + "-moz-calc(3px)", + "-moz-calc(5em + 3px - 5em)", + "calc(3px)", + "calc(5em + 3px - 5em)", + ], + other_values: [ "thin", "15px", + /* valid -moz-calc() values */ + "-moz-calc(-2px)", + "-moz-calc(2px)", + "-moz-calc(3em)", + "-moz-calc(3em + 2px)", + "-moz-calc( 3em + 2px)", + "-moz-calc(3em + 2px )", + "-moz-calc( 3em + 2px )", + "-moz-calc(3*25px)", + "-moz-calc(3 *25px)", + "-moz-calc(3 * 25px)", + "-moz-calc(3* 25px)", + "-moz-calc(25px*3)", + "-moz-calc(25px *3)", + "-moz-calc(25px* 3)", + "-moz-calc(25px * 3)", + "-moz-calc(25px * 3 / 4)", + "-moz-calc((25px * 3) / 4)", + "-moz-calc(25px * (3 / 4))", + "-moz-calc(3 * 25px / 4)", + "-moz-calc((3 * 25px) / 4)", + "-moz-calc(3 * (25px / 4))", + "-moz-calc(3em + 25px * 3 / 4)", + "-moz-calc(3em + (25px * 3) / 4)", + "-moz-calc(3em + 25px * (3 / 4))", + "-moz-calc(25px * 3 / 4 + 3em)", + "-moz-calc((25px * 3) / 4 + 3em)", + "-moz-calc(25px * (3 / 4) + 3em)", + "-moz-calc(3em + (25px * 3 / 4))", + "-moz-calc(3em + ((25px * 3) / 4))", + "-moz-calc(3em + (25px * (3 / 4)))", + "-moz-calc((25px * 3 / 4) + 3em)", + "-moz-calc(((25px * 3) / 4) + 3em)", + "-moz-calc((25px * (3 / 4)) + 3em)", + "-moz-calc(3*25px + 1in)", + "-moz-calc(1in - 3em + 2px)", + "-moz-calc(1in - (3em + 2px))", + "-moz-calc((1in - 3em) + 2px)", + "-moz-calc(50px/2)", + "-moz-calc(50px/(2 - 1))", + "-moz-calc(-3px)", + /* numeric reduction cases */ + "-moz-calc(5 * 3 * 2em)", + "-moz-calc(2em * 5 * 3)", + "-moz-calc((5 * 3) * 2em)", + "-moz-calc(2em * (5 * 3))", + "-moz-calc((5 + 3) * 2em)", + "-moz-calc(2em * (5 + 3))", + "-moz-calc(2em / (5 + 3))", + "-moz-calc(2em * (5*2 + 3))", + "-moz-calc(2em * ((5*2) + 3))", + "-moz-calc(2em * (5*(2 + 3)))", - "-moz-calc((5 + 7) * 3em)", - "-moz-calc((5em + 3em) - 2em)", - "-moz-calc((5em - 3em) + 2em)", - "-moz-calc(2em - (5em - 3em))", - "-moz-calc(2em + (5em - 3em))", - "-moz-calc(2em - (5em + 3em))", - "-moz-calc(2em + (5em + 3em))", - "-moz-calc(2em + 5em - 3em)", - "-moz-calc(2em - 5em - 3em)", - "-moz-calc(2em + 5em + 3em)", - "-moz-calc(2em - 5em + 3em)", + "-moz-calc((5 + 7) * 3em)", + "-moz-calc((5em + 3em) - 2em)", + "-moz-calc((5em - 3em) + 2em)", + "-moz-calc(2em - (5em - 3em))", + "-moz-calc(2em + (5em - 3em))", + "-moz-calc(2em - (5em + 3em))", + "-moz-calc(2em + (5em + 3em))", + "-moz-calc(2em + 5em - 3em)", + "-moz-calc(2em - 5em - 3em)", + "-moz-calc(2em + 5em + 3em)", + "-moz-calc(2em - 5em + 3em)", - "-moz-calc(2em / 4 * 3)", - "-moz-calc(2em * 4 / 3)", - "-moz-calc(2em * 4 * 3)", - "-moz-calc(2em / 4 / 3)", - "-moz-calc(4 * 2em / 3)", - "-moz-calc(4 / 3 * 2em)", + "-moz-calc(2em / 4 * 3)", + "-moz-calc(2em * 4 / 3)", + "-moz-calc(2em * 4 * 3)", + "-moz-calc(2em / 4 / 3)", + "-moz-calc(4 * 2em / 3)", + "-moz-calc(4 / 3 * 2em)", - "-moz-calc((2em / 4) * 3)", - "-moz-calc((2em * 4) / 3)", - "-moz-calc((2em * 4) * 3)", - "-moz-calc((2em / 4) / 3)", - "-moz-calc((4 * 2em) / 3)", - "-moz-calc((4 / 3) * 2em)", + "-moz-calc((2em / 4) * 3)", + "-moz-calc((2em * 4) / 3)", + "-moz-calc((2em * 4) * 3)", + "-moz-calc((2em / 4) / 3)", + "-moz-calc((4 * 2em) / 3)", + "-moz-calc((4 / 3) * 2em)", - "-moz-calc(2em / (4 * 3))", - "-moz-calc(2em * (4 / 3))", - "-moz-calc(2em * (4 * 3))", - "-moz-calc(2em / (4 / 3))", - "-moz-calc(4 * (2em / 3))", + "-moz-calc(2em / (4 * 3))", + "-moz-calc(2em * (4 / 3))", + "-moz-calc(2em * (4 * 3))", + "-moz-calc(2em / (4 / 3))", + "-moz-calc(4 * (2em / 3))", - // Valid cases with unitless zero (which is never - // a length). - "-moz-calc(0 * 2em)", - "-moz-calc(2em * 0)", - "-moz-calc(3em + 0 * 2em)", - "-moz-calc(3em + 2em * 0)", - "-moz-calc((0 + 2) * 2em)", - "-moz-calc((2 + 0) * 2em)", - // And test zero lengths while we're here. - "-moz-calc(2 * 0px)", - "-moz-calc(0 * 0px)", - "-moz-calc(2 * 0em)", - "-moz-calc(0 * 0em)", - "-moz-calc(0px * 0)", - "-moz-calc(0px * 2)", + // Valid cases with unitless zero (which is never + // a length). + "-moz-calc(0 * 2em)", + "-moz-calc(2em * 0)", + "-moz-calc(3em + 0 * 2em)", + "-moz-calc(3em + 2em * 0)", + "-moz-calc((0 + 2) * 2em)", + "-moz-calc((2 + 0) * 2em)", + // And test zero lengths while we're here. + "-moz-calc(2 * 0px)", + "-moz-calc(0 * 0px)", + "-moz-calc(2 * 0em)", + "-moz-calc(0 * 0em)", + "-moz-calc(0px * 0)", + "-moz-calc(0px * 2)", - /* valid calc() values */ - "calc(-2px)", - "calc(2px)", - "calc(3em)", - "calc(3em + 2px)", - "calc( 3em + 2px)", - "calc(3em + 2px )", - "calc( 3em + 2px )", - "calc(3*25px)", - "calc(3 *25px)", - "calc(3 * 25px)", - "calc(3* 25px)", - "calc(25px*3)", - "calc(25px *3)", - "calc(25px* 3)", - "calc(25px * 3)", - "calc(25px * 3 / 4)", - "calc((25px * 3) / 4)", - "calc(25px * (3 / 4))", - "calc(3 * 25px / 4)", - "calc((3 * 25px) / 4)", - "calc(3 * (25px / 4))", - "calc(3em + 25px * 3 / 4)", - "calc(3em + (25px * 3) / 4)", - "calc(3em + 25px * (3 / 4))", - "calc(25px * 3 / 4 + 3em)", - "calc((25px * 3) / 4 + 3em)", - "calc(25px * (3 / 4) + 3em)", - "calc(3em + (25px * 3 / 4))", - "calc(3em + ((25px * 3) / 4))", - "calc(3em + (25px * (3 / 4)))", - "calc((25px * 3 / 4) + 3em)", - "calc(((25px * 3) / 4) + 3em)", - "calc((25px * (3 / 4)) + 3em)", - "calc(3*25px + 1in)", - "calc(1in - 3em + 2px)", - "calc(1in - (3em + 2px))", - "calc((1in - 3em) + 2px)", - "calc(50px/2)", - "calc(50px/(2 - 1))", - "calc(-3px)", - /* numeric reduction cases */ - "calc(5 * 3 * 2em)", - "calc(2em * 5 * 3)", - "calc((5 * 3) * 2em)", - "calc(2em * (5 * 3))", - "calc((5 + 3) * 2em)", - "calc(2em * (5 + 3))", - "calc(2em / (5 + 3))", - "calc(2em * (5*2 + 3))", - "calc(2em * ((5*2) + 3))", - "calc(2em * (5*(2 + 3)))", + /* valid calc() values */ + "calc(-2px)", + "calc(2px)", + "calc(3em)", + "calc(3em + 2px)", + "calc( 3em + 2px)", + "calc(3em + 2px )", + "calc( 3em + 2px )", + "calc(3*25px)", + "calc(3 *25px)", + "calc(3 * 25px)", + "calc(3* 25px)", + "calc(25px*3)", + "calc(25px *3)", + "calc(25px* 3)", + "calc(25px * 3)", + "calc(25px * 3 / 4)", + "calc((25px * 3) / 4)", + "calc(25px * (3 / 4))", + "calc(3 * 25px / 4)", + "calc((3 * 25px) / 4)", + "calc(3 * (25px / 4))", + "calc(3em + 25px * 3 / 4)", + "calc(3em + (25px * 3) / 4)", + "calc(3em + 25px * (3 / 4))", + "calc(25px * 3 / 4 + 3em)", + "calc((25px * 3) / 4 + 3em)", + "calc(25px * (3 / 4) + 3em)", + "calc(3em + (25px * 3 / 4))", + "calc(3em + ((25px * 3) / 4))", + "calc(3em + (25px * (3 / 4)))", + "calc((25px * 3 / 4) + 3em)", + "calc(((25px * 3) / 4) + 3em)", + "calc((25px * (3 / 4)) + 3em)", + "calc(3*25px + 1in)", + "calc(1in - 3em + 2px)", + "calc(1in - (3em + 2px))", + "calc((1in - 3em) + 2px)", + "calc(50px/2)", + "calc(50px/(2 - 1))", + "calc(-3px)", + /* numeric reduction cases */ + "calc(5 * 3 * 2em)", + "calc(2em * 5 * 3)", + "calc((5 * 3) * 2em)", + "calc(2em * (5 * 3))", + "calc((5 + 3) * 2em)", + "calc(2em * (5 + 3))", + "calc(2em / (5 + 3))", + "calc(2em * (5*2 + 3))", + "calc(2em * ((5*2) + 3))", + "calc(2em * (5*(2 + 3)))", - "calc((5 + 7) * 3em)", - "calc((5em + 3em) - 2em)", - "calc((5em - 3em) + 2em)", - "calc(2em - (5em - 3em))", - "calc(2em + (5em - 3em))", - "calc(2em - (5em + 3em))", - "calc(2em + (5em + 3em))", - "calc(2em + 5em - 3em)", - "calc(2em - 5em - 3em)", - "calc(2em + 5em + 3em)", - "calc(2em - 5em + 3em)", + "calc((5 + 7) * 3em)", + "calc((5em + 3em) - 2em)", + "calc((5em - 3em) + 2em)", + "calc(2em - (5em - 3em))", + "calc(2em + (5em - 3em))", + "calc(2em - (5em + 3em))", + "calc(2em + (5em + 3em))", + "calc(2em + 5em - 3em)", + "calc(2em - 5em - 3em)", + "calc(2em + 5em + 3em)", + "calc(2em - 5em + 3em)", - "calc(2em / 4 * 3)", - "calc(2em * 4 / 3)", - "calc(2em * 4 * 3)", - "calc(2em / 4 / 3)", - "calc(4 * 2em / 3)", - "calc(4 / 3 * 2em)", + "calc(2em / 4 * 3)", + "calc(2em * 4 / 3)", + "calc(2em * 4 * 3)", + "calc(2em / 4 / 3)", + "calc(4 * 2em / 3)", + "calc(4 / 3 * 2em)", - "calc((2em / 4) * 3)", - "calc((2em * 4) / 3)", - "calc((2em * 4) * 3)", - "calc((2em / 4) / 3)", - "calc((4 * 2em) / 3)", - "calc((4 / 3) * 2em)", + "calc((2em / 4) * 3)", + "calc((2em * 4) / 3)", + "calc((2em * 4) * 3)", + "calc((2em / 4) / 3)", + "calc((4 * 2em) / 3)", + "calc((4 / 3) * 2em)", - "calc(2em / (4 * 3))", - "calc(2em * (4 / 3))", - "calc(2em * (4 * 3))", - "calc(2em / (4 / 3))", - "calc(4 * (2em / 3))", + "calc(2em / (4 * 3))", + "calc(2em * (4 / 3))", + "calc(2em * (4 * 3))", + "calc(2em / (4 / 3))", + "calc(4 * (2em / 3))", - // Valid cases with unitless zero (which is never - // a length). - "calc(0 * 2em)", - "calc(2em * 0)", - "calc(3em + 0 * 2em)", - "calc(3em + 2em * 0)", - "calc((0 + 2) * 2em)", - "calc((2 + 0) * 2em)", - // And test zero lengths while we're here. - "calc(2 * 0px)", - "calc(0 * 0px)", - "calc(2 * 0em)", - "calc(0 * 0em)", - "calc(0px * 0)", - "calc(0px * 2)", + // Valid cases with unitless zero (which is never + // a length). + "calc(0 * 2em)", + "calc(2em * 0)", + "calc(3em + 0 * 2em)", + "calc(3em + 2em * 0)", + "calc((0 + 2) * 2em)", + "calc((2 + 0) * 2em)", + // And test zero lengths while we're here. + "calc(2 * 0px)", + "calc(0 * 0px)", + "calc(2 * 0em)", + "calc(0 * 0em)", + "calc(0px * 0)", + "calc(0px * 2)", - ], - invalid_values: [ "20", "-1px", "red", "50%", - /* invalid -moz-calc() values */ - "-moz-calc(2em+ 2px)", - "-moz-calc(2em +2px)", - "-moz-calc(2em+2px)", - "-moz-calc(2em- 2px)", - "-moz-calc(2em -2px)", - "-moz-calc(2em-2px)", - /* invalid calc() values */ - "calc(2em+ 2px)", - "calc(2em +2px)", - "calc(2em+2px)", - "calc(2em- 2px)", - "calc(2em -2px)", - "calc(2em-2px)", - "-moz-min()", - "calc(min())", - "-moz-max()", - "calc(max())", - "-moz-min(5px)", - "calc(min(5px))", - "-moz-max(5px)", - "calc(max(5px))", - "-moz-min(5px,2em)", - "calc(min(5px,2em))", - "-moz-max(5px,2em)", - "calc(max(5px,2em))", - "calc(50px/(2 - 2))", - "calc(5 + 5)", - "calc(5 * 5)", - "calc(5em * 5em)", - "calc(5em / 5em * 5em)", + ], + invalid_values: [ "20", "-1px", "red", "50%", + /* invalid -moz-calc() values */ + "-moz-calc(2em+ 2px)", + "-moz-calc(2em +2px)", + "-moz-calc(2em+2px)", + "-moz-calc(2em- 2px)", + "-moz-calc(2em -2px)", + "-moz-calc(2em-2px)", + /* invalid calc() values */ + "calc(2em+ 2px)", + "calc(2em +2px)", + "calc(2em+2px)", + "calc(2em- 2px)", + "calc(2em -2px)", + "calc(2em-2px)", + "-moz-min()", + "calc(min())", + "-moz-max()", + "calc(max())", + "-moz-min(5px)", + "calc(min(5px))", + "-moz-max(5px)", + "calc(max(5px))", + "-moz-min(5px,2em)", + "calc(min(5px,2em))", + "-moz-max(5px,2em)", + "calc(max(5px,2em))", + "calc(50px/(2 - 2))", + "calc(5 + 5)", + "calc(5 * 5)", + "calc(5em * 5em)", + "calc(5em / 5em * 5em)", - "calc(4 * 3 / 2em)", - "calc((4 * 3) / 2em)", - "calc(4 * (3 / 2em))", - "calc(4 / (3 * 2em))", + "calc(4 * 3 / 2em)", + "calc((4 * 3) / 2em)", + "calc(4 * (3 / 2em))", + "calc(4 / (3 * 2em))", - // Tests for handling of unitless zero, which cannot - // be a length inside calc(). - "calc(0)", - "calc(0 + 2em)", - "calc(2em + 0)", - "calc(0 * 2)", - "calc(2 * 0)", - "calc(1 * (2em + 0))", - "calc((2em + 0))", - "calc((2em + 0) * 1)", - "calc(1 * (0 + 2em))", - "calc((0 + 2em))", - "calc((0 + 2em) * 1)", - ] - }, - "-moz-column-rule-style": { - domProp: "MozColumnRuleStyle", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "solid", "hidden", "ridge", "groove", "inset", "outset", "double", "dotted", "dashed" ], - invalid_values: [ "20", "foo" ] - }, - "-moz-column-rule-color": { - domProp: "MozColumnRuleColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "green" }, - initial_values: [ "currentColor", "-moz-use-text-color" ], - other_values: [ "red", "blue", "#ffff00" ], - invalid_values: [ "ffff00" ] - }, - "-moz-column-width": { - domProp: "MozColumnWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ - "15px", - "calc(15px)", - "calc(30px - 3em)", - "calc(-15px)", - "0px", - "calc(0px)" - ], - invalid_values: [ "20", "-1px", "50%" ] - }, - "-moz-float-edge": { - domProp: "MozFloatEdge", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "content-box" ], - other_values: [ "margin-box" ], - invalid_values: [ "content", "padding", "border", "margin" ] - }, - "-moz-force-broken-image-icon": { - domProp: "MozForceBrokenImageIcon", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0" ], - other_values: [ "1" ], - invalid_values: [] - }, - "-moz-image-region": { - domProp: "MozImageRegion", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "rect(3px 20px 15px 4px)", "rect(17px, 21px, 33px, 2px)" ], - invalid_values: [ "rect(17px, 21px, 33, 2px)" ] - }, - "-moz-margin-end": { - domProp: "MozMarginEnd", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* no subproperties */ - /* auto may or may not be initial */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "3em", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "-moz-margin-start": { - domProp: "MozMarginStart", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* no subproperties */ - /* auto may or may not be initial */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "3em", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "-moz-outline-radius": { - domProp: "MozOutlineRadius", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - subproperties: [ "-moz-outline-radius-bottomleft", "-moz-outline-radius-bottomright", "-moz-outline-radius-topleft", "-moz-outline-radius-topright" ], - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ], - other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular - "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - "2px 2px calc(2px + 1%) 2px", - "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px", - ], - invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ] - }, - "-moz-outline-radius-bottomleft": { - domProp: "MozOutlineRadiusBottomleft", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "-moz-outline-radius-bottomright": { - domProp: "MozOutlineRadiusBottomright", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "-moz-outline-radius-topleft": { - domProp: "MozOutlineRadiusTopleft", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "-moz-outline-radius-topright": { - domProp: "MozOutlineRadiusTopright", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], - other_values: [ "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] - }, - "-moz-padding-end": { - domProp: "MozPaddingEnd", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* no subproperties */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "3em", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "-moz-padding-start": { - domProp: "MozPaddingStart", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - get_computed: logical_box_prop_get_computed, - /* no subproperties */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "3em", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "resize": { - domProp: "resize", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block", "overflow": "auto" }, - initial_values: [ "none" ], - other_values: [ "both", "horizontal", "vertical" ], - invalid_values: [] - }, - "-moz-stack-sizing": { - domProp: "MozStackSizing", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch-to-fit" ], - other_values: [ "ignore" ], - invalid_values: [] - }, - "-moz-tab-size": { - domProp: "MozTabSize", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "8" ], - other_values: [ "0", "3", "99", "12000" ], - invalid_values: [ "-1", "-808", "3.0", "17.5" ] - }, - "-moz-text-size-adjust": { - domProp: "MozTextSizeAdjust", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none" ], - invalid_values: [ "-5%", "0", "100", "0%", "50%", "100%", "220.3%" ] - }, - "transform": { - domProp: "transform", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "300px", "height": "50px" }, - initial_values: [ "none" ], - other_values: [ "translatex(1px)", "translatex(4em)", - "translatex(-4px)", "translatex(3px)", - "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", - "translatey(4em)", "translate(3px)", "translate(10px, -3px)", - "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", - "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", - "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", - "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", - "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", - "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", - "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", - "translatex(50%)", "translatey(50%)", "translate(50%)", - "translate(3%, 5px)", "translate(5px, 3%)", - "matrix(1, 2, 3, 4, 5, 6)", - /* valid calc() values */ - "translatex(calc(5px + 10%))", - "translatey(calc(0.25 * 5px + 10% / 3))", - "translate(calc(5px - 10% * 3))", - "translate(calc(5px - 3 * 10%), 50px)", - "translate(-50px, calc(5px - 10% * 3))", - "translatez(1px)", "translatez(4em)", "translatez(-4px)", - "translatez(0px)", "translatez(2px) translatez(5px)", - "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", - "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", - "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", - "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", - "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", - "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", - ], - invalid_values: ["1px", "#0000ff", "red", "auto", - "translatex(1)", "translatey(1)", "translate(2)", - "translate(-3, -4)", - "translatex(1px 1px)", "translatex(translatex(1px))", - "translatex(#0000ff)", "translatex(red)", "translatey()", - "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", - "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", - "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", - "matrix(0, 1, 2, 3%, 4%, 5%)", "matrix(1, 2, 3, 4, 5px, 6%)", - "matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)", - "matrix(1, 2, 3, 4, 5px, 6em)", - /* invalid calc() values */ - "translatey(-moz-min(5px,10%))", - "translatex(-moz-max(5px,10%))", - "translate(10px, calc(min(5px,10%)))", - "translate(calc(max(5px,10%)), 10%)", - "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))", - "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", - "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)" - ], - }, - "transform-origin": { - domProp: "transformOrigin", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* no subproperties */ - prerequisites: { "width": "10px", "height": "10px", "display": "block"}, - initial_values: [ "50% 50%", "center", "center center" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", - "top", "bottom","top left", "top right", - "top center", "center left", "center right", - "bottom left", "bottom right", "bottom center", - "20% center", "6px center", "13in bottom", - "left 50px", "right 13%", "center 40px", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)", - "6px 5px 5px", - "top center 10px" - ], - invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff", - "border", "center red", "right diagonal", - "#00ffff bottom"] - }, - "perspective-origin": { - domProp: "perspectiveOrigin", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* no subproperties */ - prerequisites: { "width": "10px", "height": "10px", "display": "block"}, - initial_values: [ "50% 50%", "center", "center center" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", - "top", "bottom","top left", "top right", - "top center", "center left", "center right", - "bottom left", "bottom right", "bottom center", - "20% center", "6px center", "13in bottom", - "left 50px", "right 13%", "center 40px", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)" ], - invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff", - "border", "center red", "right diagonal", - "#00ffff bottom"] - }, - "perspective": { - domProp: "perspective", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "1000px", "500.2px" ], - invalid_values: [ "pants", "200", "0", "-100px", "-27.2em", "0px" ] - }, - "backface-visibility": { - domProp: "backfaceVisibility", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "visible" ], - other_values: [ "hidden" ], - invalid_values: [ "collapse" ] - }, - "transform-style": { - domProp: "transformStyle", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "flat" ], - other_values: [ "preserve-3d" ], - invalid_values: [] - }, - "-moz-user-focus": { - domProp: "MozUserFocus", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "normal", "ignore", "select-all", "select-before", "select-after", "select-same", "select-menu" ], - invalid_values: [] - }, - "-moz-user-input": { - domProp: "MozUserInput", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none", "enabled", "disabled" ], - invalid_values: [] - }, - "-moz-user-modify": { - domProp: "MozUserModify", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "read-only" ], - other_values: [ "read-write", "write-only" ], - invalid_values: [] - }, - "-moz-user-select": { - domProp: "MozUserSelect", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none", "text", "element", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ], - invalid_values: [] - }, - "-moz-window-shadow": { - domProp: "MozWindowShadow", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "default" ], - other_values: [ "none", "menu", "tooltip", "sheet" ], - invalid_values: [] - }, - "background": { - domProp: "background", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "background-attachment", "background-color", "background-image", "background-position", "background-repeat", "background-clip", "background-origin", "background-size" ], - initial_values: [ "transparent", "none", "repeat", "scroll", "0% 0%", "top left", "left top", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto", - "transparent none", "top left none", "left top none", "none left top", "none top left", "none 0% 0%", "left top / auto none", "left top / auto auto none", - "transparent none repeat scroll top left", "left top repeat none scroll transparent", "transparent none repeat scroll top left / auto", "left top / auto repeat none scroll transparent", "none repeat scroll 0% 0% / auto auto transparent" ], - other_values: [ - /* without multiple backgrounds */ - "green", - "none green repeat scroll left top", - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", - "repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') transparent left top scroll", - "repeat-x", - "repeat-y", - "no-repeat", - "none repeat-y transparent scroll 0% 0%", - "fixed", - "0% top transparent fixed repeat none", - "top", - "left", - "50% 50%", - "center", - "top / 100px", - "left / contain", - "left / cover", - "10px / 10%", - "10em / calc(20px)", - "top left / 100px 100px", - "top left / 100px auto", - "top left / 100px 10%", - "top left / 100px calc(20px)", - "bottom right scroll none transparent repeat", - "50% transparent", - "transparent 50%", - "50%", - "-moz-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat", - "-moz-linear-gradient(10px 10px -45deg, red, blue) repeat", - "-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat", - "-moz-repeating-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat", - "-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat", - "-moz-element(#test) lime", - /* multiple backgrounds */ - "url(404.png), url(404.png)", - "url(404.png), url(404.png) transparent", - "url(404.png), url(404.png) red", - "repeat-x, fixed, none", - "0% top url(404.png), url(404.png) 0% top", - "fixed repeat-y top left url(404.png), repeat-x green", - "url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) black", - "top left / contain, bottom right / cover", - /* test cases with clip+origin in the shorthand */ - "url(404.png) green padding-box", - "url(404.png) border-box transparent", - "content-box url(404.png) blue", - "url(404.png) green padding-box padding-box", - "url(404.png) green padding-box border-box", - "content-box border-box url(404.png) blue", - ], - invalid_values: [ - /* mixes with keywords have to be in correct order */ - "50% left", "top 50%", - /* no quirks mode colors */ - "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat", - /* no quirks mode lengths */ - "-moz-linear-gradient(10 10px -45deg, red, blue) repeat", - "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", - "linear-gradient(red -99, yellow, green, blue 120%)", - /* bug 258080: don't accept background-position separated */ - "left url(404.png) top", "top url(404.png) left", - /* not allowed to have color in non-bottom layer */ - "url(404.png) transparent, url(404.png)", - "url(404.png) red, url(404.png)", - "url(404.png) transparent, url(404.png) transparent", - "url(404.png) transparent red, url(404.png) transparent red", - "url(404.png) red, url(404.png) red", - "url(404.png) rgba(0, 0, 0, 0), url(404.png)", - "url(404.png) rgb(255, 0, 0), url(404.png)", - "url(404.png) rgba(0, 0, 0, 0), url(404.png) rgba(0, 0, 0, 0)", - "url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0), url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0)", - "url(404.png) rgb(255, 0, 0), url(404.png) rgb(255, 0, 0)", - /* bug 513395: old syntax for gradients */ - "-moz-radial-gradient(10% bottom, 30px, 20px 20px, 10px, from(#ffffff), to(black)) scroll no-repeat", - "-moz-linear-gradient(10px 10px, 20px 20px, from(red), to(blue)) repeat", - /* clip and origin separated in the shorthand */ - "url(404.png) padding-box green border-box", - "url(404.png) padding-box green padding-box", - "transparent padding-box url(404.png) border-box", - "transparent padding-box url(404.png) padding-box", - ] - }, - "background-attachment": { - domProp: "backgroundAttachment", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "scroll" ], - other_values: [ "fixed", "local", "scroll,scroll", "fixed, scroll", "scroll, fixed, local, scroll", "fixed, fixed" ], - invalid_values: [] - }, - "background-clip": { - /* - * When we rename this to 'background-clip', we also - * need to rename the values to match the spec. - */ - domProp: "backgroundClip", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "border-box" ], - other_values: [ "content-box", "padding-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], - invalid_values: [ "margin-box", "border-box border-box" ] - }, - "background-color": { - domProp: "backgroundColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "transparent", "rgba(255, 127, 15, 0)", "hsla(240, 97%, 50%, 0.0)", "rgba(0, 0, 0, 0)", "rgba(255,255,255,-3.7)" ], - other_values: [ "green", "rgb(255, 0, 128)", "#fc2", "#96ed2a", "black", "rgba(255,255,0,3)", "hsl(240, 50%, 50%)", "rgb(50%, 50%, 50%)", "-moz-default-background-color" ], - invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "rgb(100, 100.0, 100)" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "background-image": { - domProp: "backgroundImage", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - "none, none", - "none, none, none, none, none", - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", - "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", - ].concat(validGradientAndElementValues), - invalid_values: [ - ].concat(invalidGradientAndElementValues), - unbalanced_values: [ - ].concat(unbalancedGradientAndElementValues) - }, - "background-origin": { - domProp: "backgroundOrigin", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "padding-box" ], - other_values: [ "border-box", "content-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], - invalid_values: [ "margin-box", "padding-box padding-box" ] - }, - "background-position": { - domProp: "backgroundPosition", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "top 0% left 0%", "top 0% left", "top left", "left top", "0% 0%", "0% top", "left 0%" ], - other_values: [ "top", "left", "right", "bottom", "center", "center bottom", "bottom center", "center right", "right center", "center top", "top center", "center left", "left center", "right bottom", "bottom right", "50%", "top left, top left", "top left, top right", "top right, top left", "left top, 0% 0%", "10% 20%, 30%, 40%", "top left, bottom right", "right bottom, left top", "0%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)", - "0px 0px", - "right 20px top 60px", - "right 20px bottom 60px", - "left 20px top 60px", - "left 20px bottom 60px", - "right -50px top -50px", - "left -50px bottom -50px", - "right 20px top -50px", - "right -20px top 50px", - "right 3em bottom 10px", - "bottom 3em right 10px", - "top 3em right 10px", - "left 15px", - "10px top", - "left top 15px", - "left 10px top", - "left 20%", - "right 20%" - ], - invalid_values: [ "center 10px center 4px", "center 10px center", - "top 20%", "bottom 20%", "50% left", "top 50%", - "50% bottom 10%", "right 10% 50%", "left right", - "top bottom", "left 10% right", - "top 20px bottom 20px", "left left", "20 20" ] - }, - "background-repeat": { - domProp: "backgroundRepeat", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "repeat", "repeat repeat" ], - other_values: [ "repeat-x", "repeat-y", "no-repeat", - "repeat-x, repeat-x", - "repeat, no-repeat", - "repeat-y, no-repeat, repeat-y", - "repeat, repeat, repeat", - "repeat no-repeat", - "no-repeat repeat", - "no-repeat no-repeat", - "repeat repeat, repeat repeat", - ], - invalid_values: [ "repeat repeat repeat", - "repeat-x repeat-y", - "repeat repeat-x", - "repeat repeat-y", - "repeat-x repeat", - "repeat-y repeat" ] - }, - "background-size": { - domProp: "backgroundSize", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto", "auto auto" ], - other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)" - ], - invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3" ] - }, - "border": { - domProp: "border", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-right-color", "border-right-style", "border-right-width", "border-top-color", "border-top-style", "border-top-width", "-moz-border-top-colors", "-moz-border-right-colors", "-moz-border-bottom-colors", "-moz-border-left-colors", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor", "calc(4px - 1px) none" ], - other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid", "calc(2px) solid blue" ], - invalid_values: [ "5%", "medium solid ff00ff", "5 solid green" ] - }, - "border-bottom": { - domProp: "borderBottom", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] - }, - "border-bottom-color": { - domProp: "borderBottomColor", - 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" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "border-bottom-style": { - domProp: "borderBottomStyle", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "border-bottom-width": { - domProp: "borderBottomWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "border-bottom-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, - }, - "border-collapse": { - domProp: "borderCollapse", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "separate" ], - other_values: [ "collapse" ], - invalid_values: [] - }, - "border-color": { - domProp: "borderColor", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-color", "border-right-color", "border-bottom-color", "border-left-color" ], - initial_values: [ "currentColor", "currentColor currentColor", "currentColor currentColor currentColor", "currentColor currentColor currentcolor CURRENTcolor" ], - other_values: [ "green", "currentColor green", "currentColor currentColor green", "currentColor currentColor currentColor green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "border-left": { - domProp: "borderLeft", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-left-color", "border-left-style", "border-left-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] - }, - "border-left-color": { - domProp: "borderLeftColor", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_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" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "border-left-style": { - domProp: "borderLeftStyle", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "border-left-width": { - domProp: "borderLeftWidth", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - prerequisites: { "border-left-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, - }, - "border-right": { - domProp: "borderRight", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-right-color", "border-right-style", "border-right-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] - }, - "border-right-color": { - domProp: "borderRightColor", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_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" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "border-right-style": { - domProp: "borderRightStyle", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "border-right-width": { - domProp: "borderRightWidth", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - prerequisites: { "border-right-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, - }, - "border-spacing": { - domProp: "borderSpacing", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0 0", "0px", "0 0px", "calc(0px)", "calc(0px) calc(0em)", "calc(2em - 2em) calc(3px + 7px - 10px)", "calc(-5px)", "calc(-5px) calc(-5px)" ], - other_values: [ "3px", "4em 2px", "4em 0", "0px 2px", "calc(7px)", "0 calc(7px)", "calc(7px) 0", "calc(0px) calc(7px)", "calc(7px) calc(0px)", "7px calc(0px)", "calc(0px) 7px", "7px calc(0px)", "3px calc(2em)" ], - invalid_values: [ "0%", "0 0%", "-5px", "-5px -5px", "0 -5px", "-5px 0" ] - }, - "border-style": { - domProp: "borderStyle", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-style", "border-right-style", "border-bottom-style", "border-left-style" ], - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none", "none none", "none none none", "none none none none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge", "none solid", "none none solid", "none none none solid", "groove none none none", "none ridge none none", "none none double none", "none none none dotted" ], - invalid_values: [] - }, - "border-top": { - domProp: "borderTop", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-color", "border-top-style", "border-top-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] - }, - "border-top-color": { - domProp: "borderTopColor", - 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" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, - }, - "border-top-style": { - domProp: "borderTopStyle", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "border-top-width": { - domProp: "borderTopWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "border-top-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0em)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, - }, - "border-width": { - domProp: "borderWidth", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-width", "border-right-width", "border-bottom-width", "border-left-width" ], - prerequisites: { "border-style": "solid" }, - initial_values: [ "medium", "3px", "medium medium", "3px medium medium", "medium 3px medium medium", "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)" ], - other_values: [ "thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)" ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, - }, - "bottom": { - domProp: "bottom", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, - /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "box-shadow": { - domProp: "boxShadow", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - prerequisites: { "color": "blue" }, - other_values: [ "2px 2px", "2px 2px 1px", "2px 2px 2px 2px", "blue 3px 2px", "2px 2px 1px 5px green", "2px 2px red", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange", "3px 0 0 0", "inset 2px 2px 3px 4px black", "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px", - /* calc() values */ - "2px 2px calc(-5px)", /* clamped */ - "calc(3em - 2px) 2px green", - "green calc(3em - 2px) 2px", - "2px calc(2px + 0.2em)", - "blue 2px calc(2px + 0.2em)", - "2px calc(2px + 0.2em) blue", - "calc(-2px) calc(-2px)", - "-2px -2px", - "calc(2px) calc(2px)", - "calc(2px) calc(2px) calc(2px)", - "calc(2px) calc(2px) calc(2px) calc(2px)" - ], - invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none", "3 3", "3px 3", "3 3px", "3px 3px 3", "3px 3px 3px 3" ] - }, - "caption-side": { - domProp: "captionSide", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "top" ], - other_values: [ "right", "left", "bottom", "top-outside", "bottom-outside" ], - invalid_values: [] - }, - "clear": { - domProp: "clear", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "left", "right", "both" ], - invalid_values: [] - }, - "clip": { - domProp: "clip", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "rect(0 0 0 0)", "rect(auto,auto,auto,auto)", "rect(3px, 4px, 4em, 0)", "rect(auto, 3em, 4pt, 2px)", "rect(2px 3px 4px 5px)" ], - invalid_values: [ "rect(auto, 3em, 2%, 5px)" ], - quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" }, - }, - "color": { - domProp: "color", - inherited: true, - type: CSS_TYPE_LONGHAND, - /* XXX should test currentColor, but may or may not be initial */ - initial_values: [ "black", "#000", "-moz-default-color" ], - other_values: [ "green", "#f3c", "#fed292", "rgba(45,300,12,2)", "transparent", "-moz-nativehyperlinktext", "rgba(255,128,0,0.5)" ], - invalid_values: [ "#f", "#ff", "#ffff", "#fffff", "#fffffff", "#ffffffff", "#fffffffff" ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a", "fff": "#ffffff", "ffffff": "#ffffff", }, - }, - "content": { - domProp: "content", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX needs to be on pseudo-elements */ - initial_values: [ "normal", "none" ], - other_values: [ '""', "''", '"hello"', "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'counter(foo)', 'counter(bar, upper-roman)', 'counters(foo, ".")', "counters(bar, '-', lower-greek)", "'-' counter(foo) '.'", "attr(title)", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "close-quote attr(title) counters(foo, '.', upper-alpha)", "counter(foo, none)", "counters(bar, '.', none)", "attr(\\32)", "attr(\\2)", "attr(-\\2)", "attr(-\\32)", "counter(\\2)", "counters(\\32, '.')", "counter(-\\32, upper-roman)", "counters(-\\2, '-', lower-greek)", "counter(\\()", "counters(a\\+b, '.')", "counter(\\}, upper-alpha)", "-moz-alt-content" ], - invalid_values: [ 'counters(foo)', 'counter(foo, ".")', 'attr("title")', "attr('title')", "attr(2)", "attr(-2)", "counter(2)", "counters(-2, '.')", "-moz-alt-content 'foo'", "'foo' -moz-alt-content" ] - }, - "counter-increment": { - domProp: "counterIncrement", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ], - invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ], - unbalanced_values: [ "foo 1 (" ] - }, - "counter-reset": { - domProp: "counterReset", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ], - invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ] - }, - "cursor": { - domProp: "cursor", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress", "copy", "alias", "context-menu", "cell", "not-allowed", "col-resize", "row-resize", "no-drop", "vertical-text", "all-scroll", "nesw-resize", "nwse-resize", "ns-resize", "ew-resize", "none", "grab", "grabbing", "zoom-in", "zoom-out", "-moz-grab", "-moz-grabbing", "-moz-zoom-in", "-moz-zoom-out", "url(foo.png), move", "url(foo.png) 5 7, move", "url(foo.png) 12 3, url(bar.png), no-drop", "url(foo.png), url(bar.png) 7 2, wait", "url(foo.png) 3 2, url(bar.png) 7 9, pointer" ], - invalid_values: [ "url(foo.png)", "url(foo.png) 5 5" ] - }, - "direction": { - domProp: "direction", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "ltr" ], - other_values: [ "rtl" ], - invalid_values: [] - }, - "display": { - domProp: "display", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "inline" ], - /* XXX none will really mess with other properties */ - prerequisites: { "float": "none", "position": "static" }, - other_values: [ - "block", - "flex", - "inline-flex", - "list-item", - "inline-block", - "table", - "inline-table", - "table-row-group", - "table-header-group", - "table-footer-group", - "table-row", - "table-column-group", - "table-column", - "table-cell", - "table-caption", - "none" - ], - invalid_values: [] - }, - "empty-cells": { - domProp: "emptyCells", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "show" ], - other_values: [ "hide", "-moz-show-background" ], - invalid_values: [] - }, - "float": { - domProp: "cssFloat", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "left", "right" ], - invalid_values: [] - }, - "font": { - domProp: "font", - inherited: true, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch", "font-size-adjust", "-moz-font-feature-settings", "-moz-font-language-override" ], - initial_values: [ (gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif") ], - other_values: [ "large serif", "9px fantasy", "bold italic small-caps 24px/1.4 Times New Roman, serif", "small inherit roman", "small roman inherit", - // system fonts - "caption", "icon", "menu", "message-box", "small-caption", "status-bar", - // Gecko-specific system fonts - "-moz-window", "-moz-document", "-moz-desktop", "-moz-info", "-moz-dialog", "-moz-button", "-moz-pull-down-menu", "-moz-list", "-moz-field", "-moz-workspace", - ], - invalid_values: [ "9 fantasy", "-2px fantasy" ] - }, - "font-family": { - domProp: "fontFamily", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ (gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif") ], - other_values: [ (gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif"), "Times New Roman, serif", "'Times New Roman', serif", "cursive", "fantasy", "\\\"Times New Roman", "\"Times New Roman\"", "Times, \\\"Times New Roman", "Times, \"Times New Roman\"", "-no-such-font-installed", "inherit roman", "roman inherit", "Times, inherit roman", "inherit roman, Times", "roman inherit, Times", "Times, roman inherit" ], - invalid_values: [ "\"Times New\" Roman", "\"Times New Roman\n", "Times, \"Times New Roman\n" ] - }, - "-moz-font-feature-settings": { - domProp: "MozFontFeatureSettings", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ - "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", - "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', - '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', - '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', - '"liga" ,"smcp" 0 , "blah"' - ], - invalid_values: [ - 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', - 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", - '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', - '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' - ] - }, - "-moz-font-language-override": { - domProp: "MozFontLanguageOverride", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], - invalid_values: [ "TRK", "ja" ] - }, - "font-size": { - domProp: "fontSize", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "medium", - "1rem", - "calc(1rem)", - "calc(0.75rem + 200% - 125% + 0.25rem - 75%)" - ], - other_values: [ "large", "2em", "50%", "xx-small", "36pt", "8px", "larger", "smaller", - "0px", - "0%", - "calc(2em)", - "calc(36pt + 75% + (30% + 2em + 2px))", - "calc(-2em)", - "calc(-50%)", - "calc(-1px)" - ], - invalid_values: [ "-2em", "-50%", "-1px" ], - quirks_values: { "5": "5px" }, - }, - "font-size-adjust": { - domProp: "fontSizeAdjust", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "0.3", "0.5", "0.7" ], - invalid_values: [] - }, - "font-stretch": { - domProp: "fontStretch", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" ], - invalid_values: [ "narrower", "wider" ] - }, - "font-style": { - domProp: "fontStyle", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "italic", "oblique" ], - invalid_values: [] - }, - "font-variant": { - domProp: "fontVariant", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "small-caps" ], - invalid_values: [ "small-caps normal" ] - }, - "font-weight": { - domProp: "fontWeight", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal", "400" ], - other_values: [ "bold", "100", "200", "300", "500", "600", "700", "800", "900", "bolder", "lighter" ], - invalid_values: [ "0", "100.0", "107", "399", "401", "699", "710", "1000" ] - }, - "height": { - domProp: "height", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* FIXME: test zero, and test calc clamping */ - initial_values: [ " auto" ], - /* computed value tests for height test more with display:block */ - prerequisites: { "display": "block" }, - other_values: [ "15px", "3em", "15%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ], - quirks_values: { "5": "5px" }, - }, - "ime-mode": { - domProp: "imeMode", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "normal", "disabled", "active", "inactive" ], - invalid_values: [ "none", "enabled", "1px" ] - }, - "left": { - domProp: "left", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, - /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "letter-spacing": { - domProp: "letterSpacing", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "0", "0px", "1em", "2px", "-3px", - "calc(0px)", "calc(1em)", "calc(1em + 3px)", - "calc(15px / 2)", "calc(15px/2)", "calc(-3px)" - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "line-height": { - domProp: "lineHeight", - inherited: true, - type: CSS_TYPE_LONGHAND, - /* - * Inheritance tests require consistent font size, since - * getComputedStyle (which uses the CSS2 computed value, or - * CSS2.1 used value) doesn't match what the CSS2.1 computed - * value is. And they even require consistent font metrics for - * computation of 'normal'. -moz-block-height requires height - * on a block. - */ - prerequisites: { "font-size": "19px", "font-size-adjust": "none", "font-family": "serif", "font-weight": "normal", "font-style": "normal", "height": "18px", "display": "block"}, - initial_values: [ "normal" ], - other_values: [ "1.0", "1", "1em", "47px", "-moz-block-height" ], - invalid_values: [] - }, - "list-style": { - domProp: "listStyle", - inherited: true, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "list-style-type", "list-style-position", "list-style-image" ], - initial_values: [ "outside", "disc", "disc outside", "outside disc", "disc none", "none disc", "none disc outside", "none outside disc", "disc none outside", "disc outside none", "outside none disc", "outside disc none" ], - other_values: [ "inside none", "none inside", "none none inside", "square", "none", "none none", "outside none none", "none outside none", "none none outside", "none outside", "outside none", - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none', - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside', - 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - 'outside none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none', - 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside', - 'none outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside none', - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside' - ], - invalid_values: [ "outside outside", "disc disc", "unknown value", "none none none", "none disc url(404.png)", "none url(404.png) disc", "disc none url(404.png)", "disc url(404.png) none", "url(404.png) none disc", "url(404.png) disc none", "none disc outside url(404.png)" ] - }, - "list-style-image": { - domProp: "listStyleImage", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - // Add some tests for interesting url() values here to test serialization, etc. - "url(\'data:text/plain,\"\')", - "url(\"data:text/plain,\'\")", - "url(\'data:text/plain,\\\'\')", - "url(\"data:text/plain,\\\"\")", - "url(\'data:text/plain,\\\"\')", - "url(\"data:text/plain,\\\'\")", - "url(data:text/plain,\\\\)", - ], - invalid_values: [] - }, - "list-style-position": { - domProp: "listStylePosition", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "outside" ], - other_values: [ "inside" ], - invalid_values: [] - }, - "list-style-type": { - domProp: "listStyleType", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "disc" ], - other_values: [ "none", "circle", "square", - "decimal", "decimal-leading-zero", - "lower-roman", "upper-roman", "lower-greek", - "lower-alpha", "lower-latin", "upper-alpha", "upper-latin", - "hebrew", "armenian", "georgian", - "cjk-decimal", "cjk-ideographic", - "hiragana", "katakana", "hiragana-iroha", "katakana-iroha", - "japanese-informal", "japanese-formal", "korean-hangul-formal", - "korean-hanja-informal", "korean-hanja-formal", - "simp-chinese-informal", "simp-chinese-formal", - "trad-chinese-informal", "trad-chinese-formal", - "-moz-cjk-heavenly-stem", "-moz-cjk-earthly-branch", - "-moz-trad-chinese-informal", "-moz-trad-chinese-formal", - "-moz-simp-chinese-informal", "-moz-simp-chinese-formal", - "-moz-japanese-informal", "-moz-japanese-formal", - "-moz-arabic-indic", "-moz-persian", "-moz-urdu", - "-moz-devanagari", "-moz-gurmukhi", "-moz-gujarati", - "-moz-oriya", "-moz-kannada", "-moz-malayalam", "-moz-bengali", - "-moz-tamil", "-moz-telugu", "-moz-thai", "-moz-lao", - "-moz-myanmar", "-moz-khmer", - "-moz-hangul", "-moz-hangul-consonant", - "-moz-ethiopic-halehame", "-moz-ethiopic-numeric", - "-moz-ethiopic-halehame-am", - "-moz-ethiopic-halehame-ti-er", "-moz-ethiopic-halehame-ti-et" - ], - invalid_values: [] - }, - "margin": { - domProp: "margin", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "margin-top", "margin-right", "margin-bottom", "margin-left" ], - initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt" ], - other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ], - invalid_values: [], - quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, - }, - "margin-bottom": { - domProp: "marginBottom", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "margin-left": { - domProp: "marginLeft", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* no subproperties */ - /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", ".5px", "+32px", "+.789px", "-.328px", "+0.56px", "-0.974px", "237px", "-289px", "-056px", "1987.45px", "-84.32px", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], - quirks_values: { "5": "5px" }, - }, - "margin-right": { - domProp: "marginRight", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* no subproperties */ - /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "margin-top": { - domProp: "marginTop", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "marker-offset": { - domProp: "markerOffset", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "6em", "-1px", "calc(0px)", "calc(3em + 2px - 4px)", "calc(-2em)" ], - invalid_values: [] - }, - "marks": { - /* XXX not a real property; applies only to page context */ - domProp: "marks", - inherited: false, - backend_only: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "crop", "cross", "crop cross", "cross crop" ], - invalid_values: [ "none none", "crop none", "none crop", "cross none", "none cross" ] - }, - "max-height": { - domProp: "maxHeight", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "none" ], - other_values: [ "30px", "50%", "0", - "calc(2px)", - "calc(-2px)", - "calc(0px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "auto", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ] - }, - "max-width": { - domProp: "maxWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "none" ], - other_values: [ "30px", "50%", "0", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", - "calc(2px)", - "calc(-2px)", - "calc(0px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "auto", "5" ] - }, - "min-height": { - domProp: "minHeight", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ], - other_values: [ "30px", "50%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "auto", "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ] - }, - "min-width": { - domProp: "minWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ], - other_values: [ "30px", "50%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "auto", "none", "5" ] - }, + // Tests for handling of unitless zero, which cannot + // be a length inside calc(). + "calc(0)", + "calc(0 + 2em)", + "calc(2em + 0)", + "calc(0 * 2)", + "calc(2 * 0)", + "calc(1 * (2em + 0))", + "calc((2em + 0))", + "calc((2em + 0) * 1)", + "calc(1 * (0 + 2em))", + "calc((0 + 2em))", + "calc((0 + 2em) * 1)", + ] + }, + "-moz-column-rule-style": { + domProp: "MozColumnRuleStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "solid", "hidden", "ridge", "groove", "inset", "outset", "double", "dotted", "dashed" ], + invalid_values: [ "20", "foo" ] + }, + "-moz-column-rule-color": { + domProp: "MozColumnRuleColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "green" }, + initial_values: [ "currentColor", "-moz-use-text-color" ], + other_values: [ "red", "blue", "#ffff00" ], + invalid_values: [ "ffff00" ] + }, + "-moz-column-width": { + domProp: "MozColumnWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ + "15px", + "calc(15px)", + "calc(30px - 3em)", + "calc(-15px)", + "0px", + "calc(0px)" + ], + invalid_values: [ "20", "-1px", "50%" ] + }, + "-moz-float-edge": { + domProp: "MozFloatEdge", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "content-box" ], + other_values: [ "margin-box" ], + invalid_values: [ "content", "padding", "border", "margin" ] + }, + "-moz-force-broken-image-icon": { + domProp: "MozForceBrokenImageIcon", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0" ], + other_values: [ "1" ], + invalid_values: [] + }, + "-moz-image-region": { + domProp: "MozImageRegion", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "rect(3px 20px 15px 4px)", "rect(17px, 21px, 33px, 2px)" ], + invalid_values: [ "rect(17px, 21px, 33, 2px)" ] + }, + "-moz-margin-end": { + domProp: "MozMarginEnd", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* no subproperties */ + /* auto may or may not be initial */ + initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "3em", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "-moz-margin-start": { + domProp: "MozMarginStart", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* no subproperties */ + /* auto may or may not be initial */ + initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "3em", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "-moz-outline-radius": { + domProp: "MozOutlineRadius", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + subproperties: [ "-moz-outline-radius-bottomleft", "-moz-outline-radius-bottomright", "-moz-outline-radius-topleft", "-moz-outline-radius-topright" ], + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ], + other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular + "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + "2px 2px calc(2px + 1%) 2px", + "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px", + ], + invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ] + }, + "-moz-outline-radius-bottomleft": { + domProp: "MozOutlineRadiusBottomleft", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "-moz-outline-radius-bottomright": { + domProp: "MozOutlineRadiusBottomright", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "-moz-outline-radius-topleft": { + domProp: "MozOutlineRadiusTopleft", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "-moz-outline-radius-topright": { + domProp: "MozOutlineRadiusTopright", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, + initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ], + other_values: [ "3%", "1px", "2em", // circular + "3% 2%", "1px 4px", "2em 2pt", // elliptical + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + }, + "-moz-padding-end": { + domProp: "MozPaddingEnd", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* no subproperties */ + initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "3em", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "-moz-padding-start": { + domProp: "MozPaddingStart", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + get_computed: logical_box_prop_get_computed, + /* no subproperties */ + initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "3em", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "resize": { + domProp: "resize", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block", "overflow": "auto" }, + initial_values: [ "none" ], + other_values: [ "both", "horizontal", "vertical" ], + invalid_values: [] + }, + "-moz-stack-sizing": { + domProp: "MozStackSizing", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "stretch-to-fit" ], + other_values: [ "ignore" ], + invalid_values: [] + }, + "-moz-tab-size": { + domProp: "MozTabSize", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "8" ], + other_values: [ "0", "3", "99", "12000" ], + invalid_values: [ "-1", "-808", "3.0", "17.5" ] + }, + "-moz-text-size-adjust": { + domProp: "MozTextSizeAdjust", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "none" ], + invalid_values: [ "-5%", "0", "100", "0%", "50%", "100%", "220.3%" ] + }, + "transform": { + domProp: "transform", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "width": "300px", "height": "50px" }, + initial_values: [ "none" ], + other_values: [ "translatex(1px)", "translatex(4em)", + "translatex(-4px)", "translatex(3px)", + "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", + "translatey(4em)", "translate(3px)", "translate(10px, -3px)", + "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", + "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", + "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", + "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", + "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", + "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", + "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", + "translatex(50%)", "translatey(50%)", "translate(50%)", + "translate(3%, 5px)", "translate(5px, 3%)", + "matrix(1, 2, 3, 4, 5, 6)", + /* valid calc() values */ + "translatex(calc(5px + 10%))", + "translatey(calc(0.25 * 5px + 10% / 3))", + "translate(calc(5px - 10% * 3))", + "translate(calc(5px - 3 * 10%), 50px)", + "translate(-50px, calc(5px - 10% * 3))", + "translatez(1px)", "translatez(4em)", "translatez(-4px)", + "translatez(0px)", "translatez(2px) translatez(5px)", + "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", + "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", + "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", + "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", + "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", + "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", + ], + invalid_values: ["1px", "#0000ff", "red", "auto", + "translatex(1)", "translatey(1)", "translate(2)", + "translate(-3, -4)", + "translatex(1px 1px)", "translatex(translatex(1px))", + "translatex(#0000ff)", "translatex(red)", "translatey()", + "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", + "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", + "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", + "matrix(0, 1, 2, 3%, 4%, 5%)", "matrix(1, 2, 3, 4, 5px, 6%)", + "matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)", + "matrix(1, 2, 3, 4, 5px, 6em)", + /* invalid calc() values */ + "translatey(-moz-min(5px,10%))", + "translatex(-moz-max(5px,10%))", + "translate(10px, calc(min(5px,10%)))", + "translate(calc(max(5px,10%)), 10%)", + "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))", + "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", + "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)" + ], + }, + "transform-origin": { + domProp: "transformOrigin", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* no subproperties */ + prerequisites: { "width": "10px", "height": "10px", "display": "block"}, + initial_values: [ "50% 50%", "center", "center center" ], + other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", + "top", "bottom","top left", "top right", + "top center", "center left", "center right", + "bottom left", "bottom right", "bottom center", + "20% center", "6px center", "13in bottom", + "left 50px", "right 13%", "center 40px", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)", + "6px 5px 5px", + "top center 10px" + ], + invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff", + "border", "center red", "right diagonal", + "#00ffff bottom"] + }, + "perspective-origin": { + domProp: "perspectiveOrigin", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* no subproperties */ + prerequisites: { "width": "10px", "height": "10px", "display": "block"}, + initial_values: [ "50% 50%", "center", "center center" ], + other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", + "top", "bottom","top left", "top right", + "top center", "center left", "center right", + "bottom left", "bottom right", "bottom center", + "20% center", "6px center", "13in bottom", + "left 50px", "right 13%", "center 40px", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)" ], + invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff", + "border", "center red", "right diagonal", + "#00ffff bottom"] + }, + "perspective": { + domProp: "perspective", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "1000px", "500.2px" ], + invalid_values: [ "pants", "200", "0", "-100px", "-27.2em", "0px" ] + }, + "backface-visibility": { + domProp: "backfaceVisibility", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "visible" ], + other_values: [ "hidden" ], + invalid_values: [ "collapse" ] + }, + "transform-style": { + domProp: "transformStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "flat" ], + other_values: [ "preserve-3d" ], + invalid_values: [] + }, + "-moz-user-focus": { + domProp: "MozUserFocus", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "normal", "ignore", "select-all", "select-before", "select-after", "select-same", "select-menu" ], + invalid_values: [] + }, + "-moz-user-input": { + domProp: "MozUserInput", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "none", "enabled", "disabled" ], + invalid_values: [] + }, + "-moz-user-modify": { + domProp: "MozUserModify", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "read-only" ], + other_values: [ "read-write", "write-only" ], + invalid_values: [] + }, + "-moz-user-select": { + domProp: "MozUserSelect", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "none", "text", "element", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ], + invalid_values: [] + }, + "-moz-window-shadow": { + domProp: "MozWindowShadow", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "default" ], + other_values: [ "none", "menu", "tooltip", "sheet" ], + invalid_values: [] + }, + "background": { + domProp: "background", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "background-attachment", "background-color", "background-image", "background-position", "background-repeat", "background-clip", "background-origin", "background-size" ], + initial_values: [ "transparent", "none", "repeat", "scroll", "0% 0%", "top left", "left top", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto", + "transparent none", "top left none", "left top none", "none left top", "none top left", "none 0% 0%", "left top / auto none", "left top / auto auto none", + "transparent none repeat scroll top left", "left top repeat none scroll transparent", "transparent none repeat scroll top left / auto", "left top / auto repeat none scroll transparent", "none repeat scroll 0% 0% / auto auto transparent" ], + other_values: [ + /* without multiple backgrounds */ + "green", + "none green repeat scroll left top", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", + "repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') transparent left top scroll", + "repeat-x", + "repeat-y", + "no-repeat", + "none repeat-y transparent scroll 0% 0%", + "fixed", + "0% top transparent fixed repeat none", + "top", + "left", + "50% 50%", + "center", + "top / 100px", + "left / contain", + "left / cover", + "10px / 10%", + "10em / calc(20px)", + "top left / 100px 100px", + "top left / 100px auto", + "top left / 100px 10%", + "top left / 100px calc(20px)", + "bottom right scroll none transparent repeat", + "50% transparent", + "transparent 50%", + "50%", + "-moz-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat", + "-moz-linear-gradient(10px 10px -45deg, red, blue) repeat", + "-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat", + "-moz-repeating-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat", + "-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat", + "-moz-element(#test) lime", + /* multiple backgrounds */ + "url(404.png), url(404.png)", + "url(404.png), url(404.png) transparent", + "url(404.png), url(404.png) red", + "repeat-x, fixed, none", + "0% top url(404.png), url(404.png) 0% top", + "fixed repeat-y top left url(404.png), repeat-x green", + "url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) black", + "top left / contain, bottom right / cover", + /* test cases with clip+origin in the shorthand */ + "url(404.png) green padding-box", + "url(404.png) border-box transparent", + "content-box url(404.png) blue", + "url(404.png) green padding-box padding-box", + "url(404.png) green padding-box border-box", + "content-box border-box url(404.png) blue", + ], + invalid_values: [ + /* mixes with keywords have to be in correct order */ + "50% left", "top 50%", + /* no quirks mode colors */ + "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat", + /* no quirks mode lengths */ + "-moz-linear-gradient(10 10px -45deg, red, blue) repeat", + "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", + "linear-gradient(red -99, yellow, green, blue 120%)", + /* bug 258080: don't accept background-position separated */ + "left url(404.png) top", "top url(404.png) left", + /* not allowed to have color in non-bottom layer */ + "url(404.png) transparent, url(404.png)", + "url(404.png) red, url(404.png)", + "url(404.png) transparent, url(404.png) transparent", + "url(404.png) transparent red, url(404.png) transparent red", + "url(404.png) red, url(404.png) red", + "url(404.png) rgba(0, 0, 0, 0), url(404.png)", + "url(404.png) rgb(255, 0, 0), url(404.png)", + "url(404.png) rgba(0, 0, 0, 0), url(404.png) rgba(0, 0, 0, 0)", + "url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0), url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0)", + "url(404.png) rgb(255, 0, 0), url(404.png) rgb(255, 0, 0)", + /* bug 513395: old syntax for gradients */ + "-moz-radial-gradient(10% bottom, 30px, 20px 20px, 10px, from(#ffffff), to(black)) scroll no-repeat", + "-moz-linear-gradient(10px 10px, 20px 20px, from(red), to(blue)) repeat", + /* clip and origin separated in the shorthand */ + "url(404.png) padding-box green border-box", + "url(404.png) padding-box green padding-box", + "transparent padding-box url(404.png) border-box", + "transparent padding-box url(404.png) padding-box", + ] + }, + "background-attachment": { + domProp: "backgroundAttachment", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "scroll" ], + other_values: [ "fixed", "local", "scroll,scroll", "fixed, scroll", "scroll, fixed, local, scroll", "fixed, fixed" ], + invalid_values: [] + }, + "background-clip": { + /* + * When we rename this to 'background-clip', we also + * need to rename the values to match the spec. + */ + domProp: "backgroundClip", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "border-box" ], + other_values: [ "content-box", "padding-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], + invalid_values: [ "margin-box", "border-box border-box" ] + }, + "background-color": { + domProp: "backgroundColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "transparent", "rgba(255, 127, 15, 0)", "hsla(240, 97%, 50%, 0.0)", "rgba(0, 0, 0, 0)", "rgba(255,255,255,-3.7)" ], + other_values: [ "green", "rgb(255, 0, 128)", "#fc2", "#96ed2a", "black", "rgba(255,255,0,3)", "hsl(240, 50%, 50%)", "rgb(50%, 50%, 50%)", "-moz-default-background-color" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "rgb(100, 100.0, 100)" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "background-image": { + domProp: "backgroundImage", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + "none, none", + "none, none, none, none, none", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", + "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", + ].concat(validGradientAndElementValues), + invalid_values: [ + ].concat(invalidGradientAndElementValues), + unbalanced_values: [ + ].concat(unbalancedGradientAndElementValues) + }, + "background-origin": { + domProp: "backgroundOrigin", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "padding-box" ], + other_values: [ "border-box", "content-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], + invalid_values: [ "margin-box", "padding-box padding-box" ] + }, + "background-position": { + domProp: "backgroundPosition", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "top 0% left 0%", "top 0% left", "top left", "left top", "0% 0%", "0% top", "left 0%" ], + other_values: [ "top", "left", "right", "bottom", "center", "center bottom", "bottom center", "center right", "right center", "center top", "top center", "center left", "left center", "right bottom", "bottom right", "50%", "top left, top left", "top left, top right", "top right, top left", "left top, 0% 0%", "10% 20%, 30%, 40%", "top left, bottom right", "right bottom, left top", "0%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)", + "0px 0px", + "right 20px top 60px", + "right 20px bottom 60px", + "left 20px top 60px", + "left 20px bottom 60px", + "right -50px top -50px", + "left -50px bottom -50px", + "right 20px top -50px", + "right -20px top 50px", + "right 3em bottom 10px", + "bottom 3em right 10px", + "top 3em right 10px", + "left 15px", + "10px top", + "left top 15px", + "left 10px top", + "left 20%", + "right 20%" + ], + invalid_values: [ "center 10px center 4px", "center 10px center", + "top 20%", "bottom 20%", "50% left", "top 50%", + "50% bottom 10%", "right 10% 50%", "left right", + "top bottom", "left 10% right", + "top 20px bottom 20px", "left left", "20 20" ] + }, + "background-repeat": { + domProp: "backgroundRepeat", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "repeat", "repeat repeat" ], + other_values: [ "repeat-x", "repeat-y", "no-repeat", + "repeat-x, repeat-x", + "repeat, no-repeat", + "repeat-y, no-repeat, repeat-y", + "repeat, repeat, repeat", + "repeat no-repeat", + "no-repeat repeat", + "no-repeat no-repeat", + "repeat repeat, repeat repeat", + ], + invalid_values: [ "repeat repeat repeat", + "repeat-x repeat-y", + "repeat repeat-x", + "repeat repeat-y", + "repeat-x repeat", + "repeat-y repeat" ] + }, + "background-size": { + domProp: "backgroundSize", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto", "auto auto" ], + other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)" + ], + invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3" ] + }, + "border": { + domProp: "border", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-right-color", "border-right-style", "border-right-width", "border-top-color", "border-top-style", "border-top-width", "-moz-border-top-colors", "-moz-border-right-colors", "-moz-border-bottom-colors", "-moz-border-left-colors", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor", "calc(4px - 1px) none" ], + other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid", "calc(2px) solid blue" ], + invalid_values: [ "5%", "medium solid ff00ff", "5 solid green" ] + }, + "border-bottom": { + domProp: "borderBottom", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 solid green" ] + }, + "border-bottom-color": { + domProp: "borderBottomColor", + 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" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "border-bottom-style": { + domProp: "borderBottomStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "border-bottom-width": { + domProp: "borderBottomWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "border-bottom-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%" ], + quirks_values: { "5": "5px" }, + }, + "border-collapse": { + domProp: "borderCollapse", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "separate" ], + other_values: [ "collapse" ], + invalid_values: [] + }, + "border-color": { + domProp: "borderColor", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-top-color", "border-right-color", "border-bottom-color", "border-left-color" ], + initial_values: [ "currentColor", "currentColor currentColor", "currentColor currentColor currentColor", "currentColor currentColor currentcolor CURRENTcolor" ], + other_values: [ "green", "currentColor green", "currentColor currentColor green", "currentColor currentColor currentColor green", "rgba(255,128,0,0.5)", "transparent" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "border-left": { + domProp: "borderLeft", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-left-color", "border-left-style", "border-left-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 solid green" ] + }, + "border-left-color": { + domProp: "borderLeftColor", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_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" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "border-left-style": { + domProp: "borderLeftStyle", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "border-left-width": { + domProp: "borderLeftWidth", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + prerequisites: { "border-left-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%" ], + quirks_values: { "5": "5px" }, + }, + "border-right": { + domProp: "borderRight", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-right-color", "border-right-style", "border-right-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 solid green" ] + }, + "border-right-color": { + domProp: "borderRightColor", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_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" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "border-right-style": { + domProp: "borderRightStyle", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "border-right-width": { + domProp: "borderRightWidth", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + prerequisites: { "border-right-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%" ], + quirks_values: { "5": "5px" }, + }, + "border-spacing": { + domProp: "borderSpacing", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0 0", "0px", "0 0px", "calc(0px)", "calc(0px) calc(0em)", "calc(2em - 2em) calc(3px + 7px - 10px)", "calc(-5px)", "calc(-5px) calc(-5px)" ], + other_values: [ "3px", "4em 2px", "4em 0", "0px 2px", "calc(7px)", "0 calc(7px)", "calc(7px) 0", "calc(0px) calc(7px)", "calc(7px) calc(0px)", "7px calc(0px)", "calc(0px) 7px", "7px calc(0px)", "3px calc(2em)" ], + invalid_values: [ "0%", "0 0%", "-5px", "-5px -5px", "0 -5px", "-5px 0" ] + }, + "border-style": { + domProp: "borderStyle", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-top-style", "border-right-style", "border-bottom-style", "border-left-style" ], + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none", "none none", "none none none", "none none none none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge", "none solid", "none none solid", "none none none solid", "groove none none none", "none ridge none none", "none none double none", "none none none dotted" ], + invalid_values: [] + }, + "border-top": { + domProp: "borderTop", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-top-color", "border-top-style", "border-top-width" ], + initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], + other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], + invalid_values: [ "5%", "5", "5 solid green" ] + }, + "border-top-color": { + domProp: "borderTopColor", + 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" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, + }, + "border-top-style": { + domProp: "borderTopStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX hidden is sometimes the same as initial */ + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "border-top-width": { + domProp: "borderTopWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "border-top-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0em)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%" ], + quirks_values: { "5": "5px" }, + }, + "border-width": { + domProp: "borderWidth", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "border-top-width", "border-right-width", "border-bottom-width", "border-left-width" ], + prerequisites: { "border-style": "solid" }, + initial_values: [ "medium", "3px", "medium medium", "3px medium medium", "medium 3px medium medium", "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)" ], + other_values: [ "thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)" ], + invalid_values: [ "5%" ], + quirks_values: { "5": "5px" }, + }, + "bottom": { + domProp: "bottom", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* FIXME: run tests with multiple prerequisites */ + prerequisites: { "position": "relative" }, + /* XXX 0 may or may not be equal to auto */ + initial_values: [ "auto" ], + other_values: [ "32px", "-3em", "12%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "box-shadow": { + domProp: "boxShadow", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + prerequisites: { "color": "blue" }, + other_values: [ "2px 2px", "2px 2px 1px", "2px 2px 2px 2px", "blue 3px 2px", "2px 2px 1px 5px green", "2px 2px red", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange", "3px 0 0 0", "inset 2px 2px 3px 4px black", "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px", + /* calc() values */ + "2px 2px calc(-5px)", /* clamped */ + "calc(3em - 2px) 2px green", + "green calc(3em - 2px) 2px", + "2px calc(2px + 0.2em)", + "blue 2px calc(2px + 0.2em)", + "2px calc(2px + 0.2em) blue", + "calc(-2px) calc(-2px)", + "-2px -2px", + "calc(2px) calc(2px)", + "calc(2px) calc(2px) calc(2px)", + "calc(2px) calc(2px) calc(2px) calc(2px)" + ], + invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none", "3 3", "3px 3", "3 3px", "3px 3px 3", "3px 3px 3px 3" ] + }, + "caption-side": { + domProp: "captionSide", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "top" ], + other_values: [ "right", "left", "bottom", "top-outside", "bottom-outside" ], + invalid_values: [] + }, + "clear": { + domProp: "clear", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "left", "right", "both" ], + invalid_values: [] + }, + "clip": { + domProp: "clip", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "rect(0 0 0 0)", "rect(auto,auto,auto,auto)", "rect(3px, 4px, 4em, 0)", "rect(auto, 3em, 4pt, 2px)", "rect(2px 3px 4px 5px)" ], + invalid_values: [ "rect(auto, 3em, 2%, 5px)" ], + quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" }, + }, + "color": { + domProp: "color", + inherited: true, + type: CSS_TYPE_LONGHAND, + /* XXX should test currentColor, but may or may not be initial */ + initial_values: [ "black", "#000", "-moz-default-color" ], + other_values: [ "green", "#f3c", "#fed292", "rgba(45,300,12,2)", "transparent", "-moz-nativehyperlinktext", "rgba(255,128,0,0.5)" ], + invalid_values: [ "#f", "#ff", "#ffff", "#fffff", "#fffffff", "#ffffffff", "#fffffffff" ], + quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a", "fff": "#ffffff", "ffffff": "#ffffff", }, + }, + "content": { + domProp: "content", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX needs to be on pseudo-elements */ + initial_values: [ "normal", "none" ], + other_values: [ '""', "''", '"hello"', "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'counter(foo)', 'counter(bar, upper-roman)', 'counters(foo, ".")', "counters(bar, '-', lower-greek)", "'-' counter(foo) '.'", "attr(title)", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "close-quote attr(title) counters(foo, '.', upper-alpha)", "counter(foo, none)", "counters(bar, '.', none)", "attr(\\32)", "attr(\\2)", "attr(-\\2)", "attr(-\\32)", "counter(\\2)", "counters(\\32, '.')", "counter(-\\32, upper-roman)", "counters(-\\2, '-', lower-greek)", "counter(\\()", "counters(a\\+b, '.')", "counter(\\}, upper-alpha)", "-moz-alt-content" ], + invalid_values: [ 'counters(foo)', 'counter(foo, ".")', 'attr("title")', "attr('title')", "attr(2)", "attr(-2)", "counter(2)", "counters(-2, '.')", "-moz-alt-content 'foo'", "'foo' -moz-alt-content" ] + }, + "counter-increment": { + domProp: "counterIncrement", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ], + invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ], + unbalanced_values: [ "foo 1 (" ] + }, + "counter-reset": { + domProp: "counterReset", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ], + invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ] + }, + "cursor": { + domProp: "cursor", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress", "copy", "alias", "context-menu", "cell", "not-allowed", "col-resize", "row-resize", "no-drop", "vertical-text", "all-scroll", "nesw-resize", "nwse-resize", "ns-resize", "ew-resize", "none", "grab", "grabbing", "zoom-in", "zoom-out", "-moz-grab", "-moz-grabbing", "-moz-zoom-in", "-moz-zoom-out", "url(foo.png), move", "url(foo.png) 5 7, move", "url(foo.png) 12 3, url(bar.png), no-drop", "url(foo.png), url(bar.png) 7 2, wait", "url(foo.png) 3 2, url(bar.png) 7 9, pointer" ], + invalid_values: [ "url(foo.png)", "url(foo.png) 5 5" ] + }, + "direction": { + domProp: "direction", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "ltr" ], + other_values: [ "rtl" ], + invalid_values: [] + }, + "display": { + domProp: "display", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "inline" ], + /* XXX none will really mess with other properties */ + prerequisites: { "float": "none", "position": "static" }, + other_values: [ + "block", + "flex", + "inline-flex", + "list-item", + "inline-block", + "table", + "inline-table", + "table-row-group", + "table-header-group", + "table-footer-group", + "table-row", + "table-column-group", + "table-column", + "table-cell", + "table-caption", + "none" + ], + invalid_values: [] + }, + "empty-cells": { + domProp: "emptyCells", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "show" ], + other_values: [ "hide", "-moz-show-background" ], + invalid_values: [] + }, + "float": { + domProp: "cssFloat", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "left", "right" ], + invalid_values: [] + }, + "font": { + domProp: "font", + inherited: true, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch", "font-size-adjust", "-moz-font-feature-settings", "-moz-font-language-override" ], + initial_values: [ (gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif") ], + other_values: [ "large serif", "9px fantasy", "bold italic small-caps 24px/1.4 Times New Roman, serif", "small inherit roman", "small roman inherit", + // system fonts + "caption", "icon", "menu", "message-box", "small-caption", "status-bar", + // Gecko-specific system fonts + "-moz-window", "-moz-document", "-moz-desktop", "-moz-info", "-moz-dialog", "-moz-button", "-moz-pull-down-menu", "-moz-list", "-moz-field", "-moz-workspace", + ], + invalid_values: [ "9 fantasy", "-2px fantasy" ] + }, + "font-family": { + domProp: "fontFamily", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ (gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif") ], + other_values: [ (gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif"), "Times New Roman, serif", "'Times New Roman', serif", "cursive", "fantasy", "\\\"Times New Roman", "\"Times New Roman\"", "Times, \\\"Times New Roman", "Times, \"Times New Roman\"", "-no-such-font-installed", "inherit roman", "roman inherit", "Times, inherit roman", "inherit roman, Times", "roman inherit, Times", "Times, roman inherit" ], + invalid_values: [ "\"Times New\" Roman", "\"Times New Roman\n", "Times, \"Times New Roman\n" ] + }, + "-moz-font-feature-settings": { + domProp: "MozFontFeatureSettings", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ + "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", + "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', + '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', + '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', + '"liga" ,"smcp" 0 , "blah"' + ], + invalid_values: [ + 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', + 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", + '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', + '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' + ] + }, + "-moz-font-language-override": { + domProp: "MozFontLanguageOverride", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], + invalid_values: [ "TRK", "ja" ] + }, + "font-size": { + domProp: "fontSize", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "medium", + "1rem", + "calc(1rem)", + "calc(0.75rem + 200% - 125% + 0.25rem - 75%)" + ], + other_values: [ "large", "2em", "50%", "xx-small", "36pt", "8px", "larger", "smaller", + "0px", + "0%", + "calc(2em)", + "calc(36pt + 75% + (30% + 2em + 2px))", + "calc(-2em)", + "calc(-50%)", + "calc(-1px)" + ], + invalid_values: [ "-2em", "-50%", "-1px" ], + quirks_values: { "5": "5px" }, + }, + "font-size-adjust": { + domProp: "fontSizeAdjust", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "0.3", "0.5", "0.7" ], + invalid_values: [] + }, + "font-stretch": { + domProp: "fontStretch", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" ], + invalid_values: [ "narrower", "wider" ] + }, + "font-style": { + domProp: "fontStyle", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "italic", "oblique" ], + invalid_values: [] + }, + "font-variant": { + domProp: "fontVariant", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "small-caps" ], + invalid_values: [ "small-caps normal" ] + }, + "font-weight": { + domProp: "fontWeight", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal", "400" ], + other_values: [ "bold", "100", "200", "300", "500", "600", "700", "800", "900", "bolder", "lighter" ], + invalid_values: [ "0", "100.0", "107", "399", "401", "699", "710", "1000" ] + }, + "height": { + domProp: "height", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* FIXME: test zero, and test calc clamping */ + initial_values: [ " auto" ], + /* computed value tests for height test more with display:block */ + prerequisites: { "display": "block" }, + other_values: [ "15px", "3em", "15%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ], + quirks_values: { "5": "5px" }, + }, + "ime-mode": { + domProp: "imeMode", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "normal", "disabled", "active", "inactive" ], + invalid_values: [ "none", "enabled", "1px" ] + }, + "left": { + domProp: "left", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* FIXME: run tests with multiple prerequisites */ + prerequisites: { "position": "relative" }, + /* XXX 0 may or may not be equal to auto */ + initial_values: [ "auto" ], + other_values: [ "32px", "-3em", "12%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "letter-spacing": { + domProp: "letterSpacing", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "0", "0px", "1em", "2px", "-3px", + "calc(0px)", "calc(1em)", "calc(1em + 3px)", + "calc(15px / 2)", "calc(15px/2)", "calc(-3px)" + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "line-height": { + domProp: "lineHeight", + inherited: true, + type: CSS_TYPE_LONGHAND, + /* + * Inheritance tests require consistent font size, since + * getComputedStyle (which uses the CSS2 computed value, or + * CSS2.1 used value) doesn't match what the CSS2.1 computed + * value is. And they even require consistent font metrics for + * computation of 'normal'. -moz-block-height requires height + * on a block. + */ + prerequisites: { "font-size": "19px", "font-size-adjust": "none", "font-family": "serif", "font-weight": "normal", "font-style": "normal", "height": "18px", "display": "block"}, + initial_values: [ "normal" ], + other_values: [ "1.0", "1", "1em", "47px", "-moz-block-height" ], + invalid_values: [] + }, + "list-style": { + domProp: "listStyle", + inherited: true, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "list-style-type", "list-style-position", "list-style-image" ], + initial_values: [ "outside", "disc", "disc outside", "outside disc", "disc none", "none disc", "none disc outside", "none outside disc", "disc none outside", "disc outside none", "outside none disc", "outside disc none" ], + other_values: [ "inside none", "none inside", "none none inside", "square", "none", "none none", "outside none none", "none outside none", "none none outside", "none outside", "outside none", + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none', + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside', + 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + 'outside none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none', + 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside', + 'none outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside none', + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside' + ], + invalid_values: [ "outside outside", "disc disc", "unknown value", "none none none", "none disc url(404.png)", "none url(404.png) disc", "disc none url(404.png)", "disc url(404.png) none", "url(404.png) none disc", "url(404.png) disc none", "none disc outside url(404.png)" ] + }, + "list-style-image": { + domProp: "listStyleImage", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + // Add some tests for interesting url() values here to test serialization, etc. + "url(\'data:text/plain,\"\')", + "url(\"data:text/plain,\'\")", + "url(\'data:text/plain,\\\'\')", + "url(\"data:text/plain,\\\"\")", + "url(\'data:text/plain,\\\"\')", + "url(\"data:text/plain,\\\'\")", + "url(data:text/plain,\\\\)", + ], + invalid_values: [] + }, + "list-style-position": { + domProp: "listStylePosition", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "outside" ], + other_values: [ "inside" ], + invalid_values: [] + }, + "list-style-type": { + domProp: "listStyleType", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "disc" ], + other_values: [ "none", "circle", "square", + "decimal", "decimal-leading-zero", + "lower-roman", "upper-roman", "lower-greek", + "lower-alpha", "lower-latin", "upper-alpha", "upper-latin", + "hebrew", "armenian", "georgian", + "cjk-decimal", "cjk-ideographic", + "hiragana", "katakana", "hiragana-iroha", "katakana-iroha", + "japanese-informal", "japanese-formal", "korean-hangul-formal", + "korean-hanja-informal", "korean-hanja-formal", + "simp-chinese-informal", "simp-chinese-formal", + "trad-chinese-informal", "trad-chinese-formal", + "-moz-cjk-heavenly-stem", "-moz-cjk-earthly-branch", + "-moz-trad-chinese-informal", "-moz-trad-chinese-formal", + "-moz-simp-chinese-informal", "-moz-simp-chinese-formal", + "-moz-japanese-informal", "-moz-japanese-formal", + "-moz-arabic-indic", "-moz-persian", "-moz-urdu", + "-moz-devanagari", "-moz-gurmukhi", "-moz-gujarati", + "-moz-oriya", "-moz-kannada", "-moz-malayalam", "-moz-bengali", + "-moz-tamil", "-moz-telugu", "-moz-thai", "-moz-lao", + "-moz-myanmar", "-moz-khmer", + "-moz-hangul", "-moz-hangul-consonant", + "-moz-ethiopic-halehame", "-moz-ethiopic-numeric", + "-moz-ethiopic-halehame-am", + "-moz-ethiopic-halehame-ti-er", "-moz-ethiopic-halehame-ti-et" + ], + invalid_values: [] + }, + "margin": { + domProp: "margin", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "margin-top", "margin-right", "margin-bottom", "margin-left" ], + initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt" ], + other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ], + invalid_values: [], + quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, + }, + "margin-bottom": { + domProp: "marginBottom", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX testing auto has prerequisites */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "margin-left": { + domProp: "marginLeft", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* no subproperties */ + /* XXX testing auto has prerequisites */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "2em", "5%", ".5px", "+32px", "+.789px", "-.328px", "+0.56px", "-0.974px", "237px", "-289px", "-056px", "1987.45px", "-84.32px", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], + quirks_values: { "5": "5px" }, + }, + "margin-right": { + domProp: "marginRight", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* no subproperties */ + /* XXX testing auto has prerequisites */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "margin-top": { + domProp: "marginTop", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX testing auto has prerequisites */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "marker-offset": { + domProp: "markerOffset", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "6em", "-1px", "calc(0px)", "calc(3em + 2px - 4px)", "calc(-2em)" ], + invalid_values: [] + }, + "marks": { + /* XXX not a real property; applies only to page context */ + domProp: "marks", + inherited: false, + backend_only: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "crop", "cross", "crop cross", "cross crop" ], + invalid_values: [ "none none", "crop none", "none crop", "cross none", "none cross" ] + }, + "max-height": { + domProp: "maxHeight", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block" }, + initial_values: [ "none" ], + other_values: [ "30px", "50%", "0", + "calc(2px)", + "calc(-2px)", + "calc(0px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "auto", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ] + }, + "max-width": { + domProp: "maxWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block" }, + initial_values: [ "none" ], + other_values: [ "30px", "50%", "0", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "calc(2px)", + "calc(-2px)", + "calc(0px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "auto", "5" ] + }, + "min-height": { + domProp: "minHeight", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block" }, + initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ], + other_values: [ "30px", "50%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "auto", "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ] + }, + "min-width": { + domProp: "minWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block" }, + initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ], + other_values: [ "30px", "50%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "auto", "none", "5" ] + }, - "opacity": { - domProp: "opacity", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "17", "397.376", "3e1", "3e+1", "3e0", "3e+0", "3e-0" ], - other_values: [ "0", "0.4", "0.0000", "-3", "3e-1" ], - invalid_values: [ "0px", "1px" ] - }, - "-moz-orient": { - domProp: "MozOrient", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "horizontal", "vertical" ], - invalid_values: [ "none" ] - }, - "orphans": { - domProp: "orphans", - inherited: true, - backend_only: true, - type: CSS_TYPE_LONGHAND, - // XXX requires display:block - initial_values: [ "2" ], - other_values: [ "1", "7" ], - invalid_values: [ "0", "-1", "0px", "3px", "3e1" ] - }, - "outline": { - domProp: "outline", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "outline-color", "outline-style", "outline-width" ], - initial_values: [ - "none", "medium", "thin", - // XXX Should be invert, but currently currentcolor. - //"invert", "none medium invert" - "currentColor", "none medium currentcolor" - ], - other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid" ], - invalid_values: [ "5%", "5", "5 solid green" ] - }, - "outline-color": { - domProp: "outlineColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor", "-moz-use-text-color" ], // XXX should be invert - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000", "cc00ff" ] - }, - "outline-offset": { - domProp: "outlineOffset", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "-0", "calc(0px)", "calc(3em + 2px - 2px - 3em)", "calc(-0em)" ], - other_values: [ "-3px", "1em", "calc(3em)", "calc(7pt + 3 * 2em)", "calc(-3px)" ], - invalid_values: [ "5%" ] - }, - "outline-style": { - domProp: "outlineStyle", - inherited: false, - type: CSS_TYPE_LONGHAND, - // XXX Should 'hidden' be the same as initial? - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] - }, - "outline-width": { - domProp: "outlineWidth", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "outline-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", - "calc(2px)", - "calc(-2px)", - "calc(0px)", - "calc(0px)", - "calc(5em)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 5em)", - ], - invalid_values: [ "5%", "5" ] - }, - "overflow": { - domProp: "overflow", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - prerequisites: { "display": "block" }, - subproperties: [ "overflow-x", "overflow-y" ], - initial_values: [ "visible" ], - other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable", "-moz-scrollbars-none" ], - invalid_values: [] - }, - "overflow-x": { - domProp: "overflowX", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block", "overflow-y": "visible" }, - initial_values: [ "visible" ], - other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable" ], - invalid_values: [] - }, - "overflow-y": { - domProp: "overflowY", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block", "overflow-x": "visible" }, - initial_values: [ "visible" ], - other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable" ], - invalid_values: [] - }, - "padding": { - domProp: "padding", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "padding-top", "padding-right", "padding-bottom", "padding-left" ], - initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt", "calc(0px) calc(0em) calc(-2px) calc(-1%)" ], - other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ], - invalid_values: [], - quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, - }, - "padding-bottom": { - domProp: "paddingBottom", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "padding-left": { - domProp: "paddingLeft", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* no subproperties */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "padding-right": { - domProp: "paddingRight", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - /* no subproperties */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "padding-top": { - domProp: "paddingTop", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, - }, - "page": { - domProp: "page", - inherited: true, - backend_only: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "foo", "bar" ], - invalid_values: [ "3px" ] - }, - "page-break-after": { - domProp: "pageBreakAfter", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "always", "avoid", "left", "right" ], - invalid_values: [] - }, - "page-break-before": { - domProp: "pageBreakBefore", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "always", "avoid", "left", "right" ], - invalid_values: [] - }, - "page-break-inside": { - domProp: "pageBreakInside", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "avoid" ], - invalid_values: [ "left", "right" ] - }, - "pointer-events": { - domProp: "pointerEvents", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "visiblePainted", "visibleFill", "visibleStroke", "visible", - "painted", "fill", "stroke", "all", "none" ], - invalid_values: [] - }, - "position": { - domProp: "position", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "static" ], - other_values: [ "relative", "absolute", "fixed" ], - invalid_values: [] - }, - "quotes": { - domProp: "quotes", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ '"\u201C" "\u201D" "\u2018" "\u2019"', - '"\\201C" "\\201D" "\\2018" "\\2019"' ], - other_values: [ "none", "'\"' '\"'" ], - invalid_values: [] - }, - "right": { - domProp: "right", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, - /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "size": { - /* XXX not a real property; applies only to page context */ - domProp: "size", - inherited: false, - backend_only: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "landscape", "portrait", "8.5in 11in", "14in 11in", "297mm 210mm", "21cm 29.7cm", "100mm" ], - invalid_values: [ - // XXX spec unclear on 0s and negatives - "100mm 100mm 100mm" - ] - }, - "table-layout": { - domProp: "tableLayout", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "fixed" ], - invalid_values: [] - }, - "text-align": { - domProp: "textAlign", - inherited: true, - type: CSS_TYPE_LONGHAND, - // don't know whether left and right are same as start - initial_values: [ "start" ], - other_values: [ "center", "justify", "end" ], - invalid_values: [ "true", "true true" ] - }, - "-moz-text-align-last": { - domProp: "MozTextAlignLast", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "center", "justify", "start", "end", "left", "right" ], - invalid_values: [] - }, - "text-decoration": { - domProp: "textDecoration", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - subproperties: [ "-moz-text-decoration-color", "-moz-text-decoration-line", "-moz-text-decoration-style" ], - initial_values: [ "none" ], - other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ], - invalid_values: [ "none none", "underline none", "none underline", "blink none", "none blink", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink", - "underline red solid", "underline #ff0000", "solid underline", "red underline", "#ff0000 underline" ] - }, - "-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", "000000", "ff00ff" ] - }, - "-moz-text-decoration-line": { - domProp: "MozTextDecorationLine", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ], - invalid_values: [ "none none", "underline none", "none underline", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink" ] - }, - "-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, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "calc(3em - 5em + 2px + 2em - 2px)" ], - other_values: [ "2em", "5%", "-10px", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "text-overflow": { - domProp: "textOverflow", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "clip" ], - other_values: [ "ellipsis", '""', "''", '"hello"', 'clip clip', 'ellipsis ellipsis', 'clip ellipsis', 'clip ""', '"hello" ""', '"" ellipsis' ], - invalid_values: [ "none", "auto", '"hello" inherit', 'inherit "hello"', 'clip initial', 'initial clip', 'initial inherit', 'inherit initial', 'inherit none'] - }, - "text-shadow": { - domProp: "textShadow", - inherited: true, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "none" ], - other_values: [ "2px 2px", "2px 2px 1px", "2px 2px green", "2px 2px 1px green", "green 2px 2px", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px", - /* calc() values */ - "2px 2px calc(-5px)", /* clamped */ - "calc(3em - 2px) 2px green", - "green calc(3em - 2px) 2px", - "2px calc(2px + 0.2em)", - "blue 2px calc(2px + 0.2em)", - "2px calc(2px + 0.2em) blue", - "calc(-2px) calc(-2px)", - "-2px -2px", - "calc(2px) calc(2px)", - "calc(2px) calc(2px) calc(2px)", - ], - invalid_values: [ "3% 3%", "2px 2px -5px", "2px 2px 2px 2px", "2px 2px, none", "none, 2px 2px", "inherit, 2px 2px", "2px 2px, inherit", "2 2px", "2px 2", "2px 2px 2", "2px 2px 2px 2", - "calc(2px) calc(2px) calc(2px) calc(2px)" - ] - }, - "text-transform": { - domProp: "textTransform", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "capitalize", "uppercase", "lowercase", "full-width" ], - invalid_values: [] - }, - "top": { - domProp: "top", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, - /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "transition": { - domProp: "transition", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], - initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ], - other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all" ], - invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial", "1s width,,2s color", "1s width, ,2s color" ] - }, - "transition-delay": { - domProp: "transitionDelay", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px" ] - }, - "transition-duration": { - domProp: "transitionDuration", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px", "-1ms", "-2s" ] - }, - "transition-property": { - domProp: "transitionProperty", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "all" ], - other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all" ], - invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ] - }, - "transition-timing-function": { - domProp: "transitionTimingFunction", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], - other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], - invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] - }, - "unicode-bidi": { - domProp: "unicodeBidi", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "embed", "bidi-override", "-moz-isolate", "-moz-plaintext", "-moz-isolate-override" ], - invalid_values: [ "auto", "none" ] - }, - "vertical-align": { - domProp: "verticalAlign", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "baseline" ], - other_values: [ "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom", "-moz-middle-with-baseline", "15%", "3px", "0.2em", "-5px", "-3%", - "calc(2px)", - "calc(-2px)", - "calc(50%)", - "calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - ], - invalid_values: [ "5" ] - }, - "visibility": { - domProp: "visibility", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "visible" ], - other_values: [ "hidden", "collapse" ], - invalid_values: [] - }, - "white-space": { - domProp: "whiteSpace", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "pre", "nowrap", "pre-wrap", "pre-line", "-moz-pre-discard-newlines" ], - invalid_values: [] - }, - "widows": { - domProp: "widows", - inherited: true, - backend_only: true, - type: CSS_TYPE_LONGHAND, - // XXX requires display:block - initial_values: [ "2" ], - other_values: [ "1", "7" ], - invalid_values: [ "0", "-1", "0px", "3px", "3e1" ] - }, - "width": { - domProp: "width", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* computed value tests for width test more with display:block */ - prerequisites: { "display": "block" }, - initial_values: [ " auto" ], - /* XXX these have prerequisites */ - other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", - "3e1px", "3e+1px", "3e0px", "3e+0px", "3e-0px", "3e-1px", - "3.2e1px", "3.2e+1px", "3.2e0px", "3.2e+0px", "3.2e-0px", "3.2e-1px", - "3e1%", "3e+1%", "3e0%", "3e+0%", "3e-0%", "3e-1%", - "3.2e1%", "3.2e+1%", "3.2e0%", "3.2e+0%", "3.2e-0%", "3.2e-1%", - /* valid -moz-calc() values */ - "-moz-calc(-2px)", - "-moz-calc(2px)", - "-moz-calc(50%)", - "-moz-calc(50% + 2px)", - "-moz-calc( 50% + 2px)", - "-moz-calc(50% + 2px )", - "-moz-calc( 50% + 2px )", - "-moz-calc(50% - -2px)", - "-moz-calc(2px - -50%)", - "-moz-calc(3*25px)", - "-moz-calc(3 *25px)", - "-moz-calc(3 * 25px)", - "-moz-calc(3* 25px)", - "-moz-calc(25px*3)", - "-moz-calc(25px *3)", - "-moz-calc(25px* 3)", - "-moz-calc(25px * 3)", - "-moz-calc(3*25px + 50%)", - "-moz-calc(50% - 3em + 2px)", - "-moz-calc(50% - (3em + 2px))", - "-moz-calc((50% - 3em) + 2px)", - "-moz-calc(2em)", - "-moz-calc(50%)", - "-moz-calc(50px/2)", - "-moz-calc(50px/(2 - 1))", - /* valid calc() values */ - "calc(-2px)", - "calc(2px)", - "calc(50%)", - "calc(50% + 2px)", - "calc( 50% + 2px)", - "calc(50% + 2px )", - "calc( 50% + 2px )", - "calc(50% - -2px)", - "calc(2px - -50%)", - "calc(3*25px)", - "calc(3 *25px)", - "calc(3 * 25px)", - "calc(3* 25px)", - "calc(25px*3)", - "calc(25px *3)", - "calc(25px* 3)", - "calc(25px * 3)", - "calc(3*25px + 50%)", - "calc(50% - 3em + 2px)", - "calc(50% - (3em + 2px))", - "calc((50% - 3em) + 2px)", - "calc(2em)", - "calc(50%)", - "calc(50px/2)", - "calc(50px/(2 - 1))", - ], - invalid_values: [ "none", "-2px", - /* invalid -moz-calc() values */ - "-moz-calc(50%+ 2px)", - "-moz-calc(50% +2px)", - "-moz-calc(50%+2px)", - /* invalid calc() values */ - "calc(50%+ 2px)", - "calc(50% +2px)", - "calc(50%+2px)", - "-moz-min()", - "calc(min())", - "-moz-max()", - "calc(max())", - "-moz-min(5px)", - "calc(min(5px))", - "-moz-max(5px)", - "calc(max(5px))", - "-moz-min(5px,2em)", - "calc(min(5px,2em))", - "-moz-max(5px,2em)", - "calc(max(5px,2em))", - "calc(50px/(2 - 2))", - /* If we ever support division by values, which is - * complicated for the reasons described in - * http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html - * , we should support all 4 of these as described in - * http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html - */ - "calc((3em / 100%) * 3em)", - "calc(3em / 100% * 3em)", - "calc(3em * (3em / 100%))", - "calc(3em * 3em / 100%)", - ], - quirks_values: { "5": "5px" }, - }, - "word-break": { - domProp: "wordBreak", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "break-all", "keep-all" ], - invalid_values: [] - }, - "word-spacing": { - domProp: "wordSpacing", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal", "0", "0px", "-0em", - "calc(-0px)", "calc(0em)" - ], - other_values: [ "1em", "2px", "-3px", - "calc(1em)", "calc(1em + 3px)", - "calc(15px / 2)", "calc(15px/2)", - "calc(-2em)" - ], - invalid_values: [], - quirks_values: { "5": "5px" }, - }, - "word-wrap": { - domProp: "wordWrap", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "break-word" ], - invalid_values: [] - }, - "-moz-hyphens": { - domProp: "MozHyphens", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "manual" ], - other_values: [ "none", "auto" ], - invalid_values: [] - }, - "z-index": { - domProp: "zIndex", - inherited: false, - type: CSS_TYPE_LONGHAND, - /* XXX requires position */ - initial_values: [ "auto" ], - other_values: [ "0", "3", "-7000", "12000" ], - invalid_values: [ "3.0", "17.5", "3e1" ] - } - , - "clip-path": { - domProp: "clipPath", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mypath)", "url('404.svg#mypath')" ], - invalid_values: [] - }, - "clip-rule": { - domProp: "clipRule", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "nonzero" ], - other_values: [ "evenodd" ], - invalid_values: [] - }, - "color-interpolation": { - domProp: "colorInterpolation", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "sRGB" ], - other_values: [ "auto", "linearRGB" ], - invalid_values: [] - }, - "color-interpolation-filters": { - domProp: "colorInterpolationFilters", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "linearRGB" ], - other_values: [ "sRGB", "auto" ], - invalid_values: [] - }, - "dominant-baseline": { - domProp: "dominantBaseline", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "use-script", "no-change", "reset-size", "ideographic", "alphabetic", "hanging", "mathematical", "central", "middle", "text-after-edge", "text-before-edge" ], - invalid_values: [] - }, - "fill": { - domProp: "fill", - inherited: true, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], - other_values: [ "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "none", "currentColor", "context-fill", "context-stroke" ], - invalid_values: [ "000000", "ff00ff" ] - }, - "fill-opacity": { - domProp: "fillOpacity", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000", "context-fill-opacity", "context-stroke-opacity" ], - other_values: [ "0", "0.3", "-7.3" ], - invalid_values: [] - }, - "fill-rule": { - domProp: "fillRule", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "nonzero" ], - other_values: [ "evenodd" ], - invalid_values: [] - }, - "filter": { - domProp: "filter", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#myfilt)" ], - invalid_values: [ "url(#myfilt) none" ] - }, - "flood-color": { - domProp: "floodColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], - other_values: [ "green", "#fc3", "currentColor" ], - invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] - }, - "flood-opacity": { - domProp: "floodOpacity", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000" ], - other_values: [ "0", "0.3", "-7.3" ], - invalid_values: [] - }, - "image-rendering": { - domProp: "imageRendering", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "optimizeSpeed", "optimizeQuality", "-moz-crisp-edges" ], - invalid_values: [] - }, - "lighting-color": { - domProp: "lightingColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "white", "#fff", "#ffffff", "rgb(255,255,255)", "rgba(255,255,255,1.0)", "rgba(255,255,255,42.0)" ], - other_values: [ "green", "#fc3", "currentColor" ], - invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] - }, - "marker": { - domProp: "marker", - inherited: true, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "marker-start", "marker-mid", "marker-end" ], - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [ "none none", "url(#mysym) url(#mysym)", "none url(#mysym)", "url(#mysym) none" ] - }, - "marker-end": { - domProp: "markerEnd", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [] - }, - "marker-mid": { - domProp: "markerMid", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [] - }, - "marker-start": { - domProp: "markerStart", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [] - }, - "mask": { - domProp: "mask", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mymask)" ], - invalid_values: [] - }, - "shape-rendering": { - domProp: "shapeRendering", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "optimizeSpeed", "crispEdges", "geometricPrecision" ], - invalid_values: [] - }, - "stop-color": { - domProp: "stopColor", - inherited: false, - type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], - other_values: [ "green", "#fc3", "currentColor" ], - invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] - }, - "stop-opacity": { - domProp: "stopOpacity", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000" ], - other_values: [ "0", "0.3", "-7.3" ], - invalid_values: [] - }, - "stroke": { - domProp: "stroke", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)", "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "currentColor", "context-fill", "context-stroke" ], - invalid_values: [ "000000", "ff00ff" ] - }, - "stroke-dasharray": { - domProp: "strokeDasharray", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none", "context-value" ], - other_values: [ "5px,3px,2px", "5px 3px 2px", " 5px ,3px\t, 2px ", "1px", "5%", "3em" ], - invalid_values: [ "-5px,3px,2px", "5px,3px,-2px" ] - }, - "stroke-dashoffset": { - domProp: "strokeDashoffset", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "-0px", "0em", "context-value" ], - other_values: [ "3px", "3%", "1em" ], - invalid_values: [] - }, - "stroke-linecap": { - domProp: "strokeLinecap", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "butt" ], - other_values: [ "round", "square" ], - invalid_values: [] - }, - "stroke-linejoin": { - domProp: "strokeLinejoin", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "miter" ], - other_values: [ "round", "bevel" ], - invalid_values: [] - }, - "stroke-miterlimit": { - domProp: "strokeMiterlimit", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "4" ], - other_values: [ "1", "7", "5000", "1.1" ], - invalid_values: [ "0.9", "0", "-1", "3px", "-0.3" ] - }, - "stroke-opacity": { - domProp: "strokeOpacity", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000", "context-fill-opacity", "context-stroke-opacity" ], - other_values: [ "0", "0.3", "-7.3" ], - invalid_values: [] - }, - "stroke-width": { - domProp: "strokeWidth", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1px", "context-value" ], - other_values: [ "0", "0px", "-0em", "17px", "0.2em" ], - invalid_values: [ "-0.1px", "-3px" ] - }, - "text-anchor": { - domProp: "textAnchor", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "start" ], - other_values: [ "middle", "end" ], - invalid_values: [] - }, - "text-rendering": { - domProp: "textRendering", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "optimizeSpeed", "optimizeLegibility", "geometricPrecision" ], - invalid_values: [] - }, - "vector-effect": { - domProp: "vectorEffect", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "non-scaling-stroke" ], - invalid_values: [] - }, - "align-content": { - domProp: "alignContent", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch" ], - other_values: [ - "flex-start", - "flex-end", - "center", - "space-between", - "space-around" - ], - invalid_values: [ "abc", "30px", "0", "auto" ] - }, - "align-items": { - domProp: "alignItems", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch" ], - other_values: [ "flex-start", "flex-end", "center", "baseline" ], - invalid_values: [ "space-between", "abc", "30px" ] - }, - "align-self": { - domProp: "alignSelf", - inherited: false, - type: CSS_TYPE_LONGHAND, - // (Assuming defaults on the parent, 'auto' will compute to 'stretch'.) - initial_values: [ "auto", "stretch" ], - other_values: [ "flex-start", "flex-end", "center", "baseline" ], - invalid_values: [ "space-between", "abc", "30px" ] - }, - "flex": { - domProp: "flex", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "flex-grow", - "flex-shrink", - "flex-basis" - ], - initial_values: [ "0 1 auto", "auto 0 1", "0 auto", "auto 0" ], - other_values: [ - "none", - "1", - "0", - "0 1", - "0.5", - "1.2 3.4", - "0 0 0", - "0 0 0px", - "0px 0 0", - "5px 0 0", - "2 auto", - "auto 4", - "auto 5.6 7.8", - "-moz-max-content", - "1 -moz-max-content", - "1 2 -moz-max-content", - "-moz-max-content 1", - "-moz-max-content 1 2", - "-0" - ], - invalid_values: [ - "1 2px 3", - "1 auto 3", - "1px 2 3px", - "1px 2 3 4px", - "-1", - "1 -1" - ] - }, - "flex-basis": { - domProp: "flexBasis", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ " auto" ], + "opacity": { + domProp: "opacity", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "17", "397.376", "3e1", "3e+1", "3e0", "3e+0", "3e-0" ], + other_values: [ "0", "0.4", "0.0000", "-3", "3e-1" ], + invalid_values: [ "0px", "1px" ] + }, + "-moz-orient": { + domProp: "MozOrient", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "horizontal", "vertical" ], + invalid_values: [ "none" ] + }, + "orphans": { + domProp: "orphans", + inherited: true, + backend_only: true, + type: CSS_TYPE_LONGHAND, + // XXX requires display:block + initial_values: [ "2" ], + other_values: [ "1", "7" ], + invalid_values: [ "0", "-1", "0px", "3px", "3e1" ] + }, + "outline": { + domProp: "outline", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "outline-color", "outline-style", "outline-width" ], + initial_values: [ + "none", "medium", "thin", + // XXX Should be invert, but currently currentcolor. + //"invert", "none medium invert" + "currentColor", "none medium currentcolor" + ], + other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid" ], + invalid_values: [ "5%", "5", "5 solid green" ] + }, + "outline-color": { + domProp: "outlineColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "black" }, + initial_values: [ "currentColor", "-moz-use-text-color" ], // XXX should be invert + other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], + invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000", "cc00ff" ] + }, + "outline-offset": { + domProp: "outlineOffset", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0px", "-0", "calc(0px)", "calc(3em + 2px - 2px - 3em)", "calc(-0em)" ], + other_values: [ "-3px", "1em", "calc(3em)", "calc(7pt + 3 * 2em)", "calc(-3px)" ], + invalid_values: [ "5%" ] + }, + "outline-style": { + domProp: "outlineStyle", + inherited: false, + type: CSS_TYPE_LONGHAND, + // XXX Should 'hidden' be the same as initial? + initial_values: [ "none" ], + other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], + invalid_values: [] + }, + "outline-width": { + domProp: "outlineWidth", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "outline-style": "solid" }, + initial_values: [ "medium", "3px", "calc(4px - 1px)" ], + other_values: [ "thin", "thick", "1px", "2em", + "calc(2px)", + "calc(-2px)", + "calc(0px)", + "calc(0px)", + "calc(5em)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 5em)", + ], + invalid_values: [ "5%", "5" ] + }, + "overflow": { + domProp: "overflow", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + prerequisites: { "display": "block" }, + subproperties: [ "overflow-x", "overflow-y" ], + initial_values: [ "visible" ], + other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable", "-moz-scrollbars-none" ], + invalid_values: [] + }, + "overflow-x": { + domProp: "overflowX", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block", "overflow-y": "visible" }, + initial_values: [ "visible" ], + other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable" ], + invalid_values: [] + }, + "overflow-y": { + domProp: "overflowY", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "display": "block", "overflow-x": "visible" }, + initial_values: [ "visible" ], + other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable" ], + invalid_values: [] + }, + "padding": { + domProp: "padding", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "padding-top", "padding-right", "padding-bottom", "padding-left" ], + initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt", "calc(0px) calc(0em) calc(-2px) calc(-1%)" ], + other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ], + invalid_values: [], + quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, + }, + "padding-bottom": { + domProp: "paddingBottom", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "padding-left": { + domProp: "paddingLeft", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* no subproperties */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "padding-right": { + domProp: "paddingRight", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + /* no subproperties */ + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "padding-top": { + domProp: "paddingTop", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], + other_values: [ "1px", "2em", "5%", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ ], + quirks_values: { "5": "5px" }, + }, + "page": { + domProp: "page", + inherited: true, + backend_only: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "foo", "bar" ], + invalid_values: [ "3px" ] + }, + "page-break-after": { + domProp: "pageBreakAfter", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "always", "avoid", "left", "right" ], + invalid_values: [] + }, + "page-break-before": { + domProp: "pageBreakBefore", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "always", "avoid", "left", "right" ], + invalid_values: [] + }, + "page-break-inside": { + domProp: "pageBreakInside", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "avoid" ], + invalid_values: [ "left", "right" ] + }, + "pointer-events": { + domProp: "pointerEvents", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "visiblePainted", "visibleFill", "visibleStroke", "visible", + "painted", "fill", "stroke", "all", "none" ], + invalid_values: [] + }, + "position": { + domProp: "position", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "static" ], + other_values: [ "relative", "absolute", "fixed" ], + invalid_values: [] + }, + "quotes": { + domProp: "quotes", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ '"\u201C" "\u201D" "\u2018" "\u2019"', + '"\\201C" "\\201D" "\\2018" "\\2019"' ], + other_values: [ "none", "'\"' '\"'" ], + invalid_values: [] + }, + "right": { + domProp: "right", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* FIXME: run tests with multiple prerequisites */ + prerequisites: { "position": "relative" }, + /* XXX 0 may or may not be equal to auto */ + initial_values: [ "auto" ], + other_values: [ "32px", "-3em", "12%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "size": { + /* XXX not a real property; applies only to page context */ + domProp: "size", + inherited: false, + backend_only: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "landscape", "portrait", "8.5in 11in", "14in 11in", "297mm 210mm", "21cm 29.7cm", "100mm" ], + invalid_values: [ + // XXX spec unclear on 0s and negatives + "100mm 100mm 100mm" + ] + }, + "table-layout": { + domProp: "tableLayout", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "fixed" ], + invalid_values: [] + }, + "text-align": { + domProp: "textAlign", + inherited: true, + type: CSS_TYPE_LONGHAND, + // don't know whether left and right are same as start + initial_values: [ "start" ], + other_values: [ "center", "justify", "end" ], + invalid_values: [ "true", "true true" ] + }, + "-moz-text-align-last": { + domProp: "MozTextAlignLast", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "center", "justify", "start", "end", "left", "right" ], + invalid_values: [] + }, + "text-decoration": { + domProp: "textDecoration", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + subproperties: [ "-moz-text-decoration-color", "-moz-text-decoration-line", "-moz-text-decoration-style" ], + initial_values: [ "none" ], + other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ], + invalid_values: [ "none none", "underline none", "none underline", "blink none", "none blink", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink", + "underline red solid", "underline #ff0000", "solid underline", "red underline", "#ff0000 underline" ] + }, + "-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", "000000", "ff00ff" ] + }, + "-moz-text-decoration-line": { + domProp: "MozTextDecorationLine", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ], + invalid_values: [ "none none", "underline none", "none underline", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink" ] + }, + "-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, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "calc(3em - 5em + 2px + 2em - 2px)" ], + other_values: [ "2em", "5%", "-10px", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "text-overflow": { + domProp: "textOverflow", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "clip" ], + other_values: [ "ellipsis", '""', "''", '"hello"', 'clip clip', 'ellipsis ellipsis', 'clip ellipsis', 'clip ""', '"hello" ""', '"" ellipsis' ], + invalid_values: [ "none", "auto", '"hello" inherit', 'inherit "hello"', 'clip initial', 'initial clip', 'initial inherit', 'inherit initial', 'inherit none'] + }, + "text-shadow": { + domProp: "textShadow", + inherited: true, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "blue" }, + initial_values: [ "none" ], + other_values: [ "2px 2px", "2px 2px 1px", "2px 2px green", "2px 2px 1px green", "green 2px 2px", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px", + /* calc() values */ + "2px 2px calc(-5px)", /* clamped */ + "calc(3em - 2px) 2px green", + "green calc(3em - 2px) 2px", + "2px calc(2px + 0.2em)", + "blue 2px calc(2px + 0.2em)", + "2px calc(2px + 0.2em) blue", + "calc(-2px) calc(-2px)", + "-2px -2px", + "calc(2px) calc(2px)", + "calc(2px) calc(2px) calc(2px)", + ], + invalid_values: [ "3% 3%", "2px 2px -5px", "2px 2px 2px 2px", "2px 2px, none", "none, 2px 2px", "inherit, 2px 2px", "2px 2px, inherit", "2 2px", "2px 2", "2px 2px 2", "2px 2px 2px 2", + "calc(2px) calc(2px) calc(2px) calc(2px)" + ] + }, + "text-transform": { + domProp: "textTransform", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "capitalize", "uppercase", "lowercase", "full-width" ], + invalid_values: [] + }, + "top": { + domProp: "top", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* FIXME: run tests with multiple prerequisites */ + prerequisites: { "position": "relative" }, + /* XXX 0 may or may not be equal to auto */ + initial_values: [ "auto" ], + other_values: [ "32px", "-3em", "12%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "transition": { + domProp: "transition", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], + initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ], + other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all" ], + invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial", "1s width,,2s color", "1s width, ,2s color" ] + }, + "transition-delay": { + domProp: "transitionDelay", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px" ] + }, + "transition-duration": { + domProp: "transitionDuration", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px", "-1ms", "-2s" ] + }, + "transition-property": { + domProp: "transitionProperty", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "all" ], + other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all" ], + invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ] + }, + "transition-timing-function": { + domProp: "transitionTimingFunction", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], + other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], + invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + }, + "unicode-bidi": { + domProp: "unicodeBidi", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "embed", "bidi-override", "-moz-isolate", "-moz-plaintext", "-moz-isolate-override" ], + invalid_values: [ "auto", "none" ] + }, + "vertical-align": { + domProp: "verticalAlign", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "baseline" ], + other_values: [ "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom", "-moz-middle-with-baseline", "15%", "3px", "0.2em", "-5px", "-3%", + "calc(2px)", + "calc(-2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: [ "5" ] + }, + "visibility": { + domProp: "visibility", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "visible" ], + other_values: [ "hidden", "collapse" ], + invalid_values: [] + }, + "white-space": { + domProp: "whiteSpace", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "pre", "nowrap", "pre-wrap", "pre-line", "-moz-pre-discard-newlines" ], + invalid_values: [] + }, + "widows": { + domProp: "widows", + inherited: true, + backend_only: true, + type: CSS_TYPE_LONGHAND, + // XXX requires display:block + initial_values: [ "2" ], + other_values: [ "1", "7" ], + invalid_values: [ "0", "-1", "0px", "3px", "3e1" ] + }, + "width": { + domProp: "width", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* computed value tests for width test more with display:block */ + prerequisites: { "display": "block" }, + initial_values: [ " auto" ], + /* XXX these have prerequisites */ + other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "3e1px", "3e+1px", "3e0px", "3e+0px", "3e-0px", "3e-1px", + "3.2e1px", "3.2e+1px", "3.2e0px", "3.2e+0px", "3.2e-0px", "3.2e-1px", + "3e1%", "3e+1%", "3e0%", "3e+0%", "3e-0%", "3e-1%", + "3.2e1%", "3.2e+1%", "3.2e0%", "3.2e+0%", "3.2e-0%", "3.2e-1%", + /* valid -moz-calc() values */ + "-moz-calc(-2px)", + "-moz-calc(2px)", + "-moz-calc(50%)", + "-moz-calc(50% + 2px)", + "-moz-calc( 50% + 2px)", + "-moz-calc(50% + 2px )", + "-moz-calc( 50% + 2px )", + "-moz-calc(50% - -2px)", + "-moz-calc(2px - -50%)", + "-moz-calc(3*25px)", + "-moz-calc(3 *25px)", + "-moz-calc(3 * 25px)", + "-moz-calc(3* 25px)", + "-moz-calc(25px*3)", + "-moz-calc(25px *3)", + "-moz-calc(25px* 3)", + "-moz-calc(25px * 3)", + "-moz-calc(3*25px + 50%)", + "-moz-calc(50% - 3em + 2px)", + "-moz-calc(50% - (3em + 2px))", + "-moz-calc((50% - 3em) + 2px)", + "-moz-calc(2em)", + "-moz-calc(50%)", + "-moz-calc(50px/2)", + "-moz-calc(50px/(2 - 1))", + /* valid calc() values */ + "calc(-2px)", + "calc(2px)", + "calc(50%)", + "calc(50% + 2px)", + "calc( 50% + 2px)", + "calc(50% + 2px )", + "calc( 50% + 2px )", + "calc(50% - -2px)", + "calc(2px - -50%)", + "calc(3*25px)", + "calc(3 *25px)", + "calc(3 * 25px)", + "calc(3* 25px)", + "calc(25px*3)", + "calc(25px *3)", + "calc(25px* 3)", + "calc(25px * 3)", + "calc(3*25px + 50%)", + "calc(50% - 3em + 2px)", + "calc(50% - (3em + 2px))", + "calc((50% - 3em) + 2px)", + "calc(2em)", + "calc(50%)", + "calc(50px/2)", + "calc(50px/(2 - 1))", + ], + invalid_values: [ "none", "-2px", + /* invalid -moz-calc() values */ + "-moz-calc(50%+ 2px)", + "-moz-calc(50% +2px)", + "-moz-calc(50%+2px)", + /* invalid calc() values */ + "calc(50%+ 2px)", + "calc(50% +2px)", + "calc(50%+2px)", + "-moz-min()", + "calc(min())", + "-moz-max()", + "calc(max())", + "-moz-min(5px)", + "calc(min(5px))", + "-moz-max(5px)", + "calc(max(5px))", + "-moz-min(5px,2em)", + "calc(min(5px,2em))", + "-moz-max(5px,2em)", + "calc(max(5px,2em))", + "calc(50px/(2 - 2))", + /* If we ever support division by values, which is + * complicated for the reasons described in + * http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html + * , we should support all 4 of these as described in + * http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html + */ + "calc((3em / 100%) * 3em)", + "calc(3em / 100% * 3em)", + "calc(3em * (3em / 100%))", + "calc(3em * 3em / 100%)", + ], + quirks_values: { "5": "5px" }, + }, + "word-break": { + domProp: "wordBreak", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "break-all", "keep-all" ], + invalid_values: [] + }, + "word-spacing": { + domProp: "wordSpacing", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal", "0", "0px", "-0em", + "calc(-0px)", "calc(0em)" + ], + other_values: [ "1em", "2px", "-3px", + "calc(1em)", "calc(1em + 3px)", + "calc(15px / 2)", "calc(15px/2)", + "calc(-2em)" + ], + invalid_values: [], + quirks_values: { "5": "5px" }, + }, + "word-wrap": { + domProp: "wordWrap", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "break-word" ], + invalid_values: [] + }, + "-moz-hyphens": { + domProp: "MozHyphens", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "manual" ], + other_values: [ "none", "auto" ], + invalid_values: [] + }, + "z-index": { + domProp: "zIndex", + inherited: false, + type: CSS_TYPE_LONGHAND, + /* XXX requires position */ + initial_values: [ "auto" ], + other_values: [ "0", "3", "-7000", "12000" ], + invalid_values: [ "3.0", "17.5", "3e1" ] + } + , + "clip-path": { + domProp: "clipPath", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#mypath)", "url('404.svg#mypath')" ], + invalid_values: [] + }, + "clip-rule": { + domProp: "clipRule", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "nonzero" ], + other_values: [ "evenodd" ], + invalid_values: [] + }, + "color-interpolation": { + domProp: "colorInterpolation", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "sRGB" ], + other_values: [ "auto", "linearRGB" ], + invalid_values: [] + }, + "color-interpolation-filters": { + domProp: "colorInterpolationFilters", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "linearRGB" ], + other_values: [ "sRGB", "auto" ], + invalid_values: [] + }, + "dominant-baseline": { + domProp: "dominantBaseline", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "use-script", "no-change", "reset-size", "ideographic", "alphabetic", "hanging", "mathematical", "central", "middle", "text-after-edge", "text-before-edge" ], + invalid_values: [] + }, + "fill": { + domProp: "fill", + inherited: true, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "blue" }, + initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], + other_values: [ "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "none", "currentColor", "context-fill", "context-stroke" ], + invalid_values: [ "000000", "ff00ff" ] + }, + "fill-opacity": { + domProp: "fillOpacity", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "2.8", "1.000", "context-fill-opacity", "context-stroke-opacity" ], + other_values: [ "0", "0.3", "-7.3" ], + invalid_values: [] + }, + "fill-rule": { + domProp: "fillRule", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "nonzero" ], + other_values: [ "evenodd" ], + invalid_values: [] + }, + "filter": { + domProp: "filter", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#myfilt)" ], + invalid_values: [ "url(#myfilt) none" ] + }, + "flood-color": { + domProp: "floodColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "blue" }, + initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], + other_values: [ "green", "#fc3", "currentColor" ], + invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] + }, + "flood-opacity": { + domProp: "floodOpacity", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "2.8", "1.000" ], + other_values: [ "0", "0.3", "-7.3" ], + invalid_values: [] + }, + "image-rendering": { + domProp: "imageRendering", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "optimizeSpeed", "optimizeQuality", "-moz-crisp-edges" ], + invalid_values: [] + }, + "lighting-color": { + domProp: "lightingColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "blue" }, + initial_values: [ "white", "#fff", "#ffffff", "rgb(255,255,255)", "rgba(255,255,255,1.0)", "rgba(255,255,255,42.0)" ], + other_values: [ "green", "#fc3", "currentColor" ], + invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] + }, + "marker": { + domProp: "marker", + inherited: true, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ "marker-start", "marker-mid", "marker-end" ], + initial_values: [ "none" ], + other_values: [ "url(#mysym)" ], + invalid_values: [ "none none", "url(#mysym) url(#mysym)", "none url(#mysym)", "url(#mysym) none" ] + }, + "marker-end": { + domProp: "markerEnd", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#mysym)" ], + invalid_values: [] + }, + "marker-mid": { + domProp: "markerMid", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#mysym)" ], + invalid_values: [] + }, + "marker-start": { + domProp: "markerStart", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#mysym)" ], + invalid_values: [] + }, + "mask": { + domProp: "mask", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "url(#mymask)" ], + invalid_values: [] + }, + "shape-rendering": { + domProp: "shapeRendering", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "optimizeSpeed", "crispEdges", "geometricPrecision" ], + invalid_values: [] + }, + "stop-color": { + domProp: "stopColor", + inherited: false, + type: CSS_TYPE_LONGHAND, + prerequisites: { "color": "blue" }, + initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], + other_values: [ "green", "#fc3", "currentColor" ], + invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] + }, + "stop-opacity": { + domProp: "stopOpacity", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "2.8", "1.000" ], + other_values: [ "0", "0.3", "-7.3" ], + invalid_values: [] + }, + "stroke": { + domProp: "stroke", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)", "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "currentColor", "context-fill", "context-stroke" ], + invalid_values: [ "000000", "ff00ff" ] + }, + "stroke-dasharray": { + domProp: "strokeDasharray", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none", "context-value" ], + other_values: [ "5px,3px,2px", "5px 3px 2px", " 5px ,3px , 2px ", "1px", "5%", "3em" ], + invalid_values: [ "-5px,3px,2px", "5px,3px,-2px" ] + }, + "stroke-dashoffset": { + domProp: "strokeDashoffset", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0", "-0px", "0em", "context-value" ], + other_values: [ "3px", "3%", "1em" ], + invalid_values: [] + }, + "stroke-linecap": { + domProp: "strokeLinecap", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "butt" ], + other_values: [ "round", "square" ], + invalid_values: [] + }, + "stroke-linejoin": { + domProp: "strokeLinejoin", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "miter" ], + other_values: [ "round", "bevel" ], + invalid_values: [] + }, + "stroke-miterlimit": { + domProp: "strokeMiterlimit", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "4" ], + other_values: [ "1", "7", "5000", "1.1" ], + invalid_values: [ "0.9", "0", "-1", "3px", "-0.3" ] + }, + "stroke-opacity": { + domProp: "strokeOpacity", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1", "2.8", "1.000", "context-fill-opacity", "context-stroke-opacity" ], + other_values: [ "0", "0.3", "-7.3" ], + invalid_values: [] + }, + "stroke-width": { + domProp: "strokeWidth", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1px", "context-value" ], + other_values: [ "0", "0px", "-0em", "17px", "0.2em" ], + invalid_values: [ "-0.1px", "-3px" ] + }, + "text-anchor": { + domProp: "textAnchor", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "start" ], + other_values: [ "middle", "end" ], + invalid_values: [] + }, + "text-rendering": { + domProp: "textRendering", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "optimizeSpeed", "optimizeLegibility", "geometricPrecision" ], + invalid_values: [] + }, + "vector-effect": { + domProp: "vectorEffect", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "non-scaling-stroke" ], + invalid_values: [] + }, + "align-content": { + domProp: "alignContent", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "stretch" ], + other_values: [ + "flex-start", + "flex-end", + "center", + "space-between", + "space-around" + ], + invalid_values: [ "abc", "30px", "0", "auto" ] + }, + "align-items": { + domProp: "alignItems", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "stretch" ], + other_values: [ "flex-start", "flex-end", "center", "baseline" ], + invalid_values: [ "space-between", "abc", "30px" ] + }, + "align-self": { + domProp: "alignSelf", + inherited: false, + type: CSS_TYPE_LONGHAND, + // (Assuming defaults on the parent, 'auto' will compute to 'stretch'.) + initial_values: [ "auto", "stretch" ], + other_values: [ "flex-start", "flex-end", "center", "baseline" ], + invalid_values: [ "space-between", "abc", "30px" ] + }, + "flex": { + domProp: "flex", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "flex-grow", + "flex-shrink", + "flex-basis" + ], + initial_values: [ "0 1 auto", "auto 0 1", "0 auto", "auto 0" ], + other_values: [ + "none", + "1", + "0", + "0 1", + "0.5", + "1.2 3.4", + "0 0 0", + "0 0 0px", + "0px 0 0", + "5px 0 0", + "2 auto", + "auto 4", + "auto 5.6 7.8", + "-moz-max-content", + "1 -moz-max-content", + "1 2 -moz-max-content", + "-moz-max-content 1", + "-moz-max-content 1 2", + "-0" + ], + invalid_values: [ + "1 2px 3", + "1 auto 3", + "1px 2 3px", + "1px 2 3 4px", + "-1", + "1 -1" + ] + }, + "flex-basis": { + domProp: "flexBasis", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ " auto" ], // NOTE: This is cribbed directly from the "width" chunk, since this // property takes the exact same values as width (albeit with // different semantics on 'auto'). // XXXdholbert (Maybe these should get separated out into // a reusable array defined at the top of this file?) - other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", - // valid calc() values - "calc(-2px)", - "calc(2px)", - "calc(50%)", - "calc(50% + 2px)", - "calc( 50% + 2px)", - "calc(50% + 2px )", - "calc( 50% + 2px )", - "calc(50% - -2px)", - "calc(2px - -50%)", - "calc(3*25px)", - "calc(3 *25px)", - "calc(3 * 25px)", - "calc(3* 25px)", - "calc(25px*3)", - "calc(25px *3)", - "calc(25px* 3)", - "calc(25px * 3)", - "calc(3*25px + 50%)", - "calc(50% - 3em + 2px)", - "calc(50% - (3em + 2px))", - "calc((50% - 3em) + 2px)", - "calc(2em)", - "calc(50%)", - "calc(50px/2)", - "calc(50px/(2 - 1))" - ], - invalid_values: [ "none", "-2px", - // invalid calc() values - "calc(50%+ 2px)", - "calc(50% +2px)", - "calc(50%+2px)", - "-moz-min()", - "calc(min())", - "-moz-max()", - "calc(max())", - "-moz-min(5px)", - "calc(min(5px))", - "-moz-max(5px)", - "calc(max(5px))", - "-moz-min(5px,2em)", - "calc(min(5px,2em))", - "-moz-max(5px,2em)", - "calc(max(5px,2em))", - "calc(50px/(2 - 2))", - // If we ever support division by values, which is - // complicated for the reasons described in - // http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html - // , we should support all 4 of these as described in - // http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html - "calc((3em / 100%) * 3em)", - "calc(3em / 100% * 3em)", - "calc(3em * (3em / 100%))", - "calc(3em * 3em / 100%)" - ] - }, - "flex-direction": { - domProp: "flexDirection", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "row" ], - other_values: [ "row-reverse", "column", "column-reverse" ], - invalid_values: [ "10px", "30%", "justify", "column wrap" ] - }, - "flex-flow": { - domProp: "flexFlow", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "flex-direction", - "flex-wrap" - ], - initial_values: [ "row nowrap", "nowrap row", "row", "nowrap" ], - other_values: [ - // only specifying one property: - "column", - "wrap", - "wrap-reverse", - // specifying both properties, 'flex-direction' first: - "row wrap", - "row wrap-reverse", - "column wrap", - "column wrap-reverse", - // specifying both properties, 'flex-wrap' first: - "wrap row", - "wrap column", - "wrap-reverse row", - "wrap-reverse column", - ], - invalid_values: [ - // specifying flex-direction twice (invalid): - "row column", - "row column nowrap", - "row nowrap column", - "nowrap row column", - // specifying flex-wrap twice (invalid): - "nowrap wrap-reverse", - "nowrap wrap-reverse row", - "nowrap row wrap-reverse", - "row nowrap wrap-reverse", - // Invalid data-type / invalid keyword type: - "1px", "5%", "justify", "none" - ] - }, - "flex-grow": { - domProp: "flexGrow", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0" ], - other_values: [ "3", "1", "1.0", "2.5", "123" ], - invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ] - }, - "flex-shrink": { - domProp: "flexShrink", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1" ], - other_values: [ "3", "0", "0.0", "2.5", "123" ], - invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ] - }, - "flex-wrap": { - domProp: "flexWrap", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "nowrap" ], - other_values: [ "wrap", "wrap-reverse" ], - invalid_values: [ "10px", "30%", "justify", "column wrap", "auto" ] - }, - "order": { - domProp: "order", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "0" ], - other_values: [ "1", "99999", "-1", "-50" ], - invalid_values: [ "0px", "1.0", "1.", "1%", "0.2", "3em", "stretch" ] - }, - "justify-content": { - domProp: "justifyContent", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "flex-start" ], - other_values: [ "flex-end", "center", "space-between", "space-around" ], - invalid_values: [ "baseline", "stretch", "30px", "5%" ] - }, + other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + // valid calc() values + "calc(-2px)", + "calc(2px)", + "calc(50%)", + "calc(50% + 2px)", + "calc( 50% + 2px)", + "calc(50% + 2px )", + "calc( 50% + 2px )", + "calc(50% - -2px)", + "calc(2px - -50%)", + "calc(3*25px)", + "calc(3 *25px)", + "calc(3 * 25px)", + "calc(3* 25px)", + "calc(25px*3)", + "calc(25px *3)", + "calc(25px* 3)", + "calc(25px * 3)", + "calc(3*25px + 50%)", + "calc(50% - 3em + 2px)", + "calc(50% - (3em + 2px))", + "calc((50% - 3em) + 2px)", + "calc(2em)", + "calc(50%)", + "calc(50px/2)", + "calc(50px/(2 - 1))" + ], + invalid_values: [ "none", "-2px", + // invalid calc() values + "calc(50%+ 2px)", + "calc(50% +2px)", + "calc(50%+2px)", + "-moz-min()", + "calc(min())", + "-moz-max()", + "calc(max())", + "-moz-min(5px)", + "calc(min(5px))", + "-moz-max(5px)", + "calc(max(5px))", + "-moz-min(5px,2em)", + "calc(min(5px,2em))", + "-moz-max(5px,2em)", + "calc(max(5px,2em))", + "calc(50px/(2 - 2))", + // If we ever support division by values, which is + // complicated for the reasons described in + // http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html + // , we should support all 4 of these as described in + // http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html + "calc((3em / 100%) * 3em)", + "calc(3em / 100% * 3em)", + "calc(3em * (3em / 100%))", + "calc(3em * 3em / 100%)" + ] + }, + "flex-direction": { + domProp: "flexDirection", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "row" ], + other_values: [ "row-reverse", "column", "column-reverse" ], + invalid_values: [ "10px", "30%", "justify", "column wrap" ] + }, + "flex-flow": { + domProp: "flexFlow", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "flex-direction", + "flex-wrap" + ], + initial_values: [ "row nowrap", "nowrap row", "row", "nowrap" ], + other_values: [ + // only specifying one property: + "column", + "wrap", + "wrap-reverse", + // specifying both properties, 'flex-direction' first: + "row wrap", + "row wrap-reverse", + "column wrap", + "column wrap-reverse", + // specifying both properties, 'flex-wrap' first: + "wrap row", + "wrap column", + "wrap-reverse row", + "wrap-reverse column", + ], + invalid_values: [ + // specifying flex-direction twice (invalid): + "row column", + "row column nowrap", + "row nowrap column", + "nowrap row column", + // specifying flex-wrap twice (invalid): + "nowrap wrap-reverse", + "nowrap wrap-reverse row", + "nowrap row wrap-reverse", + "row nowrap wrap-reverse", + // Invalid data-type / invalid keyword type: + "1px", "5%", "justify", "none" + ] + }, + "flex-grow": { + domProp: "flexGrow", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0" ], + other_values: [ "3", "1", "1.0", "2.5", "123" ], + invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ] + }, + "flex-shrink": { + domProp: "flexShrink", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1" ], + other_values: [ "3", "0", "0.0", "2.5", "123" ], + invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ] + }, + "flex-wrap": { + domProp: "flexWrap", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "nowrap" ], + other_values: [ "wrap", "wrap-reverse" ], + invalid_values: [ "10px", "30%", "justify", "column wrap", "auto" ] + }, + "order": { + domProp: "order", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "0" ], + other_values: [ "1", "99999", "-1", "-50" ], + invalid_values: [ "0px", "1.0", "1.", "1%", "0.2", "3em", "stretch" ] + }, + "justify-content": { + domProp: "justifyContent", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "flex-start" ], + other_values: [ "flex-end", "center", "space-between", "space-around" ], + invalid_values: [ "baseline", "stretch", "30px", "5%" ] + }, - // Aliases - "-moz-transform": { - domProp: "MozTransform", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transform", - subproperties: [ "transform" ], - prerequisites: { "width": "300px", "height": "50px" }, - initial_values: [ "none" ], - other_values: [ "translatex(1px)", "translatex(4em)", - "translatex(-4px)", "translatex(3px)", - "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", - "translatey(4em)", "translate(3px)", "translate(10px, -3px)", - "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", - "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", - "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", - "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", - "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", - "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", - "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", - "translatex(50%)", "translatey(50%)", "translate(50%)", - "translate(3%, 5px)", "translate(5px, 3%)", - "matrix(1, 2, 3, 4, 5, 6)", - /* valid calc() values */ - "translatex(calc(5px + 10%))", - "translatey(calc(0.25 * 5px + 10% / 3))", - "translate(calc(5px - 10% * 3))", - "translate(calc(5px - 3 * 10%), 50px)", - "translate(-50px, calc(5px - 10% * 3))", - /* valid only when prefixed */ - "matrix(1, 2, 3, 4, 5px, 6%)", - "matrix(1, 2, 3, 4, 5%, 6px)", - "matrix(1, 2, 3, 4, 5%, 6%)", - "matrix(1, 2, 3, 4, 5px, 6em)", - "matrix(1, 0, 0, 1, calc(5px * 3), calc(10% - 3px))", - "translatez(1px)", "translatez(4em)", "translatez(-4px)", - "translatez(0px)", "translatez(2px) translatez(5px)", - "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", - "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", - "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", - "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", - "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", - "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", - /* valid only when prefixed */ - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)", - ], - invalid_values: ["1px", "#0000ff", "red", "auto", - "translatex(1)", "translatey(1)", "translate(2)", - "translate(-3, -4)", - "translatex(1px 1px)", "translatex(translatex(1px))", - "translatex(#0000ff)", "translatex(red)", "translatey()", - "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", - "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", - "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", - "matrix(0, 1, 2, 3%, 4%, 5%)", - /* invalid calc() values */ - "translatey(-moz-min(5px,10%))", - "translatex(-moz-max(5px,10%))", - "translate(10px, calc(min(5px,10%)))", - "translate(calc(max(5px,10%)), 10%)", - "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))", - "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", - "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)", - ], - }, - "-moz-transform-origin": { - domProp: "MozTransformOrigin", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transform-origin", - subproperties: [ "transform-origin" ], - prerequisites: { "width": "10px", "height": "10px", "display": "block"}, - initial_values: [ "50% 50%", "center", "center center" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", - "top", "bottom","top left", "top right", - "top center", "center left", "center right", - "bottom left", "bottom right", "bottom center", - "20% center", "6px center", "13in bottom", - "left 50px", "right 13%", "center 40px", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)", - "6px 5px 5px", - "top center 10px" - ], - invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff", - "border", "center red", "right diagonal", - "#00ffff bottom"] - }, - "-moz-perspective-origin": { - domProp: "MozPerspectiveOrigin", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "perspective-origin", - subproperties: [ "perspective-origin" ], - prerequisites: { "width": "10px", "height": "10px", "display": "block"}, - initial_values: [ "50% 50%", "center", "center center" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", - "top", "bottom","top left", "top right", - "top center", "center left", "center right", - "bottom left", "bottom right", "bottom center", - "20% center", "6px center", "13in bottom", - "left 50px", "right 13%", "center 40px", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)" ], - invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff", - "border", "center red", "right diagonal", - "#00ffff bottom"] - }, - "-moz-perspective": { - domProp: "MozPerspective", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "perspective", - subproperties: [ "perspective" ], - initial_values: [ "none" ], - other_values: [ "1000px", "500.2px" ], - invalid_values: [ "pants", "200", "0", "-100px", "-27.2em" ] - }, - "-moz-backface-visibility": { - domProp: "MozBackfaceVisibility", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "backface-visibility", - subproperties: [ "backface-visibility" ], - initial_values: [ "visible" ], - other_values: [ "hidden" ], - invalid_values: [ "collapse" ] - }, - "-moz-transform-style": { - domProp: "MozTransformStyle", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transform-style", - subproperties: [ "transform-style" ], - initial_values: [ "flat" ], - other_values: [ "preserve-3d" ], - invalid_values: [] - }, - "-moz-border-image": { - domProp: "MozBorderImage", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - alias_for: "border-image", - subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], - initial_values: [ "none" ], - other_values: [ "url('border.png') 27 27 27 27", - "url('border.png') 27", - "stretch url('border.png')", - "url('border.png') 27 fill", - "url('border.png') 27 27 27 27 repeat", - "repeat url('border.png') 27 27 27 27", - "url('border.png') repeat 27 27 27 27", - "url('border.png') fill 27 27 27 27 repeat", - "url('border.png') 27 27 27 27 / 1em", - "27 27 27 27 / 1em url('border.png') ", - "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat", - "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')", - "url('border.png') 27 27 27 27 / / 10 10 1em", - "fill 27 27 27 27 / / 10 10 1em url('border.png')", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ], - invalid_values: [ "url('border.png') 27 27 27 27 27", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em", - "url('border.png') 27 27 27 27 /", - "url('border.png') fill", - "url('border.png') fill repeat", - "fill repeat", - "url('border.png') fill / 1em", - "url('border.png') / repeat", - "url('border.png') 1 /", - "url('border.png') 1 / /", - "1 / url('border.png')", - "url('border.png') / 1", - "url('border.png') / / 1"] - }, - "-moz-transition": { - domProp: "MozTransition", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - alias_for: "transition", - subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], - initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ], - other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all" ], - invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial" ] - }, - "-moz-transition-delay": { - domProp: "MozTransitionDelay", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transition-delay", - subproperties: [ "transition-delay" ], - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px" ] - }, - "-moz-transition-duration": { - domProp: "MozTransitionDuration", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transition-duration", - subproperties: [ "transition-duration" ], - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px", "-1ms", "-2s" ] - }, - "-moz-transition-property": { - domProp: "MozTransitionProperty", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transition-property", - subproperties: [ "transition-property" ], - initial_values: [ "all" ], - other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all" ], - invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ] - }, - "-moz-transition-timing-function": { - domProp: "MozTransitionTimingFunction", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "transition-timing-function", - subproperties: [ "transition-timing-function" ], - initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], - other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], - invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] - }, - "-moz-animation": { - domProp: "MozAnimation", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - alias_for: "animation", - subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ], - initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ], - other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ], - invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial" ] - }, - "-moz-animation-delay": { - domProp: "MozAnimationDelay", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-delay", - subproperties: [ "animation-delay" ], - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px" ] - }, - "-moz-animation-direction": { - domProp: "MozAnimationDirection", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-direction", - subproperties: [ "animation-direction" ], - initial_values: [ "normal" ], - other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ], - invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ] - }, - "-moz-animation-duration": { - domProp: "MozAnimationDuration", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-duration", - subproperties: [ "animation-duration" ], - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px", "-1ms", "-2s" ] - }, - "-moz-animation-fill-mode": { - domProp: "MozAnimationFillMode", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-fill-mode", - subproperties: [ "animation-fill-mode" ], - initial_values: [ "none" ], - other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ], - invalid_values: [ "all"] - }, - "-moz-animation-iteration-count": { - domProp: "MozAnimationIterationCount", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-iteration-count", - subproperties: [ "animation-iteration-count" ], - initial_values: [ "1" ], - other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ], - // negatives forbidden per - // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html - invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ] - }, - "-moz-animation-name": { - domProp: "MozAnimationName", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-name", - subproperties: [ "animation-name" ], - initial_values: [ "none" ], - other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ], - invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ] - }, - "-moz-animation-play-state": { - domProp: "MozAnimationPlayState", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-play-state", - subproperties: [ "animation-play-state" ], - initial_values: [ "running" ], - other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ], - invalid_values: [ "0" ] - }, - "-moz-animation-timing-function": { - domProp: "MozAnimationTimingFunction", - inherited: false, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "animation-timing-function", - subproperties: [ "animation-timing-function" ], - initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], - other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], - invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] - } + // Aliases + "-moz-transform": { + domProp: "MozTransform", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transform", + subproperties: [ "transform" ], + prerequisites: { "width": "300px", "height": "50px" }, + initial_values: [ "none" ], + other_values: [ "translatex(1px)", "translatex(4em)", + "translatex(-4px)", "translatex(3px)", + "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", + "translatey(4em)", "translate(3px)", "translate(10px, -3px)", + "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", + "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", + "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", + "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", + "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", + "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", + "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", + "translatex(50%)", "translatey(50%)", "translate(50%)", + "translate(3%, 5px)", "translate(5px, 3%)", + "matrix(1, 2, 3, 4, 5, 6)", + /* valid calc() values */ + "translatex(calc(5px + 10%))", + "translatey(calc(0.25 * 5px + 10% / 3))", + "translate(calc(5px - 10% * 3))", + "translate(calc(5px - 3 * 10%), 50px)", + "translate(-50px, calc(5px - 10% * 3))", + /* valid only when prefixed */ + "matrix(1, 2, 3, 4, 5px, 6%)", + "matrix(1, 2, 3, 4, 5%, 6px)", + "matrix(1, 2, 3, 4, 5%, 6%)", + "matrix(1, 2, 3, 4, 5px, 6em)", + "matrix(1, 0, 0, 1, calc(5px * 3), calc(10% - 3px))", + "translatez(1px)", "translatez(4em)", "translatez(-4px)", + "translatez(0px)", "translatez(2px) translatez(5px)", + "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", + "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", + "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", + "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", + "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", + "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", + /* valid only when prefixed */ + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)", + ], + invalid_values: ["1px", "#0000ff", "red", "auto", + "translatex(1)", "translatey(1)", "translate(2)", + "translate(-3, -4)", + "translatex(1px 1px)", "translatex(translatex(1px))", + "translatex(#0000ff)", "translatex(red)", "translatey()", + "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", + "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", + "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", + "matrix(0, 1, 2, 3%, 4%, 5%)", + /* invalid calc() values */ + "translatey(-moz-min(5px,10%))", + "translatex(-moz-max(5px,10%))", + "translate(10px, calc(min(5px,10%)))", + "translate(calc(max(5px,10%)), 10%)", + "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))", + "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", + "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)", + ], + }, + "-moz-transform-origin": { + domProp: "MozTransformOrigin", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transform-origin", + subproperties: [ "transform-origin" ], + prerequisites: { "width": "10px", "height": "10px", "display": "block"}, + initial_values: [ "50% 50%", "center", "center center" ], + other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", + "top", "bottom","top left", "top right", + "top center", "center left", "center right", + "bottom left", "bottom right", "bottom center", + "20% center", "6px center", "13in bottom", + "left 50px", "right 13%", "center 40px", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)", + "6px 5px 5px", + "top center 10px" + ], + invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff", + "border", "center red", "right diagonal", + "#00ffff bottom"] + }, + "-moz-perspective-origin": { + domProp: "MozPerspectiveOrigin", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "perspective-origin", + subproperties: [ "perspective-origin" ], + prerequisites: { "width": "10px", "height": "10px", "display": "block"}, + initial_values: [ "50% 50%", "center", "center center" ], + other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", + "top", "bottom","top left", "top right", + "top center", "center left", "center right", + "bottom left", "bottom right", "bottom center", + "20% center", "6px center", "13in bottom", + "left 50px", "right 13%", "center 40px", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)" ], + invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff", + "border", "center red", "right diagonal", + "#00ffff bottom"] + }, + "-moz-perspective": { + domProp: "MozPerspective", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "perspective", + subproperties: [ "perspective" ], + initial_values: [ "none" ], + other_values: [ "1000px", "500.2px" ], + invalid_values: [ "pants", "200", "0", "-100px", "-27.2em" ] + }, + "-moz-backface-visibility": { + domProp: "MozBackfaceVisibility", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "backface-visibility", + subproperties: [ "backface-visibility" ], + initial_values: [ "visible" ], + other_values: [ "hidden" ], + invalid_values: [ "collapse" ] + }, + "-moz-transform-style": { + domProp: "MozTransformStyle", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transform-style", + subproperties: [ "transform-style" ], + initial_values: [ "flat" ], + other_values: [ "preserve-3d" ], + invalid_values: [] + }, + "-moz-border-image": { + domProp: "MozBorderImage", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + alias_for: "border-image", + subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], + initial_values: [ "none" ], + other_values: [ "url('border.png') 27 27 27 27", + "url('border.png') 27", + "stretch url('border.png')", + "url('border.png') 27 fill", + "url('border.png') 27 27 27 27 repeat", + "repeat url('border.png') 27 27 27 27", + "url('border.png') repeat 27 27 27 27", + "url('border.png') fill 27 27 27 27 repeat", + "url('border.png') 27 27 27 27 / 1em", + "27 27 27 27 / 1em url('border.png') ", + "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat", + "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')", + "url('border.png') 27 27 27 27 / / 10 10 1em", + "fill 27 27 27 27 / / 10 10 1em url('border.png')", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ], + invalid_values: [ "url('border.png') 27 27 27 27 27", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em", + "url('border.png') 27 27 27 27 /", + "url('border.png') fill", + "url('border.png') fill repeat", + "fill repeat", + "url('border.png') fill / 1em", + "url('border.png') / repeat", + "url('border.png') 1 /", + "url('border.png') 1 / /", + "1 / url('border.png')", + "url('border.png') / 1", + "url('border.png') / / 1"] + }, + "-moz-transition": { + domProp: "MozTransition", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + alias_for: "transition", + subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], + initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ], + other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all" ], + invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial" ] + }, + "-moz-transition-delay": { + domProp: "MozTransitionDelay", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transition-delay", + subproperties: [ "transition-delay" ], + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px" ] + }, + "-moz-transition-duration": { + domProp: "MozTransitionDuration", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transition-duration", + subproperties: [ "transition-duration" ], + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px", "-1ms", "-2s" ] + }, + "-moz-transition-property": { + domProp: "MozTransitionProperty", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transition-property", + subproperties: [ "transition-property" ], + initial_values: [ "all" ], + other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all" ], + invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ] + }, + "-moz-transition-timing-function": { + domProp: "MozTransitionTimingFunction", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "transition-timing-function", + subproperties: [ "transition-timing-function" ], + initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], + other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], + invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + }, + "-moz-animation": { + domProp: "MozAnimation", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + alias_for: "animation", + subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ], + initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ], + other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ], + invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial" ] + }, + "-moz-animation-delay": { + domProp: "MozAnimationDelay", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-delay", + subproperties: [ "animation-delay" ], + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px" ] + }, + "-moz-animation-direction": { + domProp: "MozAnimationDirection", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-direction", + subproperties: [ "animation-direction" ], + initial_values: [ "normal" ], + other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ], + invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ] + }, + "-moz-animation-duration": { + domProp: "MozAnimationDuration", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-duration", + subproperties: [ "animation-duration" ], + initial_values: [ "0s", "0ms" ], + other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], + invalid_values: [ "0", "0px", "-1ms", "-2s" ] + }, + "-moz-animation-fill-mode": { + domProp: "MozAnimationFillMode", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-fill-mode", + subproperties: [ "animation-fill-mode" ], + initial_values: [ "none" ], + other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ], + invalid_values: [ "all"] + }, + "-moz-animation-iteration-count": { + domProp: "MozAnimationIterationCount", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-iteration-count", + subproperties: [ "animation-iteration-count" ], + initial_values: [ "1" ], + other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ], + // negatives forbidden per + // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html + invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ] + }, + "-moz-animation-name": { + domProp: "MozAnimationName", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-name", + subproperties: [ "animation-name" ], + initial_values: [ "none" ], + other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ], + invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ] + }, + "-moz-animation-play-state": { + domProp: "MozAnimationPlayState", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-play-state", + subproperties: [ "animation-play-state" ], + initial_values: [ "running" ], + other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ], + invalid_values: [ "0" ] + }, + "-moz-animation-timing-function": { + domProp: "MozAnimationTimingFunction", + inherited: false, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "animation-timing-function", + subproperties: [ "animation-timing-function" ], + initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], + other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], + invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + } } function logical_box_prop_get_computed(cs, property) { - if (! /^-moz-/.test(property)) - throw "Unexpected property"; - property = property.substring(5); - if (cs.getPropertyValue("direction") == "ltr") - property = property.replace("-start", "-left").replace("-end", "-right"); - else - property = property.replace("-start", "-right").replace("-end", "-left"); - return cs.getPropertyValue(property); + if (! /^-moz-/.test(property)) + throw "Unexpected property"; + property = property.substring(5); + if (cs.getPropertyValue("direction") == "ltr") + property = property.replace("-start", "-left").replace("-end", "-right"); + else + property = property.replace("-start", "-right").replace("-end", "-left"); + return cs.getPropertyValue(property); } // Get the computed value for a property. For shorthands, return the // computed values of all the subproperties, delimited by " ; ". function get_computed_value(cs, property) { - var info = gCSSProperties[property]; - if (info.type == CSS_TYPE_TRUE_SHORTHAND || - (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND && - property == "text-decoration")) { - var results = []; - for (var idx in info.subproperties) { - var subprop = info.subproperties[idx]; - results.push(get_computed_value(cs, subprop)); - } - return results.join(" ; "); - } - if (info.get_computed) - return info.get_computed(cs, property); - return cs.getPropertyValue(property); + var info = gCSSProperties[property]; + if (info.type == CSS_TYPE_TRUE_SHORTHAND || + (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND && + property == "text-decoration")) { + var results = []; + for (var idx in info.subproperties) { + var subprop = info.subproperties[idx]; + results.push(get_computed_value(cs, subprop)); + } + return results.join(" ; "); + } + if (info.get_computed) + return info.get_computed(cs, property); + return cs.getPropertyValue(property); } if (SpecialPowers.getBoolPref("layout.css.touch_action.enabled")) { @@ -4367,178 +4375,178 @@ if (SpecialPowers.getBoolPref("layout.css.touch_action.enabled")) { initial_values: ["auto"], other_values: ["none", "pan-x", "pan-y", "pan-x pan-y", "pan-y pan-x"], invalid_values: ["zoom", "pinch", "tap", "10px", "2", "auto pan-x", "pan-x auto", "none pan-x", "pan-x none", - "auto pan-y", "pan-y auto", "none pan-y", "pan-y none", - "pan-x pan-y none", "none pan-x pan-y", "pan-x pan-y auto", "auto pan-x pan-y"] + "auto pan-y", "pan-y auto", "none pan-y", "pan-y none", + "pan-x pan-y none", "none pan-x pan-y", "pan-x pan-y auto", "auto pan-x pan-y"] }; } if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) { - var verticalTextProperties = { - "writing-mode": { - domProp: "writingMode", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "horizontal-tb" ], - other_values: [ "vertical-lr", "vertical-rl" ], - invalid_values: [ "10px", "30%", "justify", "auto", "1em" ] - }, - "text-orientation": { - domProp: "textOrientation", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "upright", "sideways" ], - invalid_values: [ "none", "3em" ] - }, - "text-combine-upright": { - domProp: "textCombineUpright", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "all", "digits", "digits 2", "digits 3", "digits 4", "digits 3" ], - invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0", - "digits 12", "none 3", "digits 3.1415", "digits3", "digits 1", - "digits 3 all", "digits foo", "digits all", "digits 3.0" ] - } - }; - for (var prop in verticalTextProperties) { - gCSSProperties[prop] = verticalTextProperties[prop]; - } + var verticalTextProperties = { + "writing-mode": { + domProp: "writingMode", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "horizontal-tb" ], + other_values: [ "vertical-lr", "vertical-rl" ], + invalid_values: [ "10px", "30%", "justify", "auto", "1em" ] + }, + "text-orientation": { + domProp: "textOrientation", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "upright", "sideways" ], + invalid_values: [ "none", "3em" ] + }, + "text-combine-upright": { + domProp: "textCombineUpright", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "all", "digits", "digits 2", "digits 3", "digits 4", "digits 3" ], + invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0", + "digits 12", "none 3", "digits 3.1415", "digits3", "digits 1", + "digits 3 all", "digits foo", "digits all", "digits 3.0" ] + } + }; + for (var prop in verticalTextProperties) { + gCSSProperties[prop] = verticalTextProperties[prop]; + } } if (SpecialPowers.getBoolPref("layout.css.font-features.enabled")) { - var fontFeatureProperties = { - "font-kerning": { - domProp: "fontKerning", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "normal", "none" ], - invalid_values: [ "on" ] - }, - "font-variant-alternates": { - domProp: "fontVariantAlternates", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "historical-forms", - "styleset(alt-a, alt-b)", "character-variant(a, b, c)", "annotation(circled)", - "swash(squishy)", "styleset(complex\\ blob, a)", "annotation(\\62 lah)" ], - invalid_values: [ "historical-forms normal", "historical-forms historical-forms", - "swash", "swash(3)", "annotation(a, b)", "ornaments(a,b)", - "styleset(1234blah)", "annotation(a), annotation(b)", "annotation(a) normal" ] - }, - "font-variant-caps": { - domProp: "fontVariantCaps", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "titling-caps", "unicase" ], - invalid_values: [ "normal small-caps", "petite-caps normal", "unicase unicase" ] - }, - "font-variant-east-asian": { - domProp: "fontVariantEastAsian", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "jis78", "jis83", "jis90", "jis04", "simplified", "traditional", "full-width", "proportional-width", "ruby", - "jis78 full-width", "jis78 full-width ruby", "simplified proportional-width", "ruby simplified" ], - invalid_values: [ "jis78 normal", "jis90 jis04", "simplified traditional", "full-width proportional-width", - "ruby simplified ruby", "jis78 ruby simplified" ] - }, - "font-variant-ligatures": { - domProp: "fontVariantLigatures", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", - "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual", - "common-ligatures no-discretionary-ligatures", "contextual no-discretionary-ligatures", - "historical-ligatures no-common-ligatures", "no-historical-ligatures discretionary-ligatures", - "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual" ], - invalid_values: [ "common-ligatures normal", "common-ligatures no-common-ligatures", "common-ligatures common-ligatures", - "no-historical-ligatures historical-ligatures", "no-discretionary-ligatures discretionary-ligatures", - "no-contextual contextual", "common-ligatures no-discretionary-ligatures no-common-ligatures", - "common-ligatures none", "no-discretionary-ligatures none", "none common-ligatures" ] - }, - "font-variant-numeric": { - domProp: "fontVariantNumeric", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", - "stacked-fractions", "slashed-zero", "ordinal", "lining-nums diagonal-fractions", - "tabular-nums stacked-fractions", "tabular-nums slashed-zero stacked-fractions", - "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal" ], - invalid_values: [ "lining-nums normal", "lining-nums oldstyle-nums", "lining-nums normal slashed-zero ordinal", - "proportional-nums tabular-nums", "diagonal-fractions stacked-fractions", "slashed-zero diagonal-fractions slashed-zero", - "lining-nums slashed-zero diagonal-fractions oldstyle-nums", "diagonal-fractions diagonal-fractions" ] - }, - "font-variant-position": { - domProp: "fontVariantPosition", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "super", "sub" ], - invalid_values: [ "normal sub", "super sub" ] - }, - "font-synthesis": { - domProp: "fontSynthesis", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "weight style" ], - other_values: [ "none", "weight", "style" ], - invalid_values: [ "weight none", "style none", "none style", "weight 10px", "weight weight", "style style" ] - }, - // aliases for prefixed properties - "font-feature-settings": { - domProp: "fontFeatureSettings", - inherited: true, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "-moz-font-feature-settings", - subproperties: [ "-moz-font-feature-settings" ], - initial_values: [ "normal" ], - other_values: [ - "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", - "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', - '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', - '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', - '"liga" ,"smcp" 0 , "blah"' - ], - invalid_values: [ - 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', - 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", - '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', - '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' - ] - }, - "font-language-override": { - domProp: "fontLanguageOverride", - inherited: true, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "-moz-font-language-override", - subproperties: [ "-moz-font-language-override" ], - initial_values: [ "normal" ], - other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], - invalid_values: [ "TRK", "ja" ] - } - }; - for (var prop in fontFeatureProperties) { - gCSSProperties[prop] = fontFeatureProperties[prop]; - } - var fontAdditions = [ "font-kerning", "font-synthesis", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position" ]; - gCSSProperties["font"].subproperties = gCSSProperties["font"].subproperties.concat(fontAdditions); + var fontFeatureProperties = { + "font-kerning": { + domProp: "fontKerning", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "normal", "none" ], + invalid_values: [ "on" ] + }, + "font-variant-alternates": { + domProp: "fontVariantAlternates", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "historical-forms", + "styleset(alt-a, alt-b)", "character-variant(a, b, c)", "annotation(circled)", + "swash(squishy)", "styleset(complex\\ blob, a)", "annotation(\\62 lah)" ], + invalid_values: [ "historical-forms normal", "historical-forms historical-forms", + "swash", "swash(3)", "annotation(a, b)", "ornaments(a,b)", + "styleset(1234blah)", "annotation(a), annotation(b)", "annotation(a) normal" ] + }, + "font-variant-caps": { + domProp: "fontVariantCaps", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "titling-caps", "unicase" ], + invalid_values: [ "normal small-caps", "petite-caps normal", "unicase unicase" ] + }, + "font-variant-east-asian": { + domProp: "fontVariantEastAsian", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "jis78", "jis83", "jis90", "jis04", "simplified", "traditional", "full-width", "proportional-width", "ruby", + "jis78 full-width", "jis78 full-width ruby", "simplified proportional-width", "ruby simplified" ], + invalid_values: [ "jis78 normal", "jis90 jis04", "simplified traditional", "full-width proportional-width", + "ruby simplified ruby", "jis78 ruby simplified" ] + }, + "font-variant-ligatures": { + domProp: "fontVariantLigatures", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", + "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual", + "common-ligatures no-discretionary-ligatures", "contextual no-discretionary-ligatures", + "historical-ligatures no-common-ligatures", "no-historical-ligatures discretionary-ligatures", + "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual" ], + invalid_values: [ "common-ligatures normal", "common-ligatures no-common-ligatures", "common-ligatures common-ligatures", + "no-historical-ligatures historical-ligatures", "no-discretionary-ligatures discretionary-ligatures", + "no-contextual contextual", "common-ligatures no-discretionary-ligatures no-common-ligatures", + "common-ligatures none", "no-discretionary-ligatures none", "none common-ligatures" ] + }, + "font-variant-numeric": { + domProp: "fontVariantNumeric", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", + "stacked-fractions", "slashed-zero", "ordinal", "lining-nums diagonal-fractions", + "tabular-nums stacked-fractions", "tabular-nums slashed-zero stacked-fractions", + "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal" ], + invalid_values: [ "lining-nums normal", "lining-nums oldstyle-nums", "lining-nums normal slashed-zero ordinal", + "proportional-nums tabular-nums", "diagonal-fractions stacked-fractions", "slashed-zero diagonal-fractions slashed-zero", + "lining-nums slashed-zero diagonal-fractions oldstyle-nums", "diagonal-fractions diagonal-fractions" ] + }, + "font-variant-position": { + domProp: "fontVariantPosition", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "super", "sub" ], + invalid_values: [ "normal sub", "super sub" ] + }, + "font-synthesis": { + domProp: "fontSynthesis", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "weight style" ], + other_values: [ "none", "weight", "style" ], + invalid_values: [ "weight none", "style none", "none style", "weight 10px", "weight weight", "style style" ] + }, + // aliases for prefixed properties + "font-feature-settings": { + domProp: "fontFeatureSettings", + inherited: true, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "-moz-font-feature-settings", + subproperties: [ "-moz-font-feature-settings" ], + initial_values: [ "normal" ], + other_values: [ + "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", + "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', + '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', + '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', + '"liga" ,"smcp" 0 , "blah"' + ], + invalid_values: [ + 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', + 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", + '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', + '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' + ] + }, + "font-language-override": { + domProp: "fontLanguageOverride", + inherited: true, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "-moz-font-language-override", + subproperties: [ "-moz-font-language-override" ], + initial_values: [ "normal" ], + other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], + invalid_values: [ "TRK", "ja" ] + } + }; + for (var prop in fontFeatureProperties) { + gCSSProperties[prop] = fontFeatureProperties[prop]; + } + var fontAdditions = [ "font-kerning", "font-synthesis", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position" ]; + gCSSProperties["font"].subproperties = gCSSProperties["font"].subproperties.concat(fontAdditions); } if (SpecialPowers.getBoolPref("layout.css.masking.enabled")) { - gCSSProperties["mask-type"] = { - domProp: "maskType", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "luminance" ], - other_values: [ "alpha" ], - invalid_values: [] - }; + gCSSProperties["mask-type"] = { + domProp: "maskType", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "luminance" ], + other_values: [ "alpha" ], + invalid_values: [] + }; } if (SpecialPowers.getBoolPref("svg.paint-order.enabled")) { @@ -4553,841 +4561,830 @@ if (SpecialPowers.getBoolPref("svg.paint-order.enabled")) { } if (SpecialPowers.getBoolPref("layout.css.filters.enabled")) { - gCSSProperties["filter"] = { - domProp: "filter", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - // SVG reference filters - "url(#my-filter)", - "url(#my-filter-1) url(#my-filter-2)", + gCSSProperties["filter"] = { + domProp: "filter", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + // SVG reference filters + "url(#my-filter)", + "url(#my-filter-1) url(#my-filter-2)", - // Filter functions - "opacity(50%) saturate(1.0)", - "invert(50%) sepia(0.1) brightness(90%)", + // Filter functions + "opacity(50%) saturate(1.0)", + "invert(50%) sepia(0.1) brightness(90%)", - // Mixed SVG reference filters and filter functions - "grayscale(1) url(#my-filter-1)", - "url(#my-filter-1) brightness(50%) contrast(0.9)", + // Mixed SVG reference filters and filter functions + "grayscale(1) url(#my-filter-1)", + "url(#my-filter-1) brightness(50%) contrast(0.9)", - // The CSS parser will accept these weird URLs. However, we'll fail - // to resolve them when computing style, so we'll fall back to the - // initial value ("none"). - "url('feed:javascript:5')", - "blur(3px) url('feed:javascript:5') grayscale(50%)", + // The CSS parser will accept these weird URLs. However, we'll fail + // to resolve them when computing style, so we'll fall back to the + // initial value ("none"). + "url('feed:javascript:5')", + "blur(3px) url('feed:javascript:5') grayscale(50%)", - "blur(0)", - "blur(0px)", - "blur(0.5px)", - "blur(3px)", - "blur(100px)", - "blur(0.1em)", - "blur(calc(-1px))", // Parses and becomes blur(0px). - "blur(calc(0px))", - "blur(calc(5px))", - "blur(calc(2 * 5px))", + "blur(0)", + "blur(0px)", + "blur(0.5px)", + "blur(3px)", + "blur(100px)", + "blur(0.1em)", + "blur(calc(-1px))", // Parses and becomes blur(0px). + "blur(calc(0px))", + "blur(calc(5px))", + "blur(calc(2 * 5px))", - "brightness(0)", - "brightness(50%)", - "brightness(1)", - "brightness(1.0)", - "brightness(2)", - "brightness(350%)", - "brightness(4.567)", + "brightness(0)", + "brightness(50%)", + "brightness(1)", + "brightness(1.0)", + "brightness(2)", + "brightness(350%)", + "brightness(4.567)", - "contrast(0)", - "contrast(50%)", - "contrast(1)", - "contrast(1.0)", - "contrast(2)", - "contrast(350%)", - "contrast(4.567)", + "contrast(0)", + "contrast(50%)", + "contrast(1)", + "contrast(1.0)", + "contrast(2)", + "contrast(350%)", + "contrast(4.567)", - "drop-shadow(2px 2px)", - "drop-shadow(2px 2px 1px)", - "drop-shadow(2px 2px green)", - "drop-shadow(2px 2px 1px green)", - "drop-shadow(green 2px 2px)", - "drop-shadow(green 2px 2px 1px)", - "drop-shadow(currentColor 3px 3px)", - "drop-shadow(2px 2px calc(-5px))", /* clamped */ - "drop-shadow(calc(3em - 2px) 2px green)", - "drop-shadow(green calc(3em - 2px) 2px)", - "drop-shadow(2px calc(2px + 0.2em))", - "drop-shadow(blue 2px calc(2px + 0.2em))", - "drop-shadow(2px calc(2px + 0.2em) blue)", - "drop-shadow(calc(-2px) calc(-2px))", - "drop-shadow(-2px -2px)", - "drop-shadow(calc(2px) calc(2px))", - "drop-shadow(calc(2px) calc(2px) calc(2px))", + "drop-shadow(2px 2px)", + "drop-shadow(2px 2px 1px)", + "drop-shadow(2px 2px green)", + "drop-shadow(2px 2px 1px green)", + "drop-shadow(green 2px 2px)", + "drop-shadow(green 2px 2px 1px)", + "drop-shadow(currentColor 3px 3px)", + "drop-shadow(2px 2px calc(-5px))", /* clamped */ + "drop-shadow(calc(3em - 2px) 2px green)", + "drop-shadow(green calc(3em - 2px) 2px)", + "drop-shadow(2px calc(2px + 0.2em))", + "drop-shadow(blue 2px calc(2px + 0.2em))", + "drop-shadow(2px calc(2px + 0.2em) blue)", + "drop-shadow(calc(-2px) calc(-2px))", + "drop-shadow(-2px -2px)", + "drop-shadow(calc(2px) calc(2px))", + "drop-shadow(calc(2px) calc(2px) calc(2px))", - "grayscale(0)", - "grayscale(50%)", - "grayscale(1)", - "grayscale(1.0)", - "grayscale(2)", - "grayscale(350%)", - "grayscale(4.567)", + "grayscale(0)", + "grayscale(50%)", + "grayscale(1)", + "grayscale(1.0)", + "grayscale(2)", + "grayscale(350%)", + "grayscale(4.567)", - "hue-rotate(0deg)", - "hue-rotate(90deg)", - "hue-rotate(540deg)", - "hue-rotate(-90deg)", - "hue-rotate(10grad)", - "hue-rotate(1.6rad)", - "hue-rotate(-1.6rad)", - "hue-rotate(0.5turn)", - "hue-rotate(-2turn)", + "hue-rotate(0deg)", + "hue-rotate(90deg)", + "hue-rotate(540deg)", + "hue-rotate(-90deg)", + "hue-rotate(10grad)", + "hue-rotate(1.6rad)", + "hue-rotate(-1.6rad)", + "hue-rotate(0.5turn)", + "hue-rotate(-2turn)", - "invert(0)", - "invert(50%)", - "invert(1)", - "invert(1.0)", - "invert(2)", - "invert(350%)", - "invert(4.567)", + "invert(0)", + "invert(50%)", + "invert(1)", + "invert(1.0)", + "invert(2)", + "invert(350%)", + "invert(4.567)", - "opacity(0)", - "opacity(50%)", - "opacity(1)", - "opacity(1.0)", - "opacity(2)", - "opacity(350%)", - "opacity(4.567)", + "opacity(0)", + "opacity(50%)", + "opacity(1)", + "opacity(1.0)", + "opacity(2)", + "opacity(350%)", + "opacity(4.567)", - "saturate(0)", - "saturate(50%)", - "saturate(1)", - "saturate(1.0)", - "saturate(2)", - "saturate(350%)", - "saturate(4.567)", + "saturate(0)", + "saturate(50%)", + "saturate(1)", + "saturate(1.0)", + "saturate(2)", + "saturate(350%)", + "saturate(4.567)", - "sepia(0)", - "sepia(50%)", - "sepia(1)", - "sepia(1.0)", - "sepia(2)", - "sepia(350%)", - "sepia(4.567)", - ], - invalid_values: [ - // none - "none none", - "url(#my-filter) none", - "none url(#my-filter)", - "blur(2px) none url(#my-filter)", + "sepia(0)", + "sepia(50%)", + "sepia(1)", + "sepia(1.0)", + "sepia(2)", + "sepia(350%)", + "sepia(4.567)", + ], + invalid_values: [ + // none + "none none", + "url(#my-filter) none", + "none url(#my-filter)", + "blur(2px) none url(#my-filter)", - // Nested filters - "grayscale(invert(1.0))", + // Nested filters + "grayscale(invert(1.0))", - // Comma delimited filters - "url(#my-filter),", - "invert(50%), url(#my-filter), brightness(90%)", + // Comma delimited filters + "url(#my-filter),", + "invert(50%), url(#my-filter), brightness(90%)", - // Test the following situations for each filter function: - // - Invalid number of arguments - // - Comma delimited arguments - // - Wrong argument type - // - Argument value out of range - "blur()", - "blur(3px 5px)", - "blur(3px,)", - "blur(3px, 5px)", - "blur(#my-filter)", - "blur(0.5)", - "blur(50%)", - "blur(calc(0))", // Unitless zero in calc is not a valid length. - "blur(calc(0.1))", - "blur(calc(10%))", - "blur(calc(20px - 5%))", - "blur(-3px)", + // Test the following situations for each filter function: + // - Invalid number of arguments + // - Comma delimited arguments + // - Wrong argument type + // - Argument value out of range + "blur()", + "blur(3px 5px)", + "blur(3px,)", + "blur(3px, 5px)", + "blur(#my-filter)", + "blur(0.5)", + "blur(50%)", + "blur(calc(0))", // Unitless zero in calc is not a valid length. + "blur(calc(0.1))", + "blur(calc(10%))", + "blur(calc(20px - 5%))", + "blur(-3px)", - "brightness()", - "brightness(0.5 0.5)", - "brightness(0.5,)", - "brightness(0.5, 0.5)", - "brightness(#my-filter)", - "brightness(10px)", - "brightness(-1)", + "brightness()", + "brightness(0.5 0.5)", + "brightness(0.5,)", + "brightness(0.5, 0.5)", + "brightness(#my-filter)", + "brightness(10px)", + "brightness(-1)", - "contrast()", - "contrast(0.5 0.5)", - "contrast(0.5,)", - "contrast(0.5, 0.5)", - "contrast(#my-filter)", - "contrast(10px)", - "contrast(-1)", + "contrast()", + "contrast(0.5 0.5)", + "contrast(0.5,)", + "contrast(0.5, 0.5)", + "contrast(#my-filter)", + "contrast(10px)", + "contrast(-1)", - "drop-shadow()", - "drop-shadow(3% 3%)", - "drop-shadow(2px 2px -5px)", - "drop-shadow(2px 2px 2px 2px)", - "drop-shadow(2px 2px, none)", - "drop-shadow(none, 2px 2px)", - "drop-shadow(inherit, 2px 2px)", - "drop-shadow(2px 2px, inherit)", - "drop-shadow(2 2px)", - "drop-shadow(2px 2)", - "drop-shadow(2px 2px 2)", - "drop-shadow(2px 2px 2px 2)", - "drop-shadow(calc(2px) calc(2px) calc(2px) calc(2px))", - "drop-shadow(green 2px 2px, blue 1px 3px 4px)", - "drop-shadow(blue 2px 2px, currentColor 1px 2px)", + "drop-shadow()", + "drop-shadow(3% 3%)", + "drop-shadow(2px 2px -5px)", + "drop-shadow(2px 2px 2px 2px)", + "drop-shadow(2px 2px, none)", + "drop-shadow(none, 2px 2px)", + "drop-shadow(inherit, 2px 2px)", + "drop-shadow(2px 2px, inherit)", + "drop-shadow(2 2px)", + "drop-shadow(2px 2)", + "drop-shadow(2px 2px 2)", + "drop-shadow(2px 2px 2px 2)", + "drop-shadow(calc(2px) calc(2px) calc(2px) calc(2px))", + "drop-shadow(green 2px 2px, blue 1px 3px 4px)", + "drop-shadow(blue 2px 2px, currentColor 1px 2px)", - "grayscale()", - "grayscale(0.5 0.5)", - "grayscale(0.5,)", - "grayscale(0.5, 0.5)", - "grayscale(#my-filter)", - "grayscale(10px)", - "grayscale(-1)", + "grayscale()", + "grayscale(0.5 0.5)", + "grayscale(0.5,)", + "grayscale(0.5, 0.5)", + "grayscale(#my-filter)", + "grayscale(10px)", + "grayscale(-1)", - "hue-rotate()", - "hue-rotate(0)", - "hue-rotate(0.5 0.5)", - "hue-rotate(0.5,)", - "hue-rotate(0.5, 0.5)", - "hue-rotate(#my-filter)", - "hue-rotate(10px)", - "hue-rotate(-1)", - "hue-rotate(45deg,)", + "hue-rotate()", + "hue-rotate(0)", + "hue-rotate(0.5 0.5)", + "hue-rotate(0.5,)", + "hue-rotate(0.5, 0.5)", + "hue-rotate(#my-filter)", + "hue-rotate(10px)", + "hue-rotate(-1)", + "hue-rotate(45deg,)", - "invert()", - "invert(0.5 0.5)", - "invert(0.5,)", - "invert(0.5, 0.5)", - "invert(#my-filter)", - "invert(10px)", - "invert(-1)", + "invert()", + "invert(0.5 0.5)", + "invert(0.5,)", + "invert(0.5, 0.5)", + "invert(#my-filter)", + "invert(10px)", + "invert(-1)", - "opacity()", - "opacity(0.5 0.5)", - "opacity(0.5,)", - "opacity(0.5, 0.5)", - "opacity(#my-filter)", - "opacity(10px)", - "opacity(-1)", + "opacity()", + "opacity(0.5 0.5)", + "opacity(0.5,)", + "opacity(0.5, 0.5)", + "opacity(#my-filter)", + "opacity(10px)", + "opacity(-1)", - "saturate()", - "saturate(0.5 0.5)", - "saturate(0.5,)", - "saturate(0.5, 0.5)", - "saturate(#my-filter)", - "saturate(10px)", - "saturate(-1)", + "saturate()", + "saturate(0.5 0.5)", + "saturate(0.5,)", + "saturate(0.5, 0.5)", + "saturate(#my-filter)", + "saturate(10px)", + "saturate(-1)", - "sepia()", - "sepia(0.5 0.5)", - "sepia(0.5,)", - "sepia(0.5, 0.5)", - "sepia(#my-filter)", - "sepia(10px)", - "sepia(-1)", - ] - }; + "sepia()", + "sepia(0.5 0.5)", + "sepia(0.5,)", + "sepia(0.5, 0.5)", + "sepia(#my-filter)", + "sepia(10px)", + "sepia(-1)", + ] + }; } if (SpecialPowers.getBoolPref("layout.css.grid.enabled")) { - gCSSProperties["display"].other_values.push("grid", "inline-grid"); - gCSSProperties["grid-auto-flow"] = { - domProp: "gridAutoFlow", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "column", - "row", - "column dense", - "row dense", - "dense column", - "dense row", - ], - invalid_values: [ - "", - "auto", - "10px", - "dense", - "none row", - "none dense", - "column row", - "dense row dense", - ] - }; + gCSSProperties["display"].other_values.push("grid", "inline-grid"); + gCSSProperties["grid-auto-flow"] = { + domProp: "gridAutoFlow", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + "column", + "row", + "column dense", + "row dense", + "dense column", + "dense row", + ], + invalid_values: [ + "", + "auto", + "10px", + "dense", + "none row", + "none dense", + "column row", + "dense row dense", + ] + }; - gCSSProperties["grid-auto-columns"] = { - domProp: "gridAutoColumns", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ - "40px", - "2em", - "2.5fr", - "12%", - "min-content", - "max-content", - "calc(20px + 10%)", - "minmax(20px, max-content)", - "m\\69nmax(20px, 4Fr)", - "MinMax(min-content, calc(20px + 10%))", - ], - invalid_values: [ - "", - "normal", - "40ms", - "-40px", - "-12%", - "-2em", - "-2.5fr", - "minmax()", - "minmax(20px)", - "mİnmax(20px, 100px)", - "minmax(20px, 100px, 200px)", - "maxmin(100px, 20px)", - "minmax(min-content, auto)", - "minmax(min-content, minmax(30px, max-content))", - ] - }; - gCSSProperties["grid-auto-rows"] = { - domProp: "gridAutoRows", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: gCSSProperties["grid-auto-columns"].initial_values, - other_values: gCSSProperties["grid-auto-columns"].other_values, - invalid_values: gCSSProperties["grid-auto-columns"].invalid_values - }; + gCSSProperties["grid-auto-columns"] = { + domProp: "gridAutoColumns", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ + "40px", + "2em", + "2.5fr", + "12%", + "min-content", + "max-content", + "calc(20px + 10%)", + "minmax(20px, max-content)", + "m\\69nmax(20px, 4Fr)", + "MinMax(min-content, calc(20px + 10%))", + ], + invalid_values: [ + "", + "normal", + "40ms", + "-40px", + "-12%", + "-2em", + "-2.5fr", + "minmax()", + "minmax(20px)", + "mİnmax(20px, 100px)", + "minmax(20px, 100px, 200px)", + "maxmin(100px, 20px)", + "minmax(min-content, auto)", + "minmax(min-content, minmax(30px, max-content))", + ] + }; + gCSSProperties["grid-auto-rows"] = { + domProp: "gridAutoRows", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: gCSSProperties["grid-auto-columns"].initial_values, + other_values: gCSSProperties["grid-auto-columns"].other_values, + invalid_values: gCSSProperties["grid-auto-columns"].invalid_values + }; - gCSSProperties["grid-template-columns"] = { - domProp: "gridTemplateColumns", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "auto", - "40px", - "2.5fr", - "(normal) 40px () auto ( ) 12%", - "(foo) 40px min-content ( bar ) calc(20px + 10%) max-content", - "40px min-content calc(20px + 10%) max-content", - "m\\69nmax(20px, 4Fr)", - "40px MinMax(min-content, calc(20px + 10%)) max-content", - "40px 2em", - "() 40px (-foo) 2em (bar baz This\ is\ one\ ident)", - // TODO bug 978478: "(a) repeat(3, (b) 20px (c) 40px (d)) (e)", - "repeat(1, 20px)", - "repeat(1, (a) 20px)", - "(a) Repeat(4, (a) 20px () auto (b c)) (d)", - "(a) 2.5fr Repeat(4, (a) 20px () auto (b c)) (d)", - "(a) 2.5fr (z) Repeat(4, (a) 20px () auto (b c)) (d)", - "(a) 2.5fr (z) Repeat(4, (a) 20px () auto) (d)", - "(a) 2.5fr (z) Repeat(4, 20px (b c) auto (b c)) (d)", - "(a) 2.5fr (z) Repeat(4, 20px auto) (d)", + gCSSProperties["grid-template-columns"] = { + domProp: "gridTemplateColumns", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + "auto", + "40px", + "2.5fr", + "(normal) 40px () auto ( ) 12%", + "(foo) 40px min-content ( bar ) calc(20px + 10%) max-content", + "40px min-content calc(20px + 10%) max-content", + "m\\69nmax(20px, 4Fr)", + "40px MinMax(min-content, calc(20px + 10%)) max-content", + "40px 2em", + "() 40px (-foo) 2em (bar baz This\ is\ one\ ident)", + // TODO bug 978478: "(a) repeat(3, (b) 20px (c) 40px (d)) (e)", + "repeat(1, 20px)", + "repeat(1, (a) 20px)", + "(a) Repeat(4, (a) 20px () auto (b c)) (d)", + "(a) 2.5fr Repeat(4, (a) 20px () auto (b c)) (d)", + "(a) 2.5fr (z) Repeat(4, (a) 20px () auto (b c)) (d)", + "(a) 2.5fr (z) Repeat(4, (a) 20px () auto) (d)", + "(a) 2.5fr (z) Repeat(4, 20px (b c) auto (b c)) (d)", + "(a) 2.5fr (z) Repeat(4, 20px auto) (d)", - // See https://bugzilla.mozilla.org/show_bug.cgi?id=981300 - "(none auto subgrid min-content max-content foo) 40px", + // See https://bugzilla.mozilla.org/show_bug.cgi?id=981300 + "(none auto subgrid min-content max-content foo) 40px", - "subgrid", - "subgrid () (foo bar)", - "subgrid repeat(1, ())", - "subgrid Repeat(4, (a) (b c) () (d))", - ], - invalid_values: [ - "", - "normal", - "40ms", - "-40px", - "-12%", - "-2fr", - "(foo)", - "(inherit) 40px", - "(initial) 40px", - "(unset) 40px", - "(default) 40px", - "(6%) 40px", - "(5th) 40px", - "(foo() bar) 40px", - "(foo)) 40px", - "[foo] 40px", - "(foo) (bar) 40px", - "40px (foo) (bar)", - "minmax()", - "minmax(20px)", - "mİnmax(20px, 100px)", - "minmax(20px, 100px, 200px)", - "maxmin(100px, 20px)", - "minmax(min-content, auto)", - "minmax(min-content, minmax(30px, max-content))", - "repeat(0, 20px)", - "repeat(-3, 20px)", - "rêpeat(1, 20px)", - "repeat(1)", - "repeat(1, )", - "repeat(3px, 20px)", - "repeat(2.0, 20px)", - "repeat(2.5, 20px)", - "repeat(2, (foo))", - "repeat(2, foo)", - "subgrid (foo) 40px", - "subgrid (foo 40px)", - "(foo) subgrid", - "subgrid rêpeat(1, ())", - "subgrid repeat(0, ())", - "subgrid repeat(-3, ())", - "subgrid repeat(2.0, ())", - "subgrid repeat(2.5, ())", - "subgrid repeat(3px, ())", - "subgrid repeat(1)", - "subgrid repeat(1, )", - "subgrid repeat(2, (40px))", - "subgrid repeat(2, foo)", - ], - unbalanced_values: [ - "(foo] 40px", - ] - }; - gCSSProperties["grid-template-rows"] = { - domProp: "gridTemplateRows", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: gCSSProperties["grid-template-columns"].initial_values, - other_values: gCSSProperties["grid-template-columns"].other_values, - invalid_values: gCSSProperties["grid-template-columns"].invalid_values - }; - gCSSProperties["grid-template-areas"] = { - domProp: "gridTemplateAreas", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "''", - "'' ''", - "'1a-é_ .' \"b .\"", - "' Z\t\\aZ' 'Z Z'", - " '. . a b' '..a b' ", - ], - invalid_values: [ - "'a b' 'a/b'", - "'a . a'", - "'. a a' 'a a a'", - "'a a .' 'a a a'", - "'a a' 'a .'", - "'a a'\n'..'\n'a a'", - ] - }; + "subgrid", + "subgrid () (foo bar)", + "subgrid repeat(1, ())", + "subgrid Repeat(4, (a) (b c) () (d))", + ], + invalid_values: [ + "", + "normal", + "40ms", + "-40px", + "-12%", + "-2fr", + "(foo)", + "(inherit) 40px", + "(initial) 40px", + "(unset) 40px", + "(default) 40px", + "(6%) 40px", + "(5th) 40px", + "(foo() bar) 40px", + "(foo)) 40px", + "[foo] 40px", + "(foo) (bar) 40px", + "40px (foo) (bar)", + "minmax()", + "minmax(20px)", + "mİnmax(20px, 100px)", + "minmax(20px, 100px, 200px)", + "maxmin(100px, 20px)", + "minmax(min-content, auto)", + "minmax(min-content, minmax(30px, max-content))", + "repeat(0, 20px)", + "repeat(-3, 20px)", + "rêpeat(1, 20px)", + "repeat(1)", + "repeat(1, )", + "repeat(3px, 20px)", + "repeat(2.0, 20px)", + "repeat(2.5, 20px)", + "repeat(2, (foo))", + "repeat(2, foo)", + "subgrid (foo) 40px", + "subgrid (foo 40px)", + "(foo) subgrid", + "subgrid rêpeat(1, ())", + "subgrid repeat(0, ())", + "subgrid repeat(-3, ())", + "subgrid repeat(2.0, ())", + "subgrid repeat(2.5, ())", + "subgrid repeat(3px, ())", + "subgrid repeat(1)", + "subgrid repeat(1, )", + "subgrid repeat(2, (40px))", + "subgrid repeat(2, foo)", + ], + unbalanced_values: [ + "(foo] 40px", + ] + }; + gCSSProperties["grid-template-rows"] = { + domProp: "gridTemplateRows", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: gCSSProperties["grid-template-columns"].initial_values, + other_values: gCSSProperties["grid-template-columns"].other_values, + invalid_values: gCSSProperties["grid-template-columns"].invalid_values + }; + gCSSProperties["grid-template-areas"] = { + domProp: "gridTemplateAreas", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ + "''", + "'' ''", + "'1a-é_ .' \"b .\"", + "' Z\t\\aZ' 'Z Z'", + " '. . a b' '..a b' ", + ], + invalid_values: [ + "'a b' 'a/b'", + "'a . a'", + "'. a a' 'a a a'", + "'a a .' 'a a a'", + "'a a' 'a .'", + "'a a'\n'..'\n'a a'", + ] + }; - gCSSProperties["grid-template"] = { - domProp: "gridTemplate", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-template-areas", - "grid-template-columns", - "grid-template-rows", - ], - initial_values: [ - "none", - "none / none", - ], - other_values: [ - "subgrid", - // <'grid-template-columns'> / <'grid-template-rows'> - "40px / 100px", - "(foo) 40px (bar) / (baz) 100px (fizz)", - " none/100px", - "40px/none", - "subgrid/40px 20px", - "subgrid (foo) () (bar baz) / 40px 20px", - "40px 20px/subgrid", - "40px 20px/subgrid (foo) () repeat(3, (a) (b)) (bar baz)", - "subgrid/subgrid", - "subgrid (foo) () (bar baz)/subgrid (foo) () (bar baz)", - // [ / ]? [ ? ? ? ]+ - "'fizz'", - "(bar) 'fizz'", - "(foo) 40px / 'fizz'", - "(foo) 40px / (bar) 'fizz'", - "(foo) 40px / 'fizz' 100px", - "(foo) 40px / (bar) 'fizz' 100px", - "(foo) 40px / (bar) 'fizz' 100px (buzz)", - "(foo) 40px / (bar) 'fizz' 100px (buzz) \n (a) '.' 200px (b)", - ], - invalid_values: [ - "subgrid ()", - "subgrid () / 'fizz'", - "subgrid / 'fizz'", - "(foo) (bar) 40px / 100px", - "40px / (fizz) (buzz) 100px", - "40px / (fizz) (buzz) 'foo'", - "none / 'foo'" - ] - }; + gCSSProperties["grid-template"] = { + domProp: "gridTemplate", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "grid-template-areas", + "grid-template-columns", + "grid-template-rows", + ], + initial_values: [ + "none", + "none / none", + ], + other_values: [ + "subgrid", + // <'grid-template-columns'> / <'grid-template-rows'> + "40px / 100px", + "(foo) 40px (bar) / (baz) 100px (fizz)", + " none/100px", + "40px/none", + "subgrid/40px 20px", + "subgrid (foo) () (bar baz) / 40px 20px", + "40px 20px/subgrid", + "40px 20px/subgrid (foo) () repeat(3, (a) (b)) (bar baz)", + "subgrid/subgrid", + "subgrid (foo) () (bar baz)/subgrid (foo) () (bar baz)", + // [ / ]? [ ? ? ? ]+ + "'fizz'", + "(bar) 'fizz'", + "(foo) 40px / 'fizz'", + "(foo) 40px / (bar) 'fizz'", + "(foo) 40px / 'fizz' 100px", + "(foo) 40px / (bar) 'fizz' 100px", + "(foo) 40px / (bar) 'fizz' 100px (buzz)", + "(foo) 40px / (bar) 'fizz' 100px (buzz) \n (a) '.' 200px (b)", + ], + invalid_values: [ + "subgrid ()", + "subgrid () / 'fizz'", + "subgrid / 'fizz'", + "(foo) (bar) 40px / 100px", + "40px / (fizz) (buzz) 100px", + "40px / (fizz) (buzz) 'foo'", + "none / 'foo'" + ] + }; - gCSSProperties["grid"] = { - domProp: "grid", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-template-areas", - "grid-template-columns", - "grid-template-rows", - "grid-auto-flow", - "grid-auto-columns", - "grid-auto-rows", - ], - initial_values: [ - "none", - "none / none", - "none auto", - "none auto / auto", - ], - other_values: [ - "row", - "none 40px", - "column dense auto", - "dense row minmax(min-content, 2fr)", - "row 40px / 100px", - ].concat( - gCSSProperties["grid-template"].other_values, - gCSSProperties["grid-auto-flow"].other_values - ), - invalid_values: [ - "row column 40px", - "row -20px", - "row 200ms", - "row 40px 100px", - ].concat( - gCSSProperties["grid-template"].invalid_values, - gCSSProperties["grid-auto-flow"].invalid_values - ) - }; + gCSSProperties["grid"] = { + domProp: "grid", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "grid-template-areas", + "grid-template-columns", + "grid-template-rows", + "grid-auto-flow", + "grid-auto-columns", + "grid-auto-rows", + ], + initial_values: [ + "none", + "none / none", + "none auto", + "none auto / auto", + ], + other_values: [ + "row", + "none 40px", + "column dense auto", + "dense row minmax(min-content, 2fr)", + "row 40px / 100px", + ].concat( + gCSSProperties["grid-template"].other_values, + gCSSProperties["grid-auto-flow"].other_values + ), + invalid_values: [ + "row column 40px", + "row -20px", + "row 200ms", + "row 40px 100px", + ].concat( + gCSSProperties["grid-template"].invalid_values, + gCSSProperties["grid-auto-flow"].invalid_values + ) + }; - var gridLineOtherValues = [ - "foo", - "2", - "2 foo", - "foo 2", - "-3", - "-3 bar", - "bar -3", - "span 2", - "2 span", - "span foo", - "foo span", - "span 2 foo", - "span foo 2", - "2 foo span", - "foo 2 span", - ]; - var gridLineInvalidValues = [ - "", - "4th", - "span", - "inherit 2", - "2 inherit", - "20px", - "2 3", - "2.5", - "2.0", - "0", - "0 foo", - "span 0", - "2 foo 3", - "foo 2 foo", - "2 span foo", - "foo span 2", - "span -3", - "span -3 bar", - "span 2 span", - "span foo span", - "span 2 foo span", - ]; + var gridLineOtherValues = [ + "foo", + "2", + "2 foo", + "foo 2", + "-3", + "-3 bar", + "bar -3", + "span 2", + "2 span", + "span foo", + "foo span", + "span 2 foo", + "span foo 2", + "2 foo span", + "foo 2 span", + ]; + var gridLineInvalidValues = [ + "", + "4th", + "span", + "inherit 2", + "2 inherit", + "20px", + "2 3", + "2.5", + "2.0", + "0", + "0 foo", + "span 0", + "2 foo 3", + "foo 2 foo", + "2 span foo", + "foo span 2", + "span -3", + "span -3 bar", + "span 2 span", + "span foo span", + "span 2 foo span", + ]; - gCSSProperties["grid-column-start"] = { - domProp: "gridColumnStart", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues - }; - gCSSProperties["grid-column-end"] = { - domProp: "gridColumnEnd", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues - }; - gCSSProperties["grid-row-start"] = { - domProp: "gridRowStart", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues - }; - gCSSProperties["grid-row-end"] = { - domProp: "gridRowEnd", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues - }; + gCSSProperties["grid-column-start"] = { + domProp: "gridColumnStart", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: gridLineOtherValues, + invalid_values: gridLineInvalidValues + }; + gCSSProperties["grid-column-end"] = { + domProp: "gridColumnEnd", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: gridLineOtherValues, + invalid_values: gridLineInvalidValues + }; + gCSSProperties["grid-row-start"] = { + domProp: "gridRowStart", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: gridLineOtherValues, + invalid_values: gridLineInvalidValues + }; + gCSSProperties["grid-row-end"] = { + domProp: "gridRowEnd", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: gridLineOtherValues, + invalid_values: gridLineInvalidValues + }; - var gridAutoPositionOtherValues = []; - gridLineOtherValues.concat([ "auto" ]).forEach(function(val) { - gridAutoPositionOtherValues.push(" foo / " + val); - gridAutoPositionOtherValues.push(val + "/2"); - }); - var gridAutoPositionInvalidValues = [ - "foo", - "foo, bar", - "foo / bar / baz", - ]; - gridLineInvalidValues.forEach(function(val) { - gridAutoPositionInvalidValues.push("span 3 / " + val); - gridAutoPositionInvalidValues.push(val + " / foo"); - }); - gCSSProperties["grid-auto-position"] = { - domProp: "gridAutoPosition", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "1 / 1" ], - other_values: gridAutoPositionOtherValues, - invalid_values: gridAutoPositionInvalidValues - }; + var gridAutoPositionOtherValues = []; + gridLineOtherValues.concat([ "auto" ]).forEach(function(val) { + gridAutoPositionOtherValues.push(" foo / " + val); + gridAutoPositionOtherValues.push(val + "/2"); + }); + var gridAutoPositionInvalidValues = [ + "foo", + "foo, bar", + "foo / bar / baz", + ]; + gridLineInvalidValues.forEach(function(val) { + gridAutoPositionInvalidValues.push("span 3 / " + val); + gridAutoPositionInvalidValues.push(val + " / foo"); + }); + gCSSProperties["grid-auto-position"] = { + domProp: "gridAutoPosition", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "1 / 1" ], + other_values: gridAutoPositionOtherValues, + invalid_values: gridAutoPositionInvalidValues + }; - // The grid-column and grid-row shorthands take values of the form - // [ / ]? - // which is equivalent to: - // | [ / ] - // which is equivalent to: - // | <'grid-auto-position'> - var gridColumnRowOtherValues = [].concat( - gridLineOtherValues, - gridAutoPositionOtherValues); - var gridColumnRowInvalidValues = [].concat( - gridLineInvalidValues, - gridAutoPositionInvalidValues); - // A single is invalid for grid-auto-position, - // but not for grid-column or grid-row: - gridColumnRowInvalidValues.splice( - gridColumnRowInvalidValues.indexOf("foo"), - 1); - gCSSProperties["grid-column"] = { - domProp: "gridColumn", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-column-start", - "grid-column-end" - ], - initial_values: [ "auto", "auto / auto" ], - other_values: gridColumnRowOtherValues, - invalid_values: gridColumnRowInvalidValues - }; - gCSSProperties["grid-row"] = { - domProp: "gridRow", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-row-start", - "grid-row-end" - ], - initial_values: [ "auto", "auto / auto" ], - other_values: gridColumnRowOtherValues, - invalid_values: gridColumnRowInvalidValues - }; + // The grid-column and grid-row shorthands take values of the form + // [ / ]? + // which is equivalent to: + // | [ / ] + // which is equivalent to: + // | <'grid-auto-position'> + var gridColumnRowOtherValues = [].concat( + gridLineOtherValues, + gridAutoPositionOtherValues); + var gridColumnRowInvalidValues = [].concat( + gridLineInvalidValues, + gridAutoPositionInvalidValues); + // A single is invalid for grid-auto-position, + // but not for grid-column or grid-row: + gridColumnRowInvalidValues.splice( + gridColumnRowInvalidValues.indexOf("foo"), + 1); + gCSSProperties["grid-column"] = { + domProp: "gridColumn", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "grid-column-start", + "grid-column-end" + ], + initial_values: [ "auto", "auto / auto" ], + other_values: gridColumnRowOtherValues, + invalid_values: gridColumnRowInvalidValues + }; + gCSSProperties["grid-row"] = { + domProp: "gridRow", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "grid-row-start", + "grid-row-end" + ], + initial_values: [ "auto", "auto / auto" ], + other_values: gridColumnRowOtherValues, + invalid_values: gridColumnRowInvalidValues + }; - var gridAreaOtherValues = gridLineOtherValues.slice(); - gridLineOtherValues.forEach(function(val) { - gridAreaOtherValues.push("foo / " + val); - gridAreaOtherValues.push(val + "/2/3"); - gridAreaOtherValues.push("foo / bar / " + val + " / baz"); - }); - var gridAreaInvalidValues = [ - "foo, bar", - "foo / bar / baz / fizz / buzz", - "default / foo / bar / baz", - "foo / initial / bar / baz", - "foo / bar / inherit / baz", - "foo / bar / baz / unset", - ].concat(gridLineInvalidValues); - gridLineInvalidValues.forEach(function(val) { - gridAreaInvalidValues.push("foo / " + val); - gridAreaInvalidValues.push("foo / bar / " + val); - gridAreaInvalidValues.push("foo / 4 / bar / " + val); - }); + var gridAreaOtherValues = gridLineOtherValues.slice(); + gridLineOtherValues.forEach(function(val) { + gridAreaOtherValues.push("foo / " + val); + gridAreaOtherValues.push(val + "/2/3"); + gridAreaOtherValues.push("foo / bar / " + val + " / baz"); + }); + var gridAreaInvalidValues = [ + "foo, bar", + "foo / bar / baz / fizz / buzz", + "default / foo / bar / baz", + "foo / initial / bar / baz", + "foo / bar / inherit / baz", + "foo / bar / baz / unset", + ].concat(gridLineInvalidValues); + gridLineInvalidValues.forEach(function(val) { + gridAreaInvalidValues.push("foo / " + val); + gridAreaInvalidValues.push("foo / bar / " + val); + gridAreaInvalidValues.push("foo / 4 / bar / " + val); + }); - gCSSProperties["grid-area"] = { - domProp: "gridArea", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-row-start", - "grid-column-start", - "grid-row-end", - "grid-column-end" - ], - initial_values: [ - "auto", - "auto / auto", - "auto / auto / auto", - "auto / auto / auto / auto" - ], - other_values: gridAreaOtherValues, - invalid_values: gridAreaInvalidValues - }; + gCSSProperties["grid-area"] = { + domProp: "gridArea", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: [ + "grid-row-start", + "grid-column-start", + "grid-row-end", + "grid-column-end" + ], + initial_values: [ + "auto", + "auto / auto", + "auto / auto / auto", + "auto / auto / auto / auto" + ], + other_values: gridAreaOtherValues, + invalid_values: gridAreaInvalidValues + }; } if (SpecialPowers.getBoolPref("layout.css.image-orientation.enabled")) { - gCSSProperties["image-orientation"] = { - domProp: "imageOrientation", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ - "0deg", - "0grad", - "0rad", - "0turn", + gCSSProperties["image-orientation"] = { + domProp: "imageOrientation", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ + "0deg", + "0grad", + "0rad", + "0turn", - // Rounded initial values. - "-90deg", - "15deg", - "360deg", - ], - other_values: [ - "0deg flip", - "90deg", - "90deg flip", - "180deg", - "180deg flip", - "270deg", - "270deg flip", - "flip", - "from-image", + // Rounded initial values. + "-90deg", + "15deg", + "360deg", + ], + other_values: [ + "0deg flip", + "90deg", + "90deg flip", + "180deg", + "180deg flip", + "270deg", + "270deg flip", + "flip", + "from-image", - // Grad units. - "0grad flip", - "100grad", - "100grad flip", - "200grad", - "200grad flip", - "300grad", - "300grad flip", + // Grad units. + "0grad flip", + "100grad", + "100grad flip", + "200grad", + "200grad flip", + "300grad", + "300grad flip", - // Radian units. - "0rad flip", - "1.57079633rad", - "1.57079633rad flip", - "3.14159265rad", - "3.14159265rad flip", - "4.71238898rad", - "4.71238898rad flip", + // Radian units. + "0rad flip", + "1.57079633rad", + "1.57079633rad flip", + "3.14159265rad", + "3.14159265rad flip", + "4.71238898rad", + "4.71238898rad flip", - // Turn units. - "0turn flip", - "0.25turn", - "0.25turn flip", - "0.5turn", - "0.5turn flip", - "0.75turn", - "0.75turn flip", + // Turn units. + "0turn flip", + "0.25turn", + "0.25turn flip", + "0.5turn", + "0.5turn flip", + "0.75turn", + "0.75turn flip", - // Rounded values. - "-45deg flip", - "65deg flip", - "400deg flip", - ], - invalid_values: [ - "none", - "0deg none", - "flip 0deg", - "flip 0deg", - "0", - "0 flip", - "flip 0", - "0deg from-image", - "from-image 0deg", - "flip from-image", - "from-image flip", - ] - }; + // Rounded values. + "-45deg flip", + "65deg flip", + "400deg flip", + ], + invalid_values: [ + "none", + "0deg none", + "flip 0deg", + "flip 0deg", + "0", + "0 flip", + "flip 0", + "0deg from-image", + "from-image 0deg", + "flip from-image", + "from-image flip", + ] + }; } if (SpecialPowers.getBoolPref("layout.css.osx-font-smoothing.enabled")) { - gCSSProperties["-moz-osx-font-smoothing"] = { - domProp: "MozOSXFontSmoothing", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "grayscale" ], - invalid_values: [ "none", "subpixel-antialiased", "antialiased" ] - }; + gCSSProperties["-moz-osx-font-smoothing"] = { + domProp: "MozOSXFontSmoothing", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "grayscale" ], + invalid_values: [ "none", "subpixel-antialiased", "antialiased" ] + }; } if (SpecialPowers.getBoolPref("layout.css.sticky.enabled")) { - gCSSProperties["position"].other_values.push("sticky"); + gCSSProperties["position"].other_values.push("sticky"); } if (SpecialPowers.getBoolPref("layout.css.mix-blend-mode.enabled")) { - gCSSProperties["mix-blend-mode"] = { - domProp: "mixBlendMode", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: ["multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", - "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], - invalid_values: [] - }; + gCSSProperties["mix-blend-mode"] = { + domProp: "mixBlendMode", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: ["multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", + "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], + invalid_values: [] + }; } if (SpecialPowers.getBoolPref("layout.css.background-blend-mode.enabled")) { - gCSSProperties["background-blend-mode"] = { - domProp: "backgroundBlendMode", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", - "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity" ], - invalid_values: ["none", "10px", "multiply multiply"] - }; + gCSSProperties["background-blend-mode"] = { + domProp: "backgroundBlendMode", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", + "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity" ], + invalid_values: ["none", "10px", "multiply multiply"] + }; } if (SpecialPowers.getBoolPref("layout.css.will-change.enabled")) { - gCSSProperties["will-change"] = { - domProp: "willChange", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "scroll-position", "contents", "transform", "opacity", "scroll-position, transform", "transform, opacity", "contents, transform", "property-that-doesnt-exist-yet" ], - invalid_values: [ "none", "all", "default", "auto, scroll-position", "scroll-position, auto", "transform scroll-position", ",", "trailing," ] - }; + gCSSProperties["will-change"] = { + domProp: "willChange", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "scroll-position", "contents", "transform", "opacity", "scroll-position, transform", "transform, opacity", "contents, transform", "property-that-doesnt-exist-yet" ], + invalid_values: [ "none", "all", "default", "auto, scroll-position", "scroll-position, auto", "transform scroll-position", ",", "trailing," ] + }; } if (SpecialPowers.getBoolPref("layout.css.overflow-clip-box.enabled")) { - gCSSProperties["overflow-clip-box"] = { - domProp: "overflowClipBox", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "padding-box" ], - other_values: [ "content-box" ], - invalid_values: [ "none", "auto", "border-box", "0" ] - }; -} - -if (SpecialPowers.getBoolPref("layout.css.box-decoration-break.enabled")) { - gCSSProperties["box-decoration-break"] = { - domProp: "boxDecorationBreak", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: [ "slice" ], - other_values: [ "clone" ], - invalid_values: [ "auto", "none", "1px" ] - }; + gCSSProperties["overflow-clip-box"] = { + domProp: "overflowClipBox", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "padding-box" ], + other_values: [ "content-box" ], + invalid_values: [ "none", "auto", "border-box", "0" ] + }; } if (SpecialPowers.getBoolPref("layout.css.unset-value.enabled")) { diff --git a/layout/style/test/test_shorthand_property_getters.html b/layout/style/test/test_shorthand_property_getters.html index 5f761c4bd49e..355ecb723a7a 100644 --- a/layout/style/test/test_shorthand_property_getters.html +++ b/layout/style/test/test_shorthand_property_getters.html @@ -139,6 +139,10 @@ isnot(e.style.background, "", "should have background shorthand (size:100% auto) e.setAttribute("style", "background: red; background-size: auto 100%"); isnot(e.style.background, "", "should have background shorthand (size:auto 100%)"); +// Test background-inline-policy not interacting with the background shorthand. +e.setAttribute("style", "background: red; -moz-background-inline-policy: each-box"); +isnot(e.style.background, "", "should have background shorthand (-moz-background-inline-policy not relevant)"); + // Check that we only serialize background when the lists (of layers) for // the subproperties are the same length. e.setAttribute("style", "background-clip: border-box, padding-box, border-box; background-origin: border-box, padding-box, padding-box; background-size: cover, auto, contain; background-color: blue; background-image: url(404.png), none, url(404-2.png); background-attachment: fixed, scroll, scroll; background-position: top left, center, 30px 50px; background-repeat: repeat-x, repeat, no-repeat"); diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 0aac7c2dd856..39d51c3af034 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -550,11 +550,6 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, int nsTableCellFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { - if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { - return 0; - } - int skip = 0; if (nullptr != GetPrevInFlow()) { skip |= LOGICAL_SIDE_B_START; @@ -1108,10 +1103,7 @@ nsBCTableCellFrame::GetUsedBorder() const } /* virtual */ bool -nsBCTableCellFrame::GetBorderRadii(const nsSize& aFrameSize, - const nsSize& aBorderArea, - int aSkipSides, - nscoord aRadii[8]) const +nsBCTableCellFrame::GetBorderRadii(nscoord aRadii[8]) const { NS_FOR_CSS_HALF_CORNERS(corner) { aRadii[corner] = 0; diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index 6225f2dd5cf7..855628479414 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -298,10 +298,7 @@ public: virtual nsIAtom* GetType() const MOZ_OVERRIDE; virtual nsMargin GetUsedBorder() const MOZ_OVERRIDE; - virtual bool GetBorderRadii(const nsSize& aFrameSize, - const nsSize& aBorderArea, - int aSkipSides, - nscoord aRadii[8]) const MOZ_OVERRIDE; + virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE; // Get the *inner half of the border only*, in twips. virtual nsMargin* GetBorderWidth(nsMargin& aBorder) const MOZ_OVERRIDE; diff --git a/layout/tables/nsTableColGroupFrame.cpp b/layout/tables/nsTableColGroupFrame.cpp index 071d0d519ffb..37fa8c5befd6 100644 --- a/layout/tables/nsTableColGroupFrame.cpp +++ b/layout/tables/nsTableColGroupFrame.cpp @@ -343,11 +343,6 @@ nsTableColGroupFrame::RemoveFrame(ChildListID aListID, int nsTableColGroupFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { - if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { - return 0; - } - int skip = 0; if (nullptr != GetPrevInFlow()) { skip |= 1 << LOGICAL_SIDE_B_START; diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 33fa27e05670..60613ba7d413 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -1409,11 +1409,6 @@ nsTableFrame::PaintTableBorderBackground(nsRenderingContext& aRenderingContext, int nsTableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { - if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { - return 0; - } - int skip = 0; // frame attribute was accounted for in nsHTMLTableElement::MapTableBorderInto // account for pagination diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index 67863457e02a..d1c493b629bd 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -605,11 +605,6 @@ nsTableRowFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, int nsTableRowFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { - if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { - return 0; - } - int skip = 0; if (nullptr != GetPrevInFlow()) { skip |= LOGICAL_SIDE_B_START; diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index f387a7e0af5e..b149921f9870 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -256,11 +256,6 @@ nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, int nsTableRowGroupFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const { - if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak == - NS_STYLE_BOX_DECORATION_BREAK_CLONE)) { - return 0; - } - int skip = 0; if (nullptr != GetPrevInFlow()) { skip |= LOGICAL_SIDE_B_START; diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js index af6a472d819c..026e3f222efc 100644 --- a/modules/libpref/src/init/all.js +++ b/modules/libpref/src/init/all.js @@ -1900,9 +1900,6 @@ pref("layout.css.variables.enabled", true); // Is support for CSS overflow-clip-box enabled for non-UA sheets? pref("layout.css.overflow-clip-box.enabled", false); -// Is support for CSS box-decoration-break enabled? -pref("layout.css.box-decoration-break.enabled", false); - // pref for which side vertical scrollbars should be on // 0 = end-side in UI direction // 1 = end-side in document/content direction From 30bb9d81ffc16d3c5e880a06b1f8070d1ebc15c0 Mon Sep 17 00:00:00 2001 From: Terrence Cole Date: Thu, 17 Apr 2014 08:14:35 -0700 Subject: [PATCH 51/79] Bug 990336 - Backout non-lazy dedup-on-insertion: not actually a speedup; r=jonco --HG-- extra : rebase_source : 7b505c2c46b8c65c19e5d10b622a76bd8976e9a5 --- js/src/ds/LifoAlloc.h | 16 ---------------- js/src/gc/StoreBuffer.h | 23 ----------------------- 2 files changed, 39 deletions(-) diff --git a/js/src/ds/LifoAlloc.h b/js/src/ds/LifoAlloc.h index 062257c004d2..7617cf54a221 100644 --- a/js/src/ds/LifoAlloc.h +++ b/js/src/ds/LifoAlloc.h @@ -141,12 +141,6 @@ class BumpChunk return aligned; } - void *peek(size_t n) { - if (bump - bumpBase() < ptrdiff_t(n)) - return nullptr; - return bump - n; - } - static BumpChunk *new_(size_t chunkSize); static void delete_(BumpChunk *chunk); }; @@ -461,16 +455,6 @@ class LifoAlloc return Mark(chunk_, position_); } }; - - // Return a modifiable pointer to the most recently allocated bytes. The - // type of the thing must be known, so is only applicable to some special- - // purpose allocators. Will return a nullptr if nothing has been allocated. - template - T *peek() { - if (!latest) - return nullptr; - return static_cast(latest->peek(sizeof(T))); - } }; class LifoAllocScope diff --git a/js/src/gc/StoreBuffer.h b/js/src/gc/StoreBuffer.h index d65e5c9480ca..01f1696178dc 100644 --- a/js/src/gc/StoreBuffer.h +++ b/js/src/gc/StoreBuffer.h @@ -134,10 +134,6 @@ class StoreBuffer void put(StoreBuffer *owner, const T &t) { JS_ASSERT(storage_); - T *tip = storage_->peek(); - if (tip && tip->canMergeWith(t)) - return tip->mergeInplace(t); - T *tp = storage_->new_(t); if (!tp) CrashAtUnhandlableOOM("Failed to allocate for MonoTypeBuffer::put."); @@ -251,9 +247,6 @@ class StoreBuffer return !nursery.isInside(edge) && nursery.isInside(*edge); } - bool canMergeWith(const CellPtrEdge &other) const { return edge == other.edge; } - void mergeInplace(const CellPtrEdge &) {} - void mark(JSTracer *trc); CellPtrEdge tagged() const { return CellPtrEdge((Cell **)(uintptr_t(edge) | 1)); } @@ -277,9 +270,6 @@ class StoreBuffer return !nursery.isInside(edge) && nursery.isInside(deref()); } - bool canMergeWith(const ValueEdge &other) const { return edge == other.edge; } - void mergeInplace(const ValueEdge &) {} - void mark(JSTracer *trc); ValueEdge tagged() const { return ValueEdge((JS::Value *)(uintptr_t(edge) | 1)); } @@ -321,16 +311,6 @@ class StoreBuffer return !(*this == other); } - bool canMergeWith(const SlotsEdge &other) const { - return objectAndKind_ == other.objectAndKind_; - } - - void mergeInplace(const SlotsEdge &other) { - int32_t end = Max(start_ + count_, other.start_ + other.count_); - start_ = Min(start_, other.start_); - count_ = end - start_; - } - bool maybeInRememberedSet(const Nursery &nursery) const { return !nursery.isInside(object()); } @@ -360,9 +340,6 @@ class StoreBuffer static bool supportsDeduplication() { return true; } void *deduplicationKey() const { return (void *)edge; } - bool canMergeWith(const WholeCellEdges &other) const { return edge == other.edge; } - void mergeInplace(const WholeCellEdges &) {} - void mark(JSTracer *trc); typedef PointerEdgeHasher Hasher; From 4f1d8a952d93b8e577ff427cc81fad6b6dd81916 Mon Sep 17 00:00:00 2001 From: Mike Shal Date: Mon, 7 Apr 2014 16:46:07 -0400 Subject: [PATCH 52/79] Bug 996307 - enable sccache for B2G Desktop Linux builds; r=glandium --- b2g/config/mozconfigs/common | 1 + b2g/config/mozconfigs/linux32_gecko/nightly | 3 ++- b2g/config/mozconfigs/linux64_gecko/debug | 3 ++- b2g/config/mozconfigs/linux64_gecko/nightly | 3 ++- .../tooltool-manifests/linux32/releng.manifest | 14 ++++++++++++++ .../tooltool-manifests/linux64/releng.manifest | 14 ++++++++++++++ browser/config/mozconfigs/linux32/l10n-mozconfig | 1 + browser/config/mozconfigs/linux32/valgrind | 1 + browser/config/mozconfigs/linux64/l10n-mozconfig | 1 + browser/config/mozconfigs/linux64/valgrind | 1 + build/mozconfig.cache | 2 +- 11 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 b2g/config/tooltool-manifests/linux32/releng.manifest create mode 100644 b2g/config/tooltool-manifests/linux64/releng.manifest diff --git a/b2g/config/mozconfigs/common b/b2g/config/mozconfigs/common index 30581f1e49c6..c6baae8bc92b 100644 --- a/b2g/config/mozconfigs/common +++ b/b2g/config/mozconfigs/common @@ -3,6 +3,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. no_tooltool=1 +no_sccache=1 # This file is included at the top of all b2g mozconfigs diff --git a/b2g/config/mozconfigs/linux32_gecko/nightly b/b2g/config/mozconfigs/linux32_gecko/nightly index e5d72130b381..fdab89d68daf 100644 --- a/b2g/config/mozconfigs/linux32_gecko/nightly +++ b/b2g/config/mozconfigs/linux32_gecko/nightly @@ -21,7 +21,8 @@ export MOZ_TELEMETRY_REPORTING=1 # Treat warnings as errors in directories with FAIL_ON_WARNINGS. # DISABLED WHILE NOT ON TRY ac_add_options --enable-warnings-as-errors -# Use ccache +# Use sccache +no_sccache= . "$topsrcdir/build/mozconfig.cache" #B2G options diff --git a/b2g/config/mozconfigs/linux64_gecko/debug b/b2g/config/mozconfigs/linux64_gecko/debug index a5b058908b19..256b44165884 100644 --- a/b2g/config/mozconfigs/linux64_gecko/debug +++ b/b2g/config/mozconfigs/linux64_gecko/debug @@ -22,7 +22,8 @@ export MOZ_TELEMETRY_REPORTING=1 # Treat warnings as errors in directories with FAIL_ON_WARNINGS. # DISABLED WHILE NOT ON TRY ac_add_options --enable-warnings-as-errors -# Use ccache +# Use sccache +no_sccache= . "$topsrcdir/build/mozconfig.cache" #B2G options diff --git a/b2g/config/mozconfigs/linux64_gecko/nightly b/b2g/config/mozconfigs/linux64_gecko/nightly index 991bbf3ce20d..fa9bae8ac008 100644 --- a/b2g/config/mozconfigs/linux64_gecko/nightly +++ b/b2g/config/mozconfigs/linux64_gecko/nightly @@ -21,7 +21,8 @@ export MOZ_TELEMETRY_REPORTING=1 # Treat warnings as errors in directories with FAIL_ON_WARNINGS. # DISABLED WHILE NOT ON TRY ac_add_options --enable-warnings-as-errors -# Use ccache +# Use sccache +no_sccache= . "$topsrcdir/build/mozconfig.cache" #B2G options diff --git a/b2g/config/tooltool-manifests/linux32/releng.manifest b/b2g/config/tooltool-manifests/linux32/releng.manifest new file mode 100644 index 000000000000..285a8f8cd9d6 --- /dev/null +++ b/b2g/config/tooltool-manifests/linux32/releng.manifest @@ -0,0 +1,14 @@ +[ +{ +"size": 50, +"digest": "48f405d8c2712838b9dd3be118951c8b41c63c891576f5287d2e05afa8fd051a08807511259581aa3170a3c4f7d4e77e6c0539b00b8f6845f01562127f6a27fa", +"algorithm": "sha512", +"filename": "setup.sh" +}, +{ +"size": 160232, +"digest": "8656c3fc2daa66839ec81a0edbd9759040a83c7a41c3e472d7f90508b80eefd008b87305dc8549b4ff6098dc33fe17fedc9b4eb76cf5307d5f22dae925c033db", +"algorithm": "sha512", +"filename": "sccache.tar.xz" +} +] diff --git a/b2g/config/tooltool-manifests/linux64/releng.manifest b/b2g/config/tooltool-manifests/linux64/releng.manifest new file mode 100644 index 000000000000..285a8f8cd9d6 --- /dev/null +++ b/b2g/config/tooltool-manifests/linux64/releng.manifest @@ -0,0 +1,14 @@ +[ +{ +"size": 50, +"digest": "48f405d8c2712838b9dd3be118951c8b41c63c891576f5287d2e05afa8fd051a08807511259581aa3170a3c4f7d4e77e6c0539b00b8f6845f01562127f6a27fa", +"algorithm": "sha512", +"filename": "setup.sh" +}, +{ +"size": 160232, +"digest": "8656c3fc2daa66839ec81a0edbd9759040a83c7a41c3e472d7f90508b80eefd008b87305dc8549b4ff6098dc33fe17fedc9b4eb76cf5307d5f22dae925c033db", +"algorithm": "sha512", +"filename": "sccache.tar.xz" +} +] diff --git a/browser/config/mozconfigs/linux32/l10n-mozconfig b/browser/config/mozconfigs/linux32/l10n-mozconfig index 1e88587cf64d..45a3727a30ea 100644 --- a/browser/config/mozconfigs/linux32/l10n-mozconfig +++ b/browser/config/mozconfigs/linux32/l10n-mozconfig @@ -1,4 +1,5 @@ no_tooltool=1 +no_sccache=1 ac_add_options --with-l10n-base=../../l10n ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL} diff --git a/browser/config/mozconfigs/linux32/valgrind b/browser/config/mozconfigs/linux32/valgrind index 8c8dd0648f32..c98ecd79fcd6 100644 --- a/browser/config/mozconfigs/linux32/valgrind +++ b/browser/config/mozconfigs/linux32/valgrind @@ -1,4 +1,5 @@ no_tooltool=1 +no_sccache=1 . $topsrcdir/browser/config/mozconfigs/linux32/nightly diff --git a/browser/config/mozconfigs/linux64/l10n-mozconfig b/browser/config/mozconfigs/linux64/l10n-mozconfig index e2141ccbd95d..ce8b34ecb390 100644 --- a/browser/config/mozconfigs/linux64/l10n-mozconfig +++ b/browser/config/mozconfigs/linux64/l10n-mozconfig @@ -1,4 +1,5 @@ no_tooltool=1 +no_sccache=1 ac_add_options --with-l10n-base=../../l10n ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL} diff --git a/browser/config/mozconfigs/linux64/valgrind b/browser/config/mozconfigs/linux64/valgrind index c6fd78aabd48..bff7ff7b0b1b 100644 --- a/browser/config/mozconfigs/linux64/valgrind +++ b/browser/config/mozconfigs/linux64/valgrind @@ -1,4 +1,5 @@ no_tooltool=1 +no_sccache=1 . $topsrcdir/browser/config/mozconfigs/linux64/nightly diff --git a/build/mozconfig.cache b/build/mozconfig.cache index 844326e5fb82..028dc6f4c6dc 100644 --- a/build/mozconfig.cache +++ b/build/mozconfig.cache @@ -9,7 +9,7 @@ $(python2.7 -c 'import json; p = json.loads(open("'"$topsrcdir"'/../buildprops.j EOF bucket= -if test -z "$SCCACHE_DISABLE" -a -z "$no_tooltool"; then +if test -z "$SCCACHE_DISABLE" -a -z "$no_sccache"; then case "${branch}_${master}" in try_*scl1.mozilla.com*|try_*.scl3.mozilla.com*) bucket=mozilla-releng-ceph-cache-scl3-try From b62e626c45da634bbf7bae8518bf6f564dd64f76 Mon Sep 17 00:00:00 2001 From: Mike Shal Date: Tue, 15 Apr 2014 15:28:34 -0400 Subject: [PATCH 53/79] Bug 996791 - remove old b2g releng manifests; r=rail --- b2g/config/tooltool-manifests/ics.manifest | 14 -------------- b2g/config/tooltool-manifests/releng.manifest | 14 -------------- 2 files changed, 28 deletions(-) delete mode 100644 b2g/config/tooltool-manifests/ics.manifest delete mode 100644 b2g/config/tooltool-manifests/releng.manifest diff --git a/b2g/config/tooltool-manifests/ics.manifest b/b2g/config/tooltool-manifests/ics.manifest deleted file mode 100644 index f1afd33eef65..000000000000 --- a/b2g/config/tooltool-manifests/ics.manifest +++ /dev/null @@ -1,14 +0,0 @@ -[ -{ -"size": 195, -"digest": "236362c71c433971c36b46d34e8560342435718364bc390df8de6a33249fb1fbf4fc3d0143f1e22bca262a7af7dc1b277a920bfde3ee8197eb07db2e7cef3e1f", -"algorithm": "sha512", -"filename": "setup.sh" -}, -{ -"size": 63159127, -"digest": "fcf629c815b5cbed7858d7697815f355275dcc6b060ae5455b4b31fde0d78ebc176927564a5353ceacdb9f9c9bfc1357f1341bf6ba844c25153a89664e661510", -"algorithm": "sha512", -"filename": "gonk-toolchain-7.tar.bz2" -} -] diff --git a/b2g/config/tooltool-manifests/releng.manifest b/b2g/config/tooltool-manifests/releng.manifest deleted file mode 100644 index f6fd515acfb7..000000000000 --- a/b2g/config/tooltool-manifests/releng.manifest +++ /dev/null @@ -1,14 +0,0 @@ -[ -{ -"size": 195, -"digest": "da2edcb1ec9b169f6c685d02ebd0bd4ad53ace2df58598f15e1bde43dd74bcb816620601587c97e636bda3327045b43c8f5e973672ebd904e06036f70466908f", -"algorithm": "sha512", -"filename": "setup.sh" -}, -{ -"size": 121166734, -"digest": "10da1d28d49ff1aa9ad3d84e52235dc8ed7df6721530b896a53424480ec23a2e9f28cadd631f562342325611ecb72152be51f9b62616356f33005f6cc0fb82fe", -"algorithm": "sha512", -"filename": "gonk-toolchain-3.tar.bz2" -} -] From 713d80a80c77a4cc3b7a1b38253dab19a9e92295 Mon Sep 17 00:00:00 2001 From: Mike Shal Date: Mon, 14 Apr 2014 13:53:20 -0400 Subject: [PATCH 54/79] Bug 995762 - don't evaluate diff unless it's needed; r=gps --- python/mozbuild/mozbuild/config_status.py | 2 +- python/mozbuild/mozbuild/test/test_util.py | 10 +++++----- python/mozbuild/mozbuild/util.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python/mozbuild/mozbuild/config_status.py b/python/mozbuild/mozbuild/config_status.py index 2cbdb010271c..3565fc21a45d 100644 --- a/python/mozbuild/mozbuild/config_status.py +++ b/python/mozbuild/mozbuild/config_status.py @@ -152,7 +152,7 @@ def config_status(topobjdir='.', topsrcdir='.', if options.diff: for path, diff in sorted(summary.file_diffs.items()): - print(diff) + print('\n'.join(diff)) # Advertise Visual Studio if appropriate. if os.name == 'nt' and options.backend == 'RecursiveMake': diff --git a/python/mozbuild/mozbuild/test/test_util.py b/python/mozbuild/mozbuild/test/test_util.py index 8ae4886f38cc..0dc3c6d0aa5e 100644 --- a/python/mozbuild/mozbuild/test/test_util.py +++ b/python/mozbuild/mozbuild/test/test_util.py @@ -128,9 +128,9 @@ class TestFileAvoidWrite(unittest.TestCase): faw.write('new') faw.close() - self.assertIsInstance(faw.diff, unicode) - self.assertIn('-old', faw.diff) - self.assertIn('+new', faw.diff) + diff = '\n'.join(faw.diff) + self.assertIn('-old', diff) + self.assertIn('+new', diff) def test_diff_create(self): """Diffs are produced when files are created.""" @@ -142,8 +142,8 @@ class TestFileAvoidWrite(unittest.TestCase): faw.write('new') faw.close() - self.assertIsInstance(faw.diff, unicode) - self.assertIn('+new', faw.diff) + diff = '\n'.join(faw.diff) + self.assertIn('+new', diff) finally: shutil.rmtree(tmpdir) diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py index 6b89e8ee3eb3..872ea9655c62 100644 --- a/python/mozbuild/mozbuild/util.py +++ b/python/mozbuild/mozbuild/util.py @@ -167,8 +167,8 @@ class FileAvoidWrite(StringIO): old_lines = old_content.splitlines() if old_content else [] new_lines = buf.splitlines() - self.diff = '\n'.join(difflib.unified_diff(old_lines, new_lines, - self.name, self.name, n=4, lineterm='')) + self.diff = difflib.unified_diff(old_lines, new_lines, + self.name, self.name, n=4, lineterm='') # FileAvoidWrite isn't unicode/bytes safe. So, files with non-ascii # content or opened and written in different modes may involve # implicit conversion and this will make Python unhappy. Since From 0493bfc10b5e1c9410a0dad6234ea27767cae282 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Thu, 17 Apr 2014 16:42:18 +0100 Subject: [PATCH 55/79] Backed out changeset 5aa4eed6cd16 (bug 981477) for B2G reftest failures --- editor/reftests/xul/reftest.list | 48 +++++++++---------- .../reftest/bmp/bmp-corrupted/reftest.list | 2 +- layout/reftests/bidi/reftest.list | 6 +-- layout/reftests/box-ordinal/reftest.list | 14 +++--- layout/reftests/box-properties/reftest.list | 2 +- layout/reftests/box-shadow/reftest.list | 2 +- layout/reftests/bugs/reftest.list | 4 +- layout/reftests/columns/reftest.list | 4 +- layout/reftests/dom/reftest.list | 4 +- layout/reftests/first-line/reftest.list | 2 +- .../reftests/forms/input/number/reftest.list | 2 +- .../reftests/forms/input/range/reftest.list | 8 ++-- layout/reftests/ib-split/reftest.list | 2 +- layout/reftests/image-element/reftest.list | 2 +- layout/reftests/image-region/reftest.list | 2 +- layout/reftests/marquee/reftest.list | 2 +- layout/reftests/object/reftest.list | 2 +- layout/reftests/printing/reftest.list | 8 ++-- layout/reftests/reftest.list | 2 +- layout/reftests/svg/reftest.list | 2 +- layout/reftests/svg/sizing/reftest.list | 12 ++--- layout/reftests/text-shadow/reftest.list | 10 ++-- layout/reftests/transform-3d/reftest.list | 4 +- .../w3c-css/submitted/ui3/reftest.list | 6 +-- .../reftests/xul-document-load/reftest.list | 44 ++++++++--------- layout/reftests/xul/reftest.list | 14 +++--- layout/xul/grid/reftests/reftest.list | 34 ++++++------- layout/xul/reftest/reftest.list | 10 ++-- toolkit/content/tests/reftests/reftest.list | 4 +- 29 files changed, 129 insertions(+), 129 deletions(-) diff --git a/editor/reftests/xul/reftest.list b/editor/reftests/xul/reftest.list index a4de29c2503c..14f639bad925 100644 --- a/editor/reftests/xul/reftest.list +++ b/editor/reftests/xul/reftest.list @@ -1,29 +1,29 @@ -fails-if(Android||B2G) skip-if(B2G&&browserIsRemote) == empty-1.xul empty-ref.xul # bug 783658 -skip-if(B2G&&browserIsRemote) != empty-2.xul empty-ref.xul +fails-if(Android||B2G) == empty-1.xul empty-ref.xul # bug 783658 +!= empty-2.xul empty-ref.xul # There is no way to simulate an autocomplete textbox in windows XP/Vista/7 default theme using CSS. # Therefore, the equlity tests below should be marked as failing. -fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012])/.test(http.oscpu)) skip-if(B2G&&browserIsRemote) == autocomplete-1.xul autocomplete-ref.xul # bug 783658 -fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012])/.test(http.oscpu)) skip-if(B2G&&browserIsRemote) == emptyautocomplete-1.xul emptyautocomplete-ref.xul # bug 783658 -skip-if(B2G&&browserIsRemote) != emptymultiline-1.xul emptymultiline-ref.xul -fails-if(Android||B2G) skip-if(B2G&&browserIsRemote) == emptymultiline-2.xul emptymultiline-ref.xul # bug 783658 -fails-if(Android||B2G) skip-if(B2G&&browserIsRemote) == emptytextbox-1.xul emptytextbox-ref.xul # bug 783658 -fails-if(Android||B2G) skip-if(B2G&&browserIsRemote) == emptytextbox-2.xul emptytextbox-ref.xul # bug 783658 -skip-if(B2G&&browserIsRemote) != emptytextbox-3.xul emptytextbox-ref.xul -skip-if(B2G&&browserIsRemote) != emptytextbox-4.xul emptytextbox-ref.xul -fails-if(Android||B2G) skip-if(B2G&&browserIsRemote) == emptytextbox-5.xul emptytextbox-ref.xul # bug 783658 +fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012])/.test(http.oscpu)) == autocomplete-1.xul autocomplete-ref.xul # bug 783658 +fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012])/.test(http.oscpu)) == emptyautocomplete-1.xul emptyautocomplete-ref.xul # bug 783658 +!= emptymultiline-1.xul emptymultiline-ref.xul +fails-if(Android||B2G) == emptymultiline-2.xul emptymultiline-ref.xul # bug 783658 +fails-if(Android||B2G) == emptytextbox-1.xul emptytextbox-ref.xul # bug 783658 +fails-if(Android||B2G) == emptytextbox-2.xul emptytextbox-ref.xul # bug 783658 +!= emptytextbox-3.xul emptytextbox-ref.xul +!= emptytextbox-4.xul emptytextbox-ref.xul +fails-if(Android||B2G) == emptytextbox-5.xul emptytextbox-ref.xul # bug 783658 # There is no way to simulate a number textbox in windows XP/Vista/7 default theme using CSS. # Therefore, the equlity tests below should be marked as failing. -skip-if(B2G&&browserIsRemote) != number-1.xul number-ref.xul -skip-if(B2G&&browserIsRemote) != number-2.xul number-ref.xul -fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012])/.test(http.oscpu)) skip-if(B2G&&browserIsRemote) == number-3.xul number-ref.xul # bug 783658 -skip-if(B2G&&browserIsRemote) != number-4.xul number-ref.xul -fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012])/.test(http.oscpu)) skip-if(B2G&&browserIsRemote) == number-5.xul number-ref.xul # bug 783658 -fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012])/.test(http.oscpu)) skip-if(B2G&&browserIsRemote) == numberwithvalue-1.xul numberwithvalue-ref.xul # bug 783658 -fails-if(Android||B2G) skip-if(B2G&&browserIsRemote) == passwd-1.xul passwd-ref.xul # bug 783658 -fails-if(Android||B2G) skip-if(B2G&&browserIsRemote) == passwd-2.xul passwd-ref.xul # bug 783658 -skip-if(B2G&&browserIsRemote) != passwd-3.xul passwd-ref.xul -fails-if(Android||B2G) skip-if(B2G&&browserIsRemote) == plain-1.xul plain-ref.xul # bug 783658 -fails-if(Android||B2G) skip-if(B2G&&browserIsRemote) == textbox-1.xul textbox-ref.xul -skip-if(B2G&&browserIsRemote) != textbox-disabled.xul textbox-ref.xul +!= number-1.xul number-ref.xul +!= number-2.xul number-ref.xul +fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012])/.test(http.oscpu)) == number-3.xul number-ref.xul # bug 783658 +!= number-4.xul number-ref.xul +fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012])/.test(http.oscpu)) == number-5.xul number-ref.xul # bug 783658 +fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012])/.test(http.oscpu)) == numberwithvalue-1.xul numberwithvalue-ref.xul # bug 783658 +fails-if(Android||B2G) == passwd-1.xul passwd-ref.xul # bug 783658 +fails-if(Android||B2G) == passwd-2.xul passwd-ref.xul # bug 783658 +!= passwd-3.xul passwd-ref.xul +fails-if(Android||B2G) == plain-1.xul plain-ref.xul # bug 783658 +fails-if(Android||B2G) == textbox-1.xul textbox-ref.xul +!= textbox-disabled.xul textbox-ref.xul # Read-only textboxes look like normal textboxes in windows Vista/7 default theme -fails-if(windowsDefaultTheme&&/^Windows\x20NT\x206\.[012]/.test(http.oscpu)) skip-if(B2G&&browserIsRemote) != textbox-readonly.xul textbox-ref.xul +fails-if(windowsDefaultTheme&&/^Windows\x20NT\x206\.[012]/.test(http.oscpu)) != textbox-readonly.xul textbox-ref.xul diff --git a/image/test/reftest/bmp/bmp-corrupted/reftest.list b/image/test/reftest/bmp/bmp-corrupted/reftest.list index a398338852c8..fc39882dac51 100644 --- a/image/test/reftest/bmp/bmp-corrupted/reftest.list +++ b/image/test/reftest/bmp/bmp-corrupted/reftest.list @@ -8,5 +8,5 @@ # Tests for RLE4 with an invalid BPP == wrapper.html?invalid-compression-RLE4.bmp about:blank # Tests for RLE8 with an invalid BPP -random-if(B2G) == wrapper.html?invalid-compression-RLE8.bmp about:blank # Bug 921207 +== wrapper.html?invalid-compression-RLE8.bmp about:blank diff --git a/layout/reftests/bidi/reftest.list b/layout/reftests/bidi/reftest.list index 5ae9c3a164c9..1286dd469326 100644 --- a/layout/reftests/bidi/reftest.list +++ b/layout/reftests/bidi/reftest.list @@ -86,8 +86,8 @@ random-if(winWidget) == 305643-1.html 305643-1-ref.html # depends on windows ver == 409375.html 409375-ref.html == 413542-1.html 413542-1-ref.html == 413542-2.html 413542-2-ref.html -random-if(B2G) == 413928-1.html 413928-1-ref.html -random-if(B2G) == 413928-2.html 413928-2-ref.html +== 413928-1.html 413928-1-ref.html +== 413928-2.html 413928-2-ref.html == 425338-1a.html 425338-1-ref.html == 425338-1b.html 425338-1-ref.html == 489517-1.html 489517-1-ref.html @@ -139,6 +139,6 @@ skip-if(B2G) == 726420-1.html 726420-1-ref.html == 779003-1.html 779003-1-ref.html == 779003-1-dynamic.html 779003-1-ref.html == 847242-1.html 847242-1-ref.html -skip-if(B2G&&browserIsRemote) == 869833-1.xul 869833-1-ref.xul +== 869833-1.xul 869833-1-ref.xul fails-if(B2G) == 922530-1.html 922530-1-ref.html # B2G kerning == 922550-1.html 922550-1-ref.html diff --git a/layout/reftests/box-ordinal/reftest.list b/layout/reftests/box-ordinal/reftest.list index b933ca483010..91de0baaa8e2 100644 --- a/layout/reftests/box-ordinal/reftest.list +++ b/layout/reftests/box-ordinal/reftest.list @@ -1,7 +1,7 @@ -skip-if(B2G&&browserIsRemote) == box-ordinal-with-out-of-flow-1.html box-ordinal-with-out-of-flow-1-ref.html -skip-if(B2G&&browserIsRemote) == dynamic-1-remove-to-none-grouped.xul dynamic-1-ref.xul -skip-if(B2G&&browserIsRemote) == dynamic-1-add-to-one-grouped.xul dynamic-1-ref.xul -skip-if(B2G&&browserIsRemote) == dynamic-1-remove-to-one-grouped-1.xul dynamic-1-ref.xul -fails skip-if(B2G&&browserIsRemote) == dynamic-1-remove-to-one-grouped-2.xul dynamic-1-ref.xul # bug 575500 -skip-if(B2G&&browserIsRemote) == dynamic-1-add-to-two-grouped-1.xul dynamic-1-ref.xul -skip-if(B2G&&browserIsRemote) == dynamic-1-add-to-two-grouped-2.xul dynamic-1-ref.xul +== box-ordinal-with-out-of-flow-1.html box-ordinal-with-out-of-flow-1-ref.html +== dynamic-1-remove-to-none-grouped.xul dynamic-1-ref.xul +== dynamic-1-add-to-one-grouped.xul dynamic-1-ref.xul +== dynamic-1-remove-to-one-grouped-1.xul dynamic-1-ref.xul +fails == dynamic-1-remove-to-one-grouped-2.xul dynamic-1-ref.xul # bug 575500 +== dynamic-1-add-to-two-grouped-1.xul dynamic-1-ref.xul +== dynamic-1-add-to-two-grouped-2.xul dynamic-1-ref.xul diff --git a/layout/reftests/box-properties/reftest.list b/layout/reftests/box-properties/reftest.list index 0a1dcb3b2722..1aa02c45e929 100644 --- a/layout/reftests/box-properties/reftest.list +++ b/layout/reftests/box-properties/reftest.list @@ -1,4 +1,4 @@ -random-if(B2G) == outline-radius-percent-1.html outline-radius-percent-1-ref.html +== outline-radius-percent-1.html outline-radius-percent-1-ref.html == min-width-1.html min-width-1-ref.html == min-height-1.html min-height-1-ref.html == max-width-1.html max-width-1-ref.html diff --git a/layout/reftests/box-shadow/reftest.list b/layout/reftests/box-shadow/reftest.list index 80a9c77ccff1..680ab08f777e 100644 --- a/layout/reftests/box-shadow/reftest.list +++ b/layout/reftests/box-shadow/reftest.list @@ -14,7 +14,7 @@ fails-if(Android||B2G) == boxshadow-fileupload.html boxshadow-fileupload-ref.htm == boxshadow-inner-basic.html boxshadow-inner-basic-ref.svg random-if(layersGPUAccelerated) == boxshadow-mixed.html boxshadow-mixed-ref.html random-if(d2d) == boxshadow-rounded-spread.html boxshadow-rounded-spread-ref.html -skip-if(B2G&&browserIsRemote) HTTP(..) == boxshadow-dynamic.xul boxshadow-dynamic-ref.xul +HTTP(..) == boxshadow-dynamic.xul boxshadow-dynamic-ref.xul random-if(d2d) == boxshadow-onecorner.html boxshadow-onecorner-ref.html random-if(d2d) == boxshadow-twocorners.html boxshadow-twocorners-ref.html random-if(d2d) == boxshadow-threecorners.html boxshadow-threecorners-ref.html diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 9ab68d2b4164..58f86e2bb857 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1384,7 +1384,7 @@ skip-if(B2G&&browserIsRemote) == 498228-1.xul 498228-1-ref.xul # bug 974780 == 501257-1a.html 501257-1-ref.html == 501257-1b.html 501257-1-ref.html == 501257-1.xhtml 501257-1-ref.xhtml -skip-if(B2G) == 501627-1.html 501627-1-ref.html # Bug 989165 +== 501627-1.html 501627-1-ref.html == 502288-1.html 502288-1-ref.html skip-if(B2G) == 502447-1.html 502447-1-ref.html == 502795-1.html 502795-1-ref.html @@ -1609,7 +1609,7 @@ fuzzy-if(Android&&AndroidVersion>=15,8,20) == 602200-3.html 602200-3-ref.html == 602200-4.html 602200-4-ref.html == 603423-1.html 603423-1-ref.html == 604737.html 604737-ref.html -random-if(B2G) == 605138-1.html 605138-1-ref.html # Bug 988758 +== 605138-1.html 605138-1-ref.html == 605157-1.xhtml 605157-1-ref.xhtml == 607267-1.html 607267-1-ref.html == 608636-1.html 608636-1-ref.html diff --git a/layout/reftests/columns/reftest.list b/layout/reftests/columns/reftest.list index b5dedd944769..add8d8ddb37c 100644 --- a/layout/reftests/columns/reftest.list +++ b/layout/reftests/columns/reftest.list @@ -19,8 +19,8 @@ == column-box-alignment-rtl.html column-box-alignment-rtl-ref.html HTTP(..) == columnfill-balance.html columnfill-balance-ref.html HTTP(..) == columnfill-auto.html columnfill-auto-ref.html -random-if(B2G) HTTP(..) == columnfill-auto-2.html columnfill-auto-2-ref.html -random-if(B2G) HTTP(..) == columnfill-auto-3.html columnfill-auto-2-ref.html +HTTP(..) == columnfill-auto-2.html columnfill-auto-2-ref.html +HTTP(..) == columnfill-auto-3.html columnfill-auto-2-ref.html skip-if(B2G) == columnrule-basic.html columnrule-basic-ref.html # bug 773482 skip-if(B2G) == columnrule-complex.html columnrule-complex-ref.html # bug 773482 != columnrule-linestyles.html columnrule-linestyles-notref.html diff --git a/layout/reftests/dom/reftest.list b/layout/reftests/dom/reftest.list index bd4a88fa6645..8585554eda03 100644 --- a/layout/reftests/dom/reftest.list +++ b/layout/reftests/dom/reftest.list @@ -31,7 +31,7 @@ == insertmultiplemultiple-2.html insertmultiplemultiple-ref.html # testing bindings that have multiple insertion points -fails-if(B2G) == multipleinsertionpoints-ref2.xhtml multipleinsertionpoints-ref.xhtml #Bug 988759 +== multipleinsertionpoints-ref2.xhtml multipleinsertionpoints-ref.xhtml # append a single element skip-if(B2G) == multipleinsertionpoints-appendsingle-1.xhtml multipleinsertionpoints-ref.xhtml # bug 773482 skip-if(B2G) == multipleinsertionpoints-appendsingle-2.xhtml multipleinsertionpoints-ref.xhtml # bug 773482 @@ -45,7 +45,7 @@ skip-if(B2G) == multipleinsertionpoints-insertmultiple.xhtml multipleinsertionpo # test appending some nodes whose frame construction should be done lazily # followed by appending a node that might not be done lazily -skip-if(B2G&&browserIsRemote) == multipleappendwithxul.xhtml multipleappendwithxul-ref.xhtml # Bug 974780 +== multipleappendwithxul.xhtml multipleappendwithxul-ref.xhtml == multipleappendwithinput.xhtml multipleappendwithinput-ref.xhtml == multipleappendwitheditable.xhtml multipleappendwitheditable-ref.xhtml diff --git a/layout/reftests/first-line/reftest.list b/layout/reftests/first-line/reftest.list index 758eb8088230..9e0cca7081d6 100644 --- a/layout/reftests/first-line/reftest.list +++ b/layout/reftests/first-line/reftest.list @@ -26,7 +26,7 @@ load stress-10.html # crash test == stress-11.xhtml stress-11-ref.xhtml == border-not-apply.html border-not-apply-ref.html -skip-if(B2G) == 287088-1.html 287088-1-ref.html # Bug 975254 +== 287088-1.html 287088-1-ref.html == 287088-2.html 287088-2-ref.html == 403177-1.html 403177-1-ref.html == 469227-2.html 469227-2-ref.html diff --git a/layout/reftests/forms/input/number/reftest.list b/layout/reftests/forms/input/number/reftest.list index 82333022988f..edfe074ad053 100644 --- a/layout/reftests/forms/input/number/reftest.list +++ b/layout/reftests/forms/input/number/reftest.list @@ -21,7 +21,7 @@ fuzzy-if(/^Windows\x20NT\x205\.1/.test(http.oscpu),64,4) fuzzy-if(cocoaWidget,63 == number-disabled.html number-disabled-ref.html # auto width: -random-if(B2G) == number-auto-width-1.html number-auto-width-1-ref.html +== number-auto-width-1.html number-auto-width-1-ref.html # min-height/max-height tests: skip-if(B2G||Android) == number-min-height-1.html number-min-height-1-ref.html diff --git a/layout/reftests/forms/input/range/reftest.list b/layout/reftests/forms/input/range/reftest.list index e6ff7786f30f..f7c74f31aaf4 100644 --- a/layout/reftests/forms/input/range/reftest.list +++ b/layout/reftests/forms/input/range/reftest.list @@ -17,10 +17,10 @@ == value-prop.html 75pct-common-ref.html == valueAsNumber-prop-unthemed.html 75pct-unthemed-common-ref.html == valueAsNumber-prop.html 75pct-common-ref.html -random-if(B2G) == stepDown-unthemed.html 75pct-unthemed-common-ref.html # Bug 878916 -random-if(B2G) == stepDown.html 75pct-common-ref.html # Bug 878916 -random-if(B2G) == stepUp-unthemed.html 75pct-unthemed-common-ref.html # Bug 969256 -random-if(B2G) == stepUp.html 75pct-common-ref.html # Bug 969256 +== stepDown-unthemed.html 75pct-unthemed-common-ref.html +== stepDown.html 75pct-common-ref.html +== stepUp-unthemed.html 75pct-unthemed-common-ref.html +== stepUp.html 75pct-common-ref.html fuzzy-if(B2G,1,1) == max-prop.html 100pct-common-ref.html # 'direction' property: diff --git a/layout/reftests/ib-split/reftest.list b/layout/reftests/ib-split/reftest.list index 209535f2e229..779921d2100b 100644 --- a/layout/reftests/ib-split/reftest.list +++ b/layout/reftests/ib-split/reftest.list @@ -64,7 +64,7 @@ == insert-into-split-inline-16a.html insert-into-split-inline-16-ref.html == insert-into-split-inline-16b.html insert-into-split-inline-16-ref.html == insert-into-split-inline-16-ref.html insert-into-split-inline-16-noib-ref.html -random-if(B2G) == float-inside-inline-between-blocks-1.html float-inside-inline-between-blocks-1-ref.html +== float-inside-inline-between-blocks-1.html float-inside-inline-between-blocks-1-ref.html == table-pseudo-in-part3-1.html table-pseudo-in-part3-1-ref.html == emptyspan-1.html emptyspan-1-ref.html == emptyspan-2.html emptyspan-2-ref.html diff --git a/layout/reftests/image-element/reftest.list b/layout/reftests/image-element/reftest.list index 3304f0a90ad5..d8c425197551 100644 --- a/layout/reftests/image-element/reftest.list +++ b/layout/reftests/image-element/reftest.list @@ -44,4 +44,4 @@ fuzzy(1,16900) == gradient-html-07c.html gradient-html-07d.html HTTP == invalidate-1.html invalidate-1-ref.html == pattern-html-01.html pattern-html-01-ref.svg == pattern-html-02.html pattern-html-02-ref.svg -fails-if(B2G) == referenced-from-binding-01.html referenced-from-binding-01-ref.html # Bug 988763 +== referenced-from-binding-01.html referenced-from-binding-01-ref.html diff --git a/layout/reftests/image-region/reftest.list b/layout/reftests/image-region/reftest.list index d28c80942e41..6b4a02f16bb1 100644 --- a/layout/reftests/image-region/reftest.list +++ b/layout/reftests/image-region/reftest.list @@ -1 +1 @@ -skip-if(B2G&&browserIsRemote) == image-region.xul image-region-ref.xul +== image-region.xul image-region-ref.xul diff --git a/layout/reftests/marquee/reftest.list b/layout/reftests/marquee/reftest.list index 89591401503e..ebc7dd69f39c 100644 --- a/layout/reftests/marquee/reftest.list +++ b/layout/reftests/marquee/reftest.list @@ -1,4 +1,4 @@ -fails-if(B2G) == 166591-dynamic-1.html 166591-dynamic-1-ref.html +== 166591-dynamic-1.html 166591-dynamic-1-ref.html fuzzy-if(Android&&AndroidVersion>=15,8,50) == 336736-1a.html 336736-1-ref.html fuzzy-if(Android&&AndroidVersion>=15,8,50) == 336736-1b.html 336736-1-ref.html == 406073-1.html 406073-1-ref.html diff --git a/layout/reftests/object/reftest.list b/layout/reftests/object/reftest.list index 444d7235ede5..c5243643f5f5 100644 --- a/layout/reftests/object/reftest.list +++ b/layout/reftests/object/reftest.list @@ -54,4 +54,4 @@ fails == svg-with-type.html svg-with-type-ref.html # XXX missing test 034 from http://biesi.damowmow.com/object/ here; would # need to require Flash on the test machine to run them # -fails-if(B2G) == malformed-uri.html malformed-uri-ref.html +== malformed-uri.html malformed-uri-ref.html diff --git a/layout/reftests/printing/reftest.list b/layout/reftests/printing/reftest.list index b20c287d5502..7e58a8b334cc 100644 --- a/layout/reftests/printing/reftest.list +++ b/layout/reftests/printing/reftest.list @@ -20,15 +20,15 @@ fails-if(B2G) == 609227-2b.html 609227-2-ref.html # reftest-print doesn't work o == 626395-2c.html 626395-2-ref.html == 626395-2d.html 626395-2-ref.html == 652178-1.html 652178-1-ref.html -random-if(B2G) == 115199-1.html 115199-1-ref.html # reftest-print doesn't work on B2G -random-if(B2G) == 115199-2a.html 115199-2-ref.html -random-if(B2G) == 115199-2b.html 115199-2-ref.html +fails-if(B2G) == 115199-1.html 115199-1-ref.html # reftest-print doesn't work on B2G +== 115199-2a.html 115199-2-ref.html +== 115199-2b.html 115199-2-ref.html == 652178-1.html 652178-1-ref2.html skip-if(B2G) fuzzy-if(cocoaWidget,1,5000) == 745025-1.html 745025-1-ref.html # reftest-print doesn't work on B2G == 820496-1.html 820496-1-ref.html # NOTE: These tests don't yet rigorously test what they're # trying to test (shrink-to-fit behavior), due to bug 967311. -random-if(B2G) == 960822.html 960822-ref.html # reftest-print doesn't work on B2G (scrollbar difference only) +fails-if(B2G) == 960822.html 960822-ref.html # reftest-print doesn't work on B2G (scrollbar difference only) == 966419-1.html 966419-1-ref.html == 966419-2.html 966419-2-ref.html diff --git a/layout/reftests/reftest.list b/layout/reftests/reftest.list index ca852da2c8b6..c461d65d00bb 100644 --- a/layout/reftests/reftest.list +++ b/layout/reftests/reftest.list @@ -165,7 +165,7 @@ include font-face/reftest.list include font-features/reftest.list # mobile font size inflation -skip-if(B2G) include font-inflation/reftest.list # Bug 972697 +include font-inflation/reftest.list # font matching include font-matching/reftest.list diff --git a/layout/reftests/svg/reftest.list b/layout/reftests/svg/reftest.list index e177652afe13..8da49e622a1f 100644 --- a/layout/reftests/svg/reftest.list +++ b/layout/reftests/svg/reftest.list @@ -226,7 +226,7 @@ random-if(gtk2Widget) == objectBoundingBox-and-fePointLight-02.svg objectBoundin skip-if(d2d) fuzzy-if(azureQuartz,1,99974) == opacity-and-gradient-02.svg opacity-and-gradient-02-ref.svg == opacity-and-pattern-01.svg pass.svg == opacity-and-transform-01.svg opacity-and-transform-01-ref.svg -fuzzy-if(Android&&AndroidVersion>=15,8,200) random-if(B2G) == outer-svg-border-and-padding-01.svg outer-svg-border-and-padding-01-ref.svg +fuzzy-if(Android&&AndroidVersion>=15,8,200) == outer-svg-border-and-padding-01.svg outer-svg-border-and-padding-01-ref.svg == overflow-on-outer-svg-01.svg overflow-on-outer-svg-01-ref.svg == overflow-on-outer-svg-02a.xhtml overflow-on-outer-svg-02-ref.xhtml == overflow-on-outer-svg-02b.xhtml overflow-on-outer-svg-02-ref.xhtml diff --git a/layout/reftests/svg/sizing/reftest.list b/layout/reftests/svg/sizing/reftest.list index 8264aca6f8bd..c1ac8ee0464e 100644 --- a/layout/reftests/svg/sizing/reftest.list +++ b/layout/reftests/svg/sizing/reftest.list @@ -284,16 +284,16 @@ HTTP(../..) == inline--position-relative--01.xhtml inline--position-relative- # tests do not have any width or height on the element so they should # be sized purely by the embedded SVG's intrinsic size. -random-if(Android||B2G) == object--auto-auto--0-0.html pass-empty.svg # XXX add border -random-if(Android||B2G) == object--auto-auto--0-pct.html object--auto-auto--0-pct--ref.html -random-if(Android||B2G) == object--auto-auto--0-px.html object--auto-auto--0-px--ref.html -random-if(Android||B2G) == object--auto-auto--pct-0.html object--auto-auto--pct-0--ref.html +random-if(Android) == object--auto-auto--0-0.html pass-empty.svg # XXX add border +random-if(Android) == object--auto-auto--0-pct.html object--auto-auto--0-pct--ref.html +random-if(Android) == object--auto-auto--0-px.html object--auto-auto--0-px--ref.html +random-if(Android) == object--auto-auto--pct-0.html object--auto-auto--pct-0--ref.html # The following four commented out tests fail post bug 428023: #== object--auto-auto--pct-pct.html object--auto-auto--pct-pct--ref.html #== object--auto-auto--pct-px.html object--auto-auto--pct-px--ref.html -random-if(Android||B2G) == object--auto-auto--px-0.html object--auto-auto--px-0--ref.html +random-if(Android) == object--auto-auto--px-0.html object--auto-auto--px-0--ref.html #== object--auto-auto--px-pct.html object--auto-auto--px-pct--ref.html -random-if(Android||B2G) == object--auto-auto--px-px.html object--auto-auto--px-px--ref.html +random-if(Android) == object--auto-auto--px-px.html object--auto-auto--px-px--ref.html #== object--pct-pct--0-0.html pass.svg diff --git a/layout/reftests/text-shadow/reftest.list b/layout/reftests/text-shadow/reftest.list index a4e5d9697224..d9e3437a941a 100644 --- a/layout/reftests/text-shadow/reftest.list +++ b/layout/reftests/text-shadow/reftest.list @@ -1,8 +1,8 @@ -skip-if(B2G&&browserIsRemote) == basic.xul basic-ref.xul -random-if(Android) skip-if(B2G&&browserIsRemote) == basic-negcoord.xul basic-negcoord-ref.xul -skip-if(B2G&&browserIsRemote) != blur.xul blur-notref.xul -skip-if(B2G&&browserIsRemote) == color-inherit.xul color-inherit-ref.xul -skip-if(B2G&&browserIsRemote) == multiple-noblur.xul multiple-noblur-ref.xul +== basic.xul basic-ref.xul +random-if(Android) == basic-negcoord.xul basic-negcoord-ref.xul +!= blur.xul blur-notref.xul +== color-inherit.xul color-inherit-ref.xul +== multiple-noblur.xul multiple-noblur-ref.xul HTTP(..) == blur-opacity.html blur-opacity-ref.html == basic.html basic-ref.html diff --git a/layout/reftests/transform-3d/reftest.list b/layout/reftests/transform-3d/reftest.list index c64cb0f3db0d..11bd5b16e4a3 100644 --- a/layout/reftests/transform-3d/reftest.list +++ b/layout/reftests/transform-3d/reftest.list @@ -11,7 +11,7 @@ == rotatex-perspective-1c.html rotatex-1-ref.html == rotatex-perspective-3a.html rotatex-perspective-3-ref.html == scalez-1a.html scalez-1-ref.html -fails-if(B2G) == preserve3d-1a.html preserve3d-1-ref.html # Bug 988766 +== preserve3d-1a.html preserve3d-1-ref.html == preserve3d-1b.html about:blank == preserve3d-clipped.html about:blank == preserve3d-2a.html preserve3d-2-ref.html @@ -20,7 +20,7 @@ fails-if(B2G) == preserve3d-1a.html preserve3d-1-ref.html # Bug 988766 == preserve3d-2d.html preserve3d-2-ref.html == preserve3d-3a.html preserve3d-3-ref.html skip-if(B2G) == preserve3d-4a.html green-rect.html -fuzzy-if(Android&&AndroidVersion>=15,4,300) fails-if(B2G) == preserve3d-5a.html preserve3d-5-ref.html # Bug 988767 +fuzzy-if(Android&&AndroidVersion>=15,4,300) == preserve3d-5a.html preserve3d-5-ref.html == scale3d-z.html scalez-1-ref.html fuzzy-if(winWidget,102,580) fuzzy-if(d2d,143,681) fuzzy-if(OSX==10.8,224,924) fuzzy-if(OSX==10.9,224,924) == scale3d-all.html scale3d-1-ref.html # subpixel AA fuzzy-if(winWidget,102,580) fuzzy-if(d2d,143,681) fuzzy-if(OSX==10.8,224,924) fuzzy-if(OSX==10.9,224,924) == scale3d-all-separate.html scale3d-1-ref.html # subpixel AA diff --git a/layout/reftests/w3c-css/submitted/ui3/reftest.list b/layout/reftests/w3c-css/submitted/ui3/reftest.list index d04ef6059434..1fd280bef738 100644 --- a/layout/reftests/w3c-css/submitted/ui3/reftest.list +++ b/layout/reftests/w3c-css/submitted/ui3/reftest.list @@ -8,6 +8,6 @@ == box-sizing-padding-box-001.xht box-sizing-padding-box-001-ref.xht == box-sizing-padding-box-002.xht box-sizing-padding-box-002-ref.xht == box-sizing-padding-box-003.xht box-sizing-padding-box-003-ref.xht -random-if(Android) skip-if(B2G) == box-sizing-replaced-001.xht box-sizing-replaced-001-ref.xht # Bug 982547 -random-if(B2G) == box-sizing-replaced-002.xht box-sizing-replaced-002-ref.xht -random-if(B2G) == box-sizing-replaced-003.xht box-sizing-replaced-003-ref.xht +fails-if(B2G) random-if(Android) == box-sizing-replaced-001.xht box-sizing-replaced-001-ref.xht +== box-sizing-replaced-002.xht box-sizing-replaced-002-ref.xht +== box-sizing-replaced-003.xht box-sizing-replaced-003-ref.xht diff --git a/layout/reftests/xul-document-load/reftest.list b/layout/reftests/xul-document-load/reftest.list index 1ffb71b3fd5e..a726e216f307 100644 --- a/layout/reftests/xul-document-load/reftest.list +++ b/layout/reftests/xul-document-load/reftest.list @@ -1,23 +1,23 @@ -skip-if(B2G&&browserIsRemote) == test001.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test002.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test003.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test004.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test005.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test006.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test007.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test008.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test009.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test010.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test011.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test012.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test013.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test014.xul reference-green-window.xul +== test001.xul reference-green-window.xul +== test002.xul reference-green-window.xul +== test003.xul reference-green-window.xul +== test004.xul reference-green-window.xul +== test005.xul reference-green-window.xul +== test006.xul reference-green-window.xul +== test007.xul reference-green-window.xul +== test008.xul reference-green-window.xul +== test009.xul reference-green-window.xul +== test010.xul reference-green-window.xul +== test011.xul reference-green-window.xul +== test012.xul reference-green-window.xul +== test013.xul reference-green-window.xul +== test014.xul reference-green-window.xul # Disabled due to compartments for now. -#skip-if(B2G&&browserIsRemote) == test015.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test016.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test017.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test018.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test019.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test020.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test021.xul reference-green-window.xul -skip-if(B2G&&browserIsRemote) == test022.xul reference-green-window.xul +#== test015.xul reference-green-window.xul +== test016.xul reference-green-window.xul +== test017.xul reference-green-window.xul +== test018.xul reference-green-window.xul +== test019.xul reference-green-window.xul +== test020.xul reference-green-window.xul +== test021.xul reference-green-window.xul +== test022.xul reference-green-window.xul diff --git a/layout/reftests/xul/reftest.list b/layout/reftests/xul/reftest.list index 4a11579ce417..0496804083ed 100644 --- a/layout/reftests/xul/reftest.list +++ b/layout/reftests/xul/reftest.list @@ -1,9 +1,9 @@ -skip-if(B2G&&browserIsRemote) == menuitem-key.xul menuitem-key-ref.xul +== menuitem-key.xul menuitem-key-ref.xul # these random-if(Android) are due to differences between Android Native & Xul, see bug 732569 -random-if(Android||B2G) skip-if(B2G&&browserIsRemote) == menulist-shrinkwrap-1.xul menulist-shrinkwrap-1-ref.xul -random-if(Android||B2G) fails-if(winWidget) skip-if(B2G&&browserIsRemote) == menulist-shrinkwrap-2.xul menulist-shrinkwrap-2-ref.xul -skip-if(B2G&&browserIsRemote) == textbox-overflow-1.xul textbox-overflow-1-ref.xul # for bug 749658 +random-if(Android||B2G) == menulist-shrinkwrap-1.xul menulist-shrinkwrap-1-ref.xul +random-if(Android||B2G) fails-if(winWidget) == menulist-shrinkwrap-2.xul menulist-shrinkwrap-2-ref.xul +== textbox-overflow-1.xul textbox-overflow-1-ref.xul # for bug 749658 # accesskeys are not normally displayed on Mac, so skip this test -skip-if(cocoaWidget) skip-if(B2G&&browserIsRemote) == accesskey.xul accesskey-ref.xul -fails-if(cocoaWidget) fails-if(B2G) skip-if(B2G&&browserIsRemote) == tree-row-outline-1.xul tree-row-outline-1-ref.xul -skip-if(B2G&&browserIsRemote) != tree-row-outline-1.xul tree-row-outline-1-notref.xul +skip-if(cocoaWidget) == accesskey.xul accesskey-ref.xul +fails-if(cocoaWidget) fails-if(B2G) == tree-row-outline-1.xul tree-row-outline-1-ref.xul +!= tree-row-outline-1.xul tree-row-outline-1-notref.xul diff --git a/layout/xul/grid/reftests/reftest.list b/layout/xul/grid/reftests/reftest.list index 15c3c0b7944c..80f7925a0882 100644 --- a/layout/xul/grid/reftests/reftest.list +++ b/layout/xul/grid/reftests/reftest.list @@ -1,18 +1,18 @@ -skip-if(B2G&&browserIsRemote) == row-sizing-1.xul row-sizing-1-ref.xul -skip-if(B2G&&browserIsRemote) == column-sizing-1.xul column-sizing-1-ref.xul -skip-if(B2G&&browserIsRemote) == row-or-column-sizing-1.xul row-or-column-sizing-2.xul -skip-if(B2G&&browserIsRemote) == row-or-column-sizing-1.xul row-or-column-sizing-3.xul -skip-if(B2G&&browserIsRemote) == row-or-column-sizing-1.xul row-or-column-sizing-4.xul -skip-if(B2G&&browserIsRemote) == z-order-1.xul z-order-1-ref.xul -skip-if(B2G&&browserIsRemote) == z-order-2.xul z-order-2-ref.xul -skip-if(B2G&&browserIsRemote) == not-full-basic.xul not-full-basic-ref.xhtml -skip-if(B2G&&browserIsRemote) == not-full-grid-pack-align.xul not-full-basic-ref.xhtml -skip-if(B2G&&browserIsRemote) == not-full-row-group-align.xul not-full-row-group-align-ref.xhtml # does anyone want/need this behavior? -skip-if(B2G&&browserIsRemote) == not-full-row-group-pack.xul not-full-row-group-pack-ref.xhtml -skip-if(B2G&&browserIsRemote) == not-full-row-group-direction.xul not-full-row-group-direction-ref.xhtml -skip-if(B2G&&browserIsRemote) == not-full-row-leaf-align.xul not-full-basic-ref.xhtml -skip-if(B2G&&browserIsRemote) == not-full-row-leaf-pack.xul not-full-row-leaf-pack-ref.xhtml -skip-if(B2G&&browserIsRemote) == not-full-row-leaf-direction.xul not-full-row-leaf-pack-ref.xhtml +== row-sizing-1.xul row-sizing-1-ref.xul +== column-sizing-1.xul column-sizing-1-ref.xul +== row-or-column-sizing-1.xul row-or-column-sizing-2.xul +== row-or-column-sizing-1.xul row-or-column-sizing-3.xul +== row-or-column-sizing-1.xul row-or-column-sizing-4.xul +== z-order-1.xul z-order-1-ref.xul +== z-order-2.xul z-order-2-ref.xul +== not-full-basic.xul not-full-basic-ref.xhtml +== not-full-grid-pack-align.xul not-full-basic-ref.xhtml +== not-full-row-group-align.xul not-full-row-group-align-ref.xhtml # does anyone want/need this behavior? +== not-full-row-group-pack.xul not-full-row-group-pack-ref.xhtml +== not-full-row-group-direction.xul not-full-row-group-direction-ref.xhtml +== not-full-row-leaf-align.xul not-full-basic-ref.xhtml +== not-full-row-leaf-pack.xul not-full-row-leaf-pack-ref.xhtml +== not-full-row-leaf-direction.xul not-full-row-leaf-pack-ref.xhtml skip-if(B2G) fails-if(Android&&browserIsRemote) == scrollable-columns.xul scrollable-columns-ref.xhtml # bug 650597, 732569 -fails skip-if(B2G&&browserIsRemote) == scrollable-rows.xul scrollable-rows-ref.xhtml -skip-if(B2G&&browserIsRemote) == sizing-2d.xul sizing-2d-ref.xul +fails == scrollable-rows.xul scrollable-rows-ref.xhtml +== sizing-2d.xul sizing-2d-ref.xul diff --git a/layout/xul/reftest/reftest.list b/layout/xul/reftest/reftest.list index ae4818596d59..7452737be091 100644 --- a/layout/xul/reftest/reftest.list +++ b/layout/xul/reftest/reftest.list @@ -1,5 +1,5 @@ -fails-if(Android||B2G) skip-if(B2G&&browserIsRemote) == textbox-multiline-noresize.xul textbox-multiline-ref.xul # reference is blank on Android (due to no native theme support?) -skip-if(B2G&&browserIsRemote) != textbox-multiline-resize.xul textbox-multiline-ref.xul -skip-if(B2G&&browserIsRemote) == popup-explicit-size.xul popup-explicit-size-ref.xul -random-if(Android) skip-if(B2G&&browserIsRemote) == image-size.xul image-size-ref.xul -skip-if(B2G&&browserIsRemote) == image-scaling-min-height-1.xul image-scaling-min-height-1-ref.xul +fails-if(Android||B2G) == textbox-multiline-noresize.xul textbox-multiline-ref.xul # reference is blank on Android (due to no native theme support?) +!= textbox-multiline-resize.xul textbox-multiline-ref.xul +== popup-explicit-size.xul popup-explicit-size-ref.xul +random-if(Android) == image-size.xul image-size-ref.xul +== image-scaling-min-height-1.xul image-scaling-min-height-1-ref.xul diff --git a/toolkit/content/tests/reftests/reftest.list b/toolkit/content/tests/reftests/reftest.list index 963e371386d0..a37a9722a523 100644 --- a/toolkit/content/tests/reftests/reftest.list +++ b/toolkit/content/tests/reftests/reftest.list @@ -1,2 +1,2 @@ -skip-if(B2G&&browserIsRemote) random-if(cocoaWidget) == bug-442419-progressmeter-max.xul bug-442419-progressmeter-max-ref.xul # fails most of the time on Mac because progress meter animates # Bug 974780 -skip-if(B2G&&browserIsRemote) != textbox-multiline-default-value.xul textbox-multiline-empty.xul # Bug 974780 +random-if(cocoaWidget) == bug-442419-progressmeter-max.xul bug-442419-progressmeter-max-ref.xul # fails most of the time on Mac because progress meter animates +!= textbox-multiline-default-value.xul textbox-multiline-empty.xul From 059de3e6fdc4487093df7b0abf5481e807a1f46a Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 17 Apr 2014 09:00:34 -0700 Subject: [PATCH 56/79] Bug 997306: Use size_t loop iterators in TestGCPostBarriers.cpp to fix signed/unsigned comparison build warnings. r=jonco --- xpcom/glue/tests/gtest/TestGCPostBarriers.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xpcom/glue/tests/gtest/TestGCPostBarriers.cpp b/xpcom/glue/tests/gtest/TestGCPostBarriers.cpp index 423cf357703f..c71f08efb7ff 100644 --- a/xpcom/glue/tests/gtest/TestGCPostBarriers.cpp +++ b/xpcom/glue/tests/gtest/TestGCPostBarriers.cpp @@ -55,7 +55,7 @@ RunTest(JSRuntime* rt, JSContext* cx, ArrayT* array) RootedValue value(cx); const char* property = "foo"; JS::shadow::Runtime* srt = reinterpret_cast(rt); - for (int i = 0; i < ElementCount; ++i) { + for (size_t i = 0; i < ElementCount; ++i) { RootedObject obj(cx, JS_NewObject(cx, nullptr, JS::NullPtr(), JS::NullPtr())); #ifdef JSGC_GENERATIONAL ASSERT_TRUE(js::gc::IsInsideNursery(srt, obj)); @@ -76,12 +76,12 @@ RunTest(JSRuntime* rt, JSContext* cx, ArrayT* array) /* * Sanity check that our array contains what we expect. */ - for (int i = 0; i < ElementCount; ++i) { + for (size_t i = 0; i < ElementCount; ++i) { RootedObject obj(cx, array->ElementAt(i)); ASSERT_FALSE(js::gc::IsInsideNursery(srt, obj)); ASSERT_TRUE(JS_GetProperty(cx, obj, property, &value)); ASSERT_TRUE(value.isInt32()); - ASSERT_EQ(i, value.toInt32()); + ASSERT_EQ(static_cast(i), value.toInt32()); } JS_RemoveExtraGCRootsTracer(rt, TraceArray, array); From 9243138b137e6d79142bc3fd810b06d5215b22c6 Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Wed, 16 Apr 2014 17:02:22 -0400 Subject: [PATCH 57/79] Bug 997287 - Access AsyncPanZoomController::mGeckoContentController safely. r=kats --HG-- extra : source : cf71c9301548157b0b92f1443290273ac8a45f28 --- gfx/layers/apz/src/AsyncPanZoomController.cpp | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 46734e5046b3..c8af51ad5ded 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -618,9 +618,10 @@ nsEventStatus AsyncPanZoomController::OnTouchStart(const MultiTouchInput& aEvent mX.StartTouch(point.x); mY.StartTouch(point.y); APZCTreeManager* treeManagerLocal = mTreeManager; - if (treeManagerLocal) { + nsRefPtr controller = GetGeckoContentController(); + if (treeManagerLocal && controller) { bool touchCanBePan = treeManagerLocal->CanBePanned(this); - mGeckoContentController->NotifyAPZStateChange( + controller->NotifyAPZStateChange( GetGuid(), APZStateChange::StartTouch, touchCanBePan); } SetState(TOUCHING); @@ -961,8 +962,10 @@ nsEventStatus AsyncPanZoomController::GenerateSingleTap(const ScreenIntPoint& aP } void AsyncPanZoomController::OnTouchEndOrCancel() { - mGeckoContentController->NotifyAPZStateChange( - GetGuid(), APZStateChange::EndTouch, mTouchBlockState.mSingleTapOccurred); + if (nsRefPtr controller = GetGeckoContentController()) { + controller->NotifyAPZStateChange( + GetGuid(), APZStateChange::EndTouch, mTouchBlockState.mSingleTapOccurred); + } } nsEventStatus AsyncPanZoomController::OnSingleTapUp(const TapGestureInput& aEvent) { @@ -1107,7 +1110,9 @@ nsEventStatus AsyncPanZoomController::StartPanning(const MultiTouchInput& aEvent } if (IsPanningState(mState)) { - mGeckoContentController->NotifyAPZStateChange(GetGuid(), APZStateChange::StartPanning); + if (nsRefPtr controller = GetGeckoContentController()) { + controller->NotifyAPZStateChange(GetGuid(), APZStateChange::StartPanning); + } return nsEventStatus_eConsumeNoDefault; } // Don't consume an event that didn't trigger a panning. @@ -2006,12 +2011,12 @@ void AsyncPanZoomController::SetState(PanZoomState aNewState) { mState = aNewState; } - if (mGeckoContentController) { + if (nsRefPtr controller = GetGeckoContentController()) { if (!IsTransformingState(oldState) && IsTransformingState(aNewState)) { - mGeckoContentController->NotifyAPZStateChange( + controller->NotifyAPZStateChange( GetGuid(), APZStateChange::TransformBegin); } else if (IsTransformingState(oldState) && !IsTransformingState(aNewState)) { - mGeckoContentController->NotifyAPZStateChange( + controller->NotifyAPZStateChange( GetGuid(), APZStateChange::TransformEnd); } } From a82d7f8191c2a41b207574e3e0aac65370ea7ab0 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Mon, 14 Apr 2014 19:12:13 -0700 Subject: [PATCH 58/79] Bug 995289 - Use fmod to wrap custom waveform phase. r=padenot From 4156df84046e8c0be31f02a9ac0ffac1cb9fe668 Mon Sep 17 00:00:00 2001 --- content/media/webaudio/OscillatorNode.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/media/webaudio/OscillatorNode.cpp b/content/media/webaudio/OscillatorNode.cpp index 2607407b9d8a..53111d776304 100644 --- a/content/media/webaudio/OscillatorNode.cpp +++ b/content/media/webaudio/OscillatorNode.cpp @@ -386,9 +386,7 @@ public: tableInterpolationFactor); // mPhase runs 0..periodicWaveSize here instead of 0..2*M_PI. mPhase += periodicWaveSize * mFinalFrequency * rate; - if (mPhase >= periodicWaveSize) { - mPhase -= periodicWaveSize; - } + mPhase = fmod(mPhase, periodicWaveSize); // Bilinear interpolation between adjacent samples in each table. uint32_t j1 = floor(mPhase); uint32_t j2 = j1 + 1; From 0860109f89bd0904cd66bf613ec822074df8cad1 Mon Sep 17 00:00:00 2001 From: David Keeler Date: Thu, 17 Apr 2014 09:50:06 -0700 Subject: [PATCH 59/79] bug 997843 - mozilla::pkix::der::Input::Expect should take a uint16_t as its length argument r=briansmith --- security/pkix/lib/pkixder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/pkix/lib/pkixder.h b/security/pkix/lib/pkixder.h index 7deacc8a04fd..c2a50c0b601f 100644 --- a/security/pkix/lib/pkixder.h +++ b/security/pkix/lib/pkixder.h @@ -93,7 +93,7 @@ public: return Success; } - Result Expect(const uint8_t* expected, size_t expectedLen) + Result Expect(const uint8_t* expected, uint16_t expectedLen) { if (EnsureLength(expectedLen) != Success) { return Fail(SEC_ERROR_BAD_DER); @@ -464,7 +464,7 @@ Null(Input& input) return ExpectTagAndLength(input, NULLTag, 0); } -template +template Result OID(Input& input, const uint8_t (&expectedOid)[Len]) { From c75a74a16f56069216ef2a5443e61c48b64a40a5 Mon Sep 17 00:00:00 2001 From: Camilo Viecco Date: Mon, 7 Apr 2014 10:35:57 -0700 Subject: [PATCH 60/79] Bug 992972 - Add sha256SubjectPublicKeyInfoDigest attribute to nsIX509Cert. sr=bsmith --- security/manager/ssl/public/nsIX509Cert.idl | 8 +++++- security/manager/ssl/src/nsNSSCertificate.cpp | 26 +++++++++++++++++++ .../ssl/src/nsNSSCertificateFakeTransport.cpp | 7 +++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/security/manager/ssl/public/nsIX509Cert.idl b/security/manager/ssl/public/nsIX509Cert.idl index 45b9cda13dd3..a70cfe10202b 100644 --- a/security/manager/ssl/public/nsIX509Cert.idl +++ b/security/manager/ssl/public/nsIX509Cert.idl @@ -13,7 +13,7 @@ interface nsIASN1Object; /** * This represents a X.509 certificate. */ -[scriptable, uuid(45b24b0a-6189-4b05-af0b-8d4d66d57c59)] +[scriptable, uuid(6286dd8c-c1a1-11e3-941d-180373d97f24)] interface nsIX509Cert : nsISupports { /** @@ -230,4 +230,10 @@ interface nsIX509Cert : nsISupports { * @return Whether the certificates are equal */ boolean equals(in nsIX509Cert other); + + /** + * The base64 encoding of the DER encoded public key info using the specified + * digest. + */ + readonly attribute ACString sha256SubjectPublicKeyInfoDigest; }; diff --git a/security/manager/ssl/src/nsNSSCertificate.cpp b/security/manager/ssl/src/nsNSSCertificate.cpp index 9026ed6c6fce..76a60420638b 100644 --- a/security/manager/ssl/src/nsNSSCertificate.cpp +++ b/security/manager/ssl/src/nsNSSCertificate.cpp @@ -40,6 +40,7 @@ #include "nsXULAppAPI.h" #include "ScopedNSSTypes.h" #include "nsProxyRelease.h" +#include "mozilla/Base64.h" #include "nspr.h" #include "certdb.h" @@ -1077,6 +1078,31 @@ nsNSSCertificate::GetTokenName(nsAString& aTokenName) return NS_OK; } +NS_IMETHODIMP +nsNSSCertificate::GetSha256SubjectPublicKeyInfoDigest(nsACString& aSha256SPKIDigest) +{ + nsNSSShutDownPreventionLock locker; + if (isAlreadyShutDown()) { + return NS_ERROR_NOT_AVAILABLE; + } + + aSha256SPKIDigest.Truncate(); + Digest digest; + nsresult rv = digest.DigestBuf(SEC_OID_SHA256, mCert->derPublicKey.data, + mCert->derPublicKey.len); + if (NS_WARN_IF(NS_FAILED(rv))) { + return rv; + } + rv = Base64Encode(nsDependentCSubstring( + reinterpret_cast (digest.get().data), + digest.get().len), + aSha256SPKIDigest); + if (NS_WARN_IF(NS_FAILED(rv))) { + return rv; + } + return NS_OK; +} + NS_IMETHODIMP nsNSSCertificate::GetRawDER(uint32_t* aLength, uint8_t** aArray) { diff --git a/security/manager/ssl/src/nsNSSCertificateFakeTransport.cpp b/security/manager/ssl/src/nsNSSCertificateFakeTransport.cpp index 7e28b1a5bb08..88ca1e347107 100644 --- a/security/manager/ssl/src/nsNSSCertificateFakeTransport.cpp +++ b/security/manager/ssl/src/nsNSSCertificateFakeTransport.cpp @@ -230,6 +230,13 @@ nsNSSCertificateFakeTransport::Equals(nsIX509Cert *other, bool *result) return NS_ERROR_NOT_IMPLEMENTED; } +NS_IMETHODIMP +nsNSSCertificateFakeTransport::GetSha256SubjectPublicKeyInfoDigest(nsACString_internal&) +{ + NS_NOTREACHED("Unimplemented on content process"); + return NS_ERROR_NOT_IMPLEMENTED; +} + NS_IMETHODIMP nsNSSCertificateFakeTransport::Write(nsIObjectOutputStream* aStream) { From 759b8bc24fd85c81210f1da3eb666d6113c305a5 Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Wed, 16 Apr 2014 12:34:56 -0400 Subject: [PATCH 61/79] Bug 997690 - nsHttpConnection::IdleTimeout default can be set internally r=hurley --- netwerk/protocol/http/nsHttpConnection.cpp | 7 ++++++- netwerk/protocol/http/nsHttpConnection.h | 1 - netwerk/protocol/http/nsHttpConnectionMgr.cpp | 8 -------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/netwerk/protocol/http/nsHttpConnection.cpp b/netwerk/protocol/http/nsHttpConnection.cpp index 6985db17df17..ee4644fadfa4 100644 --- a/netwerk/protocol/http/nsHttpConnection.cpp +++ b/netwerk/protocol/http/nsHttpConnection.cpp @@ -48,7 +48,6 @@ nsHttpConnection::nsHttpConnection() : mTransaction(nullptr) , mHttpHandler(gHttpHandler) , mCallbacksLock("nsHttpConnection::mCallbacksLock") - , mIdleTimeout(0) , mConsiderReusedAfterInterval(0) , mConsiderReusedAfterEpoch(0) , mCurrentBytesRead(0) @@ -80,6 +79,12 @@ nsHttpConnection::nsHttpConnection() , mTCPKeepaliveConfig(kTCPKeepaliveDisabled) { LOG(("Creating nsHttpConnection @%x\n", this)); + + // the default timeout is for when this connection has not yet processed a + // transaction + static const PRIntervalTime k5Sec = PR_SecondsToInterval(5); + mIdleTimeout = + (k5Sec < gHttpHandler->IdleTimeout()) ? k5Sec : gHttpHandler->IdleTimeout(); } nsHttpConnection::~nsHttpConnection() diff --git a/netwerk/protocol/http/nsHttpConnection.h b/netwerk/protocol/http/nsHttpConnection.h index 4c052da1e170..1f58254548d8 100644 --- a/netwerk/protocol/http/nsHttpConnection.h +++ b/netwerk/protocol/http/nsHttpConnection.h @@ -114,7 +114,6 @@ public: bool IsPersistent() { return IsKeepAlive(); } bool IsReused(); void SetIsReusedAfter(uint32_t afterMilliseconds); - void SetIdleTimeout(PRIntervalTime val) {mIdleTimeout = val;} nsresult PushBack(const char *data, uint32_t length); nsresult ResumeSend(); nsresult ResumeRecv(); diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp index 46704d61aa5c..73861d031152 100644 --- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp +++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp @@ -3067,14 +3067,6 @@ nsHalfOpenSocket::OnOutputStreamReady(nsIAsyncOutputStream *out) // this transaction was dispatched off the pending q before all the // sockets established themselves. - // We need to establish a small non-zero idle timeout so the connection - // mgr perceives this socket as suitable for persistent connection reuse - const PRIntervalTime k5Sec = PR_SecondsToInterval(5); - if (k5Sec < gHttpHandler->IdleTimeout()) - conn->SetIdleTimeout(k5Sec); - else - conn->SetIdleTimeout(gHttpHandler->IdleTimeout()); - // After about 1 second allow for the possibility of restarting a // transaction due to server close. Keep at sub 1 second as that is the // minimum granularity we can expect a server to be timing out with. From 14305fa2c4c7e9fc4741b15860c7b0a24b76f1b7 Mon Sep 17 00:00:00 2001 From: Nicholas Hurley Date: Thu, 17 Apr 2014 10:41:17 -0700 Subject: [PATCH 62/79] Bug 997166 - Avoid starting up the seer service if we don't have to. r=mcmanus --- netwerk/base/src/Seer.cpp | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/netwerk/base/src/Seer.cpp b/netwerk/base/src/Seer.cpp index 41826ca6b60b..a7319afca4fe 100644 --- a/netwerk/base/src/Seer.cpp +++ b/netwerk/base/src/Seer.cpp @@ -2736,6 +2736,10 @@ nsresult SeerPredict(nsIURI *targetURI, nsIURI *sourceURI, SeerPredictReason reason, nsILoadContext *loadContext, nsINetworkSeerVerifier *verifier) { + if (!IsNullOrHttp(targetURI) || !IsNullOrHttp(sourceURI)) { + return NS_OK; + } + nsCOMPtr seer; nsresult rv = EnsureGlobalSeer(getter_AddRefs(seer)); NS_ENSURE_SUCCESS(rv, rv); @@ -2747,6 +2751,10 @@ nsresult SeerLearn(nsIURI *targetURI, nsIURI *sourceURI, SeerLearnReason reason, nsILoadContext *loadContext) { + if (!IsNullOrHttp(targetURI) || !IsNullOrHttp(sourceURI)) { + return NS_OK; + } + nsCOMPtr seer; nsresult rv = EnsureGlobalSeer(getter_AddRefs(seer)); NS_ENSURE_SUCCESS(rv, rv); @@ -2758,6 +2766,10 @@ nsresult SeerLearn(nsIURI *targetURI, nsIURI *sourceURI, SeerLearnReason reason, nsILoadGroup *loadGroup) { + if (!IsNullOrHttp(targetURI) || !IsNullOrHttp(sourceURI)) { + return NS_OK; + } + nsCOMPtr seer; nsresult rv = EnsureGlobalSeer(getter_AddRefs(seer)); NS_ENSURE_SUCCESS(rv, rv); @@ -2779,6 +2791,10 @@ nsresult SeerLearn(nsIURI *targetURI, nsIURI *sourceURI, SeerLearnReason reason, nsIDocument *document) { + if (!IsNullOrHttp(targetURI) || !IsNullOrHttp(sourceURI)) { + return NS_OK; + } + nsCOMPtr seer; nsresult rv = EnsureGlobalSeer(getter_AddRefs(seer)); NS_ENSURE_SUCCESS(rv, rv); @@ -2796,12 +2812,8 @@ nsresult SeerLearnRedirect(nsIURI *targetURI, nsIChannel *channel, nsILoadContext *loadContext) { - nsCOMPtr seer; - nsresult rv = EnsureGlobalSeer(getter_AddRefs(seer)); - NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr sourceURI; - rv = channel->GetOriginalURI(getter_AddRefs(sourceURI)); + nsresult rv = channel->GetOriginalURI(getter_AddRefs(sourceURI)); NS_ENSURE_SUCCESS(rv, rv); bool sameUri; @@ -2812,6 +2824,14 @@ SeerLearnRedirect(nsIURI *targetURI, nsIChannel *channel, return NS_OK; } + if (!IsNullOrHttp(targetURI) || !IsNullOrHttp(sourceURI)) { + return NS_OK; + } + + nsCOMPtr seer; + rv = EnsureGlobalSeer(getter_AddRefs(seer)); + NS_ENSURE_SUCCESS(rv, rv); + return seer->Learn(targetURI, sourceURI, nsINetworkSeer::LEARN_LOAD_REDIRECT, loadContext); } From b94179a9388f75b3b77a25c520777414818ae5af Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Tue, 15 Apr 2014 23:00:39 -0400 Subject: [PATCH 63/79] Bug 997688 - nsSocketTransport should track SocketTransportService via smart ptr r=sworkman --- netwerk/base/src/nsSocketTransport2.cpp | 36 +++++++++++-------------- netwerk/base/src/nsSocketTransport2.h | 6 +++++ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/netwerk/base/src/nsSocketTransport2.cpp b/netwerk/base/src/nsSocketTransport2.cpp index 58431d43772a..5fdb546fa795 100644 --- a/netwerk/base/src/nsSocketTransport2.cpp +++ b/netwerk/base/src/nsSocketTransport2.cpp @@ -764,6 +764,7 @@ nsSocketTransport::nsSocketTransport() , mFD(MOZ_THIS_IN_INITIALIZER_LIST()) , mFDref(0) , mFDconnected(false) + , mSocketTransportService(gSocketTransportService) , mInput(MOZ_THIS_IN_INITIALIZER_LIST()) , mOutput(MOZ_THIS_IN_INITIALIZER_LIST()) , mQoSBits(0x00) @@ -774,8 +775,6 @@ nsSocketTransport::nsSocketTransport() { SOCKET_LOG(("creating nsSocketTransport @%p\n", this)); - NS_ADDREF(gSocketTransportService); - mTimeouts[TIMEOUT_CONNECT] = UINT16_MAX; // no timeout mTimeouts[TIMEOUT_READ_WRITE] = UINT16_MAX; // no timeout } @@ -791,9 +790,6 @@ nsSocketTransport::~nsSocketTransport() PL_strfree(mTypes[i]); free(mTypes); } - - nsSocketTransportService *serv = gSocketTransportService; - NS_RELEASE(serv); // nulls argument } nsresult @@ -961,7 +957,7 @@ nsSocketTransport::PostEvent(uint32_t type, nsresult status, nsISupports *param) if (!event) return NS_ERROR_OUT_OF_MEMORY; - return gSocketTransportService->Dispatch(event, NS_DISPATCH_NORMAL); + return mSocketTransportService->Dispatch(event, NS_DISPATCH_NORMAL); } void @@ -1219,19 +1215,19 @@ nsSocketTransport::InitiateSocket() // FIFO ordering (which wouldn't even be that valuable IMO). see bug // 194402 for more info. // - if (!gSocketTransportService->CanAttachSocket()) { + if (!mSocketTransportService->CanAttachSocket()) { nsCOMPtr event = new nsSocketEvent(this, MSG_RETRY_INIT_SOCKET); if (!event) return NS_ERROR_OUT_OF_MEMORY; - return gSocketTransportService->NotifyWhenCanAttachSocket(event); + return mSocketTransportService->NotifyWhenCanAttachSocket(event); } // // if we already have a connected socket, then just attach and return. // if (mFD.IsInitialized()) { - rv = gSocketTransportService->AttachSocket(mFD, this); + rv = mSocketTransportService->AttachSocket(mFD, this); if (NS_SUCCEEDED(rv)) mAttached = true; return rv; @@ -1273,7 +1269,7 @@ nsSocketTransport::InitiateSocket() // The Windows default of 8KB is too small and as of vista sp1, autotuning // only applies to receive window int32_t sndBufferSize; - gSocketTransportService->GetSendBufferSize(&sndBufferSize); + mSocketTransportService->GetSendBufferSize(&sndBufferSize); if (sndBufferSize > 0) { opt.option = PR_SockOpt_SendBufferSize; opt.value.send_buffer_size = sndBufferSize; @@ -1287,7 +1283,7 @@ nsSocketTransport::InitiateSocket() } // inform socket transport about this newly created socket... - rv = gSocketTransportService->AttachSocket(fd, this); + rv = mSocketTransportService->AttachSocket(fd, this); if (NS_FAILED(rv)) { PR_Close(fd); return rv; @@ -1464,7 +1460,7 @@ nsSocketTransport::RecoverFromError() // Retry if that connection is made. if (!tryAgain) { bool autodialEnabled; - gSocketTransportService->GetAutodialEnabled(&autodialEnabled); + mSocketTransportService->GetAutodialEnabled(&autodialEnabled); if (autodialEnabled) { tryAgain = nsNativeConnectionHelper::OnConnectionFailed( NS_ConvertUTF8toUTF16(SocketHost()).get()); @@ -1966,7 +1962,7 @@ nsSocketTransport::OpenInputStream(uint32_t flags, if (NS_FAILED(rv)) return rv; // async copy from socket to pipe - rv = NS_AsyncCopy(&mInput, pipeOut, gSocketTransportService, + rv = NS_AsyncCopy(&mInput, pipeOut, mSocketTransportService, NS_ASYNCCOPY_VIA_WRITESEGMENTS, segsize); if (NS_FAILED(rv)) return rv; @@ -2012,7 +2008,7 @@ nsSocketTransport::OpenOutputStream(uint32_t flags, if (NS_FAILED(rv)) return rv; // async copy from socket to pipe - rv = NS_AsyncCopy(pipeIn, &mOutput, gSocketTransportService, + rv = NS_AsyncCopy(pipeIn, &mOutput, mSocketTransportService, NS_ASYNCCOPY_VIA_READSEGMENTS, segsize); if (NS_FAILED(rv)) return rv; @@ -2451,7 +2447,7 @@ nsSocketTransport::SetKeepaliveEnabledInternal(bool aEnable) // Only enable if keepalives are globally enabled, but ensure other // options are set correctly on the fd. - bool enable = aEnable && gSocketTransportService->IsKeepaliveEnabled(); + bool enable = aEnable && mSocketTransportService->IsKeepaliveEnabled(); nsresult rv = fd.SetKeepaliveVals(enable, mKeepaliveIdleTimeS, mKeepaliveRetryIntervalS, @@ -2483,21 +2479,21 @@ nsSocketTransport::EnsureKeepaliveValsAreInitialized() nsresult rv = NS_OK; int32_t val = -1; if (mKeepaliveIdleTimeS == -1) { - rv = gSocketTransportService->GetKeepaliveIdleTime(&val); + rv = mSocketTransportService->GetKeepaliveIdleTime(&val); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } mKeepaliveIdleTimeS = val; } if (mKeepaliveRetryIntervalS == -1) { - rv = gSocketTransportService->GetKeepaliveRetryInterval(&val); + rv = mSocketTransportService->GetKeepaliveRetryInterval(&val); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } mKeepaliveRetryIntervalS = val; } if (mKeepaliveProbeCount == -1) { - rv = gSocketTransportService->GetKeepaliveProbeCount(&val); + rv = mSocketTransportService->GetKeepaliveProbeCount(&val); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -2534,7 +2530,7 @@ nsSocketTransport::SetKeepaliveEnabled(bool aEnable) this, aEnable ? "enabled" : "disabled", mKeepaliveIdleTimeS, mKeepaliveRetryIntervalS, mKeepaliveProbeCount, - gSocketTransportService->IsKeepaliveEnabled() ? + mSocketTransportService->IsKeepaliveEnabled() ? "enabled" : "disabled")); // Set mKeepaliveEnabled here so that state is maintained; it is possible @@ -2583,7 +2579,7 @@ nsSocketTransport::SetKeepaliveVals(int32_t aIdleTime, nsresult rv = NS_OK; if (mKeepaliveProbeCount == -1) { int32_t val = -1; - nsresult rv = gSocketTransportService->GetKeepaliveProbeCount(&val); + nsresult rv = mSocketTransportService->GetKeepaliveProbeCount(&val); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } diff --git a/netwerk/base/src/nsSocketTransport2.h b/netwerk/base/src/nsSocketTransport2.h index 427f9061184c..ef02c05403e2 100644 --- a/netwerk/base/src/nsSocketTransport2.h +++ b/netwerk/base/src/nsSocketTransport2.h @@ -23,6 +23,7 @@ #include "nsASocketHandler.h" #include "prerror.h" +#include "nsAutoPtr.h" class nsSocketTransport; class nsICancelable; @@ -329,6 +330,11 @@ private: nsrefcnt mFDref; // mFD is closed when mFDref goes to zero. bool mFDconnected; // mFD is available to consumer when TRUE. + // A delete protector reference to gSocketTransportService held for lifetime + // of 'this'. Sometimes used interchangably with gSocketTransportService due + // to scoping. + nsRefPtr mSocketTransportService; + nsCOMPtr mCallbacks; nsCOMPtr mEventSink; nsCOMPtr mSecInfo; From 50536a02af97cbe9e1b45bbf9c2abe1bbeb01a56 Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Tue, 15 Apr 2014 22:41:06 -0400 Subject: [PATCH 64/79] Bug 997686 - SocketTransportService infaliible malloc cleanup r=sworkman --- netwerk/base/src/nsSocketTransportService2.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/netwerk/base/src/nsSocketTransportService2.cpp b/netwerk/base/src/nsSocketTransportService2.cpp index 552f5ca5b347..66aa50b5c4a7 100644 --- a/netwerk/base/src/nsSocketTransportService2.cpp +++ b/netwerk/base/src/nsSocketTransportService2.cpp @@ -619,18 +619,13 @@ nsSocketTransportService::CreateTransport(const char **types, NS_ENSURE_TRUE(mInitialized, NS_ERROR_NOT_INITIALIZED); NS_ENSURE_TRUE(port >= 0 && port <= 0xFFFF, NS_ERROR_ILLEGAL_VALUE); - nsSocketTransport *trans = new nsSocketTransport(); - if (!trans) - return NS_ERROR_OUT_OF_MEMORY; - NS_ADDREF(trans); - + nsRefPtr trans = new nsSocketTransport(); nsresult rv = trans->Init(types, typeCount, host, port, proxyInfo); if (NS_FAILED(rv)) { - NS_RELEASE(trans); return rv; } - *result = trans; + trans.forget(result); return NS_OK; } @@ -648,8 +643,6 @@ nsSocketTransportService::CreateUnixDomainTransport(nsIFile *aPath, return rv; nsRefPtr trans = new nsSocketTransport(); - if (!trans) - return NS_ERROR_OUT_OF_MEMORY; rv = trans->InitWithFilename(path.get()); if (NS_FAILED(rv)) From e00e1fd44f4fe4d3a6fded1ea99bb9df39321921 Mon Sep 17 00:00:00 2001 From: Monica Chew Date: Thu, 17 Apr 2014 10:57:08 -0700 Subject: [PATCH 65/79] Bug 997759: Prefs for phishing and malware tables are comma-sep lists (r=gcp) --- .../url-classifier/SafeBrowsing.jsm | 75 +++++++++++++------ 1 file changed, 52 insertions(+), 23 deletions(-) diff --git a/toolkit/components/url-classifier/SafeBrowsing.jsm b/toolkit/components/url-classifier/SafeBrowsing.jsm index aacf76c6d0aa..cfce2b20b3ac 100644 --- a/toolkit/components/url-classifier/SafeBrowsing.jsm +++ b/toolkit/components/url-classifier/SafeBrowsing.jsm @@ -10,12 +10,19 @@ const Cu = Components.utils; Cu.import("resource://gre/modules/Services.jsm"); -const phishingList = Services.prefs.getCharPref("urlclassifier.phish_table"); -const malwareList = Services.prefs.getCharPref("urlclassifier.malware_table"); -const downloadBlockList = - Services.prefs.getCharPref("urlclassifier.downloadBlockTable"); -const downloadAllowList = - Services.prefs.getCharPref("urlclassifier.downloadAllowTable"); +// Skip all the ones containining "test", because we never need to ask for +// updates for them. +function getLists(prefName) { + return Services.prefs.getCharPref(prefName).split(",") + .filter(function(value) { return value.indexOf("test-") == -1; }) + .map(function(value) { return value.trim(); }); +} + +// These may be a comma-separated lists of tables. +const phishingLists = getLists("urlclassifier.phish_table"); +const malwareLists = getLists("urlclassifier.malware_table"); +const downloadBlockLists = getLists("urlclassifier.downloadBlockTable"); +const downloadAllowLists = getLists("urlclassifier.downloadAllowTable"); var debug = false; function log(...stuff) { @@ -41,10 +48,18 @@ this.SafeBrowsing = { // Register our two types of tables, and add custom Mozilla entries let listManager = Cc["@mozilla.org/url-classifier/listmanager;1"]. getService(Ci.nsIUrlListManager); - listManager.registerTable(phishingList, false); - listManager.registerTable(malwareList, false); - listManager.registerTable(downloadBlockList, false); - listManager.registerTable(downloadAllowList, false); + for (let i = 0; i < phishingLists.length; ++i) { + listManager.registerTable(phishingLists[i], false); + } + for (let i = 0; i < malwareLists.length; ++i) { + listManager.registerTable(malwareLists[i], false); + } + for (let i = 0; i < downloadBlockLists.length; ++i) { + listManager.registerTable(downloadBlockLists[i], false); + } + for (let i = 0; i < downloadAllowLists.length; ++i) { + listManager.registerTable(downloadAllowLists[i], false); + } this.addMozEntries(); this.controlUpdateChecking(); @@ -129,19 +144,33 @@ this.SafeBrowsing = { let listManager = Cc["@mozilla.org/url-classifier/listmanager;1"]. getService(Ci.nsIUrlListManager); - if (this.phishingEnabled) - listManager.enableUpdate(phishingList); - else - listManager.disableUpdate(phishingList); - - if (this.malwareEnabled) { - listManager.enableUpdate(malwareList); - listManager.enableUpdate(downloadBlockList); - listManager.enableUpdate(downloadAllowList); - } else { - listManager.disableUpdate(malwareList); - listManager.disableUpdate(downloadBlockList); - listManager.disableUpdate(downloadAllowList); + for (let i = 0; i < phishingLists.length; ++i) { + if (this.phishingEnabled) { + listManager.enableUpdate(phishingLists[i]); + } else { + listManager.disableUpdate(phishingLists[i]); + } + } + for (let i = 0; i < malwareLists.length; ++i) { + if (this.malwareEnabled) { + listManager.enableUpdate(malwareLists[i]); + } else { + listManager.disableUpdate(malwareLists[i]); + } + } + for (let i = 0; i < downloadBlockLists.length; ++i) { + if (this.malwareEnabled) { + listManager.enableUpdate(downloadBlockLists[i]); + } else { + listManager.disableUpdate(downloadBlockLists[i]); + } + } + for (let i = 0; i < downloadAllowLists.length; ++i) { + if (this.malwareEnabled) { + listManager.enableUpdate(downloadAllowLists[i]); + } else { + listManager.disableUpdate(downloadAllowLists[i]); + } } }, From 3c802d91803434778e3fe93940d3317f41995fa0 Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Sat, 12 Apr 2014 14:44:35 +0900 Subject: [PATCH 66/79] Bug 471713 - Remove duplicated parens around flags in SpiderMonkey. r=jwalden --HG-- extra : rebase_source : 45e8cc7caa3b0796052bdb2bb9f949ad82aa3c7f --- js/src/vm/make_opcode_doc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/vm/make_opcode_doc.py b/js/src/vm/make_opcode_doc.py index 9ed192a324e1..6e79be829547 100644 --- a/js/src/vm/make_opcode_doc.py +++ b/js/src/vm/make_opcode_doc.py @@ -285,7 +285,7 @@ def format_flags(flags): return ' ({flags})'.format(flags=flags) def print_opcode(opcode): - names_template = '{name} [-{nuses}, +{ndefs}] ({flags})' + names_template = '{name} [-{nuses}, +{ndefs}]{flags}' names = map(lambda code: names_template.format(name=escape(code.name), nuses=override(code.nuses, opcode.nuses_override), From e4535ab859ce6d649457247193521d3705a7f9f2 Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Fri, 11 Apr 2014 09:14:08 +0900 Subject: [PATCH 67/79] Bug 471713 - Part 3: Add documentation for function call-related opcodes. r=djvj --HG-- extra : rebase_source : 1b019427b68d8be12cde998f60389d68c3224aad --- js/src/vm/Opcodes.h | 264 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 242 insertions(+), 22 deletions(-) diff --git a/js/src/vm/Opcodes.h b/js/src/vm/Opcodes.h index 2ef8726a7031..1ea0af498dd4 100644 --- a/js/src/vm/Opcodes.h +++ b/js/src/vm/Opcodes.h @@ -95,12 +95,32 @@ macro(JSOP_UNUSED2, 2, "unused2", NULL, 1, 1, 0, JOF_BYTE) \ macro(JSOP_ENTERWITH, 3, "enterwith", NULL, 5, 1, 0, JOF_OBJECT) \ macro(JSOP_LEAVEWITH, 4, "leavewith", NULL, 1, 0, 0, JOF_BYTE) \ + /* + * Pops the top of stack value as 'rval', stops interpretation of current + * script and returns 'rval'. + * Category: Statements + * Type: Function + * Operands: + * Stack: rval => + */ \ macro(JSOP_RETURN, 5, "return", NULL, 1, 1, 0, JOF_BYTE) \ macro(JSOP_GOTO, 6, "goto", NULL, 5, 0, 0, JOF_JUMP) \ macro(JSOP_IFEQ, 7, "ifeq", NULL, 5, 1, 0, JOF_JUMP|JOF_DETECTING) \ macro(JSOP_IFNE, 8, "ifne", NULL, 5, 1, 0, JOF_JUMP) \ \ - /* Get the arguments object for the current, lightweight function activation. */ \ + /* + * Pushes the 'arguments' object for the current function activation. + * + * If 'JSScript' is not marked 'needsArgsObj', then a + * JS_OPTIMIZED_ARGUMENTS magic value is pushed. Otherwise, a proper + * arguments object is constructed and pushed. + * + * This opcode requires that the function does not have rest parameter. + * Category: Variables and Scopes + * Type: Arguments + * Operands: + * Stack: => arguments + */ \ macro(JSOP_ARGUMENTS, 9, "arguments", NULL, 1, 0, 1, JOF_BYTE) \ \ /* @@ -259,11 +279,42 @@ */ \ macro(JSOP_VOID, 40, js_void_str, NULL, 1, 1, 1, JOF_BYTE) \ \ - /* spreadcall variant of JSOP_CALL */ \ + /* + * spreadcall variant of JSOP_CALL. + * + * Invokes 'callee' with 'this' and 'args', pushes the return value onto + * the stack. + * + * 'args' is an Array object which contains actual arguments. + * Category: Statements + * Type: Function + * Operands: + * Stack: callee, this, args => rval + */ \ macro(JSOP_SPREADCALL,41, "spreadcall", NULL, 1, 3, 1, JOF_BYTE|JOF_INVOKE|JOF_TYPESET) \ - /* spreadcall variant of JSOP_NEW */ \ + /* + * spreadcall variant of JSOP_NEW + * + * Invokes 'callee' as a constructor with 'this' and 'args', pushes the + * return value onto the stack. + * Category: Statements + * Type: Function + * Operands: + * Stack: callee, this, args => rval + */ \ macro(JSOP_SPREADNEW, 42, "spreadnew", NULL, 1, 3, 1, JOF_BYTE|JOF_INVOKE|JOF_TYPESET) \ - /* spreadcall variant of JSOP_EVAL */ \ + /* + * spreadcall variant of JSOP_EVAL + * + * Invokes 'eval' with 'args' and pushes the return value onto the stack. + * + * If 'eval' in global scope is not original one, invokes the function + * with 'this' and 'args', and pushes return value onto the stack. + * Category: Statements + * Type: Function + * Operands: + * Stack: callee, this, args => rval + */ \ macro(JSOP_SPREADEVAL,43, "spreadeval", NULL, 1, 3, 1, JOF_BYTE|JOF_INVOKE|JOF_TYPESET) \ \ /* @@ -290,6 +341,15 @@ macro(JSOP_GETELEM, 55, "getelem", NULL, 1, 2, 1, JOF_BYTE |JOF_ELEM|JOF_TYPESET|JOF_LEFTASSOC) \ macro(JSOP_SETELEM, 56, "setelem", NULL, 1, 3, 1, JOF_BYTE |JOF_ELEM|JOF_SET|JOF_DETECTING) \ macro(JSOP_UNUSED57, 57, "unused57", NULL, 1, 0, 0, JOF_BYTE) \ + /* + * Invokes 'callee' with 'this' and 'args', pushes return value onto the + * stack. + * Category: Statements + * Type: Function + * Operands: uint16_t argc + * Stack: callee, this, args[0], ..., args[argc-1] => rval + * nuses: (argc+2) + */ \ macro(JSOP_CALL, 58, "call", NULL, 3, -1, 1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \ macro(JSOP_NAME, 59, "name", NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_TYPESET) \ macro(JSOP_DOUBLE, 60, "double", NULL, 5, 0, 1, JOF_DOUBLE) \ @@ -297,6 +357,13 @@ macro(JSOP_ZERO, 62, "zero", "0", 1, 0, 1, JOF_BYTE) \ macro(JSOP_ONE, 63, "one", "1", 1, 0, 1, JOF_BYTE) \ macro(JSOP_NULL, 64, js_null_str, js_null_str, 1, 0, 1, JOF_BYTE) \ + /* + * Pushes 'this' value for current stack frame onto the stack. + * Category: Variables and Scopes + * Type: This + * Operands: + * Stack: => this + */ \ macro(JSOP_THIS, 65, js_this_str, js_this_str, 1, 0, 1, JOF_BYTE) \ macro(JSOP_FALSE, 66, js_false_str, js_false_str, 1, 0, 1, JOF_BYTE) \ macro(JSOP_TRUE, 67, js_true_str, js_true_str, 1, 0, 1, JOF_BYTE) \ @@ -307,8 +374,12 @@ macro(JSOP_TABLESWITCH, 70, "tableswitch", NULL, -1, 1, 0, JOF_TABLESWITCH|JOF_DETECTING) \ \ /* - * Prologue emitted in scripts expected to run once, which deoptimizes code if - * it executes multiple times. + * Prologue emitted in scripts expected to run once, which deoptimizes code + * if it executes multiple times. + * Category: Statements + * Type: Function + * Operands: + * Stack: => */ \ macro(JSOP_RUNONCE, 71, "runonce", NULL, 1, 0, 0, JOF_BYTE) \ \ @@ -326,8 +397,12 @@ \ /* * Sometimes web pages do 'o.Item(i) = j'. This is not an early SyntaxError, - * for web compatibility. Instead we emit JSOP_SETCALL after the function call, - * an opcode that always throws. + * for web compatibility. Instead we emit JSOP_SETCALL after the function + * call, an opcode that always throws. + * Category: Statements + * Type: Function + * Operands: + * Stack: => */ \ macro(JSOP_SETCALL, 74, "setcall", NULL, 1, 0, 0, JOF_BYTE) \ \ @@ -348,6 +423,17 @@ macro(JSOP_ITERNEXT, 77, "iternext", "", 1, 0, 1, JOF_BYTE) \ macro(JSOP_ENDITER, 78, "enditer", NULL, 1, 1, 0, JOF_BYTE) \ \ + /* + * Invokes 'callee' with 'this' and 'args', pushes return value onto the + * stack. + * + * This is for 'f.apply'. + * Category: Statements + * Type: Function + * Operands: uint16_t argc + * Stack: callee, this, args[0], ..., args[argc-1] => rval + * nuses: (argc+2) + */ \ macro(JSOP_FUNAPPLY, 79, "funapply", NULL, 3, -1, 1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \ \ /* Push object initializer literal. */ \ @@ -362,13 +448,38 @@ */ \ macro(JSOP_POP, 81, "pop", NULL, 1, 1, 0, JOF_BYTE) \ \ - /* Call a function as a constructor; operand is argc. */ \ + /* + * Invokes 'callee' as a constructor with 'this' and 'args', pushes return + * value onto the stack. + * Category: Statements + * Type: Function + * Operands: uint16_t argc + * Stack: callee, this, args[0], ..., args[argc-1] => rval + * nuses: (argc+2) + */ \ macro(JSOP_NEW, 82, js_new_str, NULL, 3, -1, 1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \ \ macro(JSOP_SPREAD, 83, "spread", NULL, 1, 3, 2, JOF_BYTE|JOF_ELEM|JOF_SET) \ \ - /* Fast get/set ops for function arguments and local variables. */ \ + /* + * Fast get op for function arguments and local variables. + * + * Pushes 'arguments[argno]' onto the stack. + * Category: Variables and Scopes + * Type: Arguments + * Operands: uint16_t argno + * Stack: => arguments[argno] + */ \ macro(JSOP_GETARG, 84, "getarg", NULL, 3, 0, 1, JOF_QARG |JOF_NAME) \ + /* + * Fast set op for function arguments and local variables. + * + * Sets 'arguments[argno]' as the top of stack value. + * Category: Variables and Scopes + * Type: Arguments + * Operands: uint16_t argno + * Stack: v => v + */ \ macro(JSOP_SETARG, 85, "setarg", NULL, 3, 1, 1, JOF_QARG |JOF_NAME|JOF_SET) \ macro(JSOP_GETLOCAL, 86,"getlocal", NULL, 4, 0, 1, JOF_LOCAL|JOF_NAME) \ macro(JSOP_SETLOCAL, 87,"setlocal", NULL, 4, 1, 1, JOF_LOCAL|JOF_NAME|JOF_SET|JOF_DETECTING) \ @@ -419,7 +530,22 @@ \ macro(JSOP_UNUSED107, 107,"unused107", NULL, 1, 0, 0, JOF_BYTE) \ \ - /* Like JSOP_FUNAPPLY but for f.call instead of f.apply. */ \ + /* + * Invokes 'callee' with 'this' and 'args', pushes return value onto the + * stack. + * + * If 'callee' is determined to be the canonical 'Function.prototype.call' + * function, then this operation is optimized to directly call 'callee' + * with 'args[0]' as 'this', and the remaining arguments as formal args + * to 'callee'. + * + * Like JSOP_FUNAPPLY but for 'f.call' instead of 'f.apply'. + * Category: Statements + * Type: Function + * Operands: uint16_t argc + * Stack: callee, this, args[0], ..., args[argc-1] => rval + * nuses: (argc+2) + */ \ macro(JSOP_FUNCALL, 108,"funcall", NULL, 3, -1, 1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \ \ /* This opcode is the target of the backwards jump for some loop. */ \ @@ -454,7 +580,13 @@ */ \ macro(JSOP_INSTANCEOF,114,js_instanceof_str,js_instanceof_str,1,2,1,JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT) \ \ - /* debugger op */ \ + /* + * Invokes debugger. + * Category: Statements + * Type: Debugger + * Operands: + * Stack: => + */ \ macro(JSOP_DEBUGGER, 115,"debugger", NULL, 1, 0, 0, JOF_BYTE) \ \ /* gosub/retsub for finally handling */ \ @@ -464,7 +596,12 @@ /* More exception handling ops. */ \ macro(JSOP_EXCEPTION, 118,"exception", NULL, 1, 0, 1, JOF_BYTE) \ \ - /* Embedded lineno to speedup pc->line mapping. */ \ + /* + * Embedded lineno to speedup 'pc->line' mapping. + * Category: Other + * Operands: uint32_t lineno + * Stack: => + */ \ macro(JSOP_LINENO, 119,"lineno", NULL, 3, 0, 0, JOF_UINT16) \ \ /* @@ -476,8 +613,17 @@ macro(JSOP_CASE, 121,"case", NULL, 5, 2, 1, JOF_JUMP) \ macro(JSOP_DEFAULT, 122,"default", NULL, 5, 1, 0, JOF_JUMP) \ \ + /* ECMA-compliant call to eval op. */ \ /* - * ECMA-compliant call to eval op + * Invokes 'eval' with 'args' and pushes return value onto the stack. + * + * If 'eval' in global scope is not original one, invokes the function + * with 'this' and 'args', and pushes return value onto the stack. + * Category: Statements + * Type: Function + * Operands: uint16_t argc + * Stack: callee, this, args[0], ..., args[argc-1] => rval + * nuses: (argc+2) */ \ macro(JSOP_EVAL, 123,"eval", NULL, 3, -1, 1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \ \ @@ -490,11 +636,34 @@ macro(JSOP_DEFCONST, 128,"defconst", NULL, 5, 0, 0, JOF_ATOM) \ macro(JSOP_DEFVAR, 129,"defvar", NULL, 5, 0, 0, JOF_ATOM) \ \ - /* Push a closure for a named or anonymous function expression. */ \ + /* + * Pushes a closure for a named or anonymous function expression onto the + * stack. + * Category: Statements + * Type: Function + * Operands: uint32_t funcIndex + * Stack: => obj + */ \ macro(JSOP_LAMBDA, 130, "lambda", NULL, 5, 0, 1, JOF_OBJECT) \ + /* + * Pops the top of stack value as 'this', pushes an arrow function with + * 'this' onto the stack. + * Category: Statements + * Type: Function + * Operands: uint32_t funcIndex + * Stack: this => obj + */ \ macro(JSOP_LAMBDA_ARROW, 131, "lambda_arrow", NULL, 5, 1, 1, JOF_OBJECT) \ \ - /* Used for named function expression self-naming, if lightweight. */ \ + /* + * Pushes current callee onto the stack. + * + * Used for named function expression self-naming, if lightweight. + * Category: Variables and Scopes + * Type: Arguments + * Operands: + * Stack: => callee + */ \ macro(JSOP_CALLEE, 132, "callee", NULL, 1, 0, 1, JOF_BYTE) \ \ /* @@ -559,12 +728,25 @@ /* Set pending exception from the stack, to trigger rethrow. */ \ macro(JSOP_THROWING, 151,"throwing", NULL, 1, 1, 0, JOF_BYTE) \ \ - /* Set the return value pseudo-register in stack frame. */ \ + /* + * Pops the top of stack value as 'rval', sets the return value in stack + * frame as 'rval'. + * Category: Statements + * Type: Function + * Operands: + * Stack: rval => + */ \ macro(JSOP_SETRVAL, 152,"setrval", NULL, 1, 1, 0, JOF_BYTE) \ /* - * Stop interpretation and return value set by JSOP_SETRVAL. When not set, - * returns UndefinedValue. Also emitted at end of script so interpreter - * don't need to check if opcode is still in script range. + * Stops interpretation and returns value set by JSOP_SETRVAL. When not set, + * returns 'undefined'. + * + * Also emitted at end of script so interpreter don't need to check if + * opcode is still in script range. + * Category: Statements + * Type: Function + * Operands: + * Stack: => */ \ macro(JSOP_RETRVAL, 153,"retrval", NULL, 1, 0, 0, JOF_BYTE) \ \ @@ -646,12 +828,35 @@ /* Block-local scope support. */ \ macro(JSOP_PUSHBLOCKSCOPE,198,"pushblockscope", NULL, 5, 0, 0, JOF_OBJECT) \ macro(JSOP_POPBLOCKSCOPE, 199,"popblockscope", NULL, 1, 0, 0, JOF_BYTE) \ + /* + * The opcode to assist the debugger. + * Category: Statements + * Type: Debugger + * Operands: + * Stack: => + */ \ macro(JSOP_DEBUGLEAVEBLOCK, 200,"debugleaveblock", NULL, 1, 0, 0, JOF_BYTE) \ \ macro(JSOP_UNUSED201, 201,"unused201", NULL, 1, 0, 0, JOF_BYTE) \ \ - /* Generator and array comprehension support. */ \ + /* + * Initializes generator frame, creates a generator, sets 'YIELDING' flag, + * stops interpretation and returns the generator. + * Category: Statements + * Type: Generator + * Operands: + * Stack: => + */ \ macro(JSOP_GENERATOR, 202,"generator", NULL, 1, 0, 0, JOF_BYTE) \ + /* + * Pops the top of stack value as 'rval1', sets 'YIELDING' flag, + * stops interpretation and returns 'rval1', pushes sent value from + * 'send()' onto the stack. + * Category: Statements + * Type: Generator + * Operands: + * Stack: rval1 => rval2 + */ \ macro(JSOP_YIELD, 203,"yield", NULL, 1, 1, 1, JOF_BYTE) \ macro(JSOP_ARRAYPUSH, 204,"arraypush", NULL, 1, 2, 0, JOF_BYTE) \ \ @@ -687,12 +892,27 @@ macro(JSOP_UNUSED222, 222,"unused222", NULL, 1, 0, 0, JOF_BYTE) \ macro(JSOP_UNUSED223, 223,"unused223", NULL, 1, 0, 0, JOF_BYTE) \ \ + /* + * Creates rest parameter array for current function call, and pushes it + * onto the stack. + * Category: Variables and Scopes + * Type: Arguments + * Operands: + * Stack: => rest + */ \ macro(JSOP_REST, 224, "rest", NULL, 1, 0, 1, JOF_BYTE|JOF_TYPESET) \ \ /* Pop the stack, convert to a jsid (int or string), and push back. */ \ macro(JSOP_TOID, 225, "toid", NULL, 1, 1, 1, JOF_BYTE) \ \ - /* Push the implicit 'this' value for calls to the associated name. */ \ + /* + * Pushes the implicit 'this' value for calls to the associated name onto + * the stack. + * Category: Variables and Scopes + * Type: This + * Operands: uint32_t nameIndex + * Stack: => this + */ \ macro(JSOP_IMPLICITTHIS, 226, "implicitthis", "", 5, 0, 1, JOF_ATOM) \ \ /* From ade891c5ce43c53d1259e2825736ca27ade45472 Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Wed, 2 Apr 2014 19:29:21 +0900 Subject: [PATCH 68/79] Bug 471713 - Part 4: Add documentation for variables and constants. r=luke --HG-- extra : rebase_source : 748cf711992289c12e5cb6da240cb2a8a906dddf --- js/src/vm/Opcodes.h | 263 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 252 insertions(+), 11 deletions(-) diff --git a/js/src/vm/Opcodes.h b/js/src/vm/Opcodes.h index 1ea0af498dd4..b7130843839c 100644 --- a/js/src/vm/Opcodes.h +++ b/js/src/vm/Opcodes.h @@ -91,6 +91,13 @@ macro(JSOP_NOP, 0, "nop", NULL, 1, 0, 0, JOF_BYTE) \ \ /* Long-standing JavaScript bytecodes. */ \ + /* + * Pushes 'undefined' onto the stack. + * Category: Literals + * Type: Constants + * Operands: + * Stack: => undefined + */ \ macro(JSOP_UNDEFINED, 1, js_undefined_str, "", 1, 0, 1, JOF_BYTE) \ macro(JSOP_UNUSED2, 2, "unused2", NULL, 1, 1, 0, JOF_BYTE) \ macro(JSOP_ENTERWITH, 3, "enterwith", NULL, 5, 1, 0, JOF_OBJECT) \ @@ -159,6 +166,14 @@ * Stack: v1, v2 => v1, v2, v1, v2 */ \ macro(JSOP_DUP2, 13, "dup2", NULL, 1, 2, 4, JOF_BYTE) \ + /* + * Defines a readonly property on the frame's current variables-object (the + * scope object on the scope chain designated to receive new variables). + * Category: Variables and Scopes + * Type: Variables + * Operands: uint32_t nameIndex + * Stack: val => val + */ \ macro(JSOP_SETCONST, 14, "setconst", NULL, 5, 1, 1, JOF_ATOM|JOF_NAME|JOF_SET) \ /* * Pops the top two values 'lval' and 'rval' from the stack, then pushes @@ -259,6 +274,17 @@ * Stack: val => (+val) */ \ macro(JSOP_POS, 35, "pos", "+ ", 1, 1, 1, JOF_BYTE|JOF_ARITH) \ + /* + * Looks up name on the scope chain and deletes it, pushes 'true' onto the + * stack if succeeded (if the property was present and deleted or if the + * property wasn't present in the first place), 'false' if not. + * + * Strict mode code should never contain this opcode. + * Category: Variables and Scopes + * Type: Variables + * Operands: uint32_t nameIndex + * Stack: => succeeded + */ \ macro(JSOP_DELNAME, 36, "delname", NULL, 5, 0, 1, JOF_ATOM|JOF_NAME) \ macro(JSOP_DELPROP, 37, "delprop", NULL, 5, 1, 1, JOF_ATOM|JOF_PROP) \ macro(JSOP_DELELEM, 38, "delelem", NULL, 1, 2, 1, JOF_BYTE |JOF_ELEM) \ @@ -351,11 +377,53 @@ * nuses: (argc+2) */ \ macro(JSOP_CALL, 58, "call", NULL, 3, -1, 1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \ + /* + * Looks up name on the scope chain and pushes its value onto the stack. + * Category: Variables and Scopes + * Type: Variables + * Operands: uint32_t nameIndex + * Stack: => val + */ \ macro(JSOP_NAME, 59, "name", NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_TYPESET) \ + /* + * Pushes numeric constant onto the stack. + * Category: Literals + * Type: Constants + * Operands: uint32_t constIndex + * Stack: => val + */ \ macro(JSOP_DOUBLE, 60, "double", NULL, 5, 0, 1, JOF_DOUBLE) \ + /* + * Pushes string constant onto the stack. + * Category: Literals + * Type: Constants + * Operands: uint32_t atomIndex + * Stack: => string + */ \ macro(JSOP_STRING, 61, "string", NULL, 5, 0, 1, JOF_ATOM) \ + /* + * Pushes '0' onto the stack. + * Category: Literals + * Type: Constants + * Operands: + * Stack: => 0 + */ \ macro(JSOP_ZERO, 62, "zero", "0", 1, 0, 1, JOF_BYTE) \ + /* + * Pushes '1' onto the stack. + * Category: Literals + * Type: Constants + * Operands: + * Stack: => 1 + */ \ macro(JSOP_ONE, 63, "one", "1", 1, 0, 1, JOF_BYTE) \ + /* + * Pushes 'null' onto the stack. + * Category: Literals + * Type: Constants + * Operands: + * Stack: => null + */ \ macro(JSOP_NULL, 64, js_null_str, js_null_str, 1, 0, 1, JOF_BYTE) \ /* * Pushes 'this' value for current stack frame onto the stack. @@ -365,6 +433,13 @@ * Stack: => this */ \ macro(JSOP_THIS, 65, js_this_str, js_this_str, 1, 0, 1, JOF_BYTE) \ + /* + * Pushes boolean value onto the stack. + * Category: Literals + * Type: Constants + * Operands: + * Stack: => true/false + */ \ macro(JSOP_FALSE, 66, js_false_str, js_false_str, 1, 0, 1, JOF_BYTE) \ macro(JSOP_TRUE, 67, js_true_str, js_true_str, 1, 0, 1, JOF_BYTE) \ macro(JSOP_OR, 68, "or", NULL, 5, 1, 1, JOF_JUMP|JOF_DETECTING|JOF_LEFTASSOC) \ @@ -481,10 +556,30 @@ * Stack: v => v */ \ macro(JSOP_SETARG, 85, "setarg", NULL, 3, 1, 1, JOF_QARG |JOF_NAME|JOF_SET) \ + /* + * Pushes the value of local variable onto the stack. + * Category: Variables and Scopes + * Type: Local Variables + * Operands: uint32_t localno + * Stack: => val + */ \ macro(JSOP_GETLOCAL, 86,"getlocal", NULL, 4, 0, 1, JOF_LOCAL|JOF_NAME) \ + /* + * Stores the top stack value to the given local. + * Category: Variables and Scopes + * Type: Local Variables + * Operands: uint32_t localno + * Stack: v => v + */ \ macro(JSOP_SETLOCAL, 87,"setlocal", NULL, 4, 1, 1, JOF_LOCAL|JOF_NAME|JOF_SET|JOF_DETECTING) \ \ - /* Push unsigned 16-bit int constant. */ \ + /* + * Pushes unsigned 16-bit int immediate integer operand onto the stack. + * Category: Literals + * Type: Constants + * Operands: uint16_t val + * Stack: => val + */ \ macro(JSOP_UINT16, 88, "uint16", NULL, 3, 0, 1, JOF_UINT16) \ \ /* @@ -552,7 +647,24 @@ macro(JSOP_LOOPHEAD, 109,"loophead", NULL, 1, 0, 0, JOF_BYTE) \ \ /* ECMA-compliant assignment ops. */ \ + /* + * Looks up name on the scope chain and pushes the scope which contains + * the name onto the stack. If not found, pushes global scope onto the + * stack. + * Category: Variables and Scopes + * Type: Variables + * Operands: uint32_t nameIndex + * Stack: => scope + */ \ macro(JSOP_BINDNAME, 110,"bindname", NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_SET) \ + /* + * Pops a scope and value from the stack, assigns value to the given name, + * and pushes the value back on the stack + * Category: Variables and Scopes + * Type: Variables + * Operands: uint32_t nameIndex + * Stack: scope, val => val + */ \ macro(JSOP_SETNAME, 111,"setname", NULL, 5, 2, 1, JOF_ATOM|JOF_NAME|JOF_SET|JOF_DETECTING) \ \ /* Exception handling ops. */ \ @@ -631,9 +743,41 @@ macro(JSOP_UNUSED125, 125, "unused125", NULL, 1, 0, 0, JOF_BYTE) \ macro(JSOP_UNUSED126, 126, "unused126", NULL, 1, 0, 0, JOF_BYTE) \ \ - /* Prolog bytecodes for defining function, var, and const names. */ \ + /* + * Defines the given function on the current scope. + * + * This is used for global scripts and also in some cases for function + * scripts where use of dynamic scoping inhibits optimization. + * Category: Variables and Scopes + * Type: Variables + * Operands: uint32_t funcIndex + * Stack: => + */ \ macro(JSOP_DEFFUN, 127,"deffun", NULL, 5, 0, 0, JOF_OBJECT) \ + /* + * Defines the new binding on the frame's current variables-object (the + * scope object on the scope chain designated to receive new variables) + * with 'READONLY' attribute. + * + * This is used for global scripts and also in some cases for function + * scripts where use of dynamic scoping inhibits optimization. + * Category: Variables and Scopes + * Type: Variables + * Operands: uint32_t nameIndex + * Stack: => + */ \ macro(JSOP_DEFCONST, 128,"defconst", NULL, 5, 0, 0, JOF_ATOM) \ + /* + * Defines the new binding on the frame's current variables-object (the + * scope object on the scope chain designated to receive new variables). + * + * This is used for global scripts and also in some cases for function + * scripts where use of dynamic scoping inhibits optimization. + * Category: Variables and Scopes + * Type: Variables + * Operands: uint32_t nameIndex + * Stack: => + */ \ macro(JSOP_DEFVAR, 129,"defvar", NULL, 5, 0, 0, JOF_ATOM) \ \ /* @@ -684,19 +828,32 @@ macro(JSOP_FINALLY, 135,"finally", NULL, 1, 0, 2, JOF_BYTE) \ \ /* - * An "aliased variable" is a var, let, or formal arg that is aliased. Sources - * of aliasing include: nested functions accessing the vars of an enclosing - * function, function statements that are conditionally executed, 'eval', - * 'with', and 'arguments'. All of these cases require creating a CallObject to - * own the aliased variable. + * Pushes aliased variable onto the stack. + * + * An "aliased variable" is a var, let, or formal arg that is aliased. + * Sources of aliasing include: nested functions accessing the vars of an + * enclosing function, function statements that are conditionally executed, + * 'eval', 'with', and 'arguments'. All of these cases require creating a + * CallObject to own the aliased variable. * * An ALIASEDVAR opcode contains the following immediates: * uint8 hops: the number of scope objects to skip to find the ScopeObject * containing the variable being accessed * uint24 slot: the slot containing the variable in the ScopeObject (this * 'slot' does not include RESERVED_SLOTS). + * Category: Variables and Scopes + * Type: Aliased Variables + * Operands: uint8_t hops, uint24_t slot + * Stack: => aliasedVar */ \ macro(JSOP_GETALIASEDVAR, 136,"getaliasedvar",NULL, 5, 0, 1, JOF_SCOPECOORD|JOF_NAME|JOF_TYPESET) \ + /* + * Sets aliased variable as the top of stack value. + * Category: Variables and Scopes + * Type: Aliased Variables + * Operands: uint8_t hops, uint24_t slot + * Stack: v => v + */ \ macro(JSOP_SETALIASEDVAR, 137,"setaliasedvar",NULL, 5, 1, 1, JOF_SCOPECOORD|JOF_NAME|JOF_SET|JOF_DETECTING) \ \ macro(JSOP_UNUSED138, 138, "unused138", NULL, 1, 0, 0, JOF_BYTE) \ @@ -706,14 +863,37 @@ macro(JSOP_UNUSED142, 142, "unused142", NULL, 1, 0, 0, JOF_BYTE) \ \ /* + * Pushes the value of the intrinsic onto the stack. + * * Intrinsic names are emitted instead of JSOP_*NAME ops when the - * CompileOptions flag "selfHostingMode" is set. + * 'CompileOptions' flag 'selfHostingMode' is set. * * They are used in self-hosted code to access other self-hosted values and * intrinsic functions the runtime doesn't give client JS code access to. + * Category: Variables and Scopes + * Type: Intrinsics + * Operands: uint32_t nameIndex + * Stack: => intrinsic[name] */ \ macro(JSOP_GETINTRINSIC, 143, "getintrinsic", NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_TYPESET) \ + /* + * Pops the top two values on the stack as 'val' and 'scope', sets intrinsic + * as 'val', and pushes 'val' onto the stack. + * + * 'scope' is not used. + * Category: Variables and Scopes + * Type: Intrinsics + * Operands: uint32_t nameIndex + * Stack: scope, val => val + */ \ macro(JSOP_SETINTRINSIC, 144, "setintrinsic", NULL, 5, 2, 1, JOF_ATOM|JOF_NAME|JOF_SET|JOF_DETECTING) \ + /* + * Pushes 'intrinsicHolder' onto the stack. + * Category: Variables and Scopes + * Type: Intrinsics + * Operands: uint32_t nameIndex + * Stack: => intrinsicHolder + */ \ macro(JSOP_BINDINTRINSIC, 145, "bindintrinsic", NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_SET) \ \ /* Unused. */ \ @@ -750,8 +930,27 @@ */ \ macro(JSOP_RETRVAL, 153,"retrval", NULL, 1, 0, 0, JOF_BYTE) \ \ - /* Free variable references that must either be found on the global or a ReferenceError */ \ + /* + * Looks up name on global scope and pushes its value onto the stack. + * + * Free variable references that must either be found on the global or a + * ReferenceError. + * Category: Variables and Scopes + * Type: Free Variables + * Operands: uint32_t nameIndex + * Stack: => val + */ \ macro(JSOP_GETGNAME, 154,"getgname", NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_TYPESET|JOF_GNAME) \ + /* + * Pops the top two values on the stack as 'val' and 'scope', sets property + * of 'scope' as 'val' and pushes 'val' back on the stack. + * + * 'scope' should be the global scope. + * Category: Variables and Scopes + * Type: Free Variables + * Operands: uint32_t nameIndex + * Stack: scope, val => val + */ \ macro(JSOP_SETGNAME, 155,"setgname", NULL, 5, 2, 1, JOF_ATOM|JOF_NAME|JOF_SET|JOF_DETECTING|JOF_GNAME) \ \ macro(JSOP_UNUSED156, 156, "unused156", NULL, 1, 0, 0, JOF_BYTE) \ @@ -792,7 +991,13 @@ macro(JSOP_UNUSED186, 186,"unused186", NULL, 1, 0, 0, JOF_BYTE) \ macro(JSOP_UNUSED187, 187,"unused187", NULL, 1, 0, 0, JOF_BYTE) \ \ - /* Opcode to hold 24-bit immediate integer operands. */ \ + /* + * Pushes unsigned 24-bit int immediate integer operand onto the stack. + * Category: Literals + * Type: Constants + * Operands: uint24_t val + * Stack: => val + */ \ macro(JSOP_UINT24, 188,"uint24", NULL, 4, 0, 1, JOF_UINT24) \ \ macro(JSOP_UNUSED189, 189,"unused189", NULL, 1, 0, 0, JOF_BYTE) \ @@ -826,7 +1031,21 @@ macro(JSOP_TYPEOFEXPR, 197,"typeofexpr", NULL, 1, 1, 1, JOF_BYTE|JOF_DETECTING) \ \ /* Block-local scope support. */ \ + /* + * Pushes block onto the scope chain. + * Category: Variables and Scopes + * Type: Block-local Scope + * Operands: uint32_t staticBlockObjectIndex + * Stack: => + */ \ macro(JSOP_PUSHBLOCKSCOPE,198,"pushblockscope", NULL, 5, 0, 0, JOF_OBJECT) \ + /* + * Pops block from the scope chain. + * Category: Variables and Scopes + * Type: Block-local Scope + * Operands: + * Stack: => + */ \ macro(JSOP_POPBLOCKSCOPE, 199,"popblockscope", NULL, 1, 0, 0, JOF_BYTE) \ /* * The opcode to assist the debugger. @@ -870,10 +1089,32 @@ macro(JSOP_UNUSED211, 211, "unused211", NULL, 1, 0, 0, JOF_BYTE) \ macro(JSOP_UNUSED212, 212, "unused212", NULL, 1, 0, 0, JOF_BYTE) \ macro(JSOP_UNUSED213, 213, "unused213", NULL, 1, 0, 0, JOF_BYTE) \ + /* + * Pushes the global scope onto the stack. + * + * 'nameIndex' is not used. + * Category: Variables and Scopes + * Type: Free Variables + * Operands: uint32_t nameIndex + * Stack: => global + */ \ macro(JSOP_BINDGNAME, 214, "bindgname", NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_SET|JOF_GNAME) \ \ - /* Opcodes to hold 8-bit and 32-bit immediate integer operands. */ \ + /* + * Pushes 8-bit int immediate integer operand onto the stack. + * Category: Literals + * Type: Constants + * Operands: int8_t val + * Stack: => val + */ \ macro(JSOP_INT8, 215, "int8", NULL, 2, 0, 1, JOF_INT8) \ + /* + * Pushes 32-bit int immediate integer operand onto the stack. + * Category: Literals + * Type: Constants + * Operands: int32_t val + * Stack: => val + */ \ macro(JSOP_INT32, 216, "int32", NULL, 5, 0, 1, JOF_INT32) \ \ /* Get the value of the 'length' property from a stacked value. */ \ From 657909dadd0df65d1b09ecedd7f265dba6ca9629 Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Wed, 2 Apr 2014 19:35:15 +0900 Subject: [PATCH 69/79] Bug 471713 - Part 6: Add documentation for object- and array-related opcodes. r=evilpies --HG-- extra : rebase_source : 6c9a441404809c6fc55b1d052f2126e79da39877 --- js/src/vm/Opcodes.h | 292 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 270 insertions(+), 22 deletions(-) diff --git a/js/src/vm/Opcodes.h b/js/src/vm/Opcodes.h index b7130843839c..8fbd731fafb0 100644 --- a/js/src/vm/Opcodes.h +++ b/js/src/vm/Opcodes.h @@ -286,7 +286,24 @@ * Stack: => succeeded */ \ macro(JSOP_DELNAME, 36, "delname", NULL, 5, 0, 1, JOF_ATOM|JOF_NAME) \ + /* + * Pops the top of stack value, deletes property from it, pushes 'true' onto + * the stack if succeeded, 'false' if not. + * Category: Literals + * Type: Object + * Operands: uint32_t nameIndex + * Stack: obj => succeeded + */ \ macro(JSOP_DELPROP, 37, "delprop", NULL, 5, 1, 1, JOF_ATOM|JOF_PROP) \ + /* + * Pops the top two values on the stack as 'propval' and 'obj', + * deletes 'propval' property from 'obj', pushes 'true' onto the stack if + * succeeded, 'false' if not. + * Category: Literals + * Type: Object + * Operands: + * Stack: obj, propval => succeeded + */ \ macro(JSOP_DELELEM, 38, "delelem", NULL, 1, 2, 1, JOF_BYTE |JOF_ELEM) \ /* * Pops the value 'val' from the stack, then pushes 'typeof val'. @@ -362,9 +379,41 @@ macro(JSOP_UNUSED51, 51, "unused51", NULL, 1, 0, 0, JOF_BYTE) \ macro(JSOP_UNUSED52, 52, "unused52", NULL, 1, 0, 0, JOF_BYTE) \ \ + /* + * Pops the top of stack value, pushes property of it onto the stack. + * Category: Literals + * Type: Object + * Operands: uint32_t nameIndex + * Stack: obj => obj[name] + */ \ macro(JSOP_GETPROP, 53, "getprop", NULL, 5, 1, 1, JOF_ATOM|JOF_PROP|JOF_TYPESET|JOF_TMPSLOT3) \ + /* + * Pops the top two values on the stack as 'val' and 'obj', sets property of + * 'obj' as 'val', pushes 'obj' onto the stack. + * Category: Literals + * Type: Object + * Operands: uint32_t nameIndex + * Stack: obj, val => val + */ \ macro(JSOP_SETPROP, 54, "setprop", NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING) \ + /* + * Pops the top two values on the stack as 'propval' and 'obj', pushes + * 'propval' property of 'obj' onto the stack. + * Category: Literals + * Type: Object + * Operands: + * Stack: obj, propval => obj[propval] + */ \ macro(JSOP_GETELEM, 55, "getelem", NULL, 1, 2, 1, JOF_BYTE |JOF_ELEM|JOF_TYPESET|JOF_LEFTASSOC) \ + /* + * Pops the top three values on the stack as 'val', 'propval' and 'obj', + * sets 'propval' property of 'obj' as 'val', pushes 'obj' onto the + * stack. + * Category: Literals + * Type: Object + * Operands: + * Stack: obj, propval, val => val + */ \ macro(JSOP_SETELEM, 56, "setelem", NULL, 1, 3, 1, JOF_BYTE |JOF_ELEM|JOF_SET|JOF_DETECTING) \ macro(JSOP_UNUSED57, 57, "unused57", NULL, 1, 0, 0, JOF_BYTE) \ /* @@ -511,7 +560,13 @@ */ \ macro(JSOP_FUNAPPLY, 79, "funapply", NULL, 3, -1, 1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \ \ - /* Push object initializer literal. */ \ + /* + * Pushes deep-cloned object literal or singleton onto the stack. + * Category: Literals + * Type: Object + * Operands: uint32_t objectIndex + * Stack: => obj + */ \ macro(JSOP_OBJECT, 80, "object", NULL, 5, 0, 1, JOF_OBJECT) \ \ /* @@ -533,7 +588,19 @@ * nuses: (argc+2) */ \ macro(JSOP_NEW, 82, js_new_str, NULL, 3, -1, 1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \ - \ + /* + * Pops the top three values on the stack as 'iterable', 'index' and 'obj', + * iterates over 'iterable' and stores the iteration values as 'index + i' + * elements of 'obj', pushes 'obj' and 'index + iteration count' onto the + * stack. + * + * This opcode is used in Array literals with spread and spreadcall + * arguments. + * Category: Literals + * Type: Array + * Operands: + * Stack: obj, index, iterable => obj, (index + iteration count) + */ \ macro(JSOP_SPREAD, 83, "spread", NULL, 1, 3, 2, JOF_BYTE|JOF_ELEM|JOF_SET) \ \ /* @@ -582,36 +649,148 @@ */ \ macro(JSOP_UINT16, 88, "uint16", NULL, 3, 0, 1, JOF_UINT16) \ \ + /* Object and array literal support. */ \ /* - * Object and array literal support. NEWINIT takes the kind of initializer - * (JSProto_Array or JSProto_Object). NEWARRAY is an array initializer - * taking the final length, which can be filled in at the start and initialized - * directly. NEWOBJECT is an object initializer taking an object with the final - * shape, which can be set at the start and slots then filled in directly. - * NEWINIT has an extra byte so it can be exchanged with NEWOBJECT during emit. + * Pushes newly created object onto the stack. + * + * This opcode takes the kind of initializer (JSProto_Array or + * JSProto_Object). + * + * This opcode has an extra byte so it can be exchanged with JSOP_NEWOBJECT + * during emit. + * Category: Literals + * Type: Object + * Operands: uint8_t kind (, uint24_t extra) + * Stack: => obj */ \ macro(JSOP_NEWINIT, 89, "newinit", NULL, 5, 0, 1, JOF_UINT8) \ + /* + * Pushes newly created array onto the stack. + * + * This opcode takes the final length, which is preallocated. + * Category: Literals + * Type: Array + * Operands: uint24_t length + * Stack: => obj + */ \ macro(JSOP_NEWARRAY, 90, "newarray", NULL, 4, 0, 1, JOF_UINT24) \ + /* + * Pushes newly created object onto the stack. + * + * This opcode takes an object with the final shape, which can be set at + * the start and slots then filled in directly. + * Category: Literals + * Type: Object + * Operands: uint32_t baseobjIndex + * Stack: => obj + */ \ macro(JSOP_NEWOBJECT, 91, "newobject", NULL, 5, 0, 1, JOF_OBJECT) \ + /* + * A no-operation bytecode. + * + * Indicates the end of object/array initialization, and used for + * Type-Inference, decompile, etc. + * Category: Literals + * Type: Object + * Operands: + * Stack: => + */ \ macro(JSOP_ENDINIT, 92, "endinit", NULL, 1, 0, 0, JOF_BYTE) \ + /* + * Initialize a named property in an object literal, like '{a: x}'. + * + * Pops the top two values on the stack as 'val' and 'obj', defines + * 'nameIndex' property of 'obj' as 'val', pushes 'obj' onto the stack. + * Category: Literals + * Type: Object + * Operands: uint32_t nameIndex + * Stack: obj, val => obj + */ \ macro(JSOP_INITPROP, 93, "initprop", NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING) \ \ - /* Initialize a numeric property in an object literal, like {1: x}. */ \ + /* + * Initialize a numeric property in an object literal, like '{1: x}'. + * + * Pops the top three values on the stack as 'val', 'id' and 'obj', defines + * 'id' property of 'obj' as 'val', pushes 'obj' onto the stack. + * Category: Literals + * Type: Object + * Operands: + * Stack: obj, id, val => obj + */ \ macro(JSOP_INITELEM, 94, "initelem", NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_SET|JOF_DETECTING) \ \ - /* Used in array literals with spread. */ \ + /* + * Pops the top three values on the stack as 'val', 'index' and 'obj', sets + * 'index' property of 'obj' as 'val', pushes 'obj' and 'index + 1' onto + * the stack. + * + * This opcode is used in Array literals with spread and spreadcall + * arguments. + * Category: Literals + * Type: Array + * Operands: + * Stack: obj, index, val => obj, (index + 1) + */ \ macro(JSOP_INITELEM_INC,95, "initelem_inc", NULL, 1, 3, 2, JOF_BYTE|JOF_ELEM|JOF_SET) \ \ - /* Initialize an array element. */ \ + /* + * Initialize an array element. + * + * Pops the top two values on the stack as 'val' and 'obj', sets 'index' + * property of 'obj' as 'val', pushes 'obj' onto the stack. + * Category: Literals + * Type: Array + * Operands: uint24_t index + * Stack: obj, val => obj + */ \ macro(JSOP_INITELEM_ARRAY,96, "initelem_array", NULL, 4, 2, 1, JOF_UINT24|JOF_ELEM|JOF_SET|JOF_DETECTING) \ \ /* - * Initialize a getter/setter in an object literal. The INITELEM* ops are used - * for numeric properties like {get 2() {}}. + * Initialize a getter in an object literal. + * + * Pops the top two values on the stack as 'val' and 'obj', defines getter + * of 'obj' as 'val', pushes 'obj' onto the stack. + * Category: Literals + * Type: Object + * Operands: uint32_t nameIndex + * Stack: obj, val => obj */ \ macro(JSOP_INITPROP_GETTER, 97, "initprop_getter", NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING) \ + /* + * Initialize a setter in an object literal. + * + * Pops the top two values on the stack as 'val' and 'obj', defines setter + * of 'obj' as 'val', pushes 'obj' onto the stack. + * Category: Literals + * Type: Object + * Operands: uint32_t nameIndex + * Stack: obj, val => obj + */ \ macro(JSOP_INITPROP_SETTER, 98, "initprop_setter", NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING) \ + /* + * Initialize a numeric getter in an object literal like + * '{get 2() {}}'. + * + * Pops the top three values on the stack as 'val', 'id' and 'obj', defines + * 'id' getter of 'obj' as 'val', pushes 'obj' onto the stack. + * Category: Literals + * Type: Object + * Operands: + * Stack: obj, id, val => obj + */ \ macro(JSOP_INITELEM_GETTER, 99, "initelem_getter", NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_SET|JOF_DETECTING) \ + /* + * Initialize a numeric setter in an object literal like + * '{set 2(v) {}}'. + * + * Pops the top three values on the stack as 'val', 'id' and 'obj', defines + * 'id' setter of 'obj' as 'val', pushes 'obj' onto the stack. + * Category: Literals + * Type: Object + * Operands: + * Stack: obj, id, val => obj + */ \ macro(JSOP_INITELEM_SETTER, 100, "initelem_setter", NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_SET|JOF_DETECTING) \ \ macro(JSOP_UNUSED101, 101, "unused101", NULL, 1, 0, 0, JOF_BYTE) \ @@ -958,7 +1137,14 @@ macro(JSOP_UNUSED158, 158, "unused158", NULL, 1, 0, 0, JOF_BYTE) \ macro(JSOP_UNUSED159, 159, "unused159", NULL, 1, 0, 0, JOF_BYTE) \ \ - /* Regular expression literal requiring special "fork on exec" handling. */ \ + /* + * Pushes a regular expression literal onto the stack. + * It requires special "clone on exec" handling. + * Category: Literals + * Type: RegExp + * Operands: uint32_t regexpIndex + * Stack: => regexp + */ \ macro(JSOP_REGEXP, 160,"regexp", NULL, 5, 0, 1, JOF_REGEXP) \ \ macro(JSOP_UNUSED161, 161,"unused161", NULL, 1, 0, 0, JOF_BYTE) \ @@ -985,6 +1171,15 @@ macro(JSOP_UNUSED182, 182,"unused182", NULL, 1, 0, 0, JOF_BYTE) \ macro(JSOP_UNUSED183, 183,"unused183", NULL, 1, 0, 0, JOF_BYTE) \ \ + /* + * Pops the top of stack value, pushes property of it onto the stack. + * + * Like JSOP_GETPROP but for call context. + * Category: Literals + * Type: Object + * Operands: uint32_t nameIndex + * Stack: obj => obj[name] + */ \ macro(JSOP_CALLPROP, 184,"callprop", NULL, 5, 1, 1, JOF_ATOM|JOF_PROP|JOF_TYPESET|JOF_TMPSLOT3) \ \ macro(JSOP_UNUSED185, 185,"unused185", NULL, 1, 0, 0, JOF_BYTE) \ @@ -1005,14 +1200,38 @@ macro(JSOP_UNUSED191, 191,"unused191", NULL, 1, 0, 0, JOF_BYTE) \ macro(JSOP_UNUSED192, 192,"unused192", NULL, 1, 0, 0, JOF_BYTE) \ \ + /* + * Pops the top two values on the stack as 'propval' and 'obj', pushes + * 'propval' property of 'obj' onto the stack. + * + * Like JSOP_GETELEM but for call context. + * Category: Literals + * Type: Object + * Operands: + * Stack: obj, propval => obj[propval] + */ \ macro(JSOP_CALLELEM, 193, "callelem", NULL, 1, 2, 1, JOF_BYTE |JOF_ELEM|JOF_TYPESET|JOF_LEFTASSOC) \ \ - /* __proto__: v inside an object initializer. */ \ + /* + * '__proto__: v' inside an object initializer. + * + * Pops the top two values on the stack as 'newProto' and 'obj', sets + * prototype of 'obj' as 'newProto', pushes 'true' onto the stack if + * succeeded, 'false' if not. + * Category: Literals + * Type: Object + * Operands: + * Stack: obj, newProto => succeeded + */ \ macro(JSOP_MUTATEPROTO, 194, "mutateproto",NULL, 1, 2, 1, JOF_BYTE) \ \ /* - * Get an extant property value, throwing ReferenceError if the identified - * property does not exist. + * Pops the top of stack value, gets an extant property value of it, + * throwing ReferenceError if the identified property does not exist. + * Category: Literals + * Type: Object + * Operands: uint32_t nameIndex + * Stack: obj => obj[name] */ \ macro(JSOP_GETXPROP, 195,"getxprop", NULL, 5, 1, 1, JOF_ATOM|JOF_PROP|JOF_TYPESET) \ \ @@ -1077,6 +1296,16 @@ * Stack: rval1 => rval2 */ \ macro(JSOP_YIELD, 203,"yield", NULL, 1, 1, 1, JOF_BYTE) \ + /* + * Pops the top two values on the stack as 'obj' and 'v', pushes 'v' to + * 'obj'. + * + * This opcode is used for Array Comprehension. + * Category: Literals + * Type: Array + * Operands: + * Stack: v, obj => + */ \ macro(JSOP_ARRAYPUSH, 204,"arraypush", NULL, 1, 2, 0, JOF_BYTE) \ \ macro(JSOP_UNUSED205, 205, "unused205", NULL, 1, 0, 0, JOF_BYTE) \ @@ -1117,13 +1346,25 @@ */ \ macro(JSOP_INT32, 216, "int32", NULL, 5, 0, 1, JOF_INT32) \ \ - /* Get the value of the 'length' property from a stacked value. */ \ + /* + * Pops the top of stack value, pushes the 'length' property of it onto the + * stack. + * Category: Literals + * Type: Array + * Operands: uint32_t nameIndex + * Stack: obj => obj['length'] + */ \ macro(JSOP_LENGTH, 217, "length", NULL, 5, 1, 1, JOF_ATOM|JOF_PROP|JOF_TYPESET|JOF_TMPSLOT3) \ \ /* - * Push a JSVAL_HOLE value onto the stack, representing an omitted property in - * an array literal (e.g. property 0 in the array [, 1]). This opcode is used - * with the JSOP_NEWARRAY opcode. + * Pushes a JS_ELEMENTS_HOLE value onto the stack, representing an omitted + * property in an array literal (e.g. property 0 in the array '[, 1]'). + * + * This opcode is used with the JSOP_NEWARRAY opcode. + * Category: Literals + * Type: Array + * Operands: + * Stack: => hole */ \ macro(JSOP_HOLE, 218, "hole", NULL, 1, 0, 1, JOF_BYTE) \ \ @@ -1143,7 +1384,14 @@ */ \ macro(JSOP_REST, 224, "rest", NULL, 1, 0, 1, JOF_BYTE|JOF_TYPESET) \ \ - /* Pop the stack, convert to a jsid (int or string), and push back. */ \ + /* + * Pops the top of stack value, converts it into a jsid (int or string), and + * pushes it onto the stack. + * Category: Literals + * Type: Object + * Operands: + * Stack: obj, id => obj, (jsid of id) + */ \ macro(JSOP_TOID, 225, "toid", NULL, 1, 1, 1, JOF_BYTE) \ \ /* From 04c8e4d392b6ca8d33354e3a7fd61a43755afe36 Mon Sep 17 00:00:00 2001 From: Marty Rosenberg Date: Thu, 17 Apr 2014 12:00:05 -0700 Subject: [PATCH 70/79] Bug 990807 - Valgrind detects leak - 4 bytes and/or 32 bytes are definitely lost (direct), r=dougc --- js/src/jit/shared/IonAssemblerBufferWithConstantPools.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h b/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h index 210bd66e9291..825977bf7f20 100644 --- a/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h +++ b/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h @@ -760,6 +760,10 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer IonSpew(IonSpew_Pools, "[%d]***Offset was still out of range!***", id, codeOffset - magicAlign); IonSpew(IonSpew_Pools, "[%d] Too complicated; bailingp", id); this->fail_bail(); + // only free up to the current offset + for (int pi = poolIdx; pi < numPoolKinds; pi++) + delete[] outcastEntries[pi]; + delete[] preservedEntries; return; } else { preservedEntries[idx] = true; @@ -783,12 +787,15 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer } poolOffset += p->numEntries * p->immSize; delete[] preservedEntries; + preservedEntries = nullptr; } // bind the current pool to the perforation point. Pool **tmp = &perforatedNode->data; *tmp = static_cast(this->LifoAlloc_.alloc(sizeof(Pool) * numPoolKinds)); if (tmp == nullptr) { this->fail_oom(); + for (int pi = 0; pi < numPoolKinds; pi++) + delete[] outcastEntries[pi]; return; } // The above operations may have changed the size of pools! @@ -804,6 +811,8 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer for (int poolIdx = 0; poolIdx < numPoolKinds; poolIdx++) { if (!pools[poolIdx].reset(this->LifoAlloc_)) { this->fail_oom(); + for (int pi = 0; pi < numPoolKinds; pi++) + delete[] outcastEntries[pi]; return; } } From 386dc80e0114bd7e6c62a894300b5e9173dacf72 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Mon, 7 Apr 2014 11:28:52 -0400 Subject: [PATCH 71/79] Bug 992955 - update libnestegg to upstream commit c739433; r=kinetik --- media/libnestegg/README_MOZILLA | 2 +- media/libnestegg/include/nestegg.h | 24 +++++ media/libnestegg/src/nestegg.c | 158 ++++++++++++++++++++++++----- 3 files changed, 158 insertions(+), 26 deletions(-) diff --git a/media/libnestegg/README_MOZILLA b/media/libnestegg/README_MOZILLA index 17dafbb5a27f..95cd89dbe006 100644 --- a/media/libnestegg/README_MOZILLA +++ b/media/libnestegg/README_MOZILLA @@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system. The nestegg git repository is: git://github.com/kinetiknz/nestegg.git -The git commit ID used was 0851279ab11f5b2e9e8154ce7880b687b564c760. +The git commit ID used was c739433afee18ee679ab0f3206d848b6d68f9de2. diff --git a/media/libnestegg/include/nestegg.h b/media/libnestegg/include/nestegg.h index ff13728f32a3..ca588d05bc84 100644 --- a/media/libnestegg/include/nestegg.h +++ b/media/libnestegg/include/nestegg.h @@ -276,6 +276,16 @@ int nestegg_track_video_params(nestegg * context, unsigned int track, int nestegg_track_audio_params(nestegg * context, unsigned int track, nestegg_audio_params * params); +/** Query the default frame duration for @a track. For a video track, this + is typically the inverse of the video frame rate. + @param context Stream context initialized by #nestegg_init. + @param track Zero based track number. + @param duration Storage for the default duration in nanoseconds. + @retval 0 Success. + @retval -1 Error. */ +int nestegg_track_default_duration(nestegg * context, unsigned int track, + uint64_t * duration); + /** Read a packet of media data. A packet consists of one or more chunks of data associated with a single track. nestegg_read_packet should be called in a loop while the return value is 1 to drive the stream parser @@ -305,6 +315,13 @@ int nestegg_packet_track(nestegg_packet * packet, unsigned int * track); @retval -1 Error. */ int nestegg_packet_tstamp(nestegg_packet * packet, uint64_t * tstamp); +/** Query the duration in nanoseconds of @a packet. + @param packet Packet initialized by #nestegg_read_packet. + @param duration Storage for the queried duration in nanoseconds. + @retval 0 Success. + @retval -1 Error. */ +int nestegg_packet_duration(nestegg_packet * packet, uint64_t * duration); + /** Query the number of data chunks contained in @a packet. @param packet Packet initialized by #nestegg_read_packet. @param count Storage for the queried timestamp in nanoseconds. @@ -346,6 +363,13 @@ int nestegg_has_cues(nestegg * context); * @retval 1 The file is a WebM file. */ int nestegg_sniff(unsigned char const * buffer, size_t length); +/** + * Set the underlying allocation function for library allocations. + * + * @param realloc_func The desired function. + */ +void nestegg_set_halloc_func(void * (* realloc_func)(void *, size_t)); + #if defined(__cplusplus) } #endif diff --git a/media/libnestegg/src/nestegg.c b/media/libnestegg/src/nestegg.c index cd609c9e7b62..86a2166699aa 100644 --- a/media/libnestegg/src/nestegg.c +++ b/media/libnestegg/src/nestegg.c @@ -66,6 +66,7 @@ #define ID_CODEC_PRIVATE 0x63a2 #define ID_CODEC_DELAY 0x56aa #define ID_SEEK_PREROLL 0x56bb +#define ID_DEFAULT_DURATION 0x23e383 /* Video Elements */ #define ID_VIDEO 0xe0 @@ -236,6 +237,7 @@ struct track_entry { struct ebml_type codec_private; struct ebml_type codec_delay; struct ebml_type seek_preroll; + struct ebml_type default_duration; struct video video; struct audio audio; }; @@ -310,6 +312,7 @@ struct nestegg { struct nestegg_packet { uint64_t track; uint64_t timecode; + uint64_t duration; struct frame * frame; int64_t discard_padding; }; @@ -419,6 +422,7 @@ static struct ebml_element_desc ne_track_entry_elements[] = { E_FIELD(ID_CODEC_PRIVATE, TYPE_BINARY, struct track_entry, codec_private), E_FIELD(ID_CODEC_DELAY, TYPE_UINT, struct track_entry, codec_delay), E_FIELD(ID_SEEK_PREROLL, TYPE_UINT, struct track_entry, seek_preroll), + E_FIELD(ID_DEFAULT_DURATION, TYPE_UINT, struct track_entry, default_duration), E_SINGLE_MASTER(ID_VIDEO, TYPE_MASTER, struct track_entry, video), E_SINGLE_MASTER(ID_AUDIO, TYPE_MASTER, struct track_entry, audio), E_LAST @@ -472,12 +476,7 @@ static struct ebml_element_desc ne_top_level_elements[] = { static struct pool_ctx * ne_pool_init(void) { - struct pool_ctx * pool; - - pool = h_malloc(sizeof(*pool)); - if (!pool) - abort(); - return pool; + return h_malloc(sizeof(struct pool_ctx)); } static void @@ -493,7 +492,7 @@ ne_pool_alloc(size_t size, struct pool_ctx * pool) p = h_malloc(size); if (!p) - abort(); + return NULL; hattach(p, pool); memset(p, 0, size); return p; @@ -502,12 +501,7 @@ ne_pool_alloc(size_t size, struct pool_ctx * pool) static void * ne_alloc(size_t size) { - void * p; - - p = calloc(1, size); - if (!p) - abort(); - return p; + return calloc(1, size); } static int @@ -698,6 +692,8 @@ ne_read_string(nestegg * ctx, char ** val, uint64_t length) if (length == 0 || length > LIMIT_STRING) return -1; str = ne_pool_alloc(length + 1, ctx->alloc_pool); + if (!str) + return -1; r = ne_io_read(ctx->io, (unsigned char *) str, length); if (r != 1) return r; @@ -712,6 +708,8 @@ ne_read_binary(nestegg * ctx, struct ebml_binary * val, uint64_t length) if (length == 0 || length > LIMIT_BINARY) return -1; val->data = ne_pool_alloc(length, ctx->alloc_pool); + if (!val->data) + return -1; val->length = length; return ne_io_read(ctx->io, val->data, length); } @@ -793,16 +791,19 @@ ne_find_element(uint64_t id, struct ebml_element_desc * elements) return NULL; } -static void +static int ne_ctx_push(nestegg * ctx, struct ebml_element_desc * ancestor, void * data) { struct list_node * item; item = ne_alloc(sizeof(*item)); + if (!item) + return -1; item->previous = ctx->ancestor; item->node = ancestor; item->data = data; ctx->ancestor = item; + return 0; } static void @@ -888,7 +889,7 @@ ne_read_element(nestegg * ctx, uint64_t * id, uint64_t * size) return 1; } -static void +static int ne_read_master(nestegg * ctx, struct ebml_element_desc * desc) { struct ebml_list * list; @@ -902,8 +903,12 @@ ne_read_master(nestegg * ctx, struct ebml_element_desc * desc) list = (struct ebml_list *) (ctx->ancestor->data + desc->offset); node = ne_pool_alloc(sizeof(*node), ctx->alloc_pool); + if (!node) + return -1; node->id = desc->id; node->data = ne_pool_alloc(desc->size, ctx->alloc_pool); + if (!node->data) + return -1; oldtail = list->tail; if (oldtail) @@ -914,10 +919,13 @@ ne_read_master(nestegg * ctx, struct ebml_element_desc * desc) ctx->log(ctx, NESTEGG_LOG_DEBUG, " -> using data %p", node->data); - ne_ctx_push(ctx, desc->children, node->data); + if (ne_ctx_push(ctx, desc->children, node->data) < 0) + return -1; + + return 0; } -static void +static int ne_read_single_master(nestegg * ctx, struct ebml_element_desc * desc) { assert(desc->type == TYPE_MASTER && !(desc->flags & DESC_FLAG_MULTI)); @@ -927,7 +935,7 @@ ne_read_single_master(nestegg * ctx, struct ebml_element_desc * desc) ctx->log(ctx, NESTEGG_LOG_DEBUG, " -> using data %p (%u)", ctx->ancestor->data + desc->offset, desc->offset); - ne_ctx_push(ctx, desc->children, ctx->ancestor->data + desc->offset); + return ne_ctx_push(ctx, desc->children, ctx->ancestor->data + desc->offset); } static int @@ -968,6 +976,7 @@ ne_read_simple(nestegg * ctx, struct ebml_element_desc * desc, size_t length) case TYPE_MASTER: case TYPE_UNKNOWN: assert(0); + r = 0; break; } @@ -1023,10 +1032,13 @@ ne_parse(nestegg * ctx, struct ebml_element_desc * top_level, int64_t max_offset } if (element->type == TYPE_MASTER) { - if (element->flags & DESC_FLAG_MULTI) - ne_read_master(ctx, element); - else - ne_read_single_master(ctx, element); + if (element->flags & DESC_FLAG_MULTI) { + if (ne_read_master(ctx, element) < 0) + break; + } else { + if (ne_read_single_master(ctx, element) < 0) + break; + } continue; } else { r = ne_read_simple(ctx, element, size); @@ -1340,6 +1352,8 @@ ne_read_block(nestegg * ctx, uint64_t block_id, uint64_t block_size, nestegg_pac return -1; pkt = ne_alloc(sizeof(*pkt)); + if (!pkt) + return -1; pkt->track = track; pkt->timecode = abs_timecode * tc_scale * track_scale; @@ -1353,7 +1367,16 @@ ne_read_block(nestegg * ctx, uint64_t block_id, uint64_t block_size, nestegg_pac return -1; } f = ne_alloc(sizeof(*f)); + if (!f) { + nestegg_free_packet(pkt); + return -1; + } f->data = ne_alloc(frame_sizes[i]); + if (!f->data) { + free(f); + nestegg_free_packet(pkt); + return -1; + } f->length = frame_sizes[i]; r = ne_io_read(ctx->io, f->data, frame_sizes[i]); if (r != 1) { @@ -1375,6 +1398,34 @@ ne_read_block(nestegg * ctx, uint64_t block_id, uint64_t block_size, nestegg_pac return 1; } +static int +ne_read_block_duration(nestegg * ctx, nestegg_packet * pkt) +{ + int r; + uint64_t id, size; + struct ebml_element_desc * element; + struct ebml_type * storage; + + r = ne_peek_element(ctx, &id, &size); + if (r != 1) + return r; + + if (id != ID_BLOCK_DURATION) + return 1; + + element = ne_find_element(id, ctx->ancestor->node); + if (!element) + return 1; + + r = ne_read_simple(ctx, element, size); + if (r != 1) + return r; + storage = (struct ebml_type *) (ctx->ancestor->data + element->offset); + pkt->duration = storage->v.i * ne_get_timecode_scale(ctx); + + return 1; +} + static int ne_read_discard_padding(nestegg * ctx, nestegg_packet * pkt) { @@ -1550,9 +1601,12 @@ ne_init_cue_points(nestegg * ctx, int64_t max_offset) return -1; ctx->ancestor = NULL; - ne_ctx_push(ctx, ne_top_level_elements, ctx); - ne_ctx_push(ctx, ne_segment_elements, &ctx->segment); - ne_ctx_push(ctx, ne_cues_elements, &ctx->segment.cues); + if (ne_ctx_push(ctx, ne_top_level_elements, ctx) < 0) + return -1; + if (ne_ctx_push(ctx, ne_segment_elements, &ctx->segment) < 0) + return -1; + if (ne_ctx_push(ctx, ne_cues_elements, &ctx->segment.cues) < 0) + return -1; /* parser will run until end of cues element. */ ctx->log(ctx, NESTEGG_LOG_DEBUG, "seek: parsing cue elements"); r = ne_parse(ctx, ne_cues_elements, max_offset); @@ -1643,10 +1697,20 @@ ne_match_webm(nestegg_io io, int64_t max_offset) return -1; ctx = ne_alloc(sizeof(*ctx)); + if (!ctx) + return -1; ctx->io = ne_alloc(sizeof(*ctx->io)); + if (!ctx->io) { + nestegg_destroy(ctx); + return -1; + } *ctx->io = io; ctx->alloc_pool = ne_pool_init(); + if (!ctx->alloc_pool) { + nestegg_destroy(ctx); + return -1; + } ctx->log = ne_null_log_callback; r = ne_peek_element(ctx, &id, NULL); @@ -1691,11 +1755,21 @@ nestegg_init(nestegg ** context, nestegg_io io, nestegg_log callback, int64_t ma return -1; ctx = ne_alloc(sizeof(*ctx)); + if (!ctx) + return -1; ctx->io = ne_alloc(sizeof(*ctx->io)); + if (!ctx->io) { + nestegg_destroy(ctx); + return -1; + } *ctx->io = io; ctx->log = callback; ctx->alloc_pool = ne_pool_init(); + if (!ctx->alloc_pool) { + nestegg_destroy(ctx); + return -1; + } if (!ctx->log) ctx->log = ne_null_log_callback; @@ -2166,6 +2240,24 @@ nestegg_track_audio_params(nestegg * ctx, unsigned int track, return 0; } +int +nestegg_track_default_duration(nestegg * ctx, unsigned int track, + uint64_t * duration) +{ + struct track_entry * entry; + uint64_t value; + + entry = ne_find_track_entry(ctx, track); + if (!entry) + return -1; + + if (ne_get_uint(entry->default_duration, &value) != 0) + return -1; + *duration = value; + + return 0; +} + int nestegg_read_packet(nestegg * ctx, nestegg_packet ** pkt) { @@ -2191,6 +2283,10 @@ nestegg_read_packet(nestegg * ctx, nestegg_packet ** pkt) if (r != 1) return r; + r = ne_read_block_duration(ctx, *pkt); + if (r != 1) + return r; + r = ne_read_discard_padding(ctx, *pkt); if (r != 1) return r; @@ -2235,6 +2331,13 @@ nestegg_packet_tstamp(nestegg_packet * pkt, uint64_t * tstamp) return 0; } +int +nestegg_packet_duration(nestegg_packet * pkt, uint64_t * duration) +{ + *duration = pkt->duration; + return 0; +} + int nestegg_packet_discard_padding(nestegg_packet * pkt, int64_t * discard_padding) { @@ -2304,3 +2407,8 @@ nestegg_sniff(unsigned char const * buffer, size_t length) return ne_match_webm(io, length); } +void +nestegg_set_halloc_func(void * (* realloc_func)(void *, size_t)) +{ + halloc_allocator = realloc_func; +} From d9a19b0c69a7cfe7190315ec2b51293aed4ecb1a Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 8 Apr 2014 10:36:30 -0400 Subject: [PATCH 72/79] Bug 682216 - add a memory reporter for libnestegg's memory; r=njn,kinetik --- layout/media/symbols.def.in | 1 + xpcom/build/nsXPComInit.cpp | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/layout/media/symbols.def.in b/layout/media/symbols.def.in index 85a5d95722c3..d6754ce9e925 100644 --- a/layout/media/symbols.def.in +++ b/layout/media/symbols.def.in @@ -28,6 +28,7 @@ nestegg_track_video_params nestegg_tstamp_scale nestegg_has_cues nestegg_sniff +nestegg_set_halloc_func #endif #ifdef MOZ_WEBM_ENCODER writeSimpleBlock diff --git a/xpcom/build/nsXPComInit.cpp b/xpcom/build/nsXPComInit.cpp index cf6039b4528f..8c7575c0d8c4 100644 --- a/xpcom/build/nsXPComInit.cpp +++ b/xpcom/build/nsXPComInit.cpp @@ -137,6 +137,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports *, REFNSIID, void **) #ifdef MOZ_VPX #include "vpx_mem/vpx_mem.h" #endif +#ifdef MOZ_WEBM +#include "nestegg/nestegg.h" +#endif #include "GeckoProfiler.h" @@ -418,6 +421,28 @@ NS_IMPL_ISUPPORTS1(VPXReporter, nsIMemoryReporter) /* static */ template<> Atomic CountingAllocatorBase::sAmount(0); #endif /* MOZ_VPX */ +#ifdef MOZ_WEBM +class NesteggReporter MOZ_FINAL : public nsIMemoryReporter + , public CountingAllocatorBase +{ +public: + NS_DECL_ISUPPORTS + +private: + NS_IMETHODIMP + CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData) + { + return MOZ_COLLECT_REPORT( + "explicit/media/libnestegg", KIND_HEAP, UNITS_BYTES, MemoryAllocated(), + "Memory allocated through libnestegg for WebM media files."); + } +}; + +NS_IMPL_ISUPPORTS1(NesteggReporter, nsIMemoryReporter) + +/* static */ template<> Atomic CountingAllocatorBase::sAmount(0); +#endif /* MOZ_WEBM */ + EXPORT_XPCOM_API(nsresult) NS_InitXPCOM2(nsIServiceManager* *result, nsIFile* binDirectory, @@ -588,6 +613,11 @@ NS_InitXPCOM2(nsIServiceManager* *result, memmove); #endif +#ifdef MOZ_WEBM + // And for libnestegg. + nestegg_set_halloc_func(NesteggReporter::CountingRealloc); +#endif + // Initialize the JS engine. if (!JS_Init()) { NS_RUNTIMEABORT("JS_Init failed"); @@ -641,6 +671,9 @@ NS_InitXPCOM2(nsIServiceManager* *result, #ifdef MOZ_VPX RegisterStrongMemoryReporter(new VPXReporter()); #endif +#ifdef MOZ_WEBM + RegisterStrongMemoryReporter(new NesteggReporter()); +#endif mozilla::Telemetry::Init(); From d1b55ffa24596d697e2a5630291ee90858780a88 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 8 Apr 2014 13:07:46 -0400 Subject: [PATCH 73/79] Bug 993522 - fix comment in DMD.h; r=njn --- memory/replace/dmd/DMD.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/memory/replace/dmd/DMD.h b/memory/replace/dmd/DMD.h index 0417bfc1f73a..fe5bcefb1a0b 100644 --- a/memory/replace/dmd/DMD.h +++ b/memory/replace/dmd/DMD.h @@ -55,7 +55,10 @@ MOZ_EXPORT void Dump(Writer aWriter); // A useful |WriterFun|. If |fp| is a FILE* you want |Dump|'s output to be -// written to, call |Dump(FpWrite, fp)|. +// written to, call: +// +// dmd::Writer writer(FpWrite, fp); +// dmd::Dump(writer); MOZ_EXPORT void FpWrite(void* aFp, const char* aFmt, va_list aAp); From b945edf9dc75aef0024c0a696b069d7c2d3cc0bc Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Thu, 17 Apr 2014 15:13:44 -0400 Subject: [PATCH 74/79] Bug 997286: Don't depend on NewThread event timing; add test for suicidal initial events r=bsmedberg --- content/media/AudioStream.cpp | 1 + content/media/AudioStream.h | 7 ++++++- xpcom/tests/TestThreadUtils.cpp | 28 ++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/content/media/AudioStream.cpp b/content/media/AudioStream.cpp index 541ebc5005fd..39c632d190f3 100644 --- a/content/media/AudioStream.cpp +++ b/content/media/AudioStream.cpp @@ -502,6 +502,7 @@ AudioStream::CheckForStart() NS_IMETHODIMP AudioInitTask::Run() { + MOZ_ASSERT(mThread); if (NS_IsMainThread()) { mThread->Shutdown(); // can't Shutdown from the thread itself, darn mThread = nullptr; diff --git a/content/media/AudioStream.h b/content/media/AudioStream.h index 2b0562c19ce0..c3dfa5b23e1c 100644 --- a/content/media/AudioStream.h +++ b/content/media/AudioStream.h @@ -433,7 +433,12 @@ public: nsresult Dispatch() { - return NS_NewNamedThread("CubebInit", getter_AddRefs(mThread), this); + // Can't add 'this' as the event to run, since mThread may not be set yet + nsresult rv = NS_NewNamedThread("CubebInit", getter_AddRefs(mThread)); + if (NS_SUCCEEDED(rv)) { + rv = mThread->Dispatch(this, NS_DISPATCH_NORMAL); + } + return rv; } protected: diff --git a/xpcom/tests/TestThreadUtils.cpp b/xpcom/tests/TestThreadUtils.cpp index 6ff0b3c330d4..572ede54174b 100644 --- a/xpcom/tests/TestThreadUtils.cpp +++ b/xpcom/tests/TestThreadUtils.cpp @@ -19,6 +19,7 @@ enum { TEST_STDCALL_NONVOID_ARG_NONVOID_RETURN, TEST_STDCALL_NONVOID_ARG_NONVOID_RETURN_EXPLICIT, #endif + TEST_CALL_NEWTHREAD_SUICIDAL, MAX_TESTS }; @@ -35,6 +36,24 @@ class nsFoo : public nsISupports { NS_IMPL_ISUPPORTS0(nsFoo) +class TestSuicide : public nsRunnable { + nsresult Run() { + // Runs first time on thread "Suicide", then dies on MainThread + if (!NS_IsMainThread()) { + mThread = do_GetCurrentThread(); + NS_DispatchToMainThread(this); + return NS_OK; + } + MOZ_ASSERT(mThread); + mThread->Shutdown(); + gRunnableExecuted[TEST_CALL_NEWTHREAD_SUICIDAL] = true; + return NS_OK; + } + +private: + nsCOMPtr mThread; +}; + class nsBar : public nsISupports { NS_DECL_ISUPPORTS virtual ~nsBar() {} @@ -131,6 +150,15 @@ int main(int argc, char** argv) // Spin the event loop NS_ProcessPendingEvents(nullptr); + // Now test a suicidal event in NS_New(Named)Thread + nsCOMPtr thread; + NS_NewNamedThread("SuicideThread", getter_AddRefs(thread), new TestSuicide()); + MOZ_ASSERT(thread); + + while (!gRunnableExecuted[TEST_CALL_NEWTHREAD_SUICIDAL]) { + NS_ProcessPendingEvents(nullptr); + } + int result = 0; for (uint32_t i = 0; i < MAX_TESTS; i++) { From 5b2534c7b291773730fa1e090de0a43f84c534b3 Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Thu, 17 Apr 2014 15:32:34 -0400 Subject: [PATCH 75/79] Bug 997286: bustage fix on a CLOSED TREE rs=dholbert --- xpcom/tests/TestThreadUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xpcom/tests/TestThreadUtils.cpp b/xpcom/tests/TestThreadUtils.cpp index 572ede54174b..9878b7578c15 100644 --- a/xpcom/tests/TestThreadUtils.cpp +++ b/xpcom/tests/TestThreadUtils.cpp @@ -37,7 +37,7 @@ class nsFoo : public nsISupports { NS_IMPL_ISUPPORTS0(nsFoo) class TestSuicide : public nsRunnable { - nsresult Run() { + NS_IMETHOD Run() { // Runs first time on thread "Suicide", then dies on MainThread if (!NS_IsMainThread()) { mThread = do_GetCurrentThread(); From 96f08c4bcc4e7f6c95f6e2b84c00b9a4dcd91698 Mon Sep 17 00:00:00 2001 From: David Burns Date: Thu, 17 Apr 2014 20:48:27 +0100 Subject: [PATCH 76/79] Bug 990299: correct and enable window management test in Marionette; r=mdas --- .../tests/unit/test_window_management.py | 16 ++++++++++++---- .../client/marionette/tests/unit/unit-tests.ini | 1 - 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/testing/marionette/client/marionette/tests/unit/test_window_management.py b/testing/marionette/client/marionette/tests/unit/test_window_management.py index 9b529209d9aa..432b6f195a6b 100644 --- a/testing/marionette/client/marionette/tests/unit/test_window_management.py +++ b/testing/marionette/client/marionette/tests/unit/test_window_management.py @@ -2,7 +2,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -import os +import time from marionette_test import MarionetteTestCase class TestSwitchWindow(MarionetteTestCase): @@ -60,9 +60,17 @@ if (win != null) self.marionette.navigate(test_html) current = self.marionette.current_window_handle - self.marionette.find_element('link text',"Open new window").click() - window_handles = self.marionette.window_handles - window_handles.remove(current) + self.marionette.find_element('link text', "Open new window").click() + count = 0 + while True: + window_handles = self.marionette.window_handles + window_handles.remove(current) + if len(window_handles) > 0: + break + elif count > 10: + self.fail("There were no windows that appeared when we clicked earlier") + else: + time.sleep(1) self.marionette.switch_to_window(window_handles[0]) self.assertEqual(self.marionette.title, "We Arrive Here") diff --git a/testing/marionette/client/marionette/tests/unit/unit-tests.ini b/testing/marionette/client/marionette/tests/unit/unit-tests.ini index d4165d1d9928..5a8962992bfc 100644 --- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini +++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini @@ -92,7 +92,6 @@ browser = false [test_window_switching.py] b2g = false [test_window_management.py] -disabled = "Bug 990299" b2g = false [test_appcache.py] From a6047ce66cdbb232cf6c8bd8f74978a9fbbb03a2 Mon Sep 17 00:00:00 2001 From: David Burns Date: Thu, 17 Apr 2014 21:14:09 +0100 Subject: [PATCH 77/79] Bug 967021: Check that a window listener is not null in marionette; r=mdas --- testing/marionette/marionette-server.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/marionette/marionette-server.js b/testing/marionette/marionette-server.js index 18dd061825e3..bd19fc6e484c 100644 --- a/testing/marionette/marionette-server.js +++ b/testing/marionette/marionette-server.js @@ -2375,8 +2375,9 @@ MarionetteServerConnection.prototype = { Services.wm.getOuterWindowWithId(message.json.value); //go in here if we're already in a remote frame. - if ((!listenerWindow || listenerWindow.location.href != message.json.href) && - (this.curBrowser.frameManager.currentRemoteFrame !== null)) { + if ((!listenerWindow || (listenerWindow.location && + listenerWindow.location.href != message.json.href)) && + (this.curBrowser.frameManager.currentRemoteFrame !== null)) { // The outerWindowID from an OOP frame will not be meaningful to // the parent process here, since each process maintains its own // independent window list. So, it will either be null (!listenerWindow) From 10e41be39eb6e2852be0c754ea7ed90fa874895f Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Thu, 17 Apr 2014 13:15:41 -0700 Subject: [PATCH 78/79] Bug 996269 - Lazily clear the WebGL backbuffer. - r=kamidphish --- content/canvas/src/WebGLContext.cpp | 58 +++++++++++-------- content/canvas/src/WebGLContext.h | 3 +- content/canvas/src/WebGLContextDraw.cpp | 6 +- .../src/WebGLContextFramebufferOperations.cpp | 36 +----------- content/canvas/src/WebGLContextGL.cpp | 6 ++ content/canvas/src/WebGLContextValidate.cpp | 21 +++++++ 6 files changed, 70 insertions(+), 60 deletions(-) diff --git a/content/canvas/src/WebGLContext.cpp b/content/canvas/src/WebGLContext.cpp index e2330a8f3bf5..0c178c2fb6a1 100644 --- a/content/canvas/src/WebGLContext.cpp +++ b/content/canvas/src/WebGLContext.cpp @@ -136,25 +136,6 @@ WebGLContext::WebGLContext() mFakeVertexAttrib0BufferObject = 0; mFakeVertexAttrib0BufferStatus = WebGLVertexAttrib0Status::Default; - // these are de default values, see 6.2 State tables in the OpenGL ES 2.0.25 spec - mColorWriteMask[0] = 1; - mColorWriteMask[1] = 1; - mColorWriteMask[2] = 1; - mColorWriteMask[3] = 1; - mDepthWriteMask = 1; - mColorClearValue[0] = 0.f; - mColorClearValue[1] = 0.f; - mColorClearValue[2] = 0.f; - mColorClearValue[3] = 0.f; - mDepthClearValue = 1.f; - mStencilClearValue = 0; - mStencilRefFront = 0; - mStencilRefBack = 0; - mStencilValueMaskFront = 0xffffffff; - mStencilValueMaskBack = 0xffffffff; - mStencilWriteMaskFront = 0xffffffff; - mStencilWriteMaskBack = 0xffffffff; - mViewportX = 0; mViewportY = 0; mViewportWidth = 0; @@ -209,7 +190,7 @@ WebGLContext::WebGLContext() InvalidateBufferFetching(); - mIsScreenCleared = false; + mBackbufferNeedsClear = true; mDisableFragHighP = false; @@ -423,7 +404,7 @@ WebGLContext::SetDimensions(int32_t width, int32_t height) mHeight = gl->OffscreenSize().height; mResetLayer = true; - ClearScreen(); + mBackbufferNeedsClear = true; return NS_OK; } @@ -610,7 +591,11 @@ WebGLContext::SetDimensions(int32_t width, int32_t height) gl->fClearDepth(1.0f); gl->fClearStencil(0); - gl->ClearSafely(); + mBackbufferNeedsClear = true; + + // Clear immediately, because we need to present the cleared initial + // buffer. + ClearBackbufferIfNeeded(); mShouldPresent = true; @@ -625,6 +610,25 @@ WebGLContext::SetDimensions(int32_t width, int32_t height) return NS_OK; } +void +WebGLContext::ClearBackbufferIfNeeded() +{ + if (!mBackbufferNeedsClear) + return; + +#ifdef DEBUG + gl->MakeCurrent(); + + GLuint fb = 0; + gl->GetUIntegerv(LOCAL_GL_FRAMEBUFFER_BINDING, &fb); + MOZ_ASSERT(fb == 0); +#endif + + ClearScreen(); + + mBackbufferNeedsClear = false; +} + void WebGLContext::LoseOldestWebGLContextIfLimitExceeded() { #ifdef MOZ_GFX_OPTIMIZE_MOBILE @@ -965,7 +969,6 @@ WebGLContext::ClearScreen() colorAttachmentsMask[0] = true; ForceClearFramebufferWithDefaultValues(clearMask, colorAttachmentsMask); - mIsScreenCleared = true; } #ifdef DEBUG @@ -1153,13 +1156,14 @@ WebGLContext::PresentScreenBuffer() } gl->MakeCurrent(); + MOZ_ASSERT(!mBackbufferNeedsClear); if (!gl->PublishFrame()) { this->ForceLoseContext(); return false; } if (!mOptions.preserveDrawingBuffer) { - ClearScreen(); + mBackbufferNeedsClear = true; } mShouldPresent = false; @@ -1340,7 +1344,11 @@ WebGLContext::GetSurfaceSnapshot(bool* aPremultAlpha) } gl->MakeCurrent(); - ReadScreenIntoImageSurface(gl, surf); + { + ScopedBindFramebuffer autoFB(gl, 0); + ClearBackbufferIfNeeded(); + ReadPixelsIntoImageSurface(gl, surf); + } if (aPremultAlpha) { *aPremultAlpha = true; diff --git a/content/canvas/src/WebGLContext.h b/content/canvas/src/WebGLContext.h index 4e849f949e81..f6896332aa6f 100644 --- a/content/canvas/src/WebGLContext.h +++ b/content/canvas/src/WebGLContext.h @@ -239,6 +239,7 @@ public: // Calls ForceClearFramebufferWithDefaultValues() for the Context's 'screen'. void ClearScreen(); + void ClearBackbufferIfNeeded(); bool MinCapabilityMode() const { return mMinCapability; } @@ -837,7 +838,7 @@ protected: bool mLoseContextOnHeapMinimize; bool mCanLoseContextInForeground; bool mShouldPresent; - bool mIsScreenCleared; + bool mBackbufferNeedsClear; bool mDisableFragHighP; template diff --git a/content/canvas/src/WebGLContextDraw.cpp b/content/canvas/src/WebGLContextDraw.cpp index c7d4ce4f4ac9..034053ce6389 100644 --- a/content/canvas/src/WebGLContextDraw.cpp +++ b/content/canvas/src/WebGLContextDraw.cpp @@ -103,6 +103,8 @@ bool WebGLContext::DrawArrays_check(GLint first, GLsizei count, GLsizei primcoun ErrorInvalidFramebufferOperation("%s: incomplete framebuffer", info); return false; } + } else { + ClearBackbufferIfNeeded(); } if (!DoFakeVertexAttrib0(checked_firstPlusCount.value())) { @@ -264,6 +266,8 @@ WebGLContext::DrawElements_check(GLsizei count, GLenum type, ErrorInvalidFramebufferOperation("%s: incomplete framebuffer", info); return false; } + } else { + ClearBackbufferIfNeeded(); } if (!DoFakeVertexAttrib0(mMaxFetchedVertices)) { @@ -333,7 +337,7 @@ void WebGLContext::Draw_cleanup() if (!mBoundFramebuffer) { Invalidate(); mShouldPresent = true; - mIsScreenCleared = false; + MOZ_ASSERT(!mBackbufferNeedsClear); } if (gl->WorkAroundDriverBugs()) { diff --git a/content/canvas/src/WebGLContextFramebufferOperations.cpp b/content/canvas/src/WebGLContextFramebufferOperations.cpp index 249f2d37c144..ae9162f71769 100644 --- a/content/canvas/src/WebGLContextFramebufferOperations.cpp +++ b/content/canvas/src/WebGLContextFramebufferOperations.cpp @@ -35,43 +35,13 @@ WebGLContext::Clear(GLbitfield mask) gl->fClear(mask); return; + } else { + ClearBackbufferIfNeeded(); } // Ok, we're clearing the default framebuffer/screen. - bool needsClear = true; - if (mIsScreenCleared) { - bool isClearRedundant = true; - if (mask & LOCAL_GL_COLOR_BUFFER_BIT) { - if (mColorClearValue[0] != 0.0f || - mColorClearValue[1] != 0.0f || - mColorClearValue[2] != 0.0f || - mColorClearValue[3] != 0.0f) - { - isClearRedundant = false; - } - } - - if (mask & LOCAL_GL_DEPTH_BUFFER_BIT) { - if (mDepthClearValue != 1.0f) { - isClearRedundant = false; - } - } - - if (mask & LOCAL_GL_DEPTH_BUFFER_BIT) { - if (mStencilClearValue != 0) { - isClearRedundant = false; - } - } - - if (isClearRedundant) - needsClear = false; - } - - if (needsClear) { - gl->fClear(mask); - mIsScreenCleared = false; - } + gl->fClear(mask); Invalidate(); mShouldPresent = true; diff --git a/content/canvas/src/WebGLContextGL.cpp b/content/canvas/src/WebGLContextGL.cpp index e014b465bb02..f28d32761a3c 100644 --- a/content/canvas/src/WebGLContextGL.cpp +++ b/content/canvas/src/WebGLContextGL.cpp @@ -473,6 +473,8 @@ WebGLContext::CopyTexImage2D(GLenum target, return ErrorInvalidOperation("copyTexImage2D: Read source attachment doesn't have the" " correct color/depth/stencil type."); } + } else { + ClearBackbufferIfNeeded(); } bool texFormatRequiresAlpha = internalformat == LOCAL_GL_RGBA || @@ -585,6 +587,8 @@ WebGLContext::CopyTexSubImage2D(GLenum target, return ErrorInvalidOperation("copyTexSubImage2D: Read source attachment doesn't have the" " correct color/depth/stencil type."); } + } else { + ClearBackbufferIfNeeded(); } bool texFormatRequiresAlpha = (internalFormat == LOCAL_GL_RGBA || @@ -2195,6 +2199,8 @@ WebGLContext::ReadPixels(GLint x, GLint y, GLsizei width, return ErrorInvalidOperation("readPixels: Read source attachment doesn't have the" " correct color/depth/stencil type."); } + } else { + ClearBackbufferIfNeeded(); } // Now that the errors are out of the way, on to actually reading diff --git a/content/canvas/src/WebGLContextValidate.cpp b/content/canvas/src/WebGLContextValidate.cpp index 4e8e33ead581..f051633bc415 100644 --- a/content/canvas/src/WebGLContextValidate.cpp +++ b/content/canvas/src/WebGLContextValidate.cpp @@ -1626,6 +1626,27 @@ WebGLContext::InitAndValidateGL() mDisableFragHighP = true; } + // These are the default values, see 6.2 State tables in the + // OpenGL ES 2.0.25 spec. + mColorWriteMask[0] = 1; + mColorWriteMask[1] = 1; + mColorWriteMask[2] = 1; + mColorWriteMask[3] = 1; + mDepthWriteMask = 1; + mColorClearValue[0] = 0.f; + mColorClearValue[1] = 0.f; + mColorClearValue[2] = 0.f; + mColorClearValue[3] = 0.f; + mDepthClearValue = 1.f; + mStencilClearValue = 0; + mStencilRefFront = 0; + mStencilRefBack = 0; + mStencilValueMaskFront = 0xffffffff; + mStencilValueMaskBack = 0xffffffff; + mStencilWriteMaskFront = 0xffffffff; + mStencilWriteMaskBack = 0xffffffff; + + // Bindings, etc. mActiveTexture = 0; mEmitContextLostErrorOnce = true; mWebGLError = LOCAL_GL_NO_ERROR; From 5264f2323653d14d87b93159a3f6bcfd444f5d9a Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Wed, 16 Apr 2014 14:36:53 -0700 Subject: [PATCH 79/79] Bug 996282 - Cleanup getParameter. - r=kamidphish --- content/canvas/src/WebGLContextState.cpp | 141 +++++++++-------------- 1 file changed, 56 insertions(+), 85 deletions(-) diff --git a/content/canvas/src/WebGLContextState.cpp b/content/canvas/src/WebGLContextState.cpp index 8de720b75fe2..5b076eb43eb2 100644 --- a/content/canvas/src/WebGLContextState.cpp +++ b/content/canvas/src/WebGLContextState.cpp @@ -80,9 +80,8 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) if (MinCapabilityMode()) { switch(pname) { - // + //////////////////////////// // Single-value params - // // int case LOCAL_GL_MAX_VERTEX_ATTRIBS: @@ -118,18 +117,15 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) } } - if (IsExtensionEnabled(WEBGL_draw_buffers)) - { - if (pname == LOCAL_GL_MAX_COLOR_ATTACHMENTS) - { + if (IsExtensionEnabled(WEBGL_draw_buffers)) { + if (pname == LOCAL_GL_MAX_COLOR_ATTACHMENTS) { return JS::Int32Value(mGLMaxColorAttachments); - } - else if (pname == LOCAL_GL_MAX_DRAW_BUFFERS) - { + + } else if (pname == LOCAL_GL_MAX_DRAW_BUFFERS) { return JS::Int32Value(mGLMaxDrawBuffers); - } - else if (pname >= LOCAL_GL_DRAW_BUFFER0 && - pname < GLenum(LOCAL_GL_DRAW_BUFFER0 + mGLMaxDrawBuffers)) + + } else if (pname >= LOCAL_GL_DRAW_BUFFER0 && + pname < GLenum(LOCAL_GL_DRAW_BUFFER0 + mGLMaxDrawBuffers)) { if (mBoundFramebuffer) { GLint iv = 0; @@ -149,17 +145,12 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) } if (IsExtensionEnabled(OES_vertex_array_object)) { - switch (pname) { - - case LOCAL_GL_VERTEX_ARRAY_BINDING: - { - if (mBoundVertexArray == mDefaultVertexArray){ - return WebGLObjectAsJSValue(cx, (WebGLVertexArray *) nullptr, rv); - } - - return WebGLObjectAsJSValue(cx, mBoundVertexArray.get(), rv); + if (pname == LOCAL_GL_VERTEX_ARRAY_BINDING) { + if (mBoundVertexArray == mDefaultVertexArray){ + return WebGLObjectAsJSValue(cx, (WebGLVertexArray *) nullptr, rv); } + return WebGLObjectAsJSValue(cx, mBoundVertexArray.get(), rv); } } @@ -171,8 +162,7 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) return StringValue(cx, "Mozilla", rv); case LOCAL_GL_RENDERER: return StringValue(cx, "Mozilla", rv); - case LOCAL_GL_VERSION: - { + case LOCAL_GL_VERSION: { const char* version = 0; if (IsWebGL2()) { @@ -189,13 +179,11 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) // Privileged string params exposed by WEBGL_debug_renderer_info: case UNMASKED_VENDOR_WEBGL: - case UNMASKED_RENDERER_WEBGL: - { + case UNMASKED_RENDERER_WEBGL: { // The privilege check is done in WebGLContext::IsExtensionSupported. // So here we just have to check that the extension is enabled. if (!IsExtensionEnabled(WEBGL_debug_renderer_info)) { - ErrorInvalidEnumInfo("getParameter: parameter", pname); - return JS::NullValue(); + break; } GLenum glstringname = LOCAL_GL_NONE; if (pname == UNMASKED_VENDOR_WEBGL) { @@ -207,9 +195,8 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) return StringValue(cx, string, rv); } - // + //////////////////////////////// // Single-value params - // // unsigned int case LOCAL_GL_CULL_FACE_MODE: @@ -230,8 +217,7 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) case LOCAL_GL_BLEND_DST_ALPHA: case LOCAL_GL_BLEND_EQUATION_RGB: case LOCAL_GL_BLEND_EQUATION_ALPHA: - case LOCAL_GL_GENERATE_MIPMAP_HINT: - { + case LOCAL_GL_GENERATE_MIPMAP_HINT: { GLint i = 0; gl->fGetIntegerv(pname, &i); return JS::NumberValue(uint32_t(i)); @@ -254,23 +240,20 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) case LOCAL_GL_BLUE_BITS: case LOCAL_GL_ALPHA_BITS: case LOCAL_GL_DEPTH_BITS: - case LOCAL_GL_STENCIL_BITS: - { + case LOCAL_GL_STENCIL_BITS: { GLint i = 0; gl->fGetIntegerv(pname, &i); return JS::Int32Value(i); } - case LOCAL_GL_FRAGMENT_SHADER_DERIVATIVE_HINT: + case LOCAL_GL_FRAGMENT_SHADER_DERIVATIVE_HINT: { if (IsExtensionEnabled(OES_standard_derivatives)) { GLint i = 0; gl->fGetIntegerv(pname, &i); return JS::Int32Value(i); + } else { + break; } - else { - ErrorInvalidEnum("getParameter: parameter", pname); - return JS::NullValue(); - } - + } case LOCAL_GL_MAX_TEXTURE_SIZE: return JS::Int32Value(mGLMaxTextureSize); @@ -291,8 +274,7 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) case LOCAL_GL_NUM_COMPRESSED_TEXTURE_FORMATS: return JS::Int32Value(0); - case LOCAL_GL_COMPRESSED_TEXTURE_FORMATS: - { + case LOCAL_GL_COMPRESSED_TEXTURE_FORMATS: { uint32_t length = mCompressedTextureFormats.Length(); JSObject* obj = Uint32Array::Create(cx, this, length, mCompressedTextureFormats.Elements()); if (!obj) { @@ -300,8 +282,7 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) } return JS::ObjectOrNullValue(obj); } - case LOCAL_GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: - { + case LOCAL_GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: { if (!IsWebGL2()) { break; } @@ -313,8 +294,7 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) case LOCAL_GL_STENCIL_BACK_VALUE_MASK: case LOCAL_GL_STENCIL_BACK_WRITEMASK: case LOCAL_GL_STENCIL_VALUE_MASK: - case LOCAL_GL_STENCIL_WRITEMASK: - { + case LOCAL_GL_STENCIL_WRITEMASK: { GLint i = 0; // the GL api (glGetIntegerv) only does signed ints gl->fGetIntegerv(pname, &i); GLuint i_unsigned(i); // this is where -1 becomes 2^32-1 @@ -323,21 +303,20 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) } // float - case LOCAL_GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: + case LOCAL_GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: { if (IsExtensionEnabled(EXT_texture_filter_anisotropic)) { GLfloat f = 0.f; gl->fGetFloatv(pname, &f); return JS::DoubleValue(f); } else { - ErrorInvalidEnumInfo("getParameter: parameter", pname); - return JS::NullValue(); + break; } + } case LOCAL_GL_DEPTH_CLEAR_VALUE: case LOCAL_GL_LINE_WIDTH: case LOCAL_GL_POLYGON_OFFSET_FACTOR: case LOCAL_GL_POLYGON_OFFSET_UNITS: - case LOCAL_GL_SAMPLE_COVERAGE_VALUE: - { + case LOCAL_GL_SAMPLE_COVERAGE_VALUE: { GLfloat f = 0.f; gl->fGetFloatv(pname, &f); return JS::DoubleValue(f); @@ -352,8 +331,7 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) case LOCAL_GL_POLYGON_OFFSET_FILL: case LOCAL_GL_SCISSOR_TEST: case LOCAL_GL_SAMPLE_COVERAGE_INVERT: - case LOCAL_GL_DEPTH_WRITEMASK: - { + case LOCAL_GL_DEPTH_WRITEMASK: { realGLboolean b = 0; gl->fGetBooleanv(pname, &b); return JS::BooleanValue(bool(b)); @@ -369,13 +347,13 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) case UNPACK_COLORSPACE_CONVERSION_WEBGL: return JS::NumberValue(uint32_t(mPixelStoreColorspaceConversion)); - // + //////////////////////////////// // Complex values - // - case LOCAL_GL_DEPTH_RANGE: // 2 floats - case LOCAL_GL_ALIASED_POINT_SIZE_RANGE: // 2 floats - case LOCAL_GL_ALIASED_LINE_WIDTH_RANGE: // 2 floats - { + + // 2 floats + case LOCAL_GL_DEPTH_RANGE: + case LOCAL_GL_ALIASED_POINT_SIZE_RANGE: + case LOCAL_GL_ALIASED_LINE_WIDTH_RANGE: { GLfloat fv[2] = { 0 }; gl->fGetFloatv(pname, fv); JSObject* obj = Float32Array::Create(cx, this, 2, fv); @@ -385,9 +363,9 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) return JS::ObjectOrNullValue(obj); } - case LOCAL_GL_COLOR_CLEAR_VALUE: // 4 floats - case LOCAL_GL_BLEND_COLOR: // 4 floats - { + // 4 floats + case LOCAL_GL_COLOR_CLEAR_VALUE: + case LOCAL_GL_BLEND_COLOR: { GLfloat fv[4] = { 0 }; gl->fGetFloatv(pname, fv); JSObject* obj = Float32Array::Create(cx, this, 4, fv); @@ -397,8 +375,8 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) return JS::ObjectOrNullValue(obj); } - case LOCAL_GL_MAX_VIEWPORT_DIMS: // 2 ints - { + // 2 ints + case LOCAL_GL_MAX_VIEWPORT_DIMS: { GLint iv[2] = { 0 }; gl->fGetIntegerv(pname, iv); JSObject* obj = Int32Array::Create(cx, this, 2, iv); @@ -408,9 +386,9 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) return JS::ObjectOrNullValue(obj); } - case LOCAL_GL_SCISSOR_BOX: // 4 ints - case LOCAL_GL_VIEWPORT: // 4 ints - { + // 4 ints + case LOCAL_GL_SCISSOR_BOX: + case LOCAL_GL_VIEWPORT: { GLint iv[4] = { 0 }; gl->fGetIntegerv(pname, iv); JSObject* obj = Int32Array::Create(cx, this, 4, iv); @@ -420,8 +398,8 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) return JS::ObjectOrNullValue(obj); } - case LOCAL_GL_COLOR_WRITEMASK: // 4 bools - { + // 4 bools + case LOCAL_GL_COLOR_WRITEMASK: { realGLboolean gl_bv[4] = { 0 }; gl->fGetBooleanv(pname, gl_bv); bool vals[4] = { bool(gl_bv[0]), bool(gl_bv[1]), @@ -433,53 +411,46 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv) return arr; } - case LOCAL_GL_ARRAY_BUFFER_BINDING: - { + case LOCAL_GL_ARRAY_BUFFER_BINDING: { return WebGLObjectAsJSValue(cx, mBoundArrayBuffer.get(), rv); } - case LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: - { + case LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: { if (!IsWebGL2()) { break; } return WebGLObjectAsJSValue(cx, mBoundTransformFeedbackBuffer.get(), rv); } - case LOCAL_GL_ELEMENT_ARRAY_BUFFER_BINDING: - { + case LOCAL_GL_ELEMENT_ARRAY_BUFFER_BINDING: { return WebGLObjectAsJSValue(cx, mBoundVertexArray->mBoundElementArrayBuffer.get(), rv); } - case LOCAL_GL_RENDERBUFFER_BINDING: - { + case LOCAL_GL_RENDERBUFFER_BINDING: { return WebGLObjectAsJSValue(cx, mBoundRenderbuffer.get(), rv); } - case LOCAL_GL_FRAMEBUFFER_BINDING: - { + case LOCAL_GL_FRAMEBUFFER_BINDING: { return WebGLObjectAsJSValue(cx, mBoundFramebuffer.get(), rv); } - case LOCAL_GL_CURRENT_PROGRAM: - { + case LOCAL_GL_CURRENT_PROGRAM: { return WebGLObjectAsJSValue(cx, mCurrentProgram.get(), rv); } - case LOCAL_GL_TEXTURE_BINDING_2D: - { + case LOCAL_GL_TEXTURE_BINDING_2D: { return WebGLObjectAsJSValue(cx, mBound2DTextures[mActiveTexture].get(), rv); } - case LOCAL_GL_TEXTURE_BINDING_CUBE_MAP: - { + case LOCAL_GL_TEXTURE_BINDING_CUBE_MAP: { return WebGLObjectAsJSValue(cx, mBoundCubeMapTextures[mActiveTexture].get(), rv); } default: - ErrorInvalidEnumInfo("getParameter: parameter", pname); + break; } + ErrorInvalidEnumInfo("getParameter: parameter", pname); return JS::NullValue(); }