diff --git a/dom/svg/SVGDocument.cpp b/dom/svg/SVGDocument.cpp index a655583082..3d62943986 100644 --- a/dom/svg/SVGDocument.cpp +++ b/dom/svg/SVGDocument.cpp @@ -103,6 +103,8 @@ SVGDocument::EnsureNonSVGUserAgentStyleSheetsLoaded() mHasLoadedNonSVGUserAgentStyleSheets = true; + BeginUpdate(UPDATE_STYLE); + if (IsBeingUsedAsImage()) { // nsDocumentViewer::CreateStyleSet skipped loading all user-agent/user // style sheets in this case, but we'll need B2G/Fennec's @@ -164,7 +166,15 @@ SVGDocument::EnsureNonSVGUserAgentStyleSheetsLoaded() EnsureOnDemandBuiltInUASheet(nsLayoutStylesheetCache::FormsSheet()); EnsureOnDemandBuiltInUASheet(nsLayoutStylesheetCache::CounterStylesSheet()); EnsureOnDemandBuiltInUASheet(nsLayoutStylesheetCache::HTMLSheet()); + if (nsLayoutUtils::ShouldUseNoFramesSheet(this)) { + EnsureOnDemandBuiltInUASheet(nsLayoutStylesheetCache::NoFramesSheet()); + } + if (nsLayoutUtils::ShouldUseNoScriptSheet(this)) { + EnsureOnDemandBuiltInUASheet(nsLayoutStylesheetCache::NoScriptSheet()); + } EnsureOnDemandBuiltInUASheet(nsLayoutStylesheetCache::UASheet()); + + EndUpdate(UPDATE_STYLE); } JSObject* diff --git a/gfx/layers/RotatedBuffer.cpp b/gfx/layers/RotatedBuffer.cpp index 1ff5e6351a..1bce95d9ff 100644 --- a/gfx/layers/RotatedBuffer.cpp +++ b/gfx/layers/RotatedBuffer.cpp @@ -113,13 +113,13 @@ RotatedBuffer::DrawBufferQuadrant(gfx::DrawTarget* aTarget, } } - if (aOperator == CompositionOp::OP_SOURCE) { - // OP_SOURCE is unbounded in Azure, and we really don't want that behaviour here. - // We also can't do a ClearRect+FillRect since we need the drawing to happen - // as an atomic operation (to prevent flickering). - aTarget->PushClipRect(gfx::Rect(fillRect.x, fillRect.y, - fillRect.width, fillRect.height)); - } + // OP_SOURCE is unbounded in Azure, and we really don't want that behaviour here. + // We also can't do a ClearRect+FillRect since we need the drawing to happen + // as an atomic operation (to prevent flickering). + // We also need this clip in the case where we have a mask, since the mask surface + // might cover more than fillRect, but we only want to touch the pixels inside + // fillRect. + aTarget->PushClipRect(gfx::ToRect(fillRect)); if (aMask) { Matrix oldTransform = aTarget->GetTransform(); @@ -155,9 +155,7 @@ RotatedBuffer::DrawBufferQuadrant(gfx::DrawTarget* aTarget, DrawOptions(aOpacity, aOperator)); } - if (aOperator == CompositionOp::OP_SOURCE) { - aTarget->PopClip(); - } + aTarget->PopClip(); } void diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index 5173609d92..d0bf4d34e6 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -148,7 +148,8 @@ SyncViewsAndInvalidateDescendants(nsIFrame* aFrame, { NS_PRECONDITION(gInApplyRenderingChangeToTree, "should only be called within ApplyRenderingChangeToTree"); - NS_ASSERTION(aChange == (aChange & (nsChangeHint_RepaintFrame | + NS_ASSERTION(nsChangeHint_size_t(aChange) == + (aChange & (nsChangeHint_RepaintFrame | nsChangeHint_SyncFrameView | nsChangeHint_UpdateOpacityLayer | nsChangeHint_SchedulePaint)), @@ -4188,7 +4189,7 @@ RestyleManager::RestyleHintToString(nsRestyleHint aHint) bool any = false; const char* names[] = { "Self", "Subtree", "LaterSiblings", "CSSTransitions", "CSSAnimations", "SVGAttrAnimations", "StyleAttribute", - "Force", "ForceDescendants" }; + "StyleAttribute_Animations", "Force", "ForceDescendants" }; uint32_t hint = aHint & ((1 << ArrayLength(names)) - 1); uint32_t rest = aHint & ~((1 << ArrayLength(names)) - 1); for (uint32_t i = 0; i < ArrayLength(names); i++) { @@ -4227,8 +4228,9 @@ RestyleManager::ChangeHintToString(nsChangeHint aHint) "UpdateSubtreeOverflow", "UpdatePostTransformOverflow", "UpdateParentOverflow", "ChildrenOnlyTransform", "RecomputePosition", "AddOrRemoveTransform", - "BorderStyleNoneChange", "UpdateTextPath", "NeutralChange", - "InvalidateRenderingObservers" + "BorderStyleNoneChange", "UpdateTextPath", "SchedulePaint", + "NeutralChange", "InvalidateRenderingObservers", + "ReflowChangesSizeOrPosition" }; uint32_t hint = aHint & ((1 << ArrayLength(names)) - 1); uint32_t rest = aHint & ~((1 << ArrayLength(names)) - 1); diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 33213585a1..8eff6bfd68 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -6702,7 +6702,12 @@ nsCSSFrameConstructor::GetInsertionPrevSibling(InsertionPoint* aInsertion, // the container would be inserted. This is needed when inserting // into nested display:contents nodes. nsIContent* child = aInsertion->mContainer; - InsertionPoint fakeInsertion(aInsertion->mParentFrame, child->GetParent()); + nsIContent* parent = child->GetParent(); + aInsertion->mParentFrame = + ::GetAdjustedParentFrame(aInsertion->mParentFrame, + aInsertion->mParentFrame->GetType(), + parent); + InsertionPoint fakeInsertion(aInsertion->mParentFrame, parent); nsIFrame* result = GetInsertionPrevSibling(&fakeInsertion, child, aIsAppend, aIsRangeInsertSafe, nullptr, nullptr); MOZ_ASSERT(aInsertion->mParentFrame->GetContent() == @@ -9079,8 +9084,10 @@ nsCSSFrameConstructor::GetInsertionPoint(nsIContent* aContainer, InsertionPoint insertion(GetContentInsertionFrameFor(insertionElement), insertionElement); - // Fieldsets have multiple insertion points. - if (insertionElement->IsHTMLElement(nsGkAtoms::fieldset)) { + // Fieldset frames have multiple normal flow child frame lists so handle it + // the same as if it had multiple content insertion points. + if (insertion.mParentFrame && + insertion.mParentFrame->GetType() == nsGkAtoms::fieldSetFrame) { insertion.mMultiple = true; } diff --git a/layout/base/nsChangeHint.h b/layout/base/nsChangeHint.h index edc497ce13..a3d81f005f 100644 --- a/layout/base/nsChangeHint.h +++ b/layout/base/nsChangeHint.h @@ -167,7 +167,14 @@ enum nsChangeHint { /** * This will cause rendering observers to be invalidated. */ - nsChangeHint_InvalidateRenderingObservers = 0x400000 + nsChangeHint_InvalidateRenderingObservers = 0x400000, + + /** + * Indicates that the reflow changes the size or position of the + * element, and thus the reflow must start from at least the frame's + * parent. + */ + nsChangeHint_ReflowChangesSizeOrPosition = 0x800000, // IMPORTANT NOTE: When adding new hints, consider whether you need to // add them to NS_HintsNotHandledForDescendantsIn() below. Please also @@ -210,6 +217,49 @@ inline bool NS_IsHintSubset(nsChangeHint aSubset, nsChangeHint aSuperSet) { return (aSubset & aSuperSet) == aSubset; } +// The functions below need an integral type to cast to to avoid +// infinite recursion. +typedef decltype(nsChangeHint(0) + nsChangeHint(0)) nsChangeHint_size_t; + +inline nsChangeHint MOZ_CONSTEXPR +operator|(nsChangeHint aLeft, nsChangeHint aRight) +{ + return nsChangeHint(nsChangeHint_size_t(aLeft) | nsChangeHint_size_t(aRight)); +} + +inline nsChangeHint MOZ_CONSTEXPR +operator&(nsChangeHint aLeft, nsChangeHint aRight) +{ + return nsChangeHint(nsChangeHint_size_t(aLeft) & nsChangeHint_size_t(aRight)); +} + +inline nsChangeHint& operator|=(nsChangeHint& aLeft, nsChangeHint aRight) +{ + return aLeft = aLeft | aRight; +} + +inline nsChangeHint& operator&=(nsChangeHint& aLeft, nsChangeHint aRight) +{ + return aLeft = aLeft & aRight; +} + +inline nsChangeHint MOZ_CONSTEXPR +operator~(nsChangeHint aArg) +{ + return nsChangeHint(~nsChangeHint_size_t(aArg)); +} + +inline nsChangeHint MOZ_CONSTEXPR +operator^(nsChangeHint aLeft, nsChangeHint aRight) +{ + return nsChangeHint(nsChangeHint_size_t(aLeft) ^ nsChangeHint_size_t(aRight)); +} + +inline nsChangeHint operator^=(nsChangeHint& aLeft, nsChangeHint aRight) +{ + return aLeft = aLeft ^ aRight; +} + /** * We have an optimization when processing change hints which prevents * us from visiting the descendants of a node when a hint on that node @@ -232,6 +282,7 @@ inline bool NS_IsHintSubset(nsChangeHint aSubset, nsChangeHint aSuperSet) { nsChangeHint_AddOrRemoveTransform | \ nsChangeHint_BorderStyleNoneChange | \ nsChangeHint_NeedReflow | \ + nsChangeHint_ReflowChangesSizeOrPosition | \ nsChangeHint_ClearAncestorIntrinsics) inline nsChangeHint NS_HintsNotHandledForDescendantsIn(nsChangeHint aChangeHint) { @@ -248,11 +299,19 @@ inline nsChangeHint NS_HintsNotHandledForDescendantsIn(nsChangeHint aChangeHint) nsChangeHint_AddOrRemoveTransform | nsChangeHint_BorderStyleNoneChange)); - if (!NS_IsHintSubset(nsChangeHint_NeedDirtyReflow, aChangeHint) && - NS_IsHintSubset(nsChangeHint_NeedReflow, aChangeHint)) { - // If NeedDirtyReflow is *not* set, then NeedReflow is a - // non-inherited hint. - NS_UpdateHint(result, nsChangeHint_NeedReflow); + if (!NS_IsHintSubset(nsChangeHint_NeedDirtyReflow, aChangeHint)) { + if (NS_IsHintSubset(nsChangeHint_NeedReflow, aChangeHint)) { + // If NeedDirtyReflow is *not* set, then NeedReflow is a + // non-inherited hint. + NS_UpdateHint(result, nsChangeHint_NeedReflow); + } + + if (NS_IsHintSubset(nsChangeHint_ReflowChangesSizeOrPosition, + aChangeHint)) { + // If NeedDirtyReflow is *not* set, then ReflowChangesSizeOrPosition is a + // non-inherited hint. + NS_UpdateHint(result, nsChangeHint_ReflowChangesSizeOrPosition); + } } if (!NS_IsHintSubset(nsChangeHint_ClearDescendantIntrinsics, aChangeHint) && @@ -277,6 +336,7 @@ inline nsChangeHint NS_HintsNotHandledForDescendantsIn(nsChangeHint aChangeHint) nsChangeHint_SchedulePaint) #define nsChangeHint_AllReflowHints \ nsChangeHint(nsChangeHint_NeedReflow | \ + nsChangeHint_ReflowChangesSizeOrPosition|\ nsChangeHint_ClearAncestorIntrinsics | \ nsChangeHint_ClearDescendantIntrinsics | \ nsChangeHint_NeedDirtyReflow) diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 9c14e67662..c892475622 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -70,6 +70,7 @@ #include "nsCaret.h" #include "nsISelection.h" #include "nsDOMTokenList.h" +#include "mozilla/RuleNodeCacheConditions.h" // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to // GetTickCount(). @@ -129,7 +130,7 @@ static void AddTransformFunctions(nsCSSValueList* aList, NS_ASSERTION(currElem.GetUnit() == eCSSUnit_Function, "Stream should consist solely of functions!"); nsCSSValue::Array* array = currElem.GetArrayValue(); - bool canStoreInRuleTree = true; + RuleNodeCacheConditions conditions; switch (nsStyleTransformMatrix::TransformFunctionOf(array)) { case eCSSKeyword_rotatex: { @@ -201,7 +202,7 @@ static void AddTransformFunctions(nsCSSValueList* aList, case eCSSKeyword_translatex: { double x = nsStyleTransformMatrix::ProcessTranslatePart( - array->Item(1), aContext, aPresContext, canStoreInRuleTree, + array->Item(1), aContext, aPresContext, conditions, &aRefBox, &TransformReferenceBox::Width); aFunctions.AppendElement(Translation(x, 0, 0)); break; @@ -209,7 +210,7 @@ static void AddTransformFunctions(nsCSSValueList* aList, case eCSSKeyword_translatey: { double y = nsStyleTransformMatrix::ProcessTranslatePart( - array->Item(1), aContext, aPresContext, canStoreInRuleTree, + array->Item(1), aContext, aPresContext, conditions, &aRefBox, &TransformReferenceBox::Height); aFunctions.AppendElement(Translation(0, y, 0)); break; @@ -217,7 +218,7 @@ static void AddTransformFunctions(nsCSSValueList* aList, case eCSSKeyword_translatez: { double z = nsStyleTransformMatrix::ProcessTranslatePart( - array->Item(1), aContext, aPresContext, canStoreInRuleTree, + array->Item(1), aContext, aPresContext, conditions, nullptr); aFunctions.AppendElement(Translation(0, 0, z)); break; @@ -225,13 +226,13 @@ static void AddTransformFunctions(nsCSSValueList* aList, case eCSSKeyword_translate: { double x = nsStyleTransformMatrix::ProcessTranslatePart( - array->Item(1), aContext, aPresContext, canStoreInRuleTree, + array->Item(1), aContext, aPresContext, conditions, &aRefBox, &TransformReferenceBox::Width); // translate(x) is shorthand for translate(x, 0) double y = 0; if (array->Count() == 3) { y = nsStyleTransformMatrix::ProcessTranslatePart( - array->Item(2), aContext, aPresContext, canStoreInRuleTree, + array->Item(2), aContext, aPresContext, conditions, &aRefBox, &TransformReferenceBox::Height); } aFunctions.AppendElement(Translation(x, y, 0)); @@ -240,13 +241,13 @@ static void AddTransformFunctions(nsCSSValueList* aList, case eCSSKeyword_translate3d: { double x = nsStyleTransformMatrix::ProcessTranslatePart( - array->Item(1), aContext, aPresContext, canStoreInRuleTree, + array->Item(1), aContext, aPresContext, conditions, &aRefBox, &TransformReferenceBox::Width); double y = nsStyleTransformMatrix::ProcessTranslatePart( - array->Item(2), aContext, aPresContext, canStoreInRuleTree, + array->Item(2), aContext, aPresContext, conditions, &aRefBox, &TransformReferenceBox::Height); double z = nsStyleTransformMatrix::ProcessTranslatePart( - array->Item(3), aContext, aPresContext, canStoreInRuleTree, + array->Item(3), aContext, aPresContext, conditions, nullptr); aFunctions.AppendElement(Translation(x, y, z)); @@ -325,7 +326,7 @@ static void AddTransformFunctions(nsCSSValueList* aList, nsStyleTransformMatrix::ProcessInterpolateMatrix(matrix, array, aContext, aPresContext, - canStoreInRuleTree, + conditions, aRefBox); aFunctions.AppendElement(TransformMatrix(gfx::ToMatrix4x4(matrix))); break; @@ -489,6 +490,13 @@ nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer(Layer* aLayer, "aBuilder and aItem, or with neither"); MOZ_ASSERT(!aItem || aFrame == aItem->Frame(), "frame mismatch"); + // Only send animations to a layer that is actually using + // off-main-thread compositing. + if (aLayer->Manager()->GetBackendType() != + layers::LayersBackend::LAYERS_CLIENT) { + return; + } + bool pending = !aBuilder; if (pending) { @@ -2968,19 +2976,36 @@ void nsDisplayBackgroundColor::Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) { - DrawTarget& aDrawTarget = *aCtx->GetDrawTarget(); - if (mColor == NS_RGBA(0, 0, 0, 0)) { return; } nsRect borderBox = nsRect(ToReferenceFrame(), mFrame->GetSize()); +#if 0 + // See https://bugzilla.mozilla.org/show_bug.cgi?id=1148418#c21 for why this + // results in a precision induced rounding issue that makes the rect one + // pixel shorter in rare cases. Disabled in favor of the old code for now. + // Note that the pref layout.css.devPixelsPerPx needs to be set to 1 to + // reproduce the bug. + DrawTarget& aDrawTarget = *aCtx->GetDrawTarget(); + Rect rect = NSRectToSnappedRect(borderBox, mFrame->PresContext()->AppUnitsPerDevPixel(), aDrawTarget); ColorPattern color(ToDeviceColor(mColor)); aDrawTarget.FillRect(rect, color); +#else + gfxContext* ctx = aCtx->ThebesContext(); + + gfxRect bounds = + nsLayoutUtils::RectToGfxRect(borderBox, mFrame->PresContext()->AppUnitsPerDevPixel()); + + ctx->SetColor(mColor); + ctx->NewPath(); + ctx->Rectangle(bounds, true); + ctx->Fill(); +#endif } nsRegion @@ -4695,17 +4720,23 @@ nsDisplayTransform::GetDeltaToTransformOrigin(const nsIFrame* aFrame, * a distance, it's already computed for us! */ const nsStyleDisplay* display = aFrame->StyleDisplay(); + // We don't use aBoundsOverride for SVG since we need to account for + // refBox.X/Y(). This happens to work because ReflowSVG sets the frame's + // mRect before calling FinishAndStoreOverflow so we don't need the override. TransformReferenceBox refBox; - if (aBoundsOverride) { + if (aBoundsOverride && + !(aFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT)) { refBox.Init(aBoundsOverride->Size()); } else { refBox.Init(aFrame); } /* Allows us to access dimension getters by index. */ - float coords[3]; + float coords[2]; TransformReferenceBox::DimensionGetter dimensionGetter[] = { &TransformReferenceBox::Width, &TransformReferenceBox::Height }; + TransformReferenceBox::DimensionGetter offsetGetter[] = + { &TransformReferenceBox::X, &TransformReferenceBox::Y }; for (uint8_t index = 0; index < 2; ++index) { /* If the -moz-transform-origin specifies a percentage, take the percentage @@ -4727,20 +4758,19 @@ nsDisplayTransform::GetDeltaToTransformOrigin(const nsIFrame* aFrame, coords[index] = NSAppUnitsToFloatPixels(coord.GetCoordValue(), aAppUnitsPerPixel); } - if ((aFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT) && - coord.GetUnit() != eStyleUnit_Percent) { - // values represent offsets from the origin of the SVG element's - // user space, not the top left of its bounds, so we must adjust for that: - nscoord offset = - (index == 0) ? aFrame->GetPosition().x : aFrame->GetPosition().y; - coords[index] -= NSAppUnitsToFloatPixels(offset, aAppUnitsPerPixel); + + if (aFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT) { + // SVG frames (unlike other frames) have a reference box that can be (and + // typically is) offset from the TopLeft() of the frame. We need to + // account for that here. + coords[index] += + NSAppUnitsToFloatPixels((refBox.*offsetGetter[index])(), aAppUnitsPerPixel); } } - coords[2] = NSAppUnitsToFloatPixels(display->mTransformOrigin[2].GetCoordValue(), - aAppUnitsPerPixel); - - return Point3D(coords[0], coords[1], coords[2]); + return Point3D(coords[0], coords[1], + NSAppUnitsToFloatPixels(display->mTransformOrigin[2].GetCoordValue(), + aAppUnitsPerPixel)); } /* Returns the delta specified by the -moz-perspective-origin property. @@ -4890,21 +4920,27 @@ nsDisplayTransform::GetResultingTransformMatrixInternal(const FrameTransformProp // Get the underlying transform matrix: + // We don't use aBoundsOverride for SVG since we need to account for + // refBox.X/Y(). This happens to work because ReflowSVG sets the frame's + // mRect before calling FinishAndStoreOverflow so we don't need the override. TransformReferenceBox refBox; - if (aBoundsOverride) { + if (aBoundsOverride && + (!frame || !(frame->GetStateBits() & NS_FRAME_SVG_LAYOUT))) { refBox.Init(aBoundsOverride->Size()); } else { refBox.Init(frame); } /* Get the matrix, then change its basis to factor in the origin. */ - bool dummy; + RuleNodeCacheConditions dummy; gfx3DMatrix result; // Call IsSVGTransformed() regardless of the value of // disp->mSpecifiedTransform, since we still need any transformFromSVGParent. Matrix svgTransform, transformFromSVGParent; bool hasSVGTransforms = frame && frame->IsSVGTransformed(&svgTransform, &transformFromSVGParent); + bool hasTransformFromSVGParent = + hasSVGTransforms && !transformFromSVGParent.IsIdentity(); /* Transformed frames always have a transform, or are preserving 3d (and might still have perspective!) */ if (aProperties.mTransformList) { result = nsStyleTransformMatrix::ReadTransforms(aProperties.mTransformList->mHead, @@ -4920,15 +4956,6 @@ nsDisplayTransform::GetResultingTransformMatrixInternal(const FrameTransformProp result = gfx3DMatrix::From2D(ThebesMatrix(svgTransform)); } - if (hasSVGTransforms && !transformFromSVGParent.IsIdentity()) { - // Correct the translation components for zoom: - float pixelsPerCSSPx = frame->PresContext()->AppUnitsPerCSSPixel() / - aAppUnitsPerPixel; - transformFromSVGParent._31 *= pixelsPerCSSPx; - transformFromSVGParent._32 *= pixelsPerCSSPx; - result = result * gfx3DMatrix::From2D(ThebesMatrix(transformFromSVGParent)); - } - if (aProperties.mChildPerspective > 0.0) { gfx3DMatrix perspective; perspective._34 = @@ -4950,17 +4977,52 @@ nsDisplayTransform::GetResultingTransformMatrixInternal(const FrameTransformProp Point3D roundedOrigin(hasSVGTransforms ? newOrigin.x : NS_round(newOrigin.x), hasSVGTransforms ? newOrigin.y : NS_round(newOrigin.y), 0); - Point3D offsetBetweenOrigins = roundedOrigin + aProperties.mToTransformOrigin; - if (aOffsetByOrigin) { - // We can fold the final translation by roundedOrigin into the first matrix - // basis change translation. This is more stable against variation due to - // insufficient floating point precision than reversing the translation - // afterwards. - result.Translate(-aProperties.mToTransformOrigin); - result.TranslatePost(offsetBetweenOrigins); + if (!hasSVGTransforms || !hasTransformFromSVGParent) { + // This is a simplification of the following |else| block, the + // simplification being possible because we don't need to apply + // mToTransformOrigin between two transforms. + Point3D offsets = roundedOrigin + aProperties.mToTransformOrigin; + if (aOffsetByOrigin) { + // We can fold the final translation by roundedOrigin into the first matrix + // basis change translation. This is more stable against variation due to + // insufficient floating point precision than reversing the translation + // afterwards. + result.Translate(-aProperties.mToTransformOrigin); + result.TranslatePost(offsets); + } else { + result.ChangeBasis(offsets); + } } else { - result.ChangeBasis(offsetBetweenOrigins); + Point3D refBoxOffset(NSAppUnitsToFloatPixels(refBox.X(), aAppUnitsPerPixel), + NSAppUnitsToFloatPixels(refBox.Y(), aAppUnitsPerPixel), + 0); + // We have both a transform and children-only transform. The + // 'transform-origin' must apply between the two, so we need to apply it + // now before we apply transformFromSVGParent. Since mToTransformOrigin is + // relative to the frame's TopLeft(), we need to convert it to SVG user + // space by subtracting refBoxOffset. (Then after applying + // transformFromSVGParent we have to reapply refBoxOffset below.) + result.ChangeBasis(aProperties.mToTransformOrigin - refBoxOffset); + + // Now apply the children-only transforms, converting the translation + // components to device pixels: + float pixelsPerCSSPx = + frame->PresContext()->AppUnitsPerCSSPixel() / aAppUnitsPerPixel; + transformFromSVGParent._31 *= pixelsPerCSSPx; + transformFromSVGParent._32 *= pixelsPerCSSPx; + result = result * gfx3DMatrix::From2D(ThebesMatrix(transformFromSVGParent)); + + // Similar to the code in the |if| block above, but since we've accounted + // for mToTransformOrigin so we don't include that. We also need to reapply + // refBoxOffset. + Point3D offsets = roundedOrigin + refBoxOffset; + if (aOffsetByOrigin) { + result.Translate(-refBoxOffset); + result.TranslatePost(offsets); + } else { + result.ChangeBasis(offsets); + } } if (frame && frame->Preserves3D()) { diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 79afc1b557..6a26e1e804 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -2416,6 +2416,20 @@ nsDocumentViewer::CreateStyleSet(nsIDocument* aDocument, styleSet->PrependStyleSheet(nsStyleSet::eAgentSheet, sheet); } + if (nsLayoutUtils::ShouldUseNoScriptSheet(aDocument)) { + sheet = nsLayoutStylesheetCache::NoScriptSheet(); + if (sheet) { + styleSet->PrependStyleSheet(nsStyleSet::eAgentSheet, sheet); + } + } + + if (nsLayoutUtils::ShouldUseNoFramesSheet(aDocument)) { + sheet = nsLayoutStylesheetCache::NoFramesSheet(); + if (sheet) { + styleSet->PrependStyleSheet(nsStyleSet::eAgentSheet, sheet); + } + } + sheet = nsLayoutStylesheetCache::HTMLSheet(); if (sheet) { styleSet->PrependStyleSheet(nsStyleSet::eAgentSheet, sheet); diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 0d9859cc8a..c41a9b8887 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -99,6 +99,7 @@ #include "mozilla/Telemetry.h" #include "mozilla/EventDispatcher.h" #include "mozilla/EventStateManager.h" +#include "mozilla/RuleNodeCacheConditions.h" #ifdef MOZ_XUL #include "nsXULPopupManager.h" @@ -140,6 +141,7 @@ typedef nsStyleTransformMatrix::TransformReferenceBox TransformReferenceBox; /* static */ bool nsLayoutUtils::sInvalidationDebuggingIsEnabled; /* static */ bool nsLayoutUtils::sCSSVariablesEnabled; /* static */ bool nsLayoutUtils::sInterruptibleReflowEnabled; +/* static */ bool nsLayoutUtils::sSVGTransformOriginEnabled; static ViewID sScrollIdCounter = FrameMetrics::START_SCROLL_ID; @@ -463,7 +465,7 @@ GetScaleForValue(const StyleAnimationValue& aValue, nsIFrame* aFrame) return gfxSize(); } - bool dontCare; + RuleNodeCacheConditions dontCare; TransformReferenceBox refBox(aFrame); gfx3DMatrix transform = nsStyleTransformMatrix::ReadTransforms( list->mHead, @@ -4349,45 +4351,186 @@ FormControlShrinksForPercentISize(nsIFrame* aFrame) return true; } +/** + * Add aOffsets which describes what to add on outside of the content box + * aContentSize (controlled by 'box-sizing') and apply min/max properties. + * We have to account for these properties after getting all the offsets + * (margin, border, padding) because percentages do not operate linearly. + * Doing this is ok because although percentages aren't handled linearly, + * they are handled monotonically. + * + * @param aContentSize the content size calculated so far + (@see IntrinsicForContainer) + * @param aContentMinSize ditto min content size + * @param aStyleSize a 'width' or 'height' property value + * @param aFixedMinSize if aStyleMinSize is a definite size then this points to + * the value, otherwise nullptr + * @param aStyleMinSize a 'min-width' or 'min-height' property value + * @param aFixedMaxSize if aStyleMaxSize is a definite size then this points to + * the value, otherwise nullptr + * @param aStyleMaxSize a 'max-width' or 'max-height' property value + * @param aFlags same as for IntrinsicForContainer + * @param aContainerWM the container's WM + */ +static nscoord +AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext, + nsIFrame* aFrame, + const nsIFrame::IntrinsicISizeOffsetData& aOffsets, + nsLayoutUtils::IntrinsicISizeType aType, + uint8_t aBoxSizing, + nscoord aContentSize, + nscoord aContentMinSize, + const nsStyleCoord& aStyleSize, + const nscoord* aFixedMinSize, + const nsStyleCoord& aStyleMinSize, + const nscoord* aFixedMaxSize, + const nsStyleCoord& aStyleMaxSize, + uint32_t aFlags, + PhysicalAxis aAxis) +{ + nscoord result = aContentSize; + nscoord min = aContentMinSize; + nscoord coordOutsideSize = 0; + float pctOutsideSize = 0; + float pctTotal = 0.0f; + + if (!(aFlags & nsLayoutUtils::IGNORE_PADDING)) { + coordOutsideSize += aOffsets.hPadding; + pctOutsideSize += aOffsets.hPctPadding; + + if (aBoxSizing == NS_STYLE_BOX_SIZING_PADDING) { + min += coordOutsideSize; + result = NSCoordSaturatingAdd(result, coordOutsideSize); + pctTotal += pctOutsideSize; + + coordOutsideSize = 0; + pctOutsideSize = 0.0f; + } + } + + coordOutsideSize += aOffsets.hBorder; + + if (aBoxSizing == NS_STYLE_BOX_SIZING_BORDER) { + min += coordOutsideSize; + result = NSCoordSaturatingAdd(result, coordOutsideSize); + pctTotal += pctOutsideSize; + + coordOutsideSize = 0; + pctOutsideSize = 0.0f; + } + + coordOutsideSize += aOffsets.hMargin; + pctOutsideSize += aOffsets.hPctMargin; + + min += coordOutsideSize; + result = NSCoordSaturatingAdd(result, coordOutsideSize); + pctTotal += pctOutsideSize; + + nscoord size; + if (GetAbsoluteCoord(aStyleSize, size) || + GetIntrinsicCoord(aStyleSize, aRenderingContext, aFrame, + PROP_WIDTH, size)) { + result = AddPercents(aType, size + coordOutsideSize, pctOutsideSize); + } else if (aType == nsLayoutUtils::MIN_ISIZE && + // The only cases of coord-percent-calc() units that + // GetAbsoluteCoord didn't handle are percent and calc()s + // containing percent. + aStyleSize.IsCoordPercentCalcUnit() && + aFrame->IsFrameOfType(nsIFrame::eReplaced)) { + // A percentage width on replaced elements means they can shrink to 0. + result = 0; // let |min| handle padding/border/margin + } else { + // NOTE: We could really do a lot better for percents and for some + // cases of calc() containing percent (certainly including any where + // the coefficient on the percent is positive and there are no max() + // expressions). However, doing better for percents wouldn't be + // backwards compatible. + result = AddPercents(aType, result, pctTotal); + } + + nscoord maxSize = aFixedMaxSize ? *aFixedMaxSize : 0; + if (aFixedMaxSize || + GetIntrinsicCoord(aStyleMaxSize, aRenderingContext, aFrame, + PROP_MAX_WIDTH, maxSize)) { + maxSize = AddPercents(aType, maxSize + coordOutsideSize, pctOutsideSize); + if (result > maxSize) { + result = maxSize; + } + } + + nscoord minSize = aFixedMinSize ? *aFixedMinSize : 0; + if (aFixedMinSize || + GetIntrinsicCoord(aStyleMinSize, aRenderingContext, aFrame, + PROP_MIN_WIDTH, minSize)) { + minSize = AddPercents(aType, minSize + coordOutsideSize, pctOutsideSize); + if (result < minSize) { + result = minSize; + } + } + + min = AddPercents(aType, min, pctTotal); + if (result < min) { + result = min; + } + + const nsStyleDisplay* disp = aFrame->StyleDisplay(); + if (aFrame->IsThemed(disp)) { + LayoutDeviceIntSize devSize; + bool canOverride = true; + nsPresContext* pc = aFrame->PresContext(); + pc->GetTheme()->GetMinimumWidgetSize(pc, aFrame, disp->mAppearance, + &devSize, &canOverride); + nscoord themeSize = + pc->DevPixelsToAppUnits(aAxis == eAxisVertical ? devSize.height + : devSize.width); + // GetMinimumWidgetSize() returns a border-box width. + themeSize += aOffsets.hMargin; + themeSize = AddPercents(aType, themeSize, aOffsets.hPctMargin); + + if (themeSize > result || !canOverride) { + result = themeSize; + } + } + return result; +} + /* static */ nscoord -nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext, - nsIFrame *aFrame, - IntrinsicISizeType aType, - uint32_t aFlags) +nsLayoutUtils::IntrinsicForAxis(PhysicalAxis aAxis, + nsRenderingContext* aRenderingContext, + nsIFrame* aFrame, + IntrinsicISizeType aType, + uint32_t aFlags) { NS_PRECONDITION(aFrame, "null frame"); NS_PRECONDITION(aFrame->GetParent(), - "IntrinsicForContainer called on frame not in tree"); + "IntrinsicForAxis called on frame not in tree"); NS_PRECONDITION(aType == MIN_ISIZE || aType == PREF_ISIZE, "bad type"); + const bool horizontalAxis = MOZ_LIKELY(aAxis == eAxisHorizontal); #ifdef DEBUG_INTRINSIC_WIDTH nsFrame::IndentBy(stderr, gNoiseIndent); static_cast(aFrame)->ListTag(stderr); - printf_stderr(" %s intrinsic inline-size for container:\n", - aType == MIN_ISIZE ? "min" : "pref"); + printf_stderr(" %s %s intrinsic size for container:\n", + aType == MIN_ISIZE ? "min" : "pref", + horizontalAxis ? "horizontal" : "vertical"); #endif // If aFrame is a container for font size inflation, then shrink // wrapping inside of it should not apply font size inflation. AutoMaybeDisableFontInflation an(aFrame); - nsIFrame::IntrinsicISizeOffsetData offsets = - aFrame->IntrinsicISizeOffsets(aRenderingContext); - // We want the size this frame will contribute to the parent's inline-size, // so we work in the parent's writing mode; but if aFrame is orthogonal to // its parent, we'll need to look at its BSize instead of min/pref-ISize. - WritingMode wm = aFrame->GetParent()->GetWritingMode(); - WritingMode ourWM = aFrame->GetWritingMode(); - bool isOrthogonal = ourWM.IsOrthogonalTo(wm); - bool isVertical = wm.IsVertical(); - - const nsStylePosition *stylePos = aFrame->StylePosition(); + const nsStylePosition* stylePos = aFrame->StylePosition(); uint8_t boxSizing = stylePos->mBoxSizing; - const nsStyleCoord& styleISize = stylePos->ISize(wm); - const nsStyleCoord& styleMinISize = stylePos->MinISize(wm); - const nsStyleCoord& styleMaxISize = stylePos->MaxISize(wm); + const nsStyleCoord& styleISize = + horizontalAxis ? stylePos->mWidth : stylePos->mHeight; + const nsStyleCoord& styleMinISize = + horizontalAxis ? stylePos->mMinWidth : stylePos->mMinHeight; + const nsStyleCoord& styleMaxISize = + horizontalAxis ? stylePos->mMaxWidth : stylePos->mMaxHeight; // We build up two values starting with the content box, and then // adding padding, border and margin. The result is normally @@ -4418,6 +4561,8 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext, haveFixedMinISize = GetAbsoluteCoord(styleMinISize, minISize); } + PhysicalAxis ourInlineAxis = + aFrame->GetWritingMode().PhysicalAxis(eLogicalAxisInline); // If we have a specified width (or a specified 'min-width' greater // than the specified 'max-width', which works out to the same thing), // don't even bother getting the frame's intrinsic width, because in @@ -4436,9 +4581,8 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext, #ifdef DEBUG_INTRINSIC_WIDTH ++gNoiseIndent; #endif - if (isOrthogonal) { - // We need aFrame's block-dir size, which will become its inline-size - // contribution in the container. + if (MOZ_UNLIKELY(aAxis != ourInlineAxis)) { + // We need aFrame's block-dir size. // XXX Unfortunately, we probably don't know this yet, so this is wrong... // but it's not clear what we should do. If aFrame's inline size hasn't // been determined yet, we can't necessarily figure out its block size @@ -4456,8 +4600,10 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext, --gNoiseIndent; nsFrame::IndentBy(stderr, gNoiseIndent); static_cast(aFrame)->ListTag(stderr); - printf_stderr(" %s intrinsic inline-size from frame is %d.\n", - aType == MIN_ISIZE ? "min" : "pref", result); + printf_stderr(" %s %s intrinsic size from frame is %d.\n", + aType == MIN_ISIZE ? "min" : "pref", + horizontalAxis ? "horizontal" : "vertical", + result); #endif // Handle elements with an intrinsic ratio (or size) and a specified @@ -4466,9 +4612,12 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext, // since that's what it means in all cases except for on flex items -- and // even there, we're supposed to ignore it (i.e. treat it as 0) until the // flex container explicitly considers it. - const nsStyleCoord& styleBSize = stylePos->BSize(wm); - const nsStyleCoord& styleMinBSize = stylePos->MinBSize(wm); - const nsStyleCoord& styleMaxBSize = stylePos->MaxBSize(wm); + const nsStyleCoord& styleBSize = + horizontalAxis ? stylePos->mHeight : stylePos->mWidth; + const nsStyleCoord& styleMinBSize = + horizontalAxis ? stylePos->mMinHeight : stylePos->mMinWidth; + const nsStyleCoord& styleMaxBSize = + horizontalAxis ? stylePos->mMaxHeight : stylePos->mMaxWidth; if (styleBSize.GetUnit() != eStyleUnit_Auto || !(styleMinBSize.GetUnit() == eStyleUnit_Auto || @@ -4476,24 +4625,27 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext, styleMinBSize.GetCoordValue() == 0)) || styleMaxBSize.GetUnit() != eStyleUnit_None) { - LogicalSize ratio(wm, aFrame->GetIntrinsicRatio()); - - if (ratio.BSize(wm) != 0) { + nsSize ratio(aFrame->GetIntrinsicRatio()); + nscoord ratioISize = (horizontalAxis ? ratio.width : ratio.height); + nscoord ratioBSize = (horizontalAxis ? ratio.height : ratio.width); + if (ratioBSize != 0) { nscoord bSizeTakenByBoxSizing = 0; switch (boxSizing) { case NS_STYLE_BOX_SIZING_BORDER: { const nsStyleBorder* styleBorder = aFrame->StyleBorder(); bSizeTakenByBoxSizing += - wm.IsVertical() ? styleBorder->GetComputedBorder().LeftRight() - : styleBorder->GetComputedBorder().TopBottom(); + horizontalAxis ? styleBorder->GetComputedBorder().TopBottom() + : styleBorder->GetComputedBorder().LeftRight(); // fall through } case NS_STYLE_BOX_SIZING_PADDING: { if (!(aFlags & IGNORE_PADDING)) { const nsStyleSides& stylePadding = aFrame->StylePadding()->mPadding; - const nsStyleCoord& paddingStart = stylePadding.GetBStart(wm); - const nsStyleCoord& paddingEnd = stylePadding.GetBEnd(wm); + const nsStyleCoord& paddingStart = + stylePadding.Get(horizontalAxis ? NS_SIDE_TOP : NS_SIDE_LEFT); + const nsStyleCoord& paddingEnd = + stylePadding.Get(horizontalAxis ? NS_SIDE_BOTTOM : NS_SIDE_RIGHT); nscoord pad; if (GetAbsoluteCoord(paddingStart, pad) || GetPercentBSize(paddingStart, aFrame, pad)) { @@ -4515,13 +4667,13 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext, if (GetAbsoluteCoord(styleBSize, h) || GetPercentBSize(styleBSize, aFrame, h)) { h = std::max(0, h - bSizeTakenByBoxSizing); - result = NSCoordMulDiv(h, ratio.ISize(wm), ratio.BSize(wm)); + result = NSCoordMulDiv(h, ratioISize, ratioBSize); } if (GetAbsoluteCoord(styleMaxBSize, h) || GetPercentBSize(styleMaxBSize, aFrame, h)) { h = std::max(0, h - bSizeTakenByBoxSizing); - nscoord maxISize = NSCoordMulDiv(h, ratio.ISize(wm), ratio.BSize(wm)); + nscoord maxISize = NSCoordMulDiv(h, ratioISize, ratioBSize); if (maxISize < result) result = maxISize; } @@ -4529,7 +4681,7 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext, if (GetAbsoluteCoord(styleMinBSize, h) || GetPercentBSize(styleMinBSize, aFrame, h)) { h = std::max(0, h - bSizeTakenByBoxSizing); - nscoord minISize = NSCoordMulDiv(h, ratio.ISize(wm), ratio.BSize(wm)); + nscoord minISize = NSCoordMulDiv(h, ratioISize, ratioBSize); if (minISize > result) result = minISize; } @@ -4543,126 +4695,42 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext, min = aFrame->GetMinISize(aRenderingContext); } - // We also need to track what has been added on outside of the box - // (controlled by 'box-sizing') where 'width', 'min-width' and - // 'max-width' are applied. We have to account for these properties - // after getting all the offsets (margin, border, padding) because - // percentages do not operate linearly. - // Doing this is ok because although percentages aren't handled - // linearly, they are handled monotonically. - nscoord coordOutsideISize = 0; - float pctOutsideISize = 0; - float pctTotal = 0.0f; - - if (!(aFlags & IGNORE_PADDING)) { - coordOutsideISize += offsets.hPadding; - pctOutsideISize += offsets.hPctPadding; - - if (boxSizing == NS_STYLE_BOX_SIZING_PADDING) { - min += coordOutsideISize; - result = NSCoordSaturatingAdd(result, coordOutsideISize); - pctTotal += pctOutsideISize; - - coordOutsideISize = 0; - pctOutsideISize = 0.0f; - } - } - - coordOutsideISize += offsets.hBorder; - - if (boxSizing == NS_STYLE_BOX_SIZING_BORDER) { - min += coordOutsideISize; - result = NSCoordSaturatingAdd(result, coordOutsideISize); - pctTotal += pctOutsideISize; - - coordOutsideISize = 0; - pctOutsideISize = 0.0f; - } - - coordOutsideISize += offsets.hMargin; - pctOutsideISize += offsets.hPctMargin; - - min += coordOutsideISize; - result = NSCoordSaturatingAdd(result, coordOutsideISize); - pctTotal += pctOutsideISize; - - nscoord w; - if (aType == MIN_ISIZE && - (((styleISize.HasPercent() || styleMaxISize.HasPercent()) && - aFrame->IsFrameOfType(nsIFrame::eReplacedSizing)) || - (styleISize.HasPercent() && - FormControlShrinksForPercentISize(aFrame)))) { - // A percentage width or max-width on replaced elements means they - // can shrink to 0. - // This is also true for percentage widths (but not max-widths) on - // text inputs. - // Note that if this is max-width, this overrides the fixed-width - // rule in the next condition. - result = 0; // let |min| handle padding/border/margin - } else if (GetAbsoluteCoord(styleISize, w) || - GetIntrinsicCoord(styleISize, aRenderingContext, aFrame, - PROP_WIDTH, w)) { - result = AddPercents(aType, w + coordOutsideISize, pctOutsideISize); - } else { - // NOTE: We could really do a lot better for percents and for some - // cases of calc() containing percent (certainly including any where - // the coefficient on the percent is positive and there are no max() - // expressions). However, doing better for percents wouldn't be - // backwards compatible. - result = AddPercents(aType, result, pctTotal); - } - - if (haveFixedMaxISize || - GetIntrinsicCoord(styleMaxISize, aRenderingContext, aFrame, - PROP_MAX_WIDTH, maxISize)) { - maxISize = AddPercents(aType, maxISize + coordOutsideISize, pctOutsideISize); - if (result > maxISize) - result = maxISize; - } - - if (haveFixedMinISize || - GetIntrinsicCoord(styleMinISize, aRenderingContext, aFrame, - PROP_MIN_WIDTH, minISize)) { - minISize = AddPercents(aType, minISize + coordOutsideISize, pctOutsideISize); - if (result < minISize) - result = minISize; - } - - min = AddPercents(aType, min, pctTotal); - if (result < min) - result = min; - - const nsStyleDisplay *disp = aFrame->StyleDisplay(); - if (aFrame->IsThemed(disp)) { - LayoutDeviceIntSize size; - bool canOverride = true; - nsPresContext *presContext = aFrame->PresContext(); - presContext->GetTheme()-> - GetMinimumWidgetSize(presContext, aFrame, disp->mAppearance, - &size, &canOverride); - - nscoord themeISize = - presContext->DevPixelsToAppUnits(isVertical ? size.height : size.width); - - // GMWS() returns a border-box width - themeISize += offsets.hMargin; - themeISize = AddPercents(aType, themeISize, offsets.hPctMargin); - - if (themeISize > result || !canOverride) { - result = themeISize; - } - } + nsIFrame::IntrinsicISizeOffsetData offsets = + MOZ_LIKELY(aAxis == ourInlineAxis) ? aFrame->IntrinsicISizeOffsets() + : aFrame->IntrinsicBSizeOffsets(); + result = AddIntrinsicSizeOffset(aRenderingContext, aFrame, offsets, aType, + boxSizing, result, min, styleISize, + haveFixedMinISize ? &minISize : nullptr, + styleMinISize, + haveFixedMaxISize ? &maxISize : nullptr, + styleMaxISize, + aFlags, aAxis); #ifdef DEBUG_INTRINSIC_WIDTH nsFrame::IndentBy(stderr, gNoiseIndent); static_cast(aFrame)->ListTag(stderr); - printf_stderr(" %s intrinsic inline-size for container is %d twips.\n", - aType == MIN_ISIZE ? "min" : "pref", result); + printf_stderr(" %s %s intrinsic size for container is %d twips.\n", + aType == MIN_ISIZE ? "min" : "pref", + horizontalAxis ? "horizontal" : "vertical", + result); #endif return result; } +/* static */ nscoord +nsLayoutUtils::IntrinsicForContainer(nsRenderingContext* aRenderingContext, + nsIFrame* aFrame, + IntrinsicISizeType aType, + uint32_t aFlags) +{ + MOZ_ASSERT(aFrame && aFrame->GetParent()); + // We want the size aFrame will contribute to its parent's inline-size. + PhysicalAxis axis = + aFrame->GetParent()->GetWritingMode().PhysicalAxis(eLogicalAxisInline); + return IntrinsicForAxis(axis, aRenderingContext, aFrame, aType, aFlags); +} + /* static */ nscoord nsLayoutUtils::ComputeCBDependentValue(nscoord aPercentBasis, const nsStyleCoord& aCoord) @@ -7171,6 +7239,8 @@ nsLayoutUtils::Initialize() "layout.css.variables.enabled"); Preferences::AddBoolVarCache(&sInterruptibleReflowEnabled, "layout.interruptible-reflow.enabled"); + Preferences::AddBoolVarCache(&sSVGTransformOriginEnabled, + "svg.transform-origin.enabled"); Preferences::RegisterCallback(GridEnabledPrefChangeCallback, GRID_ENABLED_PREF_NAME); @@ -7591,11 +7661,26 @@ nsLayoutUtils::GetBoxShadowRectForFrame(nsIFrame* aFrame, if (!boxShadows) { return nsRect(); } + + bool nativeTheme; + const nsStyleDisplay* styleDisplay = aFrame->StyleDisplay(); + nsITheme::Transparency transparency; + if (aFrame->IsThemed(styleDisplay, &transparency)) { + // For opaque (rectangular) theme widgets we can take the generic + // border-box path with border-radius disabled. + nativeTheme = transparency != nsITheme::eOpaque; + } else { + nativeTheme = false; + } + + nsRect frameRect = nativeTheme ? + aFrame->GetVisualOverflowRectRelativeToSelf() : + nsRect(nsPoint(0, 0), aFrameSize); nsRect shadows; int32_t A2D = aFrame->PresContext()->AppUnitsPerDevPixel(); for (uint32_t i = 0; i < boxShadows->Length(); ++i) { - nsRect tmpRect(nsPoint(0, 0), aFrameSize); + nsRect tmpRect = frameRect; nsCSSShadowItem* shadow = boxShadows->ShadowAt(i); // inset shadows are never painted outside the frame @@ -8524,3 +8609,25 @@ nsLayoutUtils::TransformToAncestorAndCombineRegions( nsRegion* dest = isPrecise ? aPreciseTargetDest : aImpreciseTargetDest; dest->OrWith(transformed); } + +/* static */ bool +nsLayoutUtils::ShouldUseNoScriptSheet(nsIDocument* aDocument) +{ + // also handle the case where print is done from print preview + // see bug #342439 for more details + if (aDocument->IsStaticDocument()) { + aDocument = aDocument->GetOriginalDocument(); + } + return aDocument->IsScriptEnabled(); +} + +/* static */ bool +nsLayoutUtils::ShouldUseNoFramesSheet(nsIDocument* aDocument) +{ + bool allowSubframes = true; + nsIDocShell* docShell = aDocument->GetDocShell(); + if (docShell) { + docShell->GetAllowSubframes(&allowSubframes); + } + return !allowSubframes; +} diff --git a/layout/base/nsLayoutUtils.h b/layout/base/nsLayoutUtils.h index dc9bedfb39..68544072c4 100644 --- a/layout/base/nsLayoutUtils.h +++ b/layout/base/nsLayoutUtils.h @@ -1289,18 +1289,27 @@ public: /** * Get the contribution of aFrame to its containing block's intrinsic - * width. This considers the child's intrinsic width, its 'width', - * 'min-width', and 'max-width' properties, and its padding, border, - * and margin. + * size for the given physical axis. This considers the child's intrinsic + * width, its 'width', 'min-width', and 'max-width' properties (or 'height' + * variations if that's what matches aAxis) and its padding, border and margin + * in the corresponding dimension. */ enum IntrinsicISizeType { MIN_ISIZE, PREF_ISIZE }; enum { IGNORE_PADDING = 0x01 }; + static nscoord IntrinsicForAxis(mozilla::PhysicalAxis aAxis, + nsRenderingContext* aRenderingContext, + nsIFrame* aFrame, + IntrinsicISizeType aType, + uint32_t aFlags = 0); + /** + * Calls IntrinsicForAxis with aFrame's parent's inline physical axis. + */ static nscoord IntrinsicForContainer(nsRenderingContext* aRenderingContext, - nsIFrame* aFrame, - IntrinsicISizeType aType, - uint32_t aFlags = 0); + nsIFrame* aFrame, + IntrinsicISizeType aType, + uint32_t aFlags = 0); /* * Convert nsStyleCoord to nscoord when percentages depend on the @@ -2317,6 +2326,10 @@ public: return sFontSizeInflationDisabledInMasterProcess; } + static bool SVGTransformOriginEnabled() { + return sSVGTransformOriginEnabled; + } + /** * See comment above "font.size.inflation.mappingIntercept" in * modules/libpref/src/init/all.js . @@ -2670,6 +2683,9 @@ public: */ static bool ContainsMetricsWithId(const Layer* aLayer, const ViewID& aScrollId); + static bool ShouldUseNoScriptSheet(nsIDocument* aDocument); + static bool ShouldUseNoFramesSheet(nsIDocument* aDocument); + private: static uint32_t sFontSizeInflationEmPerLine; static uint32_t sFontSizeInflationMinTwips; @@ -2681,6 +2697,7 @@ private: static bool sInvalidationDebuggingIsEnabled; static bool sCSSVariablesEnabled; static bool sInterruptibleReflowEnabled; + static bool sSVGTransformOriginEnabled; /** * Helper function for LogTestDataForPaint(). diff --git a/layout/base/nsPresArena.h b/layout/base/nsPresArena.h index eb1aaa004c..807c19074a 100644 --- a/layout/base/nsPresArena.h +++ b/layout/base/nsPresArena.h @@ -32,6 +32,8 @@ public: nsStyleContext_id, nsInheritedStyleData_id, nsResetStyleData_id, + nsConditionalResetStyleData_id, + nsConditionalResetStyleDataEntry_id, nsFrameList_id, CustomCounterStyle_id, diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index f86e43c764..3171167579 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -1375,12 +1375,6 @@ PresShell::SetPreferenceStyleRules(bool aForceReflow) if (NS_SUCCEEDED(result)) { result = SetPrefFocusRules(); } - if (NS_SUCCEEDED(result)) { - result = SetPrefNoScriptRule(); - } - if (NS_SUCCEEDED(result)) { - result = SetPrefNoFramesRule(); - } #ifdef DEBUG_attinasi printf( "Preference Style Rules set: error=%ld\n", (long)result); #endif @@ -1459,68 +1453,6 @@ PresShell::CreatePreferenceStyleSheet() // and just "append"? static uint32_t sInsertPrefSheetRulesAt = 2; -nsresult -PresShell::SetPrefNoScriptRule() -{ - nsresult rv = NS_OK; - - // also handle the case where print is done from print preview - // see bug #342439 for more details - nsIDocument* doc = mDocument; - if (doc->IsStaticDocument()) { - doc = doc->GetOriginalDocument(); - } - - bool scriptEnabled = doc->IsScriptEnabled(); - if (scriptEnabled) { - if (!mPrefStyleSheet) { - rv = CreatePreferenceStyleSheet(); - NS_ENSURE_SUCCESS(rv, rv); - } - - uint32_t index = 0; - mPrefStyleSheet-> - InsertRuleInternal(NS_LITERAL_STRING("noscript{display:none!important}"), - sInsertPrefSheetRulesAt, &index); - } - - return rv; -} - -nsresult PresShell::SetPrefNoFramesRule(void) -{ - NS_ASSERTION(mPresContext,"null prescontext not allowed"); - if (!mPresContext) { - return NS_ERROR_FAILURE; - } - - nsresult rv = NS_OK; - - if (!mPrefStyleSheet) { - rv = CreatePreferenceStyleSheet(); - NS_ENSURE_SUCCESS(rv, rv); - } - - NS_ASSERTION(mPrefStyleSheet, "prefstylesheet should not be null"); - - bool allowSubframes = true; - nsCOMPtr docShell(mPresContext->GetDocShell()); - if (docShell) { - docShell->GetAllowSubframes(&allowSubframes); - } - if (!allowSubframes) { - uint32_t index = 0; - rv = mPrefStyleSheet-> - InsertRuleInternal(NS_LITERAL_STRING("noframes{display:block}"), - sInsertPrefSheetRulesAt, &index); - NS_ENSURE_SUCCESS(rv, rv); - rv = mPrefStyleSheet-> - InsertRuleInternal(NS_LITERAL_STRING("frame, frameset, iframe {display:none!important}"), - sInsertPrefSheetRulesAt, &index); - } - return rv; -} - nsresult PresShell::SetPrefLinkRules(void) { NS_ASSERTION(mPresContext,"null prescontext not allowed"); diff --git a/layout/base/nsPresShell.h b/layout/base/nsPresShell.h index b90917bbc7..5202fa04d3 100644 --- a/layout/base/nsPresShell.h +++ b/layout/base/nsPresShell.h @@ -522,8 +522,6 @@ protected: nsresult CreatePreferenceStyleSheet(void); nsresult SetPrefLinkRules(void); nsresult SetPrefFocusRules(void); - nsresult SetPrefNoScriptRule(); - nsresult SetPrefNoFramesRule(void); // methods for painting a range to an offscreen buffer diff --git a/layout/generic/WritingModes.h b/layout/generic/WritingModes.h index 8e09bece9b..d2d6dd2d53 100644 --- a/layout/generic/WritingModes.h +++ b/layout/generic/WritingModes.h @@ -352,6 +352,62 @@ public: return PhysicalSideForInlineAxis(GetEdge(aSide)); } + /** + * Returns the logical side corresponding to the specified physical side, + * given the current writing mode. + * (This is the inverse of the PhysicalSide() method above.) + */ + LogicalSide LogicalSideForPhysicalSide(mozilla::css::Side aSide) const + { + // indexes are four-bit values: + // bit 0 = the eOrientationMask value + // bit 1 = the eInlineFlowMask value + // bit 2 = the eBlockFlowMask value + // bit 3 = the eLineOrientMask value + static const LogicalSide kPhysicalToLogicalSides[][4] = { + // top right + // bottom left + { eLogicalSideBStart, eLogicalSideIEnd, + eLogicalSideBEnd, eLogicalSideIStart }, // horizontal-tb ltr + { eLogicalSideIStart, eLogicalSideBStart, + eLogicalSideIEnd, eLogicalSideBEnd }, // vertical-rl ltr + { eLogicalSideBStart, eLogicalSideIStart, + eLogicalSideBEnd, eLogicalSideIEnd }, // horizontal-tb rtl + { eLogicalSideIEnd, eLogicalSideBStart, + eLogicalSideIStart, eLogicalSideBEnd }, // vertical-rl rtl + { eLogicalSideBEnd, eLogicalSideIStart, + eLogicalSideBStart, eLogicalSideIEnd }, // (horizontal-bt) (inv) ltr + { eLogicalSideIStart, eLogicalSideBEnd, + eLogicalSideIEnd, eLogicalSideBStart }, // vertical-lr sw-left rtl + { eLogicalSideBEnd, eLogicalSideIEnd, + eLogicalSideBStart, eLogicalSideIStart }, // (horizontal-bt) (inv) rtl + { eLogicalSideIEnd, eLogicalSideBEnd, + eLogicalSideIStart, eLogicalSideBStart }, // vertical-lr sw-left ltr + { eLogicalSideBStart, eLogicalSideIEnd, + eLogicalSideBEnd, eLogicalSideIStart }, // horizontal-tb (inv) rtl + { eLogicalSideIStart, eLogicalSideBStart, + eLogicalSideIEnd, eLogicalSideBEnd }, // vertical-rl sw-left rtl + { eLogicalSideBStart, eLogicalSideIStart, + eLogicalSideBEnd, eLogicalSideIEnd }, // horizontal-tb (inv) ltr + { eLogicalSideIEnd, eLogicalSideBStart, + eLogicalSideIStart, eLogicalSideBEnd }, // vertical-rl sw-left ltr + { eLogicalSideBEnd, eLogicalSideIEnd, + eLogicalSideBStart, eLogicalSideIStart }, // (horizontal-bt) ltr + { eLogicalSideIStart, eLogicalSideBEnd, + eLogicalSideIEnd, eLogicalSideBStart }, // vertical-lr ltr + { eLogicalSideBEnd, eLogicalSideIStart, + eLogicalSideBStart, eLogicalSideIEnd }, // (horizontal-bt) rtl + { eLogicalSideIEnd, eLogicalSideBEnd, + eLogicalSideIStart, eLogicalSideBStart }, // vertical-lr rtl + }; + + static_assert(eOrientationMask == 0x01 && eInlineFlowMask == 0x02 && + eBlockFlowMask == 0x04 && eLineOrientMask == 0x08, + "unexpected mask values"); + int index = mWritingMode & 0x0F; + return kPhysicalToLogicalSides[index][aSide]; + } + /** * Returns the logical side corresponding to the specified * line-relative direction, given the current writing mode. @@ -1944,4 +2000,41 @@ nsStylePosition::MaxBSizeDependsOnContainer(mozilla::WritingMode aWM) const : MaxHeightDependsOnContainer(); } +inline uint8_t +nsStyleTableBorder::LogicalCaptionSide(mozilla::WritingMode aWM) const +{ + // sanity-check that constants we're using have the expected relationships + static_assert(NS_STYLE_CAPTION_SIDE_BSTART == mozilla::eLogicalSideBStart && + NS_STYLE_CAPTION_SIDE_BEND == mozilla::eLogicalSideBEnd && + NS_STYLE_CAPTION_SIDE_ISTART == mozilla::eLogicalSideIStart && + NS_STYLE_CAPTION_SIDE_IEND == mozilla::eLogicalSideIEnd, + "bad logical caption-side values"); + static_assert((NS_STYLE_CAPTION_SIDE_TOP - NS_SIDE_TOP == + NS_STYLE_CAPTION_SIDE_BOTTOM - NS_SIDE_BOTTOM) && + (NS_STYLE_CAPTION_SIDE_LEFT - NS_SIDE_LEFT == + NS_STYLE_CAPTION_SIDE_RIGHT - NS_SIDE_RIGHT) && + (NS_STYLE_CAPTION_SIDE_LEFT - NS_SIDE_LEFT == + NS_STYLE_CAPTION_SIDE_TOP - NS_SIDE_TOP), + "mismatch between caption-side and side values"); + switch (mCaptionSide) { + case NS_STYLE_CAPTION_SIDE_TOP: + case NS_STYLE_CAPTION_SIDE_RIGHT: + case NS_STYLE_CAPTION_SIDE_BOTTOM: + case NS_STYLE_CAPTION_SIDE_LEFT: { + uint8_t side = mCaptionSide - (NS_STYLE_CAPTION_SIDE_TOP - NS_SIDE_TOP); + return aWM.LogicalSideForPhysicalSide(mozilla::css::Side(side)); + } + + case NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE: + return aWM.IsVertical() ? aWM.LogicalSideForPhysicalSide(NS_SIDE_TOP) + : NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE; + + case NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE: + return aWM.IsVertical() ? aWM.LogicalSideForPhysicalSide(NS_SIDE_BOTTOM) + : NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE; + } + MOZ_ASSERT(mCaptionSide <= NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE); + return mCaptionSide; +} + #endif // WritingModes_h_ diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 766add6d46..324700e7f7 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -7366,7 +7366,7 @@ nsBlockFrame::ISizeToClearPastFloats(const nsBlockReflowState& aState, nscoord inlineStartOffset, inlineEndOffset; WritingMode wm = aState.mReflowState.GetWritingMode(); nsCSSOffsetState offsetState(aFrame, aState.mReflowState.rendContext, - aState.mContentArea.Width(wm)); + wm, aState.mContentArea.ISize(wm)); ReplacedElementISizeToClear result; aState.ComputeReplacedBlockOffsetsForFloats(aFrame, aFloatAvailableSpace, diff --git a/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp index 3fea5f5ecd..35073b2031 100644 --- a/layout/generic/nsBlockReflowState.cpp +++ b/layout/generic/nsBlockReflowState.cpp @@ -182,7 +182,7 @@ nsBlockReflowState::ComputeReplacedBlockOffsetsForFloats( } else { LogicalMargin frameMargin(wm); nsCSSOffsetState os(aFrame, mReflowState.rendContext, - mContentArea.ISize(wm)); + wm, mContentArea.ISize(wm)); frameMargin = os.ComputedLogicalMargin().ConvertTo(wm, aFrame->GetWritingMode()); @@ -209,7 +209,8 @@ GetBEndMarginClone(nsIFrame* aFrame, { if (aFrame->StyleBorder()->mBoxDecorationBreak == NS_STYLE_BOX_DECORATION_BREAK_CLONE) { - nsCSSOffsetState os(aFrame, aRenderingContext, aContentArea.ISize(aWritingMode)); + nsCSSOffsetState os(aFrame, aRenderingContext, aWritingMode, + aContentArea.ISize(aWritingMode)); return os.ComputedLogicalMargin(). ConvertTo(aWritingMode, aFrame->GetWritingMode()).BEnd(aWritingMode); @@ -735,7 +736,7 @@ nsBlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat) "Float frame has wrong parent"); nsCSSOffsetState offsets(aFloat, mReflowState.rendContext, - mReflowState.ComputedISize()); + wm, mReflowState.ComputedISize()); nscoord floatMarginISize = FloatMarginISize(mReflowState, adjustedAvailableSpace.ISize(wm), diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index d2be920e56..0775900d60 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -907,24 +907,46 @@ nsContainerFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext, // wrapping inside of us should not apply font size inflation. AutoMaybeDisableFontInflation an(this); - // XXX todo: make this aware of vertical writing modes - uint8_t captionSide = StyleTableBorder()->mCaptionSide; - if (captionSide == NS_STYLE_CAPTION_SIDE_LEFT || - captionSide == NS_STYLE_CAPTION_SIDE_RIGHT) { - result.ISize(aWM) = GetMinISize(aRenderingContext); - } else if (captionSide == NS_STYLE_CAPTION_SIDE_TOP || - captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM) { - // The outer frame constrains our available width to the width of - // the table. Grow if our min-width is bigger than that, but not - // larger than the containing block width. (It would really be nice - // to transmit that information another way, so we could grow up to - // the table's available width, but that's harder.) - nscoord min = GetMinISize(aRenderingContext); - if (min > aCBSize.ISize(aWM)) { - min = aCBSize.ISize(aWM); + WritingMode tableWM = GetParent()->GetWritingMode(); + uint8_t captionSide = StyleTableBorder()->LogicalCaptionSide(tableWM); + + if (aWM.IsOrthogonalTo(tableWM)) { + if (captionSide == NS_STYLE_CAPTION_SIDE_BSTART || + captionSide == NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE || + captionSide == NS_STYLE_CAPTION_SIDE_BEND || + captionSide == NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE) { + // For an orthogonal caption on a block-dir side of the table, + // shrink-wrap to min-isize. + result.ISize(aWM) = GetMinISize(aRenderingContext); + } else { + // An orthogonal caption on an inline-dir side of the table + // is constrained to the containing block. + nscoord pref = GetPrefISize(aRenderingContext); + if (pref > aCBSize.ISize(aWM)) { + pref = aCBSize.ISize(aWM); + } + if (pref < result.ISize(aWM)) { + result.ISize(aWM) = pref; + } } - if (min > result.ISize(aWM)) { - result.ISize(aWM) = min; + } else { + if (captionSide == NS_STYLE_CAPTION_SIDE_ISTART || + captionSide == NS_STYLE_CAPTION_SIDE_IEND) { + result.ISize(aWM) = GetMinISize(aRenderingContext); + } else if (captionSide == NS_STYLE_CAPTION_SIDE_BSTART || + captionSide == NS_STYLE_CAPTION_SIDE_BEND) { + // The outer frame constrains our available isize to the isize of + // the table. Grow if our min-isize is bigger than that, but not + // larger than the containing block isize. (It would really be nice + // to transmit that information another way, so we could grow up to + // the table's available isize, but that's harder.) + nscoord min = GetMinISize(aRenderingContext); + if (min > aCBSize.ISize(aWM)) { + min = aCBSize.ISize(aWM); + } + if (min > result.ISize(aWM)) { + result.ISize(aWM) = min; + } } } } diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 3547f91861..fde2d644c2 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -4087,7 +4087,6 @@ nsIFrame::InlinePrefISizeData::ForceBreak(nsRenderingContext *aRenderingContext) static void AddCoord(const nsStyleCoord& aStyle, - nsRenderingContext* aRenderingContext, nsIFrame* aFrame, nscoord* aCoord, float* aPercent, bool aClampNegativeToZero) @@ -4123,65 +4122,84 @@ AddCoord(const nsStyleCoord& aStyle, } } -/* virtual */ nsIFrame::IntrinsicISizeOffsetData -nsFrame::IntrinsicISizeOffsets(nsRenderingContext* aRenderingContext) +static nsIFrame::IntrinsicISizeOffsetData +IntrinsicSizeOffsets(nsIFrame* aFrame, bool aForISize) { - IntrinsicISizeOffsetData result; - - WritingMode wm = GetWritingMode(); - - const nsStyleMargin *styleMargin = StyleMargin(); - AddCoord(wm.IsVertical() ? styleMargin->mMargin.GetTop() - : styleMargin->mMargin.GetLeft(), - aRenderingContext, this, &result.hMargin, &result.hPctMargin, + nsIFrame::IntrinsicISizeOffsetData result; + WritingMode wm = aFrame->GetWritingMode(); + const nsStyleMargin* styleMargin = aFrame->StyleMargin(); + bool orthogonal = aForISize == wm.IsVertical(); + AddCoord(orthogonal ? styleMargin->mMargin.GetTop() + : styleMargin->mMargin.GetLeft(), + aFrame, &result.hMargin, &result.hPctMargin, false); - AddCoord(wm.IsVertical() ? styleMargin->mMargin.GetBottom() - : styleMargin->mMargin.GetRight(), - aRenderingContext, this, &result.hMargin, &result.hPctMargin, + AddCoord(orthogonal ? styleMargin->mMargin.GetBottom() + : styleMargin->mMargin.GetRight(), + aFrame, &result.hMargin, &result.hPctMargin, false); - const nsStylePadding *stylePadding = StylePadding(); - AddCoord(wm.IsVertical() ? stylePadding->mPadding.GetTop() - : stylePadding->mPadding.GetLeft(), - aRenderingContext, this, &result.hPadding, &result.hPctPadding, + const nsStylePadding* stylePadding = aFrame->StylePadding(); + AddCoord(orthogonal ? stylePadding->mPadding.GetTop() + : stylePadding->mPadding.GetLeft(), + aFrame, &result.hPadding, &result.hPctPadding, true); - AddCoord(wm.IsVertical() ? stylePadding->mPadding.GetBottom() - : stylePadding->mPadding.GetRight(), - aRenderingContext, this, &result.hPadding, &result.hPctPadding, + AddCoord(orthogonal ? stylePadding->mPadding.GetBottom() + : stylePadding->mPadding.GetRight(), + aFrame, &result.hPadding, &result.hPctPadding, true); - const nsStyleBorder *styleBorder = StyleBorder(); - result.hBorder += styleBorder->GetComputedBorderWidth( - wm.PhysicalSideForInlineAxis(eLogicalEdgeStart)); - result.hBorder += styleBorder->GetComputedBorderWidth( - wm.PhysicalSideForInlineAxis(eLogicalEdgeEnd)); + if (aForISize) { + const nsStyleBorder* styleBorder = aFrame->StyleBorder(); + result.hBorder += styleBorder->GetComputedBorderWidth( + wm.PhysicalSideForInlineAxis(eLogicalEdgeStart)); + result.hBorder += styleBorder->GetComputedBorderWidth( + wm.PhysicalSideForInlineAxis(eLogicalEdgeEnd)); + } else { + auto wm = aFrame->StyleVisibility()->mWritingMode; + const nsStyleBorder* styleBorder = aFrame->StyleBorder(); + result.hBorder += styleBorder->GetComputedBorderWidth( + WritingMode::PhysicalSideForBlockAxis(wm, eLogicalEdgeStart)); + result.hBorder += styleBorder->GetComputedBorderWidth( + WritingMode::PhysicalSideForBlockAxis(wm, eLogicalEdgeEnd)); + } - const nsStyleDisplay *disp = StyleDisplay(); - if (IsThemed(disp)) { - nsPresContext *presContext = PresContext(); + const nsStyleDisplay* disp = aFrame->StyleDisplay(); + if (aFrame->IsThemed(disp)) { + nsPresContext* presContext = aFrame->PresContext(); nsIntMargin border; presContext->GetTheme()->GetWidgetBorder(presContext->DeviceContext(), - this, disp->mAppearance, + aFrame, disp->mAppearance, &border); result.hBorder = - presContext->DevPixelsToAppUnits(wm.IsVertical() ? border.TopBottom() - : border.LeftRight()); + presContext->DevPixelsToAppUnits(orthogonal ? border.TopBottom() + : border.LeftRight()); nsIntMargin padding; if (presContext->GetTheme()->GetWidgetPadding(presContext->DeviceContext(), - this, disp->mAppearance, + aFrame, disp->mAppearance, &padding)) { result.hPadding = - presContext->DevPixelsToAppUnits(wm.IsVertical() ? padding.TopBottom() - : padding.LeftRight()); + presContext->DevPixelsToAppUnits(orthogonal ? padding.TopBottom() + : padding.LeftRight()); result.hPctPadding = 0; } } - return result; } +/* virtual */ nsIFrame::IntrinsicISizeOffsetData +nsFrame::IntrinsicISizeOffsets() +{ + return IntrinsicSizeOffsets(this, true); +} + +nsIFrame::IntrinsicISizeOffsetData +nsIFrame::IntrinsicBSizeOffsets() +{ + return IntrinsicSizeOffsets(this, false); +} + /* virtual */ IntrinsicSize nsFrame::GetIntrinsicSize() { @@ -7930,7 +7948,7 @@ nsFrame::DoGetParentStyleContext(nsIFrame** aProviderFrame) const // Ensure that we don't return the display:contents style // of the parent content for pseudos that have the same content // as their primary frame (like -moz-list-bullets do): - IsPrimaryFrame()) || + mContent->GetPrimaryFrame() == this) || /* if next is true then it's really a request for the table frame's parent context, see nsTable[Outer]Frame::GetParentStyleContext. */ pseudo == nsCSSAnonBoxes::tableOuter) { diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h index a7565b2351..53812c1248 100644 --- a/layout/generic/nsFrame.h +++ b/layout/generic/nsFrame.h @@ -250,8 +250,7 @@ public: InlineMinISizeData *aData) override; virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext, InlinePrefISizeData *aData) override; - virtual IntrinsicISizeOffsetData - IntrinsicISizeOffsets(nsRenderingContext* aRenderingContext) override; + virtual IntrinsicISizeOffsetData IntrinsicISizeOffsets() override; virtual mozilla::IntrinsicSize GetIntrinsicSize() override; virtual nsSize GetIntrinsicRatio() override; diff --git a/layout/generic/nsHTMLReflowState.cpp b/layout/generic/nsHTMLReflowState.cpp index 9bda2f30b3..30adc6d9d4 100644 --- a/layout/generic/nsHTMLReflowState.cpp +++ b/layout/generic/nsHTMLReflowState.cpp @@ -144,6 +144,7 @@ FontSizeInflationListMarginAdjustment(const nsIFrame* aFrame) // containing-block block-size, rather than its inline-size. nsCSSOffsetState::nsCSSOffsetState(nsIFrame *aFrame, nsRenderingContext *aRenderingContext, + WritingMode aContainingBlockWritingMode, nscoord aContainingBlockISize) : frame(aFrame) , rendContext(aRenderingContext) @@ -153,9 +154,9 @@ nsCSSOffsetState::nsCSSOffsetState(nsIFrame *aFrame, "We're about to resolve percent margin & padding " "values against CB inline size, which is incorrect for " "flex/grid items"); - LogicalSize cbSize(mWritingMode, aContainingBlockISize, + LogicalSize cbSize(aContainingBlockWritingMode, aContainingBlockISize, aContainingBlockISize); - InitOffsets(cbSize, frame->GetType()); + InitOffsets(aContainingBlockWritingMode, cbSize, frame->GetType()); } // Initialize a reflow state for a child frame's reflow. Some state @@ -1952,13 +1953,15 @@ static eNormalLineHeightControl GetNormalLineHeightCalcControl(void) } static inline bool -IsSideCaption(nsIFrame* aFrame, const nsStyleDisplay* aStyleDisplay) +IsSideCaption(nsIFrame* aFrame, const nsStyleDisplay* aStyleDisplay, + WritingMode aWM) { - if (aStyleDisplay->mDisplay != NS_STYLE_DISPLAY_TABLE_CAPTION) + if (aStyleDisplay->mDisplay != NS_STYLE_DISPLAY_TABLE_CAPTION) { return false; - uint8_t captionSide = aFrame->StyleTableBorder()->mCaptionSide; - return captionSide == NS_STYLE_CAPTION_SIDE_LEFT || - captionSide == NS_STYLE_CAPTION_SIDE_RIGHT; + } + uint8_t captionSide = aFrame->StyleTableBorder()->LogicalCaptionSide(aWM); + return captionSide == NS_STYLE_CAPTION_SIDE_ISTART || + captionSide == NS_STYLE_CAPTION_SIDE_IEND; } static nsFlexContainerFrame* @@ -2013,7 +2016,7 @@ nsHTMLReflowState::InitConstraints(nsPresContext* aPresContext, // height equal to the available space if (nullptr == parentReflowState || mFlags.mDummyParentReflowState) { // XXXldb This doesn't mean what it used to! - InitOffsets(OffsetPercentBasis(frame, wm, aContainingBlockSize), + InitOffsets(wm, OffsetPercentBasis(frame, wm, aContainingBlockSize), aFrameType, aBorder, aPadding); // Override mComputedMargin since reflow roots start from the // frame's boundary, which is inside the margin. @@ -2062,9 +2065,15 @@ nsHTMLReflowState::InitConstraints(nsPresContext* aPresContext, // XXX Might need to also pass the CB height (not width) for page boxes, // too, if we implement them. - InitOffsets(OffsetPercentBasis(frame, wm, cbSize), + + // For calculating positioning offsets, margins, borders and + // padding, we use the writing mode of the containing block + WritingMode cbwm = cbrs->GetWritingMode(); + InitOffsets(cbwm, OffsetPercentBasis(frame, cbwm, + cbSize.ConvertTo(cbwm, wm)), aFrameType, aBorder, aPadding); + // For calculating the size of this box, we use its own writing mode const nsStyleCoord &blockSize = mStylePosition->BSize(wm); nsStyleUnit blockSizeUnit = blockSize.GetUnit(); @@ -2116,14 +2125,16 @@ nsHTMLReflowState::InitConstraints(nsPresContext* aPresContext, } } - // Compute our offsets if the element is relatively positioned. We need - // the correct containing block width and blockSize here, which is why we need - // to do it after all the quirks-n-such above. (If the element is sticky - // positioned, we need to wait until the scroll container knows its size, - // so we compute offsets from StickyScrollContainer::UpdatePositions.) + // Compute our offsets if the element is relatively positioned. We + // need the correct containing block inline-size and block-size + // here, which is why we need to do it after all the quirks-n-such + // above. (If the element is sticky positioned, we need to wait + // until the scroll container knows its size, so we compute offsets + // from StickyScrollContainer::UpdatePositions.) if (mStyleDisplay->IsRelativelyPositioned(frame) && NS_STYLE_POSITION_RELATIVE == mStyleDisplay->mPosition) { - ComputeRelativeOffsets(wm, frame, cbSize, ComputedPhysicalOffsets()); + ComputeRelativeOffsets(cbwm, frame, cbSize.ConvertTo(cbwm, wm), + ComputedPhysicalOffsets()); } else { // Initialize offsets to 0 ComputedPhysicalOffsets().SizeTo(0, 0, 0, 0); @@ -2256,7 +2267,7 @@ nsHTMLReflowState::InitConstraints(nsPresContext* aPresContext, // Exclude inline tables and flex items from the block margin calculations if (isBlock && - !IsSideCaption(frame, mStyleDisplay) && + !IsSideCaption(frame, mStyleDisplay, cbwm) && mStyleDisplay->mDisplay != NS_STYLE_DISPLAY_INLINE_TABLE && !flexContainerFrame) { CalculateBlockSideMargins(aFrameType); @@ -2284,7 +2295,8 @@ UpdateProp(FrameProperties& aProps, } void -nsCSSOffsetState::InitOffsets(const LogicalSize& aPercentBasis, +nsCSSOffsetState::InitOffsets(WritingMode aWM, + const LogicalSize& aPercentBasis, nsIAtom* aFrameType, const nsMargin *aBorder, const nsMargin *aPadding) @@ -2301,7 +2313,7 @@ nsCSSOffsetState::InitOffsets(const LogicalSize& aPercentBasis, // become the default computed values, and may be adjusted below // XXX fix to provide 0,0 for the top&bottom margins for // inline-non-replaced elements - bool needMarginProp = ComputeMargin(aPercentBasis); + bool needMarginProp = ComputeMargin(aWM, aPercentBasis); // XXX We need to include 'auto' horizontal margins in this too! // ... but if we did that, we'd need to fix nsFrame::GetUsedMargin // to use it even when the margins are all zero (since sometimes @@ -2334,7 +2346,7 @@ nsCSSOffsetState::InitOffsets(const LogicalSize& aPercentBasis, (frame->GetStateBits() & NS_FRAME_REFLOW_ROOT); } else { - needPaddingProp = ComputePadding(aPercentBasis, aFrameType); + needPaddingProp = ComputePadding(aWM, aPercentBasis, aFrameType); } if (isThemed) { @@ -2628,7 +2640,8 @@ nsHTMLReflowState::CalcLineHeight(nsIContent* aContent, } bool -nsCSSOffsetState::ComputeMargin(const LogicalSize& aPercentBasis) +nsCSSOffsetState::ComputeMargin(WritingMode aWM, + const LogicalSize& aPercentBasis) { // SVG text frames have no margin. if (frame->IsSVGText()) { @@ -2640,26 +2653,29 @@ nsCSSOffsetState::ComputeMargin(const LogicalSize& aPercentBasis) bool isCBDependent = !styleMargin->GetMargin(ComputedPhysicalMargin()); if (isCBDependent) { - // We have to compute the value - WritingMode wm = GetWritingMode(); - LogicalMargin m(wm); - m.IStart(wm) = nsLayoutUtils:: - ComputeCBDependentValue(aPercentBasis.ISize(wm), - styleMargin->mMargin.GetIStart(wm)); - m.IEnd(wm) = nsLayoutUtils:: - ComputeCBDependentValue(aPercentBasis.ISize(wm), - styleMargin->mMargin.GetIEnd(wm)); + // We have to compute the value. Note that this calculation is + // performed according to the writing mode of the containing block + // (http://dev.w3.org/csswg/css-writing-modes-3/#orthogonal-flows) + LogicalMargin m(aWM); + m.IStart(aWM) = nsLayoutUtils:: + ComputeCBDependentValue(aPercentBasis.ISize(aWM), + styleMargin->mMargin.GetIStart(aWM)); + m.IEnd(aWM) = nsLayoutUtils:: + ComputeCBDependentValue(aPercentBasis.ISize(aWM), + styleMargin->mMargin.GetIEnd(aWM)); - m.BStart(wm) = nsLayoutUtils:: - ComputeCBDependentValue(aPercentBasis.BSize(wm), - styleMargin->mMargin.GetBStart(wm)); - m.BEnd(wm) = nsLayoutUtils:: - ComputeCBDependentValue(aPercentBasis.BSize(wm), - styleMargin->mMargin.GetBEnd(wm)); + m.BStart(aWM) = nsLayoutUtils:: + ComputeCBDependentValue(aPercentBasis.BSize(aWM), + styleMargin->mMargin.GetBStart(aWM)); + m.BEnd(aWM) = nsLayoutUtils:: + ComputeCBDependentValue(aPercentBasis.BSize(aWM), + styleMargin->mMargin.GetBEnd(aWM)); - SetComputedLogicalMargin(m); + SetComputedLogicalMargin(aWM, m); } + // ... but font-size-inflation-based margin adjustment uses the + // frame's writing mode nscoord marginAdjustment = FontSizeInflationListMarginAdjustment(frame); if (marginAdjustment > 0) { @@ -2672,7 +2688,8 @@ nsCSSOffsetState::ComputeMargin(const LogicalSize& aPercentBasis) } bool -nsCSSOffsetState::ComputePadding(const LogicalSize& aPercentBasis, +nsCSSOffsetState::ComputePadding(WritingMode aWM, + const LogicalSize& aPercentBasis, nsIAtom* aFrameType) { // If style can provide us the padding directly, then use it. @@ -2687,25 +2704,26 @@ nsCSSOffsetState::ComputePadding(const LogicalSize& aPercentBasis, ComputedPhysicalPadding().SizeTo(0,0,0,0); } else if (isCBDependent) { - // We have to compute the value + // We have to compute the value. This calculation is performed + // according to the writing mode of the containing block + // (http://dev.w3.org/csswg/css-writing-modes-3/#orthogonal-flows) // clamp negative calc() results to 0 - WritingMode wm = GetWritingMode(); - LogicalMargin p(wm); - p.IStart(wm) = std::max(0, nsLayoutUtils:: - ComputeCBDependentValue(aPercentBasis.ISize(wm), - stylePadding->mPadding.GetIStart(wm))); - p.IEnd(wm) = std::max(0, nsLayoutUtils:: - ComputeCBDependentValue(aPercentBasis.ISize(wm), - stylePadding->mPadding.GetIEnd(wm))); + LogicalMargin p(aWM); + p.IStart(aWM) = std::max(0, nsLayoutUtils:: + ComputeCBDependentValue(aPercentBasis.ISize(aWM), + stylePadding->mPadding.GetIStart(aWM))); + p.IEnd(aWM) = std::max(0, nsLayoutUtils:: + ComputeCBDependentValue(aPercentBasis.ISize(aWM), + stylePadding->mPadding.GetIEnd(aWM))); - p.BStart(wm) = std::max(0, nsLayoutUtils:: - ComputeCBDependentValue(aPercentBasis.BSize(wm), - stylePadding->mPadding.GetBStart(wm))); - p.BEnd(wm) = std::max(0, nsLayoutUtils:: - ComputeCBDependentValue(aPercentBasis.BSize(wm), - stylePadding->mPadding.GetBEnd(wm))); + p.BStart(aWM) = std::max(0, nsLayoutUtils:: + ComputeCBDependentValue(aPercentBasis.BSize(aWM), + stylePadding->mPadding.GetBStart(aWM))); + p.BEnd(aWM) = std::max(0, nsLayoutUtils:: + ComputeCBDependentValue(aPercentBasis.BSize(aWM), + stylePadding->mPadding.GetBEnd(aWM))); - SetComputedLogicalPadding(p); + SetComputedLogicalPadding(aWM, p); } return isCBDependent; } diff --git a/layout/generic/nsHTMLReflowState.h b/layout/generic/nsHTMLReflowState.h index 5169ac9e8f..2f03258e42 100644 --- a/layout/generic/nsHTMLReflowState.h +++ b/layout/generic/nsHTMLReflowState.h @@ -124,12 +124,23 @@ public: const LogicalMargin ComputedLogicalPadding() const { return LogicalMargin(mWritingMode, mComputedPadding); } + void SetComputedLogicalMargin(mozilla::WritingMode aWM, + const LogicalMargin& aMargin) + { mComputedMargin = aMargin.GetPhysicalMargin(aWM); } void SetComputedLogicalMargin(const LogicalMargin& aMargin) - { mComputedMargin = aMargin.GetPhysicalMargin(mWritingMode); } + { SetComputedLogicalMargin(mWritingMode, aMargin); } + + void SetComputedLogicalBorderPadding(mozilla::WritingMode aWM, + const LogicalMargin& aMargin) + { mComputedBorderPadding = aMargin.GetPhysicalMargin(aWM); } void SetComputedLogicalBorderPadding(const LogicalMargin& aMargin) - { mComputedBorderPadding = aMargin.GetPhysicalMargin(mWritingMode); } + { SetComputedLogicalBorderPadding(mWritingMode, aMargin); } + + void SetComputedLogicalPadding(mozilla::WritingMode aWM, + const LogicalMargin& aMargin) + { mComputedPadding = aMargin.GetPhysicalMargin(aWM); } void SetComputedLogicalPadding(const LogicalMargin& aMargin) - { mComputedPadding = aMargin.GetPhysicalMargin(mWritingMode); } + { SetComputedLogicalPadding(mWritingMode, aMargin); } WritingMode GetWritingMode() const { return mWritingMode; } @@ -159,6 +170,7 @@ public: } nsCSSOffsetState(nsIFrame *aFrame, nsRenderingContext *aRenderingContext, + mozilla::WritingMode aContainingBlockWritingMode, nscoord aContainingBlockISize); #ifdef DEBUG @@ -180,9 +192,11 @@ private: * Computes margin values from the specified margin style information, and * fills in the mComputedMargin member. * + * @param aWM Writing mode of the containing block * @param aPercentBasis - * Logical size to use for resolving percentage margin values in - * the inline and block axes. + * Logical size in the writing mode of the containing block to use + * for resolving percentage margin values in the inline and block + * axes. * The inline size is usually the containing block inline-size * (width if writing mode is horizontal, and height if vertical). * The block size is usually the containing block inline-size, per @@ -191,15 +205,18 @@ private: * Flexbox and Grid. * @return true if the margin is dependent on the containing block size. */ - bool ComputeMargin(const mozilla::LogicalSize& aPercentBasis); + bool ComputeMargin(mozilla::WritingMode aWM, + const mozilla::LogicalSize& aPercentBasis); /** * Computes padding values from the specified padding style information, and * fills in the mComputedPadding member. * + * @param aWM Writing mode of the containing block * @param aPercentBasis - * Length to use for resolving percentage padding values in - * the inline and block axes. + * Logical size in the writing mode of the containing block to use + * for resolving percentage padding values in the inline and block + * axes. * The inline size is usually the containing block inline-size * (width if writing mode is horizontal, and height if vertical). * The block size is usually the containing block inline-size, per @@ -208,12 +225,14 @@ private: * Flexbox and Grid. * @return true if the padding is dependent on the containing block size. */ - bool ComputePadding(const mozilla::LogicalSize& aPercentBasis, + bool ComputePadding(mozilla::WritingMode aWM, + const mozilla::LogicalSize& aPercentBasis, nsIAtom* aFrameType); protected: - void InitOffsets(const mozilla::LogicalSize& aPercentBasis, + void InitOffsets(mozilla::WritingMode aWM, + const mozilla::LogicalSize& aPercentBasis, nsIAtom* aFrameType, const nsMargin *aBorder = nullptr, const nsMargin *aPadding = nullptr); diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index b0c3f32a22..f43cbbd0cd 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -1660,8 +1660,13 @@ public: , hPctPadding(0.0f), hPctMargin(0.0f) {} }; - virtual IntrinsicISizeOffsetData - IntrinsicISizeOffsets(nsRenderingContext* aRenderingContext) = 0; + virtual IntrinsicISizeOffsetData IntrinsicISizeOffsets() = 0; + + /** + * Return the bsize components of padding, border, and margin + * that contribute to the intrinsic width that applies to the parent. + */ + IntrinsicISizeOffsetData IntrinsicBSizeOffsets(); virtual mozilla::IntrinsicSize GetIntrinsicSize() = 0; diff --git a/layout/mathml/nsMathMLSelectedFrame.cpp b/layout/mathml/nsMathMLSelectedFrame.cpp index 2937fc86f2..f55e5693df 100644 --- a/layout/mathml/nsMathMLSelectedFrame.cpp +++ b/layout/mathml/nsMathMLSelectedFrame.cpp @@ -98,6 +98,39 @@ nsMathMLSelectedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, #endif } +/* virtual */ +LogicalSize +nsMathMLSelectedFrame::ComputeSize(nsRenderingContext *aRenderingContext, + WritingMode aWM, + const LogicalSize& aCBSize, + nscoord aAvailableISize, + const LogicalSize& aMargin, + const LogicalSize& aBorder, + const LogicalSize& aPadding, + ComputeSizeFlags aFlags) +{ + nsIFrame* childFrame = GetSelectedFrame(); + if (childFrame) { + // Delegate size computation to the child frame. + // Try to account for border/padding/margin on this frame and the child, + // though we don't really support them during reflow anyway... + nscoord availableISize = aAvailableISize - aBorder.ISize(aWM) - + aPadding.ISize(aWM) - aMargin.ISize(aWM); + LogicalSize cbSize = aCBSize - aBorder - aPadding - aMargin; + nsCSSOffsetState offsetState(childFrame, aRenderingContext, aWM, + availableISize); + LogicalSize size = + childFrame->ComputeSize(aRenderingContext, aWM, cbSize, + availableISize, offsetState.ComputedLogicalMargin().Size(aWM), + offsetState.ComputedLogicalBorderPadding().Size(aWM) - + offsetState.ComputedLogicalPadding().Size(aWM), + offsetState.ComputedLogicalPadding().Size(aWM), + aFlags); + return size + offsetState.ComputedLogicalBorderPadding().Size(aWM); + } + return LogicalSize(aWM); +} + // Only reflow the selected child ... void nsMathMLSelectedFrame::Reflow(nsPresContext* aPresContext, diff --git a/layout/mathml/nsMathMLSelectedFrame.h b/layout/mathml/nsMathMLSelectedFrame.h index 796bf6dabc..03ec22a571 100644 --- a/layout/mathml/nsMathMLSelectedFrame.h +++ b/layout/mathml/nsMathMLSelectedFrame.h @@ -34,6 +34,16 @@ public: bool aPlaceOrigin, nsHTMLReflowMetrics& aDesiredSize) override; + virtual mozilla::LogicalSize + ComputeSize(nsRenderingContext *aRenderingContext, + mozilla::WritingMode aWritingMode, + const mozilla::LogicalSize& aCBSize, + nscoord aAvailableISize, + const mozilla::LogicalSize& aMargin, + const mozilla::LogicalSize& aBorder, + const mozilla::LogicalSize& aPadding, + ComputeSizeFlags aFlags) override; + virtual void Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, diff --git a/layout/reftests/bugs/1169331-1-ref.html b/layout/reftests/bugs/1169331-1-ref.html new file mode 100644 index 0000000000..dce4740c60 --- /dev/null +++ b/layout/reftests/bugs/1169331-1-ref.html @@ -0,0 +1,46 @@ + + + +Rotated buffer with mask + + + +
+ +
+
+
+
+ +
+ + + diff --git a/layout/reftests/bugs/1169331-1.html b/layout/reftests/bugs/1169331-1.html new file mode 100644 index 0000000000..319091ffbb --- /dev/null +++ b/layout/reftests/bugs/1169331-1.html @@ -0,0 +1,54 @@ + + + +Rotated buffer with mask + + + +
+ +
+
+
+
+ +
+ + + diff --git a/layout/reftests/bugs/1174332-1-ref.html b/layout/reftests/bugs/1174332-1-ref.html new file mode 100644 index 0000000000..40e25c5122 --- /dev/null +++ b/layout/reftests/bugs/1174332-1-ref.html @@ -0,0 +1,36 @@ + + + +Testcase for filters on canvas + + + + + + + + + + + + + + + + + + + + + + diff --git a/layout/reftests/bugs/1174332-1.html b/layout/reftests/bugs/1174332-1.html new file mode 100644 index 0000000000..212d398ef7 --- /dev/null +++ b/layout/reftests/bugs/1174332-1.html @@ -0,0 +1,20 @@ + + + +Testcase for filters on canvas + + + + + + diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 0e1b0d4664..08ad5e718d 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -817,7 +817,7 @@ skip-if((B2G&&browserIsRemote)||Mulet) == 394676-1.xhtml 394676-1-ref.xhtml # bu skip-if((B2G&&browserIsRemote)||Mulet) == 395331-1.xml 395331-1-ref.xml # bug 974780 # Initial mulet triage: parity with B2G/B2G Desktop == 395390-1.html 395390-1-ref.html == 396286-1.html about:blank # crash test -== 397428-1.html 397428-1-ref.html +fuzzy-if(Android,5,283) == 397428-1.html 397428-1-ref.html == 397844-1.xhtml 397844-1-ref.xhtml == 398092-1.html 398092-1-ref.html == 398101-1.html 398101-1-ref.html @@ -1925,3 +1925,5 @@ skip-if(B2G||Mulet) == 1150021-1.xul 1150021-1-ref.xul == 1151306-1.html 1151306-1-ref.html == 1153845-1.html 1153845-1-ref.html == 1156129-1.html 1156129-1-ref.html +== 1169331-1.html 1169331-1-ref.html +fuzzy(1,74) == 1174332-1.html 1174332-1-ref.html diff --git a/layout/reftests/css-blending/reftest.list b/layout/reftests/css-blending/reftest.list index 2e0b6854d7..23daab6213 100644 --- a/layout/reftests/css-blending/reftest.list +++ b/layout/reftests/css-blending/reftest.list @@ -84,7 +84,7 @@ pref(layout.css.background-blend-mode.enabled,true) == background-blending-backg pref(layout.css.background-blend-mode.enabled,true) == background-blending-background-attachement-fixed-scroll.html background-blending-background-attachement-fixed-scroll-ref.html pref(layout.css.background-blend-mode.enabled,true) == background-blend-mode-body-image.html background-blend-mode-body-image-ref.html -pref(layout.css.background-blend-mode.enabled,true) == background-blend-mode-body-transparent-image.html background-blend-mode-body-transparent-image-ref.html +fuzzy-if(Android,4,768) pref(layout.css.background-blend-mode.enabled,true) == background-blend-mode-body-transparent-image.html background-blend-mode-body-transparent-image-ref.html pref(layout.css.background-blend-mode.enabled,true) == background-blending-moz-element.html background-blending-moz-element-ref.html diff --git a/layout/reftests/css-break/reftest.list b/layout/reftests/css-break/reftest.list index 7b69113db1..779ed9d738 100644 --- a/layout/reftests/css-break/reftest.list +++ b/layout/reftests/css-break/reftest.list @@ -2,9 +2,9 @@ default-preferences pref(layout.css.box-decoration-break.enabled,true) == box-decoration-break-1.html box-decoration-break-1-ref.html fuzzy(1,20) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html -fuzzy(16,460) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html +fuzzy(16,460) fuzzy-if(Android,10,2970) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html random-if(!gtkWidget) HTTP(..) == box-decoration-break-border-image.html box-decoration-break-border-image-ref.html == box-decoration-break-block-border-padding.html box-decoration-break-block-border-padding-ref.html == box-decoration-break-block-margin.html box-decoration-break-block-margin-ref.html -== box-decoration-break-first-letter.html box-decoration-break-first-letter-ref.html +fuzzy-if(Android,8,6627) == box-decoration-break-first-letter.html box-decoration-break-first-letter-ref.html == box-decoration-break-bug-1249913.html box-decoration-break-bug-1249913-ref.html diff --git a/layout/reftests/css-display/display-contents-fieldset-ref.html b/layout/reftests/css-display/display-contents-fieldset-ref.html new file mode 100644 index 0000000000..4887b5fb25 --- /dev/null +++ b/layout/reftests/css-display/display-contents-fieldset-ref.html @@ -0,0 +1,51 @@ + + + + + +
+
x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/layout/reftests/css-display/display-contents-fieldset.html b/layout/reftests/css-display/display-contents-fieldset.html new file mode 100644 index 0000000000..06cf5c99ea --- /dev/null +++ b/layout/reftests/css-display/display-contents-fieldset.html @@ -0,0 +1,48 @@ + + + + + +
+
x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/layout/reftests/css-display/display-contents-list-item-child-ref.html b/layout/reftests/css-display/display-contents-list-item-child-ref.html new file mode 100644 index 0000000000..25a9d3fe53 --- /dev/null +++ b/layout/reftests/css-display/display-contents-list-item-child-ref.html @@ -0,0 +1,6 @@ + + + + + +
  • LI diff --git a/layout/reftests/css-display/display-contents-list-item-child.html b/layout/reftests/css-display/display-contents-list-item-child.html new file mode 100644 index 0000000000..8a4916e5a4 --- /dev/null +++ b/layout/reftests/css-display/display-contents-list-item-child.html @@ -0,0 +1,18 @@ + + + + + + +
  • LI diff --git a/layout/reftests/css-display/reftest.list b/layout/reftests/css-display/reftest.list index f61e36ee64..ecd7956918 100644 --- a/layout/reftests/css-display/reftest.list +++ b/layout/reftests/css-display/reftest.list @@ -1,10 +1,10 @@ # Tests for CSS Display spec features. # http://dev.w3.org/csswg/css-display -pref(layout.css.display-contents.enabled,true) == display-contents-acid.html display-contents-acid-ref.html -pref(layout.css.display-contents.enabled,true) == display-contents-acid-dyn-1.html display-contents-acid-ref.html -pref(layout.css.display-contents.enabled,true) == display-contents-acid-dyn-2.html display-contents-acid-ref.html -pref(layout.css.display-contents.enabled,true) == display-contents-acid-dyn-3.html display-contents-acid-ref.html +fuzzy-if(Android,8,604) pref(layout.css.display-contents.enabled,true) == display-contents-acid.html display-contents-acid-ref.html +fuzzy-if(Android,8,604) pref(layout.css.display-contents.enabled,true) == display-contents-acid-dyn-1.html display-contents-acid-ref.html +fuzzy-if(Android,8,604) pref(layout.css.display-contents.enabled,true) == display-contents-acid-dyn-2.html display-contents-acid-ref.html +fuzzy-if(Android,8,604) pref(layout.css.display-contents.enabled,true) == display-contents-acid-dyn-3.html display-contents-acid-ref.html pref(layout.css.display-contents.enabled,true) == display-contents-generated-content.html display-contents-generated-content-ref.html pref(layout.css.display-contents.enabled,true) == display-contents-generated-content-2.html display-contents-generated-content-ref.html pref(layout.css.display-contents.enabled,true) == display-contents-style-inheritance-1.html display-contents-style-inheritance-1-ref.html @@ -16,9 +16,11 @@ pref(layout.css.display-contents.enabled,true) == display-contents-tables-3.xhtm pref(layout.css.display-contents.enabled,true) == display-contents-visibility-hidden.html display-contents-visibility-hidden-ref.html pref(layout.css.display-contents.enabled,true) == display-contents-visibility-hidden-2.html display-contents-visibility-hidden-ref.html pref(layout.css.display-contents.enabled,true) == display-contents-495385-2d.html display-contents-495385-2d-ref.html -skip-if(B2G) pref(layout.css.display-contents.enabled,true) == display-contents-xbl.xhtml display-contents-xbl-ref.html -pref(layout.css.display-contents.enabled,true) pref(dom.webcomponents.enabled,true) == display-contents-shadow-dom-1.html display-contents-shadow-dom-1-ref.html -skip-if(B2G) pref(layout.css.display-contents.enabled,true) == display-contents-xbl-2.xul display-contents-xbl-2-ref.xul -skip-if(B2G) asserts(1) pref(layout.css.display-contents.enabled,true) == display-contents-xbl-3.xul display-contents-xbl-3-ref.xul # bug 1089223 +skip-if(B2G||Mulet) fuzzy-if(Android,7,3935) pref(layout.css.display-contents.enabled,true) == display-contents-xbl.xhtml display-contents-xbl-ref.html # Initial mulet triage: parity with B2G/B2G Desktop +fuzzy-if(Android,7,1186) pref(layout.css.display-contents.enabled,true) pref(dom.webcomponents.enabled,true) == display-contents-shadow-dom-1.html display-contents-shadow-dom-1-ref.html +skip-if(B2G||Mulet) pref(layout.css.display-contents.enabled,true) == display-contents-xbl-2.xul display-contents-xbl-2-ref.xul # Initial mulet triage: parity with B2G/B2G Desktop +skip-if(B2G||Mulet) asserts(1) pref(layout.css.display-contents.enabled,true) == display-contents-xbl-3.xul display-contents-xbl-3-ref.xul # bug 1089223 # Initial mulet triage: parity with B2G/B2G Desktop skip pref(layout.css.display-contents.enabled,true) == display-contents-xbl-4.xul display-contents-xbl-4-ref.xul # fails (not just asserts) due to bug 1089223 -skip-if(B2G) asserts(1) pref(layout.css.display-contents.enabled,true) == display-contents-xbl-5.xul display-contents-xbl-3-ref.xul # bug 1089223 +asserts(0-1) fuzzy-if(Android,8,3216) pref(layout.css.display-contents.enabled,true) == display-contents-fieldset.html display-contents-fieldset-ref.html # bug 1089223 +skip-if(B2G||Mulet) asserts(1) pref(layout.css.display-contents.enabled,true) == display-contents-xbl-5.xul display-contents-xbl-3-ref.xul # bug 1089223 # Initial mulet triage: parity with B2G/B2G Desktop +pref(layout.css.display-contents.enabled,true) == display-contents-list-item-child.html display-contents-list-item-child-ref.html diff --git a/layout/reftests/css-gradients/reftest.list b/layout/reftests/css-gradients/reftest.list index 5decc00c8a..332888fc99 100644 --- a/layout/reftests/css-gradients/reftest.list +++ b/layout/reftests/css-gradients/reftest.list @@ -51,8 +51,8 @@ fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,2,89700) f fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,2,89700) fuzzy-if(azureQuartz,1,22367) == linear-vertical-1e.html linear-vertical-1-ref.html == linear-vertical-subpixel-1.html linear-vertical-subpixel-1-ref.html == linear-viewport.html linear-viewport-ref.html -fails-if(OSX==1010) == linear-zero-length-1a.html linear-zero-length-1-ref.html -fails-if(OSX==1010) == linear-zero-length-1b.html linear-zero-length-1-ref.html +fails-if(OSX==1010) fuzzy-if(Android,4,248) == linear-zero-length-1a.html linear-zero-length-1-ref.html +fails-if(OSX==1010) fuzzy-if(Android,4,248) == linear-zero-length-1b.html linear-zero-length-1-ref.html fails-if(OSX==1010) == linear-zero-length-1c.html linear-zero-length-1-ref.html == nostops.html about:blank == onestop.html about:blank @@ -67,30 +67,30 @@ fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,2,90000) == rad fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,2,90000) == radial-2f.html radial-2-ref.html == radial-position-1a.html radial-position-1-ref.html fuzzy-if(cocoaWidget,1,28) fuzzy-if(winWidget,1,18) == radial-position-1b.html radial-position-1-ref.html -fuzzy-if(cocoaWidget,4,22317) == radial-shape-closest-corner-1a.html radial-shape-closest-corner-1-ref.html -fuzzy(1,238) fuzzy-if(cocoaWidget,3,460) fuzzy-if(cocoaWidget,4,22608) fuzzy-if(/^Windows\x20NT\x206\./.test(http.oscpu)&&d2d,1,336) == radial-shape-closest-corner-1b.html radial-shape-closest-corner-1-ref.html -fuzzy-if(azureQuartz,2,41171) == radial-shape-closest-corner-1c.html radial-shape-closest-corner-1-ref.html +fuzzy-if(cocoaWidget,4,22317) fuzzy-if(Android,8,771) == radial-shape-closest-corner-1a.html radial-shape-closest-corner-1-ref.html +fuzzy(1,238) fuzzy-if(cocoaWidget,4,22608) fuzzy-if(/^Windows\x20NT\x206\./.test(http.oscpu)&&d2d,1,336) fuzzy-if(Android,8,787) == radial-shape-closest-corner-1b.html radial-shape-closest-corner-1-ref.html +fuzzy-if(azureQuartz,2,41171) fuzzy-if(Android,8,771) == radial-shape-closest-corner-1c.html radial-shape-closest-corner-1-ref.html fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,5) fuzzy-if(Android,17,3880) == radial-shape-closest-side-1a.html radial-shape-closest-side-1-ref.html fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,5) fuzzy-if(Android,17,3880) == radial-shape-closest-side-1b.html radial-shape-closest-side-1-ref.html fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,5) fuzzy-if(Android,17,3880) == radial-shape-closest-side-1c.html radial-shape-closest-side-1-ref.html -== radial-shape-farthest-corner-1a.html radial-shape-farthest-corner-1-ref.html -fails-if(gtkWidget&&/x86_64-/.test(xulRuntime.XPCOMABI)) fuzzy(1,1569) fuzzy-if(cocoaWidget,2,41281) == radial-shape-farthest-corner-1b.html radial-shape-farthest-corner-1-ref.html +fuzzy-if(Android,8,771) == radial-shape-farthest-corner-1a.html radial-shape-farthest-corner-1-ref.html +fails-if(gtkWidget&&/x86_64-/.test(xulRuntime.XPCOMABI)) fuzzy(1,1569) fuzzy-if(cocoaWidget,2,41281) fuzzy-if(Android,8,1091) == radial-shape-farthest-corner-1b.html radial-shape-farthest-corner-1-ref.html == radial-shape-farthest-corner-1c.html radial-shape-farthest-corner-1-ref.html fuzzy-if(Android,17,13320) == radial-shape-farthest-side-1a.html radial-shape-farthest-side-1-ref.html fuzzy-if(Android,17,13320) == radial-shape-farthest-side-1b.html radial-shape-farthest-side-1-ref.html fuzzy-if(Android,17,13320) == radial-shape-farthest-side-1c.html radial-shape-farthest-side-1-ref.html == radial-size-1a.html radial-size-1-ref.html == radial-size-1b.html radial-size-1-ref.html -== radial-zero-length-1a.html radial-zero-length-1-ref.html -== radial-zero-length-1b.html radial-zero-length-1-ref.html +fuzzy-if(Android,4,248) == radial-zero-length-1a.html radial-zero-length-1-ref.html +fuzzy-if(Android,4,248) == radial-zero-length-1b.html radial-zero-length-1-ref.html == radial-zero-length-1c.html radial-zero-length-1-ref.html -== radial-zero-length-1d.html radial-zero-length-1-ref.html +fuzzy-if(Android,4,248) == radial-zero-length-1d.html radial-zero-length-1-ref.html == radial-zero-length-1e.html radial-zero-length-1-ref.html -== radial-zero-length-1f.html radial-zero-length-1-ref.html +fuzzy-if(Android,4,248) == radial-zero-length-1f.html radial-zero-length-1-ref.html == radial-zero-length-1g.html radial-zero-length-1-ref.html -== radial-zero-length-1h.html radial-zero-length-1-ref.html +fuzzy-if(Android,4,248) == radial-zero-length-1h.html radial-zero-length-1-ref.html == radial-zero-length-1i.html radial-zero-length-1-ref.html -== radial-zero-length-1j.html radial-zero-length-1-ref.html +fuzzy-if(Android,4,248) == radial-zero-length-1j.html radial-zero-length-1-ref.html == repeated-final-stop-1.html repeated-final-stop-1-ref.html == repeating-linear-1a.html repeating-linear-1-ref.html == repeating-linear-1b.html repeating-linear-1-ref.html diff --git a/layout/reftests/mathml/reftest.list b/layout/reftests/mathml/reftest.list index 349893e38a..fbbe91664f 100644 --- a/layout/reftests/mathml/reftest.list +++ b/layout/reftests/mathml/reftest.list @@ -111,6 +111,7 @@ fails == stretchy-mover-2a.html stretchy-mover-2-ref.html random-if(winWidget&&!/^Windows\x20NT\x205\.1/.test(http.oscpu)) == semantics-1.xhtml semantics-1-ref.xhtml # Windows versions with Cambria Math == semantics-2.html semantics-2-ref.html == semantics-3.html semantics-3-ref.html +== semantics-4.html semantics-4-ref.html != mathcolor-1.xml mathcolor-1-ref.xml != mathcolor-2.xml mathcolor-2-ref.xml != mathcolor-3.xml mathcolor-3-ref.xml diff --git a/layout/reftests/mathml/semantics-4-ref.html b/layout/reftests/mathml/semantics-4-ref.html new file mode 100644 index 0000000000..b618df4658 --- /dev/null +++ b/layout/reftests/mathml/semantics-4-ref.html @@ -0,0 +1,24 @@ + + + + x + + + + + + x + + + + + + x + + + + + + x + + diff --git a/layout/reftests/mathml/semantics-4.html b/layout/reftests/mathml/semantics-4.html new file mode 100644 index 0000000000..ff9dd0c05b --- /dev/null +++ b/layout/reftests/mathml/semantics-4.html @@ -0,0 +1,36 @@ + + + + + x + + y + + + + + + + x + + y + + + + + + + x + + y + + + + + + + x + + y + + diff --git a/layout/reftests/transform/reftest.list b/layout/reftests/transform/reftest.list index baec017bcb..ad09aa38d0 100644 --- a/layout/reftests/transform/reftest.list +++ b/layout/reftests/transform/reftest.list @@ -124,3 +124,11 @@ skip-if(B2G||Mulet) == stresstest-1.html stresstest-1-ref.html # bug 773482 # In == table-2b.html table-2-ref.html # Bug 722463 == inline-1a.html inline-1-ref.html +pref(svg.transform-origin.enabled,true) == transform-box-svg-1a.svg transform-box-svg-1-ref.svg +pref(svg.transform-origin.enabled,true) == transform-box-svg-1b.svg transform-box-svg-1-ref.svg +pref(svg.transform-origin.enabled,true) == transform-box-svg-2a.svg transform-box-svg-2-ref.svg +pref(svg.transform-origin.enabled,true) == transform-box-svg-2b.svg transform-box-svg-2-ref.svg +pref(svg.transform-origin.enabled,true) == transform-origin-svg-1a.svg transform-origin-svg-1-ref.svg +pref(svg.transform-origin.enabled,true) == transform-origin-svg-1b.svg transform-origin-svg-1-ref.svg +pref(svg.transform-origin.enabled,true) == transform-origin-svg-2a.svg transform-origin-svg-2-ref.svg +pref(svg.transform-origin.enabled,true) == transform-origin-svg-2b.svg transform-origin-svg-2-ref.svg diff --git a/layout/reftests/transform/transform-box-svg-1-ref.svg b/layout/reftests/transform/transform-box-svg-1-ref.svg new file mode 100644 index 0000000000..8f748b73d7 --- /dev/null +++ b/layout/reftests/transform/transform-box-svg-1-ref.svg @@ -0,0 +1,3 @@ + + + diff --git a/layout/reftests/transform/transform-box-svg-1a.svg b/layout/reftests/transform/transform-box-svg-1a.svg new file mode 100644 index 0000000000..e74989823d --- /dev/null +++ b/layout/reftests/transform/transform-box-svg-1a.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/layout/reftests/transform/transform-box-svg-1b.svg b/layout/reftests/transform/transform-box-svg-1b.svg new file mode 100644 index 0000000000..84d0da992b --- /dev/null +++ b/layout/reftests/transform/transform-box-svg-1b.svg @@ -0,0 +1,11 @@ + + + + + + diff --git a/layout/reftests/transform/transform-box-svg-2-ref.svg b/layout/reftests/transform/transform-box-svg-2-ref.svg new file mode 100644 index 0000000000..905fafcca7 --- /dev/null +++ b/layout/reftests/transform/transform-box-svg-2-ref.svg @@ -0,0 +1,3 @@ + + + diff --git a/layout/reftests/transform/transform-box-svg-2a.svg b/layout/reftests/transform/transform-box-svg-2a.svg new file mode 100644 index 0000000000..7ae4cfe0b4 --- /dev/null +++ b/layout/reftests/transform/transform-box-svg-2a.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/layout/reftests/transform/transform-box-svg-2b.svg b/layout/reftests/transform/transform-box-svg-2b.svg new file mode 100644 index 0000000000..8b14744820 --- /dev/null +++ b/layout/reftests/transform/transform-box-svg-2b.svg @@ -0,0 +1,11 @@ + + + + + + diff --git a/layout/reftests/transform/transform-origin-svg-1-ref.svg b/layout/reftests/transform/transform-origin-svg-1-ref.svg new file mode 100644 index 0000000000..8f748b73d7 --- /dev/null +++ b/layout/reftests/transform/transform-origin-svg-1-ref.svg @@ -0,0 +1,3 @@ + + + diff --git a/layout/reftests/transform/transform-origin-svg-1a.svg b/layout/reftests/transform/transform-origin-svg-1a.svg new file mode 100644 index 0000000000..c1591e65b6 --- /dev/null +++ b/layout/reftests/transform/transform-origin-svg-1a.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/layout/reftests/transform/transform-origin-svg-1b.svg b/layout/reftests/transform/transform-origin-svg-1b.svg new file mode 100644 index 0000000000..ca4eead39e --- /dev/null +++ b/layout/reftests/transform/transform-origin-svg-1b.svg @@ -0,0 +1,9 @@ + + + + + + diff --git a/layout/reftests/transform/transform-origin-svg-2-ref.svg b/layout/reftests/transform/transform-origin-svg-2-ref.svg new file mode 100644 index 0000000000..905fafcca7 --- /dev/null +++ b/layout/reftests/transform/transform-origin-svg-2-ref.svg @@ -0,0 +1,3 @@ + + + diff --git a/layout/reftests/transform/transform-origin-svg-2a.svg b/layout/reftests/transform/transform-origin-svg-2a.svg new file mode 100644 index 0000000000..46de3c4806 --- /dev/null +++ b/layout/reftests/transform/transform-origin-svg-2a.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/layout/reftests/transform/transform-origin-svg-2b.svg b/layout/reftests/transform/transform-origin-svg-2b.svg new file mode 100644 index 0000000000..29d4187aa5 --- /dev/null +++ b/layout/reftests/transform/transform-origin-svg-2b.svg @@ -0,0 +1,9 @@ + + + + + + diff --git a/layout/reftests/writing-mode/1144501-1-block-end-margin-orthogonal-size-ref.html b/layout/reftests/writing-mode/1144501-1-block-end-margin-orthogonal-size-ref.html new file mode 100644 index 0000000000..bdf34ff763 --- /dev/null +++ b/layout/reftests/writing-mode/1144501-1-block-end-margin-orthogonal-size-ref.html @@ -0,0 +1,55 @@ + + + + Bug 1144501 testcase + + + + +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    +
    +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    + + diff --git a/layout/reftests/writing-mode/1144501-1a-block-end-margin-orthogonal-size.html b/layout/reftests/writing-mode/1144501-1a-block-end-margin-orthogonal-size.html new file mode 100644 index 0000000000..5c819ac45b --- /dev/null +++ b/layout/reftests/writing-mode/1144501-1a-block-end-margin-orthogonal-size.html @@ -0,0 +1,56 @@ + + + + Bug 1144501 testcase + + + + +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    +
    +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    + + diff --git a/layout/reftests/writing-mode/1144501-1b-block-end-margin-orthogonal-size.html b/layout/reftests/writing-mode/1144501-1b-block-end-margin-orthogonal-size.html new file mode 100644 index 0000000000..d15952c776 --- /dev/null +++ b/layout/reftests/writing-mode/1144501-1b-block-end-margin-orthogonal-size.html @@ -0,0 +1,56 @@ + + + + Bug 1144501 testcase + + + + +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    +
    +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    +
    +

    + There should be a horizontal green bar the full width of the div. +

    +
    +
    + + diff --git a/layout/reftests/writing-mode/1147834-bottom-left-ref.html b/layout/reftests/writing-mode/1147834-bottom-left-ref.html new file mode 100644 index 0000000000..22a7807fe0 --- /dev/null +++ b/layout/reftests/writing-mode/1147834-bottom-left-ref.html @@ -0,0 +1,27 @@ + + + + + Overconstrained relative positioning + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1147834-bottom-right-ref.html b/layout/reftests/writing-mode/1147834-bottom-right-ref.html new file mode 100644 index 0000000000..7b04cf659b --- /dev/null +++ b/layout/reftests/writing-mode/1147834-bottom-right-ref.html @@ -0,0 +1,27 @@ + + + + + Overconstrained relative positioning + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1147834-relative-overconstrained-horizontal-tb-ltr.html b/layout/reftests/writing-mode/1147834-relative-overconstrained-horizontal-tb-ltr.html new file mode 100644 index 0000000000..4ce2980af5 --- /dev/null +++ b/layout/reftests/writing-mode/1147834-relative-overconstrained-horizontal-tb-ltr.html @@ -0,0 +1,31 @@ + + + + + Overconstrained relative positioning + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1147834-relative-overconstrained-horizontal-tb-rtl.html b/layout/reftests/writing-mode/1147834-relative-overconstrained-horizontal-tb-rtl.html new file mode 100644 index 0000000000..1c35de714e --- /dev/null +++ b/layout/reftests/writing-mode/1147834-relative-overconstrained-horizontal-tb-rtl.html @@ -0,0 +1,31 @@ + + + + + Overconstrained relative positioning + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-lr-ltr.html b/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-lr-ltr.html new file mode 100644 index 0000000000..397c7f06eb --- /dev/null +++ b/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-lr-ltr.html @@ -0,0 +1,31 @@ + + + + + Overconstrained relative positioning + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-lr-rtl.html b/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-lr-rtl.html new file mode 100644 index 0000000000..9221df1012 --- /dev/null +++ b/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-lr-rtl.html @@ -0,0 +1,31 @@ + + + + + Overconstrained relative positioning + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-rl-ltr.html b/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-rl-ltr.html new file mode 100644 index 0000000000..cbed4d39d9 --- /dev/null +++ b/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-rl-ltr.html @@ -0,0 +1,31 @@ + + + + + Overconstrained relative positioning + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-rl-rtl.html b/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-rl-rtl.html new file mode 100644 index 0000000000..c6645d489f --- /dev/null +++ b/layout/reftests/writing-mode/1147834-relative-overconstrained-vertical-rl-rtl.html @@ -0,0 +1,31 @@ + + + + + Overconstrained relative positioning + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1147834-top-left-ref.html b/layout/reftests/writing-mode/1147834-top-left-ref.html new file mode 100644 index 0000000000..2b0914c6f9 --- /dev/null +++ b/layout/reftests/writing-mode/1147834-top-left-ref.html @@ -0,0 +1,27 @@ + + + + + Overconstrained relative positioning + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1147834-top-right-ref.html b/layout/reftests/writing-mode/1147834-top-right-ref.html new file mode 100644 index 0000000000..8fa07ec082 --- /dev/null +++ b/layout/reftests/writing-mode/1147834-top-right-ref.html @@ -0,0 +1,27 @@ + + + + + Overconstrained relative positioning + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1151993-1-orthogonal-block-size-ref.html b/layout/reftests/writing-mode/1151993-1-orthogonal-block-size-ref.html new file mode 100644 index 0000000000..fe11c1704d --- /dev/null +++ b/layout/reftests/writing-mode/1151993-1-orthogonal-block-size-ref.html @@ -0,0 +1,44 @@ + + + + + Bug 1151993 - sizing of orthogonal block + + + +
    +

    Lorem ipsum dolor sit amet, illum harum sed cu, ex mea delectus recteque. + Sit aperiri incorrupte cu. Et eam ullum minim disputando, no usu stet postea.

    +
    +

    Cu ornatus accusam nam, minim impedit omittantur vel ne. + Qui detraxit temporibus contentiones te.

    +
    +
    +

    Lorem ipsum dolor sit amet, illum harum sed cu, ex mea delectus recteque. + Sit aperiri incorrupte cu. Et eam ullum minim disputando, no usu stet postea.

    +
    +

    Cu ornatus accusam nam, minim impedit omittantur vel ne. + Qui detraxit temporibus contentiones te.

    +
    + + diff --git a/layout/reftests/writing-mode/1151993-1-orthogonal-block-size.html b/layout/reftests/writing-mode/1151993-1-orthogonal-block-size.html new file mode 100644 index 0000000000..7920de7116 --- /dev/null +++ b/layout/reftests/writing-mode/1151993-1-orthogonal-block-size.html @@ -0,0 +1,48 @@ + + + + + Bug 1151993 - sizing of orthogonal block + + + +
    +

    Lorem ipsum dolor sit amet, illum harum sed cu, ex mea delectus recteque. + Sit aperiri incorrupte cu. Et eam ullum minim disputando, no usu stet postea.

    +
    +

    Cu ornatus accusam nam, minim impedit omittantur vel ne. + Qui detraxit temporibus contentiones te.

    +
    +
    +

    Lorem ipsum dolor sit amet, illum harum sed cu, ex mea delectus recteque. + Sit aperiri incorrupte cu. Et eam ullum minim disputando, no usu stet postea.

    +
    + + + +
    +

    Cu ornatus accusam nam, minim impedit omittantur vel ne. + Qui detraxit temporibus contentiones te.

    +
    + + diff --git a/layout/reftests/writing-mode/1152941-1-orthogonal-blocksize-overflow-ref.html b/layout/reftests/writing-mode/1152941-1-orthogonal-blocksize-overflow-ref.html new file mode 100644 index 0000000000..d7748e024a --- /dev/null +++ b/layout/reftests/writing-mode/1152941-1-orthogonal-blocksize-overflow-ref.html @@ -0,0 +1,39 @@ + + + + + + + + +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac fringilla quam, + eu ultricies augue.

    + +
    + +

    Ut accumsan dui eu elit dapibus rutrum. Nunc tristique urna eget ex dictum + placerat. Nunc venenatis enim sed odio iaculis, consequat consectetur sem + elementum.

    +
    + +

    Maecenas nec ornare ligula. Phasellus eleifend + elit leo, nec vestibulum sapien consectetur quis.

    + + diff --git a/layout/reftests/writing-mode/1152941-1-orthogonal-blocksize-overflow.html b/layout/reftests/writing-mode/1152941-1-orthogonal-blocksize-overflow.html new file mode 100644 index 0000000000..5ce03d1525 --- /dev/null +++ b/layout/reftests/writing-mode/1152941-1-orthogonal-blocksize-overflow.html @@ -0,0 +1,53 @@ + + + + + + + + +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac fringilla quam, + eu ultricies augue.

    + +
    + +

    Ut accumsan dui eu elit dapibus rutrum. Nunc tristique urna eget ex dictum + placerat. Nunc venenatis enim sed odio iaculis, consequat consectetur sem + elementum.

    + +

    Fusce eros eros, eleifend eget eros at, convallis tempor tortor. Cras + at gravida leo. Proin ultricies ipsum vitae felis suscipit, a tincidunt orci + mattis. Cras in suscipit mauris.

    + +

    Etiam eu pellentesque nisi. Quisque + ullamcorper dui odio, eu feugiat nunc interdum vitae. Morbi egestas dolor a + nulla pellentesque, faucibus tincidunt diam facilisis. Suspendisse at urna + varius, pellentesque nibh non, venenatis ante.

    + +

    Nullam aliquet orci vel dui + dapibus, nec facilisis enim interdum. Morbi condimentum venenatis commodo. Sed + viverra diam nec lacinia congue. Etiam ultrices luctus volutpat.

    +
    + +

    Maecenas nec ornare ligula. Phasellus eleifend + elit leo, nec vestibulum sapien consectetur quis.

    + + diff --git a/layout/reftests/writing-mode/1156021-text-indent-percent-ref.html b/layout/reftests/writing-mode/1156021-text-indent-percent-ref.html new file mode 100644 index 0000000000..0bb7fcba82 --- /dev/null +++ b/layout/reftests/writing-mode/1156021-text-indent-percent-ref.html @@ -0,0 +1,45 @@ + + + + + + + +

    +

    +

    +

    +

    +

    +
    +

    +

    +

    +

    +

    +

    + + diff --git a/layout/reftests/writing-mode/1156021-text-indent-percent.html b/layout/reftests/writing-mode/1156021-text-indent-percent.html new file mode 100644 index 0000000000..b37a202e2c --- /dev/null +++ b/layout/reftests/writing-mode/1156021-text-indent-percent.html @@ -0,0 +1,51 @@ + + + + + + + +

    +

    +

    +

    +

    +

    +
    +

    +

    +

    +

    +

    +

    + + diff --git a/layout/reftests/writing-mode/1157752-upright-bidi-ref.html b/layout/reftests/writing-mode/1157752-upright-bidi-ref.html new file mode 100644 index 0000000000..6be780e664 --- /dev/null +++ b/layout/reftests/writing-mode/1157752-upright-bidi-ref.html @@ -0,0 +1,43 @@ + + + + + + + + +
    +Bidi עברית text +
    + +
    +Bidi עברית text +
    + +
    +Bidi עברית text +
    + +
    +Bidi עברית text +
    + + + diff --git a/layout/reftests/writing-mode/1157752-upright-bidi.html b/layout/reftests/writing-mode/1157752-upright-bidi.html new file mode 100644 index 0000000000..551e75b122 --- /dev/null +++ b/layout/reftests/writing-mode/1157752-upright-bidi.html @@ -0,0 +1,43 @@ + + + + + + + + +
    +Bidi עברית text +
    + +
    +Bidi עברית text +
    + +
    +Bidi עברית text +
    + +
    +Bidi עברית text +
    + + + diff --git a/layout/reftests/writing-mode/1157758-1-vertical-arabic-ref.html b/layout/reftests/writing-mode/1157758-1-vertical-arabic-ref.html new file mode 100644 index 0000000000..e3ec37a5a3 --- /dev/null +++ b/layout/reftests/writing-mode/1157758-1-vertical-arabic-ref.html @@ -0,0 +1,18 @@ + + + + + + + + + 你 ا‌ل‌ع‌ر‌ب‌ي 好! + + diff --git a/layout/reftests/writing-mode/1157758-1-vertical-arabic.html b/layout/reftests/writing-mode/1157758-1-vertical-arabic.html new file mode 100644 index 0000000000..ddd084379a --- /dev/null +++ b/layout/reftests/writing-mode/1157758-1-vertical-arabic.html @@ -0,0 +1,18 @@ + + + + + + + + + 你 العربي 好! + + diff --git a/layout/reftests/writing-mode/1158549-1-vertical-block-size-constraints-ref.html b/layout/reftests/writing-mode/1158549-1-vertical-block-size-constraints-ref.html new file mode 100644 index 0000000000..15520d034d --- /dev/null +++ b/layout/reftests/writing-mode/1158549-1-vertical-block-size-constraints-ref.html @@ -0,0 +1,44 @@ + + + + + + + + +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac fringilla quam, +eu ultricies augue. Aliquam ante orci, egestas eu pulvinar eget, ullamcorper eu +elit. Phasellus tristique vulputate odio, quis ultricies justo rutrum in. Mauris +auctor est in sagittis eleifend.

    + +
    +

    Ut accumsan dui eu elit dapibus rutrum. Nunc tristique urna eget ex dictum +placerat. Nunc venenatis enim sed odio iaculis, consequat consectetur sem +elementum. Fusce eros eros, eleifend eget eros at, convallis tempor tortor. Cras +at gravida leo. Proin ultricies ipsum vitae felis suscipit, a tincidunt orci +mattis. Cras in suscipit mauris.

    +
    + +

    Vivamus lobortis hendrerit vehicula. Nullam dapibus ante et commodo lacinia. +Sed tincidunt pretium ligula, eget porta metus pharetra eget. Mauris pharetra +tortor convallis nisi varius facilisis.

    + + + diff --git a/layout/reftests/writing-mode/1158549-1-vertical-block-size-constraints.html b/layout/reftests/writing-mode/1158549-1-vertical-block-size-constraints.html new file mode 100644 index 0000000000..2ef3d1cda2 --- /dev/null +++ b/layout/reftests/writing-mode/1158549-1-vertical-block-size-constraints.html @@ -0,0 +1,44 @@ + + + + + + + + +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac fringilla quam, +eu ultricies augue. Aliquam ante orci, egestas eu pulvinar eget, ullamcorper eu +elit. Phasellus tristique vulputate odio, quis ultricies justo rutrum in. Mauris +auctor est in sagittis eleifend.

    + +
    +

    Ut accumsan dui eu elit dapibus rutrum. Nunc tristique urna eget ex dictum +placerat. Nunc venenatis enim sed odio iaculis, consequat consectetur sem +elementum. Fusce eros eros, eleifend eget eros at, convallis tempor tortor. Cras +at gravida leo. Proin ultricies ipsum vitae felis suscipit, a tincidunt orci +mattis. Cras in suscipit mauris.

    +
    + +

    Vivamus lobortis hendrerit vehicula. Nullam dapibus ante et commodo lacinia. +Sed tincidunt pretium ligula, eget porta metus pharetra eget. Mauris pharetra +tortor convallis nisi varius facilisis.

    + + + diff --git a/layout/reftests/writing-mode/1163238-orthogonal-auto-margins-ref.html b/layout/reftests/writing-mode/1163238-orthogonal-auto-margins-ref.html new file mode 100644 index 0000000000..2842969d09 --- /dev/null +++ b/layout/reftests/writing-mode/1163238-orthogonal-auto-margins-ref.html @@ -0,0 +1,39 @@ + + + + + + +
    +
    +
    +
    diff --git a/layout/reftests/writing-mode/1163238-orthogonal-auto-margins.html b/layout/reftests/writing-mode/1163238-orthogonal-auto-margins.html new file mode 100644 index 0000000000..e4758ec6fe --- /dev/null +++ b/layout/reftests/writing-mode/1163238-orthogonal-auto-margins.html @@ -0,0 +1,42 @@ + + + + + + +
    +
    +
    +
    diff --git a/layout/reftests/writing-mode/1172774-percent-horizontal-ref.html b/layout/reftests/writing-mode/1172774-percent-horizontal-ref.html new file mode 100644 index 0000000000..53b1bef4bd --- /dev/null +++ b/layout/reftests/writing-mode/1172774-percent-horizontal-ref.html @@ -0,0 +1,10 @@ + + + + CSS Writing Modes Test: margin percentage and 'vertical-rl' + + + +
    Image download support must be enabled
    + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/1172774-percent-margin-1.html b/layout/reftests/writing-mode/1172774-percent-margin-1.html new file mode 100644 index 0000000000..4017ea9f10 --- /dev/null +++ b/layout/reftests/writing-mode/1172774-percent-margin-1.html @@ -0,0 +1,59 @@ + + + + CSS Writing Modes Test: margin percentage and 'vertical-rl' + + + + + + +
    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1172774-percent-margin-2.html b/layout/reftests/writing-mode/1172774-percent-margin-2.html new file mode 100644 index 0000000000..55ce27f509 --- /dev/null +++ b/layout/reftests/writing-mode/1172774-percent-margin-2.html @@ -0,0 +1,59 @@ + + + + CSS Writing Modes Test: margin percentage and 'vertical-lr' + + + + + + +
    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1172774-percent-margin-3.html b/layout/reftests/writing-mode/1172774-percent-margin-3.html new file mode 100644 index 0000000000..03f5edde4f --- /dev/null +++ b/layout/reftests/writing-mode/1172774-percent-margin-3.html @@ -0,0 +1,63 @@ + + + + CSS Writing Modes Test: margin percentage and 'vertical-rl' + + + + + + +
    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1172774-percent-margin-4.html b/layout/reftests/writing-mode/1172774-percent-margin-4.html new file mode 100644 index 0000000000..adac543bed --- /dev/null +++ b/layout/reftests/writing-mode/1172774-percent-margin-4.html @@ -0,0 +1,63 @@ + + + + CSS Writing Modes Test: margin percentage and 'vertical-lr' + + + + + + +
    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/1172774-percent-padding-1.html b/layout/reftests/writing-mode/1172774-percent-padding-1.html new file mode 100644 index 0000000000..d665db7252 --- /dev/null +++ b/layout/reftests/writing-mode/1172774-percent-padding-1.html @@ -0,0 +1,57 @@ + + + + CSS Writing Modes Test: padding percentage and 'vertical-rl' + + + + + +
    +
    Image download support must be enabled
    +
    +
    Image download support must be enabled
    +
    + + diff --git a/layout/reftests/writing-mode/1172774-percent-padding-2.html b/layout/reftests/writing-mode/1172774-percent-padding-2.html new file mode 100644 index 0000000000..2a9cb52f76 --- /dev/null +++ b/layout/reftests/writing-mode/1172774-percent-padding-2.html @@ -0,0 +1,58 @@ + + + + CSS Writing Modes Test: padding percentage and 'vertical-lr' + + + + + + +
    +
    Image download support must be enabled
    +
    +
    Image download support must be enabled
    +
    + + diff --git a/layout/reftests/writing-mode/1172774-percent-padding-3.html b/layout/reftests/writing-mode/1172774-percent-padding-3.html new file mode 100644 index 0000000000..fb897735a5 --- /dev/null +++ b/layout/reftests/writing-mode/1172774-percent-padding-3.html @@ -0,0 +1,62 @@ + + + + CSS Writing Modes Test: padding percentage and 'vertical-rl' + + + + + + +
    +
    Image download support must be enabled
    +
    +
    Image download support must be enabled
    +
    + + diff --git a/layout/reftests/writing-mode/1172774-percent-padding-4.html b/layout/reftests/writing-mode/1172774-percent-padding-4.html new file mode 100644 index 0000000000..a3d8859a5b --- /dev/null +++ b/layout/reftests/writing-mode/1172774-percent-padding-4.html @@ -0,0 +1,62 @@ + + + + CSS Writing Modes Test: padding percentage and 'vertical-lr' + + + + + + +
    +
    Image download support must be enabled
    +
    +
    Image download support must be enabled
    +
    + + diff --git a/layout/reftests/writing-mode/1172774-percent-vertical-ref.html b/layout/reftests/writing-mode/1172774-percent-vertical-ref.html new file mode 100644 index 0000000000..2fd2a2f08f --- /dev/null +++ b/layout/reftests/writing-mode/1172774-percent-vertical-ref.html @@ -0,0 +1,10 @@ + + + + CSS Writing Modes Test: margin percentage and 'vertical-rl' + + + +
    Image download support must be enabled
    + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/1174450-intrinsic-sizing-ref.html b/layout/reftests/writing-mode/1174450-intrinsic-sizing-ref.html new file mode 100644 index 0000000000..629c0a917c --- /dev/null +++ b/layout/reftests/writing-mode/1174450-intrinsic-sizing-ref.html @@ -0,0 +1,70 @@ + + + + + Testcase for bug 1174450 + + + + + +
    +
    vertical container, horizontal child
    +
    +
    +
    +
    vertical container, vertical child
    +
    +
    +
    +
    horizontal container, horizontal child
    +
    +
    +
    +
    horizontal container, vertical child
    +
    +
    + + + diff --git a/layout/reftests/writing-mode/1174450-intrinsic-sizing.html b/layout/reftests/writing-mode/1174450-intrinsic-sizing.html new file mode 100644 index 0000000000..e7cd5585c4 --- /dev/null +++ b/layout/reftests/writing-mode/1174450-intrinsic-sizing.html @@ -0,0 +1,63 @@ + + + + + Testcase for bug 1174450 + + + + + +
    +
    vertical container, horizontal child
    +
    +
    +
    +
    vertical container, vertical child
    +
    +
    +
    +
    horizontal container, horizontal child
    +
    +
    +
    +
    horizontal container, vertical child
    +
    +
    + + + diff --git a/layout/reftests/writing-mode/abspos/reftest.list b/layout/reftests/writing-mode/abspos/reftest.list new file mode 100644 index 0000000000..54921fd07e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/reftest.list @@ -0,0 +1,101 @@ +# This directory contains tests for position:absolute and vertical writing modes. +# They require the vertical-text pref to be true, otherwise lots of them will fail. +# (See bug 1079151 for the origin of these testcases by Gérard Talbot.) +default-preferences pref(layout.css.vertical-text.enabled,true) + +fails == s71-abs-pos-non-replaced-vlr-003.xht s71-abs-pos-non-replaced-vlr-003-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-005.xht s71-abs-pos-non-replaced-vlr-005-ref.xht +fails == s71-abs-pos-non-replaced-vlr-007.xht s71-abs-pos-non-replaced-vlr-007-ref.xht +fails == s71-abs-pos-non-replaced-vlr-009.xht s71-abs-pos-non-replaced-vlr-009-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-011.xht s71-abs-pos-non-replaced-vlr-011-ref.xht +fails == s71-abs-pos-non-replaced-vlr-013.xht s71-abs-pos-non-replaced-vlr-013-ref.xht +fails == s71-abs-pos-non-replaced-vlr-015.xht s71-abs-pos-non-replaced-vlr-015-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-017.xht s71-abs-pos-non-replaced-vlr-017-ref.xht +fails == s71-abs-pos-non-replaced-vlr-019.xht s71-abs-pos-non-replaced-vlr-019-ref.xht +fails == s71-abs-pos-non-replaced-vlr-021.xht s71-abs-pos-non-replaced-vlr-021-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-023.xht s71-abs-pos-non-replaced-vlr-023-ref.xht +fails == s71-abs-pos-non-replaced-vlr-025.xht s71-abs-pos-non-replaced-vlr-025-ref.xht +fails == s71-abs-pos-non-replaced-vlr-027.xht s71-abs-pos-non-replaced-vlr-027-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-029.xht s71-abs-pos-non-replaced-vlr-029-ref.xht +fails == s71-abs-pos-non-replaced-vlr-031.xht s71-abs-pos-non-replaced-vlr-031-ref.xht +fails == s71-abs-pos-non-replaced-vlr-033.xht s71-abs-pos-non-replaced-vlr-033-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-035.xht s71-abs-pos-non-replaced-vlr-035-ref.xht +fails == s71-abs-pos-non-replaced-vlr-037.xht s71-abs-pos-non-replaced-vlr-037-ref.xht +fails == s71-abs-pos-non-replaced-vlr-039.xht s71-abs-pos-non-replaced-vlr-039-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-041.xht s71-abs-pos-non-replaced-vlr-041-ref.xht +fails == s71-abs-pos-non-replaced-vlr-043.xht s71-abs-pos-non-replaced-vlr-043-ref.xht +fails == s71-abs-pos-non-replaced-vlr-045.xht s71-abs-pos-non-replaced-vlr-045-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-047.xht s71-abs-pos-non-replaced-vlr-047-ref.xht +fails == s71-abs-pos-non-replaced-vlr-049.xht s71-abs-pos-non-replaced-vlr-049-ref.xht +fails == s71-abs-pos-non-replaced-vlr-051.xht s71-abs-pos-non-replaced-vlr-051-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-053.xht s71-abs-pos-non-replaced-vlr-053-ref.xht +fails == s71-abs-pos-non-replaced-vlr-055.xht s71-abs-pos-non-replaced-vlr-055-ref.xht +fails == s71-abs-pos-non-replaced-vlr-057.xht s71-abs-pos-non-replaced-vlr-057-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-059.xht s71-abs-pos-non-replaced-vlr-059-ref.xht +fails == s71-abs-pos-non-replaced-vlr-061.xht s71-abs-pos-non-replaced-vlr-061-ref.xht +fails == s71-abs-pos-non-replaced-vlr-063.xht s71-abs-pos-non-replaced-vlr-063-ref.xht +fails == s71-abs-pos-non-replaced-vlr-065.xht s71-abs-pos-non-replaced-vlr-065-ref.xht +fails == s71-abs-pos-non-replaced-vlr-067.xht s71-abs-pos-non-replaced-vlr-067-ref.xht +fails == s71-abs-pos-non-replaced-vlr-069.xht s71-abs-pos-non-replaced-vlr-069-ref.xht +fails == s71-abs-pos-non-replaced-vlr-071.xht s71-abs-pos-non-replaced-vlr-071-ref.xht +fails == s71-abs-pos-non-replaced-vlr-073.xht s71-abs-pos-non-replaced-vlr-073-ref.xht +fails == s71-abs-pos-non-replaced-vlr-075.xht s71-abs-pos-non-replaced-vlr-075-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-077.xht s71-abs-pos-non-replaced-vlr-077-ref.xht +fails == s71-abs-pos-non-replaced-vlr-079.xht s71-abs-pos-non-replaced-vlr-079-ref.xht +fails == s71-abs-pos-non-replaced-vlr-081.xht s71-abs-pos-non-replaced-vlr-081-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vlr-083.xht s71-abs-pos-non-replaced-vlr-083-ref.xht +fails == s71-abs-pos-non-replaced-vlr-085.xht s71-abs-pos-non-replaced-vlr-085-ref.xht +fails == s71-abs-pos-non-replaced-vlr-087.xht s71-abs-pos-non-replaced-vlr-087-ref.xht +fails == s71-abs-pos-non-replaced-vlr-089.xht s71-abs-pos-non-replaced-vlr-089-ref.xht +fails == s71-abs-pos-non-replaced-vlr-091.xht s71-abs-pos-non-replaced-vlr-091-ref.xht +fails == s71-abs-pos-non-replaced-vlr-093.xht s71-abs-pos-non-replaced-vlr-093-ref.xht +fails == s71-abs-pos-non-replaced-vlr-095.xht s71-abs-pos-non-replaced-vlr-095-ref.xht +fails == s71-abs-pos-non-replaced-vlr-097.xht s71-abs-pos-non-replaced-vlr-097-ref.xht +fails == s71-abs-pos-non-replaced-vrl-002.xht s71-abs-pos-non-replaced-vrl-002-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-004.xht s71-abs-pos-non-replaced-vrl-004-ref.xht +fails == s71-abs-pos-non-replaced-vrl-006.xht s71-abs-pos-non-replaced-vrl-006-ref.xht +fails == s71-abs-pos-non-replaced-vrl-008.xht s71-abs-pos-non-replaced-vrl-008-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-010.xht s71-abs-pos-non-replaced-vrl-010-ref.xht +fails == s71-abs-pos-non-replaced-vrl-012.xht s71-abs-pos-non-replaced-vrl-012-ref.xht +fails == s71-abs-pos-non-replaced-vrl-014.xht s71-abs-pos-non-replaced-vrl-014-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-016.xht s71-abs-pos-non-replaced-vrl-016-ref.xht +fails == s71-abs-pos-non-replaced-vrl-018.xht s71-abs-pos-non-replaced-vrl-018-ref.xht +fails == s71-abs-pos-non-replaced-vrl-020.xht s71-abs-pos-non-replaced-vrl-020-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-022.xht s71-abs-pos-non-replaced-vrl-022-ref.xht +fails == s71-abs-pos-non-replaced-vrl-024.xht s71-abs-pos-non-replaced-vrl-024-ref.xht +fails == s71-abs-pos-non-replaced-vrl-026.xht s71-abs-pos-non-replaced-vrl-026-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-028.xht s71-abs-pos-non-replaced-vrl-028-ref.xht +fails == s71-abs-pos-non-replaced-vrl-030.xht s71-abs-pos-non-replaced-vrl-030-ref.xht +fails == s71-abs-pos-non-replaced-vrl-032.xht s71-abs-pos-non-replaced-vrl-032-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-034.xht s71-abs-pos-non-replaced-vrl-034-ref.xht +fails == s71-abs-pos-non-replaced-vrl-036.xht s71-abs-pos-non-replaced-vrl-036-ref.xht +fails == s71-abs-pos-non-replaced-vrl-038.xht s71-abs-pos-non-replaced-vrl-038-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-040.xht s71-abs-pos-non-replaced-vrl-040-ref.xht +fails == s71-abs-pos-non-replaced-vrl-042.xht s71-abs-pos-non-replaced-vrl-042-ref.xht +fails == s71-abs-pos-non-replaced-vrl-044.xht s71-abs-pos-non-replaced-vrl-044-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-046.xht s71-abs-pos-non-replaced-vrl-046-ref.xht +fails == s71-abs-pos-non-replaced-vrl-048.xht s71-abs-pos-non-replaced-vrl-048-ref.xht +fails == s71-abs-pos-non-replaced-vrl-050.xht s71-abs-pos-non-replaced-vrl-050-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-052.xht s71-abs-pos-non-replaced-vrl-052-ref.xht +fails == s71-abs-pos-non-replaced-vrl-054.xht s71-abs-pos-non-replaced-vrl-054-ref.xht +fails == s71-abs-pos-non-replaced-vrl-056.xht s71-abs-pos-non-replaced-vrl-056-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-058.xht s71-abs-pos-non-replaced-vrl-058-ref.xht +fails == s71-abs-pos-non-replaced-vrl-060.xht s71-abs-pos-non-replaced-vrl-060-ref.xht +fails == s71-abs-pos-non-replaced-vrl-062.xht s71-abs-pos-non-replaced-vrl-062-ref.xht +fails == s71-abs-pos-non-replaced-vrl-064.xht s71-abs-pos-non-replaced-vrl-064-ref.xht +fails == s71-abs-pos-non-replaced-vrl-066.xht s71-abs-pos-non-replaced-vrl-066-ref.xht +fails == s71-abs-pos-non-replaced-vrl-068.xht s71-abs-pos-non-replaced-vrl-068-ref.xht +fails == s71-abs-pos-non-replaced-vrl-070.xht s71-abs-pos-non-replaced-vrl-070-ref.xht +fails == s71-abs-pos-non-replaced-vrl-072.xht s71-abs-pos-non-replaced-vrl-072-ref.xht +fails == s71-abs-pos-non-replaced-vrl-074.xht s71-abs-pos-non-replaced-vrl-074-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-076.xht s71-abs-pos-non-replaced-vrl-076-ref.xht +fails == s71-abs-pos-non-replaced-vrl-078.xht s71-abs-pos-non-replaced-vrl-078-ref.xht +fails == s71-abs-pos-non-replaced-vrl-080.xht s71-abs-pos-non-replaced-vrl-080-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-082.xht s71-abs-pos-non-replaced-vrl-082-ref.xht +fails == s71-abs-pos-non-replaced-vrl-084.xht s71-abs-pos-non-replaced-vrl-084-ref.xht +fails == s71-abs-pos-non-replaced-vrl-086.xht s71-abs-pos-non-replaced-vrl-086-ref.xht +fails == s71-abs-pos-non-replaced-vrl-088.xht s71-abs-pos-non-replaced-vrl-088-ref.xht +fails == s71-abs-pos-non-replaced-vrl-090.xht s71-abs-pos-non-replaced-vrl-090-ref.xht +fails == s71-abs-pos-non-replaced-vrl-092.xht s71-abs-pos-non-replaced-vrl-092-ref.xht +fails == s71-abs-pos-non-replaced-vrl-094.xht s71-abs-pos-non-replaced-vrl-094-ref.xht +fails == s71-abs-pos-non-replaced-vrl-096.xht s71-abs-pos-non-replaced-vrl-096-ref.xht diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003-ref.xht new file mode 100644 index 0000000000..c301c0c10b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003.xht new file mode 100644 index 0000000000..e9943203f6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003.xht @@ -0,0 +1,120 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005-ref.xht new file mode 100644 index 0000000000..8b78406566 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005.xht new file mode 100644 index 0000000000..78aa6e4e82 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005.xht @@ -0,0 +1,114 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007-ref.xht new file mode 100644 index 0000000000..ed3c87a817 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007-ref.xht @@ -0,0 +1,57 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007.xht new file mode 100644 index 0000000000..d99fe09eed --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007.xht @@ -0,0 +1,125 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009-ref.xht new file mode 100644 index 0000000000..ec7fafe59a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009.xht new file mode 100644 index 0000000000..a6cb849c2b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009.xht @@ -0,0 +1,120 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011-ref.xht new file mode 100644 index 0000000000..6299224f36 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011.xht new file mode 100644 index 0000000000..0e3145b915 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011.xht @@ -0,0 +1,114 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013-ref.xht new file mode 100644 index 0000000000..a05914e705 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013.xht new file mode 100644 index 0000000000..3e685b254c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013.xht @@ -0,0 +1,124 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015-ref.xht new file mode 100644 index 0000000000..f1e1acad9d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' are 'auto' and bottom is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015.xht new file mode 100644 index 0000000000..a6d0143ad0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015.xht @@ -0,0 +1,119 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' are 'auto' and bottom is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017-ref.xht new file mode 100644 index 0000000000..733b9a04b3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017.xht new file mode 100644 index 0000000000..fe7ca0b701 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017.xht @@ -0,0 +1,110 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019-ref.xht new file mode 100644 index 0000000000..f90551d4c8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019-ref.xht @@ -0,0 +1,57 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'height' are 'auto and 'bottom' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019.xht new file mode 100644 index 0000000000..a9c8425241 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019.xht @@ -0,0 +1,123 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'height' are 'auto and 'bottom' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021-ref.xht new file mode 100644 index 0000000000..d29d7f4d06 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto and 'bottom' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021.xht new file mode 100644 index 0000000000..f9921e63fb --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021.xht @@ -0,0 +1,118 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto and 'bottom' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023-ref.xht new file mode 100644 index 0000000000..3d3d2af3fd --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023.xht new file mode 100644 index 0000000000..41d7213738 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023.xht @@ -0,0 +1,112 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025-ref.xht new file mode 100644 index 0000000000..86f4555e81 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025.xht new file mode 100644 index 0000000000..4b8cf20631 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025.xht @@ -0,0 +1,122 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027-ref.xht new file mode 100644 index 0000000000..0c725e83ae --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027.xht new file mode 100644 index 0000000000..c3d79ae997 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027.xht @@ -0,0 +1,116 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029-ref.xht new file mode 100644 index 0000000000..dd7458329e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029.xht new file mode 100644 index 0000000000..2a5b5e56a3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029.xht @@ -0,0 +1,110 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031-ref.xht new file mode 100644 index 0000000000..c9b7f5ed5d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031-ref.xht @@ -0,0 +1,57 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031.xht new file mode 100644 index 0000000000..7acfb2d4b6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031.xht @@ -0,0 +1,121 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033-ref.xht new file mode 100644 index 0000000000..5342e9c3df --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto and 'height' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033.xht new file mode 100644 index 0000000000..f1520328f3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033.xht @@ -0,0 +1,116 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto and 'height' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035-ref.xht new file mode 100644 index 0000000000..91a8a02635 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035.xht new file mode 100644 index 0000000000..f72648cd98 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035.xht @@ -0,0 +1,110 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037-ref.xht new file mode 100644 index 0000000000..81debc1f33 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037.xht new file mode 100644 index 0000000000..6c1d1a205b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037.xht @@ -0,0 +1,120 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039-ref.xht new file mode 100644 index 0000000000..82ea1a0418 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039.xht new file mode 100644 index 0000000000..25840ce04d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039.xht @@ -0,0 +1,117 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041-ref.xht new file mode 100644 index 0000000000..13c6d126f6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041.xht new file mode 100644 index 0000000000..460ef7a98b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041.xht @@ -0,0 +1,111 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043-ref.xht new file mode 100644 index 0000000000..44d3b928ed --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043.xht new file mode 100644 index 0000000000..0b54fb590d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043.xht @@ -0,0 +1,121 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045-ref.xht new file mode 100644 index 0000000000..b3a420fc38 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045.xht new file mode 100644 index 0000000000..0b202e6114 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045.xht @@ -0,0 +1,117 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047-ref.xht new file mode 100644 index 0000000000..8434ecf3ae --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047.xht new file mode 100644 index 0000000000..a5426ca7b4 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047.xht @@ -0,0 +1,111 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049-ref.xht new file mode 100644 index 0000000000..be5d151be2 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049.xht new file mode 100644 index 0000000000..62cecbb3d5 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049.xht @@ -0,0 +1,121 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051-ref.xht new file mode 100644 index 0000000000..0bde1b19ec --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051.xht new file mode 100644 index 0000000000..275a3f051e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051.xht @@ -0,0 +1,95 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053-ref.xht new file mode 100644 index 0000000000..53a92cddcc --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053.xht new file mode 100644 index 0000000000..afa02759f5 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055-ref.xht new file mode 100644 index 0000000000..8ad2c61a49 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055.xht new file mode 100644 index 0000000000..952292465c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057-ref.xht new file mode 100644 index 0000000000..367d888470 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057.xht new file mode 100644 index 0000000000..cf7af79afd --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057.xht @@ -0,0 +1,94 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059-ref.xht new file mode 100644 index 0000000000..ddb9b1f9ba --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059.xht new file mode 100644 index 0000000000..574c1d8f70 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061-ref.xht new file mode 100644 index 0000000000..2a4e3e8452 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061.xht new file mode 100644 index 0000000000..ddc3cb11f8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063-ref.xht new file mode 100644 index 0000000000..d19612ac38 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063.xht new file mode 100644 index 0000000000..bafb7d106a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063.xht @@ -0,0 +1,94 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065-ref.xht new file mode 100644 index 0000000000..3a7b02a8e0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' is 'auto', 'left' and 'right' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065.xht new file mode 100644 index 0000000000..5fd5d050c6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' is 'auto', 'left' and 'right' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067-ref.xht new file mode 100644 index 0000000000..d40647476f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067.xht new file mode 100644 index 0000000000..60ffa8047b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069-ref.xht new file mode 100644 index 0000000000..0b0d583d1c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069.xht new file mode 100644 index 0000000000..116d3759bb --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069.xht @@ -0,0 +1,94 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071-ref.xht new file mode 100644 index 0000000000..d088c8ee00 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071.xht new file mode 100644 index 0000000000..842c03d946 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073-ref.xht new file mode 100644 index 0000000000..f82d8e3efe --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073.xht new file mode 100644 index 0000000000..00162c62b5 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075-ref.xht new file mode 100644 index 0000000000..a058a2c79c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075.xht new file mode 100644 index 0000000000..e31044360c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075.xht @@ -0,0 +1,94 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077-ref.xht new file mode 100644 index 0000000000..0ebbc59eea --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077.xht new file mode 100644 index 0000000000..aa36898144 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079-ref.xht new file mode 100644 index 0000000000..808cdb1a6a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079.xht new file mode 100644 index 0000000000..ce862e1fe8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081-ref.xht new file mode 100644 index 0000000000..9af8baad5d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081.xht new file mode 100644 index 0000000000..cc3ee0476a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081.xht @@ -0,0 +1,94 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083-ref.xht new file mode 100644 index 0000000000..646241b50a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083.xht new file mode 100644 index 0000000000..0bca6edbcc --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085-ref.xht new file mode 100644 index 0000000000..1f1afd43d8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085.xht new file mode 100644 index 0000000000..0872461b9d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087-ref.xht new file mode 100644 index 0000000000..e9cdcfce18 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087.xht new file mode 100644 index 0000000000..99b6572b5a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087.xht @@ -0,0 +1,118 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089-ref.xht new file mode 100644 index 0000000000..9ba99e9845 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained) + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089.xht new file mode 100644 index 0000000000..f72441b996 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089.xht @@ -0,0 +1,112 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained) + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091-ref.xht new file mode 100644 index 0000000000..61be51411c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091.xht new file mode 100644 index 0000000000..ee22d9b057 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091.xht @@ -0,0 +1,122 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093-ref.xht new file mode 100644 index 0000000000..9248a251ef --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093.xht new file mode 100644 index 0000000000..c5b8d0c5e6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093.xht @@ -0,0 +1,118 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095-ref.xht new file mode 100644 index 0000000000..f89ea7b472 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095.xht new file mode 100644 index 0000000000..fcc8308df6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095.xht @@ -0,0 +1,112 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097-ref.xht new file mode 100644 index 0000000000..54c01741a8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097.xht new file mode 100644 index 0000000000..1f0a2292f3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097.xht @@ -0,0 +1,122 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002-ref.xht new file mode 100644 index 0000000000..fd594c18ee --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002.xht new file mode 100644 index 0000000000..297b4c7098 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002.xht @@ -0,0 +1,120 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004-ref.xht new file mode 100644 index 0000000000..3c242a069c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004-ref.xht @@ -0,0 +1,49 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto' + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004.xht new file mode 100644 index 0000000000..05d6e2369a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004.xht @@ -0,0 +1,115 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto' + + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006-ref.xht new file mode 100644 index 0000000000..0db0697256 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006.xht new file mode 100644 index 0000000000..74f9462d0e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006.xht @@ -0,0 +1,124 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008-ref.xht new file mode 100644 index 0000000000..01f86da916 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008.xht new file mode 100644 index 0000000000..bf0cba59a6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008.xht @@ -0,0 +1,120 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010-ref.xht new file mode 100644 index 0000000000..6299224f36 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010.xht new file mode 100644 index 0000000000..53a667d6e0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010.xht @@ -0,0 +1,114 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012-ref.xht new file mode 100644 index 0000000000..f2a3e2453f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012.xht new file mode 100644 index 0000000000..09b15a8ccb --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012.xht @@ -0,0 +1,124 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014-ref.xht new file mode 100644 index 0000000000..0891c22a07 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' are 'auto' and bottom is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014.xht new file mode 100644 index 0000000000..86cc97a90d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014.xht @@ -0,0 +1,119 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' are 'auto' and bottom is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016-ref.xht new file mode 100644 index 0000000000..733b9a04b3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016.xht new file mode 100644 index 0000000000..2e0c184439 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016.xht @@ -0,0 +1,110 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018-ref.xht new file mode 100644 index 0000000000..bb5775c586 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'height' are 'auto and 'bottom' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018.xht new file mode 100644 index 0000000000..96407d95cd --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018.xht @@ -0,0 +1,122 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'height' are 'auto and 'bottom' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020-ref.xht new file mode 100644 index 0000000000..a0efd31883 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto and 'bottom' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020.xht new file mode 100644 index 0000000000..ac4cb14d81 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020.xht @@ -0,0 +1,118 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto and 'bottom' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022-ref.xht new file mode 100644 index 0000000000..3d3d2af3fd --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022.xht new file mode 100644 index 0000000000..0f742e7d74 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022.xht @@ -0,0 +1,112 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024-ref.xht new file mode 100644 index 0000000000..686407dc3f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024.xht new file mode 100644 index 0000000000..d6d6828589 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024.xht @@ -0,0 +1,122 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026-ref.xht new file mode 100644 index 0000000000..2133c6f33d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026.xht new file mode 100644 index 0000000000..0ba56f48bd --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026.xht @@ -0,0 +1,116 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028-ref.xht new file mode 100644 index 0000000000..dd7458329e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028.xht new file mode 100644 index 0000000000..96567ca5bf --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028.xht @@ -0,0 +1,110 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030-ref.xht new file mode 100644 index 0000000000..87e733bb7e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030.xht new file mode 100644 index 0000000000..f89585eb4d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030.xht @@ -0,0 +1,120 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032-ref.xht new file mode 100644 index 0000000000..74a173cae8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto and 'height' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032.xht new file mode 100644 index 0000000000..6847a29b43 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032.xht @@ -0,0 +1,116 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto and 'height' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034-ref.xht new file mode 100644 index 0000000000..91a8a02635 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034.xht new file mode 100644 index 0000000000..7c57819813 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034.xht @@ -0,0 +1,110 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036-ref.xht new file mode 100644 index 0000000000..25bbb01feb --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036.xht new file mode 100644 index 0000000000..b1626955ab --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036.xht @@ -0,0 +1,120 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038-ref.xht new file mode 100644 index 0000000000..cc9fbebec7 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038.xht new file mode 100644 index 0000000000..f45c6200ac --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038.xht @@ -0,0 +1,117 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040-ref.xht new file mode 100644 index 0000000000..13c6d126f6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040.xht new file mode 100644 index 0000000000..fee04dd2b8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040.xht @@ -0,0 +1,111 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042-ref.xht new file mode 100644 index 0000000000..203611921d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042.xht new file mode 100644 index 0000000000..567adf3321 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042.xht @@ -0,0 +1,121 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044-ref.xht new file mode 100644 index 0000000000..daaaab6bbb --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044.xht new file mode 100644 index 0000000000..2eb2e576bf --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044.xht @@ -0,0 +1,117 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046-ref.xht new file mode 100644 index 0000000000..8434ecf3ae --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046.xht new file mode 100644 index 0000000000..efb42c82ac --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046.xht @@ -0,0 +1,111 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048-ref.xht new file mode 100644 index 0000000000..2591999123 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048.xht new file mode 100644 index 0000000000..f23a6b0749 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048.xht @@ -0,0 +1,121 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050-ref.xht new file mode 100644 index 0000000000..8d8a4f9381 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050.xht new file mode 100644 index 0000000000..733cddb1ea --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050.xht @@ -0,0 +1,95 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052-ref.xht new file mode 100644 index 0000000000..53a92cddcc --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052.xht new file mode 100644 index 0000000000..7cd717ff3a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054-ref.xht new file mode 100644 index 0000000000..8abe491094 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054.xht new file mode 100644 index 0000000000..7d34d371f3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056-ref.xht new file mode 100644 index 0000000000..15ecf83312 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056.xht new file mode 100644 index 0000000000..11924dea6c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056.xht @@ -0,0 +1,94 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058-ref.xht new file mode 100644 index 0000000000..ddb9b1f9ba --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058.xht new file mode 100644 index 0000000000..e17fe78bac --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060-ref.xht new file mode 100644 index 0000000000..35d6b307a2 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060.xht new file mode 100644 index 0000000000..f0329c2ac7 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062-ref.xht new file mode 100644 index 0000000000..ce2cf8b47f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062.xht new file mode 100644 index 0000000000..dd678065e6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062.xht @@ -0,0 +1,94 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064-ref.xht new file mode 100644 index 0000000000..3a7b02a8e0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' is 'auto', 'left' and 'right' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064.xht new file mode 100644 index 0000000000..4c8c125dc1 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' is 'auto', 'left' and 'right' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066-ref.xht new file mode 100644 index 0000000000..dbb96bd05d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066.xht new file mode 100644 index 0000000000..f7e0f60722 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068-ref.xht new file mode 100644 index 0000000000..f40e41b051 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068.xht new file mode 100644 index 0000000000..7c8d4445d8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068.xht @@ -0,0 +1,94 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070-ref.xht new file mode 100644 index 0000000000..d088c8ee00 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070.xht new file mode 100644 index 0000000000..aeabf6fdfd --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072-ref.xht new file mode 100644 index 0000000000..d164df55f4 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072.xht new file mode 100644 index 0000000000..4487233770 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074-ref.xht new file mode 100644 index 0000000000..ffffeddf84 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074.xht new file mode 100644 index 0000000000..c74527faff --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074.xht @@ -0,0 +1,94 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076-ref.xht new file mode 100644 index 0000000000..0ebbc59eea --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076.xht new file mode 100644 index 0000000000..e2f05a25ee --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078-ref.xht new file mode 100644 index 0000000000..85972a314b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078.xht new file mode 100644 index 0000000000..20c742d1f2 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080-ref.xht new file mode 100644 index 0000000000..ab013a5751 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080.xht new file mode 100644 index 0000000000..1449cb8367 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080.xht @@ -0,0 +1,94 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082-ref.xht new file mode 100644 index 0000000000..646241b50a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082.xht new file mode 100644 index 0000000000..8101222985 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082.xht @@ -0,0 +1,88 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084-ref.xht new file mode 100644 index 0000000000..a733a84e32 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084.xht new file mode 100644 index 0000000000..163a594ff6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084.xht @@ -0,0 +1,98 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086-ref.xht new file mode 100644 index 0000000000..92ac87b32c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086.xht new file mode 100644 index 0000000000..2f485caca9 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086.xht @@ -0,0 +1,118 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088-ref.xht new file mode 100644 index 0000000000..9ba99e9845 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained) + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088.xht new file mode 100644 index 0000000000..6d26c4d661 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088.xht @@ -0,0 +1,112 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained) + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090-ref.xht new file mode 100644 index 0000000000..6fa438f0cf --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090.xht new file mode 100644 index 0000000000..858fca40a7 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090.xht @@ -0,0 +1,122 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092-ref.xht new file mode 100644 index 0000000000..328354de56 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092.xht new file mode 100644 index 0000000000..f4516a7bf8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092.xht @@ -0,0 +1,118 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained) + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094-ref.xht new file mode 100644 index 0000000000..f89ea7b472 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094-ref.xht @@ -0,0 +1,48 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094.xht new file mode 100644 index 0000000000..1ef102f113 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094.xht @@ -0,0 +1,112 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096-ref.xht new file mode 100644 index 0000000000..165a00e351 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096-ref.xht @@ -0,0 +1,56 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096.xht new file mode 100644 index 0000000000..ede2cd4933 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096.xht @@ -0,0 +1,122 @@ + + + + + + + CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' + + + + + + + + + + + + + + + + + +

    Image download support must be enabled

    + +
    1 2 34X
    + + + \ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/support/Ahem.ttf b/layout/reftests/writing-mode/abspos/support/Ahem.ttf new file mode 100644 index 0000000000..e69de29bb2 diff --git a/layout/reftests/writing-mode/abspos/support/ahem.css b/layout/reftests/writing-mode/abspos/support/ahem.css new file mode 100644 index 0000000000..2d07a1d562 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/support/ahem.css @@ -0,0 +1,4 @@ +@font-face { + font-family: Ahem; + src: url("Ahem.ttf"); +} diff --git a/layout/reftests/writing-mode/abspos/support/bg-red-2col-2row-320x320.png b/layout/reftests/writing-mode/abspos/support/bg-red-2col-2row-320x320.png new file mode 100644 index 0000000000..4f354e9352 Binary files /dev/null and b/layout/reftests/writing-mode/abspos/support/bg-red-2col-2row-320x320.png differ diff --git a/layout/reftests/writing-mode/abspos/support/bg-red-2col-3row-320x320.png b/layout/reftests/writing-mode/abspos/support/bg-red-2col-3row-320x320.png new file mode 100644 index 0000000000..6eded69a4a Binary files /dev/null and b/layout/reftests/writing-mode/abspos/support/bg-red-2col-3row-320x320.png differ diff --git a/layout/reftests/writing-mode/abspos/support/bg-red-3col-2row-320x320.png b/layout/reftests/writing-mode/abspos/support/bg-red-3col-2row-320x320.png new file mode 100644 index 0000000000..5f4b53c46b Binary files /dev/null and b/layout/reftests/writing-mode/abspos/support/bg-red-3col-2row-320x320.png differ diff --git a/layout/reftests/writing-mode/abspos/support/bg-red-3col-3row-320x320.png b/layout/reftests/writing-mode/abspos/support/bg-red-3col-3row-320x320.png new file mode 100644 index 0000000000..4c2f6c8e63 Binary files /dev/null and b/layout/reftests/writing-mode/abspos/support/bg-red-3col-3row-320x320.png differ diff --git a/layout/reftests/writing-mode/abspos/support/pass-cdts-abs-pos-non-replaced.png b/layout/reftests/writing-mode/abspos/support/pass-cdts-abs-pos-non-replaced.png new file mode 100644 index 0000000000..15fd6065ef Binary files /dev/null and b/layout/reftests/writing-mode/abspos/support/pass-cdts-abs-pos-non-replaced.png differ diff --git a/layout/reftests/writing-mode/blue-yellow-165w-206h.png b/layout/reftests/writing-mode/blue-yellow-165w-206h.png new file mode 100644 index 0000000000..3d70889ee2 Binary files /dev/null and b/layout/reftests/writing-mode/blue-yellow-165w-206h.png differ diff --git a/layout/reftests/writing-mode/blue-yellow-206w-165h.png b/layout/reftests/writing-mode/blue-yellow-206w-165h.png new file mode 100644 index 0000000000..47ceb84d3f Binary files /dev/null and b/layout/reftests/writing-mode/blue-yellow-206w-165h.png differ diff --git a/layout/reftests/writing-mode/reftest.list b/layout/reftests/writing-mode/reftest.list index f32d2716cc..17b06dadab 100644 --- a/layout/reftests/writing-mode/reftest.list +++ b/layout/reftests/writing-mode/reftest.list @@ -124,3 +124,34 @@ test-pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLin pref(dom.meta-viewport.enabled,true) pref(font.size.inflation.emPerLine,15) pref(font.size.inflation.forceEnabled,true) pref(font.size.inflation.lineThreshold,0) != font-inflation-1c.html font-inflation-1d.html test-pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == font-inflation-1c.html font-inflation-1c-ref.html test-pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == font-inflation-1d.html font-inflation-1d-ref.html + +== 1144501-1a-block-end-margin-orthogonal-size.html 1144501-1-block-end-margin-orthogonal-size-ref.html +== 1144501-1b-block-end-margin-orthogonal-size.html 1144501-1-block-end-margin-orthogonal-size-ref.html +== 1147834-relative-overconstrained-horizontal-tb-ltr.html 1147834-bottom-right-ref.html +== 1147834-relative-overconstrained-horizontal-tb-rtl.html 1147834-bottom-left-ref.html +== 1147834-relative-overconstrained-vertical-lr-ltr.html 1147834-bottom-right-ref.html +fails == 1147834-relative-overconstrained-vertical-lr-rtl.html 1147834-top-right-ref.html # bug 1131451 +== 1147834-relative-overconstrained-vertical-rl-ltr.html 1147834-bottom-left-ref.html +fails == 1147834-relative-overconstrained-vertical-rl-rtl.html 1147834-top-left-ref.html # bug 1131451 +== 1151993-1-orthogonal-block-size.html 1151993-1-orthogonal-block-size-ref.html +== 1152941-1-orthogonal-blocksize-overflow.html 1152941-1-orthogonal-blocksize-overflow-ref.html +== 1156021-text-indent-percent.html 1156021-text-indent-percent-ref.html +== 1157752-upright-bidi.html 1157752-upright-bidi-ref.html +== 1157758-1-vertical-arabic.html 1157758-1-vertical-arabic-ref.html +== 1158549-1-vertical-block-size-constraints.html 1158549-1-vertical-block-size-constraints-ref.html +== 1163238-orthogonal-auto-margins.html 1163238-orthogonal-auto-margins-ref.html +== 1172774-percent-margin-1.html 1172774-percent-horizontal-ref.html +== 1172774-percent-margin-2.html 1172774-percent-horizontal-ref.html +== 1172774-percent-margin-3.html 1172774-percent-vertical-ref.html +== 1172774-percent-margin-4.html 1172774-percent-vertical-ref.html +== 1172774-percent-padding-1.html 1172774-percent-horizontal-ref.html +== 1172774-percent-padding-2.html 1172774-percent-horizontal-ref.html +== 1172774-percent-padding-3.html 1172774-percent-vertical-ref.html +== 1172774-percent-padding-4.html 1172774-percent-vertical-ref.html +== 1174450-intrinsic-sizing.html 1174450-intrinsic-sizing-ref.html + +# Suite of tests from Gérard Talbot in bug 1079151 +include abspos/reftest.list + +# Tests for tables with vertical writing modes +include tables/reftest.list diff --git a/layout/reftests/writing-mode/swatch-yellow.png b/layout/reftests/writing-mode/swatch-yellow.png new file mode 100644 index 0000000000..e69de29bb2 diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-002-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-002-ref.html new file mode 100644 index 0000000000..3ce178442a --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-002-ref.html @@ -0,0 +1,25 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if the boxes below are the same height.

    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-002-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-002-vlr.html new file mode 100644 index 0000000000..99aeab7868 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-002-vlr.html @@ -0,0 +1,53 @@ + + + + CSS Test: Value other than 'auto' for column height sets height of cells in the column + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + +
    X
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-002-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-002-vrl.html new file mode 100644 index 0000000000..adbbff9259 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-002-vrl.html @@ -0,0 +1,54 @@ + + + + CSS Test: Value other than 'auto' for column height sets height of cells in the column + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + +
    X
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-003-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-003-vlr.html new file mode 100644 index 0000000000..30913cbf78 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-003-vlr.html @@ -0,0 +1,49 @@ + + + + CSS Test: Cell in the first row with specified height sets the height for the column + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + +
    X
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-003-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-003-vrl.html new file mode 100644 index 0000000000..0dd80b978b --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-003-vrl.html @@ -0,0 +1,49 @@ + + + + CSS Test: Cell in the first row with specified height sets the height for the column + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + +
    X
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-004-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-004-ref.html new file mode 100644 index 0000000000..f1575a900e --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-004-ref.html @@ -0,0 +1,33 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if the blue and black bars are the same height +and the gray and orange boxes are half of that height.

    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-004-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-004-vlr.html new file mode 100644 index 0000000000..a8a6a8f9fa --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-004-vlr.html @@ -0,0 +1,61 @@ + + + + CSS Test: Fixed table layout + + + + + + + + +

    Test passes if the blue and black bars are the same height +and the gray and orange boxes are half of that height.

    +
    + + + + + + + + +
    +
    + + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-004-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-004-vrl.html new file mode 100644 index 0000000000..efa93023be --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-004-vrl.html @@ -0,0 +1,61 @@ + + + + CSS Test: Fixed table layout + + + + + + + + +

    Test passes if the blue and black bars are the same height +and the gray and orange boxes are half of that height.

    +
    + + + + + + + + +
    +
    + + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-005-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-005-ref.html new file mode 100644 index 0000000000..8f1efad6da --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-005-ref.html @@ -0,0 +1,42 @@ + + + + CSS Test: Leftover table height is divided evenly among auto-sized columns + + + + + + + + +
    +
    +
    1
    +
    2
    +
    3
    +
    4
    +
    5
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-005-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-005-vlr.html new file mode 100644 index 0000000000..1b2288946f --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-005-vlr.html @@ -0,0 +1,55 @@ + + + + CSS Test: Leftover table height is divided evenly among auto-sized columns + + + + + + + + +
    + + + + + + + + + + + + + + +
    12345
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-005-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-005-vrl.html new file mode 100644 index 0000000000..bc22d3db6c --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-005-vrl.html @@ -0,0 +1,55 @@ + + + + CSS Test: Leftover table height is divided evenly among auto-sized columns + + + + + + + + +
    + + + + + + + + + + + + + + +
    12345
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-006-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-006-ref.html new file mode 100644 index 0000000000..42e28b5e39 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-006-ref.html @@ -0,0 +1,33 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if all of the blue lines below appear to have the same height.

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-006-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-006-vlr.html new file mode 100644 index 0000000000..3ccbff1eda --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-006-vlr.html @@ -0,0 +1,44 @@ + + + + CSS Test: Remaining table height is divided evenly among non auto-sized columns (minus borders and cell spacing) + + + + + + + + +

    Test passes if all of the blue lines below appear to have the same height.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-006-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-006-vrl.html new file mode 100644 index 0000000000..821e4c6820 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-006-vrl.html @@ -0,0 +1,44 @@ + + + + CSS Test: Remaining table height is divided evenly among non auto-sized columns (minus borders and cell spacing) + + + + + + + + +

    Test passes if all of the blue lines below appear to have the same height.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-007-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-007-ref.html new file mode 100644 index 0000000000..4313090884 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-007-ref.html @@ -0,0 +1,25 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if the boxes below are the same height.

    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-007-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-007-vlr.html new file mode 100644 index 0000000000..9cd003f81c --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-007-vlr.html @@ -0,0 +1,47 @@ + + + + CSS Test: Fixed table height is maximum between table and sum of column 'height' (table height wins) + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + +
    XX
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-007-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-007-vrl.html new file mode 100644 index 0000000000..b5b3e30027 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-007-vrl.html @@ -0,0 +1,48 @@ + + + + CSS Test: Fixed table height is maximum between table and sum of column 'height' (table height wins) + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + +
    XX
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-009-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-009-ref.html new file mode 100644 index 0000000000..89ca8ffaff --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-009-ref.html @@ -0,0 +1,42 @@ + + + + CSS Test: Cell that overflows a fixed-height table + + + + + + + + +
    +
    FillerTextFillerTextFillerTextFiller
    +
    Test passes if the text in the blue rectangle to the left + of this line spills outside of its bottom border and the text + in the blue rectangle to the right of this line is contained + within the rectangle's border (and appears to be cut off on + its bottom edge).
    +
    FillerTextFillerTextFillerTextFiller
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-009-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-009-vlr.html new file mode 100644 index 0000000000..5d26b97281 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-009-vlr.html @@ -0,0 +1,46 @@ + + + + CSS Test: Cell that overflows a fixed-height table + + + + + + + + +
    +
    FillerTextFillerTextFillerTextFiller
    +
    Test passes if the text in the blue rectangle to the left + of this line spills outside of its bottom border and the text + in the blue rectangle to the right of this line is contained + within the rectangle's border (and appears to be cut off on + its bottom edge).
    +
    FillerTextFillerTextFillerTextFiller
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-009-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-009-vrl.html new file mode 100644 index 0000000000..639103d158 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-009-vrl.html @@ -0,0 +1,46 @@ + + + + CSS Test: Cell that overflows a fixed-height table + + + + + + + + +
    +
    FillerTextFillerTextFillerTextFiller
    +
    Test passes if the text in the blue rectangle to the left + of this line spills outside of its bottom border and the text + in the blue rectangle to the right of this line is contained + within the rectangle's border (and appears to be cut off on + its bottom edge).
    +
    FillerTextFillerTextFillerTextFiller
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-010-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-010-ref.html new file mode 100644 index 0000000000..5ca0f37baa --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-010-ref.html @@ -0,0 +1,30 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if the boxes below are the same height and the +blue box has the words "Filler Text" in the middle, +overflowing below the box.

    +
    +
    +
    Filler Text Filler Text Filler Text
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-010-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-010-vlr.html new file mode 100644 index 0000000000..1ef6d7d6ad --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-010-vlr.html @@ -0,0 +1,70 @@ + + + + CSS Test: Subsequent rows in fixed table layout + + + + + + + + +

    Test passes if the boxes below are the same height and the +blue box has the words "Filler Text" in the middle, +overflowing below the box.

    +
    + + + + + + + + + + + + + +
    Filler Text Filler Text Filler Text
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-010-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-010-vrl.html new file mode 100644 index 0000000000..f062e8617c --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-010-vrl.html @@ -0,0 +1,70 @@ + + + + CSS Test: Subsequent rows in fixed table layout + + + + + + + + +

    Test passes if the boxes below are the same height and the +blue box has the words "Filler Text" in the middle, +overflowing below the box.

    +
    +
    + + + + + + + + + + + + + +
    Filler Text Filler Text Filler Text
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-012-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-012-ref.html new file mode 100644 index 0000000000..52e387c9f7 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-012-ref.html @@ -0,0 +1,25 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if the boxes below are the same height.

    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-012-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-012-vlr.html new file mode 100644 index 0000000000..ef25ceedc8 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-012-vlr.html @@ -0,0 +1,54 @@ + + + + CSS Test: Fixed table layout - specified column height overrides first-cell specified height + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + +
    X
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-012-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-012-vrl.html new file mode 100644 index 0000000000..e443494973 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-012-vrl.html @@ -0,0 +1,55 @@ + + + + CSS Test: Fixed table layout - specified column height overrides first-cell specified height + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + +
    X
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-013-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-013-vlr.html new file mode 100644 index 0000000000..4d8f763866 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-013-vlr.html @@ -0,0 +1,59 @@ + + + + CSS Test: Fixed table layout - specified column-group height + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + + + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-013-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-013-vrl.html new file mode 100644 index 0000000000..147c3db0fd --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-013-vrl.html @@ -0,0 +1,59 @@ + + + + CSS Test: Fixed table layout - specified column-group height + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + + + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-014-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-014-vlr.html new file mode 100644 index 0000000000..0f9a51ac82 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-014-vlr.html @@ -0,0 +1,62 @@ + + + + CSS Test: Fixed table layout - specified column height overrides specified column-group height + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + + + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-014-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-014-vrl.html new file mode 100644 index 0000000000..aac53493c6 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-014-vrl.html @@ -0,0 +1,62 @@ + + + + CSS Test: Fixed table layout - specified column height overrides specified column-group height + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + + + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-015-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-015-vlr.html new file mode 100644 index 0000000000..cbb026d34f --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-015-vlr.html @@ -0,0 +1,60 @@ + + + + CSS Test: Fixed table layout - specified cell height overrides specified column-group height + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + + + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-015-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-015-vrl.html new file mode 100644 index 0000000000..50f378d860 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-015-vrl.html @@ -0,0 +1,63 @@ + + + + CSS Test: Fixed table layout - specified cell height overrides specified column-group height + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + + + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-016-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-016-vlr.html new file mode 100644 index 0000000000..ad4b6944e0 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-016-vlr.html @@ -0,0 +1,52 @@ + + + + CSS Test: Fixed table height is maximum between table and sum of column 'height' (sum of columns' heights wins) + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-016-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-016-vrl.html new file mode 100644 index 0000000000..604dacbe49 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-016-vrl.html @@ -0,0 +1,52 @@ + + + + CSS Test: Fixed table height is maximum between table and sum of column 'height' (sum of columns' heights wins) + + + + + + + + +

    Test passes if the boxes below are the same height.

    +
    + + + + + + + +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-017-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-017-ref.html new file mode 100644 index 0000000000..237db1a831 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-017-ref.html @@ -0,0 +1,29 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if the orange stripe is exactly as high as the blue stripe and is vertically positioned the same.

    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-017-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-017-vlr.html new file mode 100644 index 0000000000..d3d0e4d025 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-017-vlr.html @@ -0,0 +1,90 @@ + + + + CSS Test: table-layout fixed - columns with percentage height + + + + + + + + + +

    Test passes if the orange stripe is exactly as high as the blue stripe and is vertically positioned the same.

    +
    + + + + + + + + + + + +
    col
    +
    ref
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-017-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-017-vrl.html new file mode 100644 index 0000000000..b4d90e3a13 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-017-vrl.html @@ -0,0 +1,90 @@ + + + + CSS Test: table-layout fixed - columns with percentage height + + + + + + + + + +

    Test passes if the orange stripe is exactly as high as the blue stripe and is vertically positioned the same.

    +
    +
    ref
    + + + + + + + + + + + +
    col
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-018-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-018-vlr.html new file mode 100644 index 0000000000..266caae5ee --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-018-vlr.html @@ -0,0 +1,93 @@ + + + + CSS Test: table-layout fixed - columns with percentage height + + + + + + + + + +

    Test passes if the orange stripe is exactly as high as the blue stripe and is vertically positioned the same.

    +
    + + + + + + + + + + + +
    col
    +
    ref
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-018-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-018-vrl.html new file mode 100644 index 0000000000..7b3f3f5170 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-018-vrl.html @@ -0,0 +1,94 @@ + + + + CSS Test: table-layout fixed - columns with percentage height + + + + + + + + + +

    Test passes if the orange stripe is exactly as high as the blue stripe and is vertically positioned the same.

    +
    +
    ref
    + + + + + + + + + + + +
    col
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-021-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-021-ref.html new file mode 100644 index 0000000000..67214d000b --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-021-ref.html @@ -0,0 +1,44 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if the colored (fuchsia, olive and orange) stripes have respectively the same heights and the same vertical positions.

    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-021-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-021-vlr.html new file mode 100644 index 0000000000..e929c92b25 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-021-vlr.html @@ -0,0 +1,140 @@ + + + + CSS Test: table-layout fixed - columns with percentage height + + + + + + + + + +

    Test passes if the colored (fuchsia, olive and orange) stripes have respectively the same heights and the same vertical positions.

    +
    + + + + + + + + + + + +
    1st2nd3rd
    +
    ref
    +
    ref
    +
    ref
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-021-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-021-vrl.html new file mode 100644 index 0000000000..0486684b93 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-021-vrl.html @@ -0,0 +1,140 @@ + + + + CSS Test: table-layout fixed - columns with percentage height + + + + + + + + + +

    Test passes if the colored (fuchsia, olive and orange) stripes have respectively the same heights and the same vertical positions.

    +
    +
    ref
    +
    ref
    +
    ref
    + + + + + + + + + + + +
    1st2nd3rd
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-022-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-022-ref.html new file mode 100644 index 0000000000..febe38ac47 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-022-ref.html @@ -0,0 +1,49 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if the colored (fuchsia, olive, orange and lime) stripes have respectively the same heights and the same vertical positions.

    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-022-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-022-vlr.html new file mode 100644 index 0000000000..cfeef6be81 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-022-vlr.html @@ -0,0 +1,170 @@ + + + + CSS Test: table-layout fixed - columns with percentage height and absolute height + + + + + + + + + +

    Test passes if the colored (fuchsia, olive, orange and lime) stripes have respectively the same heights and the same vertical positions.

    +
    + + + + + + + + + + + +
    1st2nd3rd4th
    +
    ref
    +
    ref
    +
    ref
    +
    ref
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-022-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-022-vrl.html new file mode 100644 index 0000000000..c26b0938fc --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-022-vrl.html @@ -0,0 +1,170 @@ + + + + CSS Test: table-layout fixed - columns with percentage height and absolute height + + + + + + + + + +

    Test passes if the colored (fuchsia, olive, orange and lime) stripes have respectively the same heights and the same vertical positions.

    +
    +
    ref
    +
    ref
    +
    ref
    +
    ref
    + + + + + + + + + + + +
    1st2nd3rd4th
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-023-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-023-ref.html new file mode 100644 index 0000000000..4211763ab4 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-023-ref.html @@ -0,0 +1,49 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if the colored (fuchsia, olive, orange and lime) stripes have respectively the same heights and the same vertical positions.

    +
    +
    +
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-023-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-023-vlr.html new file mode 100644 index 0000000000..57eed6640d --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-023-vlr.html @@ -0,0 +1,175 @@ + + + + CSS Test: table-layout fixed - columns with percentage height and absolute height + + + + + + + + + +

    Test passes if the colored (fuchsia, olive, orange and lime) stripes have respectively the same heights and the same vertical positions.

    +
    + + + + + + + + + + + +
    1st2nd3rd4th
    +
    ref
    +
    ref
    +
    ref
    +
    ref
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-023-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-023-vrl.html new file mode 100644 index 0000000000..3f6b042d8b --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-023-vrl.html @@ -0,0 +1,175 @@ + + + + CSS Test: table-layout fixed - columns with percentage height and absolute height + + + + + + + + + +

    Test passes if the colored (fuchsia, olive, orange and lime) stripes have respectively the same heights and the same vertical positions.

    +
    +
    ref
    +
    ref
    +
    ref
    +
    ref
    + + + + + + + + + + + +
    1st2nd3rd4th
    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-025-ref.html b/layout/reftests/writing-mode/tables/fixed-table-layout-025-ref.html new file mode 100644 index 0000000000..172b85ac9a --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-025-ref.html @@ -0,0 +1,23 @@ + + + + CSS Reftest Reference + + + + + +

    Test passes if there is a filled green square and no red.

    +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-025-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-025-vlr.html new file mode 100644 index 0000000000..530eeee5aa --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-025-vlr.html @@ -0,0 +1,40 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-025-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-025-vrl.html new file mode 100644 index 0000000000..26ffd948b7 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-025-vrl.html @@ -0,0 +1,40 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-026-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-026-vlr.html new file mode 100644 index 0000000000..5abcba40f0 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-026-vlr.html @@ -0,0 +1,42 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-026-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-026-vrl.html new file mode 100644 index 0000000000..bd4b2438bc --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-026-vrl.html @@ -0,0 +1,42 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-027-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-027-vlr.html new file mode 100644 index 0000000000..120475baa3 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-027-vlr.html @@ -0,0 +1,44 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-027-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-027-vrl.html new file mode 100644 index 0000000000..bd30dacef1 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-027-vrl.html @@ -0,0 +1,44 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-028-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-028-vlr.html new file mode 100644 index 0000000000..9837521763 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-028-vlr.html @@ -0,0 +1,42 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-028-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-028-vrl.html new file mode 100644 index 0000000000..f975ed45fd --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-028-vrl.html @@ -0,0 +1,42 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-029-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-029-vlr.html new file mode 100644 index 0000000000..4b55f1f46e --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-029-vlr.html @@ -0,0 +1,44 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-029-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-029-vrl.html new file mode 100644 index 0000000000..08f7458d8b --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-029-vrl.html @@ -0,0 +1,44 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-030-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-030-vlr.html new file mode 100644 index 0000000000..e68ff76429 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-030-vlr.html @@ -0,0 +1,41 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-030-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-030-vrl.html new file mode 100644 index 0000000000..a88bfe0ccb --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-030-vrl.html @@ -0,0 +1,41 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-031-vlr.html b/layout/reftests/writing-mode/tables/fixed-table-layout-031-vlr.html new file mode 100644 index 0000000000..047daac238 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-031-vlr.html @@ -0,0 +1,41 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/fixed-table-layout-031-vrl.html b/layout/reftests/writing-mode/tables/fixed-table-layout-031-vrl.html new file mode 100644 index 0000000000..cc9ea74c89 --- /dev/null +++ b/layout/reftests/writing-mode/tables/fixed-table-layout-031-vrl.html @@ -0,0 +1,41 @@ + + + + CSS Test: percentage height set on table-cell in 'table-layout: fixed' table + + + + + + + + + + + +

    Test passes if there is a filled green square and no red.

    + + + + + + +
    + + diff --git a/layout/reftests/writing-mode/tables/reftest.list b/layout/reftests/writing-mode/tables/reftest.list new file mode 100644 index 0000000000..690d93a063 --- /dev/null +++ b/layout/reftests/writing-mode/tables/reftest.list @@ -0,0 +1,64 @@ +== vertical-table-1a.html vertical-table-1-ref.html +== vertical-table-1b.html vertical-table-1-ref.html +== vertical-table-2a.html vertical-table-2-ref.html +== vertical-table-2b.html vertical-table-2-ref.html +== vertical-table-rowspan-1.html vertical-table-rowspan-1-ref.html +== vertical-table-rowspan-2.html vertical-table-rowspan-2-ref.html +== vertical-table-colspan-1.html vertical-table-colspan-1-ref.html +== vertical-table-colspan-2.html vertical-table-colspan-2-ref.html +== vertical-table-specified-width-1.html vertical-table-specified-width-1-ref.html +== vertical-table-specified-width-2.html vertical-table-specified-width-2-ref.html +fuzzy-if(cocoaWidget,141,24) == vertical-border-collapse-1.html vertical-border-collapse-1-ref.html +fuzzy-if(cocoaWidget,141,24) == vertical-border-collapse-2.html vertical-border-collapse-2-ref.html + +== fixed-table-layout-002-vlr.html fixed-table-layout-002-ref.html +== fixed-table-layout-003-vlr.html fixed-table-layout-002-ref.html +== fixed-table-layout-004-vlr.html fixed-table-layout-004-ref.html +== fixed-table-layout-005-vlr.html fixed-table-layout-005-ref.html +== fixed-table-layout-006-vlr.html fixed-table-layout-006-ref.html +== fixed-table-layout-007-vlr.html fixed-table-layout-007-ref.html +== fixed-table-layout-009-vlr.html fixed-table-layout-009-ref.html +random == fixed-table-layout-010-vlr.html fixed-table-layout-010-ref.html # bug 1178059 +== fixed-table-layout-012-vlr.html fixed-table-layout-012-ref.html +== fixed-table-layout-013-vlr.html fixed-table-layout-002-ref.html +== fixed-table-layout-014-vlr.html fixed-table-layout-002-ref.html +== fixed-table-layout-015-vlr.html fixed-table-layout-002-ref.html +== fixed-table-layout-016-vlr.html fixed-table-layout-002-ref.html +== fixed-table-layout-017-vlr.html fixed-table-layout-017-ref.html +== fixed-table-layout-018-vlr.html fixed-table-layout-017-ref.html +== fixed-table-layout-021-vlr.html fixed-table-layout-021-ref.html +== fixed-table-layout-022-vlr.html fixed-table-layout-022-ref.html +== fixed-table-layout-023-vlr.html fixed-table-layout-023-ref.html +== fixed-table-layout-025-vlr.html fixed-table-layout-025-ref.html +== fixed-table-layout-026-vlr.html fixed-table-layout-025-ref.html +== fixed-table-layout-027-vlr.html fixed-table-layout-025-ref.html +== fixed-table-layout-028-vlr.html fixed-table-layout-025-ref.html +== fixed-table-layout-029-vlr.html fixed-table-layout-025-ref.html +== fixed-table-layout-030-vlr.html fixed-table-layout-025-ref.html +== fixed-table-layout-031-vlr.html fixed-table-layout-025-ref.html + +== fixed-table-layout-002-vrl.html fixed-table-layout-002-ref.html +== fixed-table-layout-003-vrl.html fixed-table-layout-002-ref.html +== fixed-table-layout-004-vrl.html fixed-table-layout-004-ref.html +== fixed-table-layout-005-vrl.html fixed-table-layout-005-ref.html +== fixed-table-layout-006-vrl.html fixed-table-layout-006-ref.html +== fixed-table-layout-007-vrl.html fixed-table-layout-007-ref.html +== fixed-table-layout-009-vrl.html fixed-table-layout-009-ref.html +random == fixed-table-layout-010-vrl.html fixed-table-layout-010-ref.html # bug 1178059 +== fixed-table-layout-012-vrl.html fixed-table-layout-012-ref.html +== fixed-table-layout-013-vrl.html fixed-table-layout-002-ref.html +== fixed-table-layout-014-vrl.html fixed-table-layout-002-ref.html +== fixed-table-layout-015-vrl.html fixed-table-layout-002-ref.html +== fixed-table-layout-016-vrl.html fixed-table-layout-002-ref.html +== fixed-table-layout-017-vrl.html fixed-table-layout-017-ref.html +== fixed-table-layout-018-vrl.html fixed-table-layout-017-ref.html +== fixed-table-layout-021-vrl.html fixed-table-layout-021-ref.html +== fixed-table-layout-022-vrl.html fixed-table-layout-022-ref.html +== fixed-table-layout-023-vrl.html fixed-table-layout-023-ref.html +== fixed-table-layout-025-vrl.html fixed-table-layout-025-ref.html +== fixed-table-layout-026-vrl.html fixed-table-layout-025-ref.html +== fixed-table-layout-027-vrl.html fixed-table-layout-025-ref.html +== fixed-table-layout-028-vrl.html fixed-table-layout-025-ref.html +== fixed-table-layout-029-vrl.html fixed-table-layout-025-ref.html +== fixed-table-layout-030-vrl.html fixed-table-layout-025-ref.html +== fixed-table-layout-031-vrl.html fixed-table-layout-025-ref.html diff --git a/layout/reftests/writing-mode/tables/vertical-border-collapse-1-ref.html b/layout/reftests/writing-mode/tables/vertical-border-collapse-1-ref.html new file mode 100644 index 0000000000..30e67d7dda --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-border-collapse-1-ref.html @@ -0,0 +1,49 @@ + + + + + + + + + ++ + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-border-collapse-1.html b/layout/reftests/writing-mode/tables/vertical-border-collapse-1.html new file mode 100644 index 0000000000..599302ff79 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-border-collapse-1.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-border-collapse-2-ref.html b/layout/reftests/writing-mode/tables/vertical-border-collapse-2-ref.html new file mode 100644 index 0000000000..a74ee00655 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-border-collapse-2-ref.html @@ -0,0 +1,49 @@ + + + + + + + + + ++ + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-border-collapse-2.html b/layout/reftests/writing-mode/tables/vertical-border-collapse-2.html new file mode 100644 index 0000000000..9c602ebdbb --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-border-collapse-2.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-1-ref.html b/layout/reftests/writing-mode/tables/vertical-table-1-ref.html new file mode 100644 index 0000000000..093acf6b03 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-1-ref.html @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-1a.html b/layout/reftests/writing-mode/tables/vertical-table-1a.html new file mode 100644 index 0000000000..aea9a2198d --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-1a.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-1b.html b/layout/reftests/writing-mode/tables/vertical-table-1b.html new file mode 100644 index 0000000000..8acd2ab109 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-1b.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-2-ref.html b/layout/reftests/writing-mode/tables/vertical-table-2-ref.html new file mode 100644 index 0000000000..2e5b9fb2a1 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-2-ref.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-2a.html b/layout/reftests/writing-mode/tables/vertical-table-2a.html new file mode 100644 index 0000000000..e735076177 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-2a.html @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-2b.html b/layout/reftests/writing-mode/tables/vertical-table-2b.html new file mode 100644 index 0000000000..b075388172 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-2b.html @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-colspan-1-ref.html b/layout/reftests/writing-mode/tables/vertical-table-colspan-1-ref.html new file mode 100644 index 0000000000..3c902df9db --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-colspan-1-ref.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-colspan-1.html b/layout/reftests/writing-mode/tables/vertical-table-colspan-1.html new file mode 100644 index 0000000000..b93851d16c --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-colspan-1.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-colspan-2-ref.html b/layout/reftests/writing-mode/tables/vertical-table-colspan-2-ref.html new file mode 100644 index 0000000000..47f7ed04d6 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-colspan-2-ref.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-colspan-2.html b/layout/reftests/writing-mode/tables/vertical-table-colspan-2.html new file mode 100644 index 0000000000..eb840c5d71 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-colspan-2.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-rowspan-1-ref.html b/layout/reftests/writing-mode/tables/vertical-table-rowspan-1-ref.html new file mode 100644 index 0000000000..fd7a6738aa --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-rowspan-1-ref.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-rowspan-1.html b/layout/reftests/writing-mode/tables/vertical-table-rowspan-1.html new file mode 100644 index 0000000000..bc368cce6d --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-rowspan-1.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-rowspan-2-ref.html b/layout/reftests/writing-mode/tables/vertical-table-rowspan-2-ref.html new file mode 100644 index 0000000000..2c1b7d9774 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-rowspan-2-ref.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-rowspan-2.html b/layout/reftests/writing-mode/tables/vertical-table-rowspan-2.html new file mode 100644 index 0000000000..da4cc58929 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-rowspan-2.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-specified-width-1-ref.html b/layout/reftests/writing-mode/tables/vertical-table-specified-width-1-ref.html new file mode 100644 index 0000000000..03820b7f6f --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-specified-width-1-ref.html @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-specified-width-1.html b/layout/reftests/writing-mode/tables/vertical-table-specified-width-1.html new file mode 100644 index 0000000000..f8aaaf88a9 --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-specified-width-1.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-specified-width-2-ref.html b/layout/reftests/writing-mode/tables/vertical-table-specified-width-2-ref.html new file mode 100644 index 0000000000..cbd125d8dd --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-specified-width-2-ref.html @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/reftests/writing-mode/tables/vertical-table-specified-width-2.html b/layout/reftests/writing-mode/tables/vertical-table-specified-width-2.html new file mode 100644 index 0000000000..6d85079dde --- /dev/null +++ b/layout/reftests/writing-mode/tables/vertical-table-specified-width-2.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/layout/style/AnimationCommon.h b/layout/style/AnimationCommon.h index 7bde06455a..34278a566c 100644 --- a/layout/style/AnimationCommon.h +++ b/layout/style/AnimationCommon.h @@ -161,6 +161,14 @@ protected: return false; } + // Return an AnimationCollection* if we have an animation for + // the element aContent and pseudo-element indicator aElementProperty + // that can be performed on the compositor thread (as defined by + // AnimationCollection::CanPerformOnCompositorThread). + // + // Note that this does not test whether the element's layer uses + // off-main-thread compositing, although it does check whether + // off-main-thread compositing is enabled as a whole. static AnimationCollection* GetAnimationsForCompositor(nsIContent* aContent, nsIAtom* aElementProperty, @@ -283,11 +291,13 @@ struct AnimationCollection : public PRCList CanAnimate_AllowPartial = 2 }; +private: static bool CanAnimatePropertyOnCompositor(const dom::Element *aElement, nsCSSProperty aProperty, CanAnimateFlags aFlags); +public: static bool IsCompositorAnimationDisabledForFrame(nsIFrame* aFrame); // True if this animation can be performed on the compositor thread. @@ -303,6 +313,10 @@ struct AnimationCollection : public PRCList // time can be fully represented by data sent to the compositor. // (This is useful for determining whether throttle the animation // (suppress main-thread style updates).) + // + // Note that this does not test whether the element's layer uses + // off-main-thread compositing, although it does check whether + // off-main-thread compositing is enabled as a whole. bool CanPerformOnCompositorThread(CanAnimateFlags aFlags) const; void PostUpdateLayerAnimations(); diff --git a/layout/style/RuleNodeCacheConditions.cpp b/layout/style/RuleNodeCacheConditions.cpp new file mode 100644 index 0000000000..2dbb6c344e --- /dev/null +++ b/layout/style/RuleNodeCacheConditions.cpp @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=78: */ +/* 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/. */ + +/* + * an object that stores the result of determining whether a style struct that + * was computed can be cached in the rule tree, and if so, what the cache + * key is + */ + +#include "RuleNodeCacheConditions.h" + +#include "nsStyleContext.h" +#include "WritingModes.h" + +using namespace mozilla; + +bool +RuleNodeCacheConditions::Matches(nsStyleContext* aStyleContext) const +{ + MOZ_ASSERT(Cacheable()); + if ((mBits & eHaveFontSize) && + mFontSize != aStyleContext->StyleFont()->mFont.size) { + return false; + } + if ((mBits & eHaveWritingMode) && + (GetWritingMode() != WritingMode(aStyleContext).GetBits())) { + return false; + } + return true; +} + +#ifdef DEBUG +void +RuleNodeCacheConditions::List() const +{ + printf("{ "); + bool first = true; + if (mBits & eHaveFontSize) { + printf("FontSize(%d)", mFontSize); + first = false; + } + if (mBits & eHaveWritingMode) { + if (!first) { + printf(", "); + } + printf("WritingMode(0x%x)", GetWritingMode()); + } + printf(" }"); +} +#endif diff --git a/layout/style/RuleNodeCacheConditions.h b/layout/style/RuleNodeCacheConditions.h new file mode 100644 index 0000000000..e34b6a8381 --- /dev/null +++ b/layout/style/RuleNodeCacheConditions.h @@ -0,0 +1,120 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* 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/. */ + +/* + * an object that stores the result of determining whether a style struct that + * was computed can be cached in the rule tree, and if so, what the conditions + * it relies on are + */ + +#ifndef RuleNodeCacheConditions_h_ +#define RuleNodeCacheConditions_h_ + +#include "mozilla/Attributes.h" +#include "nsCoord.h" +#include "nsTArray.h" + +class nsStyleContext; + +namespace mozilla { + +class RuleNodeCacheConditions +{ +public: + RuleNodeCacheConditions() + : mFontSize(0), mBits(0) {} + RuleNodeCacheConditions(const RuleNodeCacheConditions& aOther) + : mFontSize(aOther.mFontSize), mBits(aOther.mBits) {} + RuleNodeCacheConditions& operator=(const RuleNodeCacheConditions& aOther) + { + mFontSize = aOther.mFontSize; + mBits = aOther.mBits; + return *this; + } + bool operator==(const RuleNodeCacheConditions& aOther) const + { + return mFontSize == aOther.mFontSize && + mBits == aOther.mBits; + } + bool operator!=(const RuleNodeCacheConditions& aOther) const + { + return !(*this == aOther); + } + + bool Matches(nsStyleContext* aStyleContext) const; + + void SetFontSizeDependency(nscoord aCoord) + { + MOZ_ASSERT(!(mBits & eHaveFontSize) || mFontSize == aCoord); + mFontSize = aCoord; + mBits |= eHaveFontSize; + } + + void SetWritingModeDependency(uint8_t aWritingMode) + { + MOZ_ASSERT(!(mBits & eHaveWritingMode) || GetWritingMode() == aWritingMode); + mBits |= (static_cast(aWritingMode) << eWritingModeShift) | + eHaveWritingMode; + } + + void SetUncacheable() + { + mBits |= eUncacheable; + } + + bool Cacheable() const + { + return !(mBits & eUncacheable); + } + + bool CacheableWithDependencies() const + { + return !(mBits & eUncacheable) && + (mBits & eHaveBitsMask) != 0; + } + + bool CacheableWithoutDependencies() const + { + // We're not uncacheable and we have don't have a font-size or + // writing mode value. + return (mBits & eHaveBitsMask) == 0; + } + +#ifdef DEBUG + void List() const; +#endif + +private: + enum { + eUncacheable = 0x0001, + eHaveFontSize = 0x0002, + eHaveWritingMode = 0x0004, + eHaveBitsMask = 0x00ff, + eWritingModeMask = 0xff00, + eWritingModeShift = 8, + }; + + uint8_t GetWritingMode() const + { + return static_cast( + (mBits & eWritingModeMask) >> eWritingModeShift); + } + + // The font size from which em units are derived. + nscoord mFontSize; + + // Values in mBits: + // bit 0: are we set to "uncacheable"? + // bit 1: do we have a font size value? + // bit 2: do we have a writing mode value? + // bits 2-7: unused + // bits 8-15: writing mode (uint8_t) + // bits 16-31: unused + uint32_t mBits; +}; + +} // namespace mozilla + +#endif // !defined(RuleNodeCacheConditions_h_) diff --git a/layout/style/StyleAnimationValue.cpp b/layout/style/StyleAnimationValue.cpp index 04dd4624c3..2091e60a35 100644 --- a/layout/style/StyleAnimationValue.cpp +++ b/layout/style/StyleAnimationValue.cpp @@ -7,7 +7,7 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/MathAlgorithms.h" - +#include "mozilla/RuleNodeCacheConditions.h" #include "mozilla/StyleAnimationValue.h" #include "nsStyleTransformMatrix.h" #include "nsCOMArray.h" @@ -2591,7 +2591,7 @@ StyleAnimationValue::ComputeValue(nsCSSProperty aProperty, // context-sensitive. So if there's nothing cached, it's not context // sensitive. *aIsContextSensitive = - !tmpStyleContext->RuleNode()->NodeHasCachedData(sid); + !tmpStyleContext->RuleNode()->NodeHasCachedUnconditionalData(sid); } // If we're not concerned whether the property is context sensitive then just @@ -2869,11 +2869,11 @@ SubstitutePixelValues(nsStyleContext* aStyleContext, const nsCSSValue& aInput, nsCSSValue& aOutput) { if (aInput.IsCalcUnit()) { - bool canStoreInRuleTree = true; + RuleNodeCacheConditions conditions; nsRuleNode::ComputedCalc c = nsRuleNode::SpecifiedCalcToComputedCalc(aInput, aStyleContext, aStyleContext->PresContext(), - canStoreInRuleTree); + conditions); nsStyleCoord::CalcValue c2; c2.mLength = c.mLength; c2.mPercent = c.mPercent; @@ -2890,10 +2890,10 @@ SubstitutePixelValues(nsStyleContext* aStyleContext, aOutput.SetArrayValue(outputArray, aInput.GetUnit()); } else if (aInput.IsLengthUnit() && aInput.GetUnit() != eCSSUnit_Pixel) { - bool canStoreInRuleTree = true; + RuleNodeCacheConditions conditions; nscoord len = nsRuleNode::CalcLength(aInput, aStyleContext, aStyleContext->PresContext(), - canStoreInRuleTree); + conditions); aOutput.SetFloatValue(nsPresContext::AppUnitsToFloatCSSPixels(len), eCSSUnit_Pixel); } else { diff --git a/layout/style/jar.mn b/layout/style/jar.mn index 3d10bce75a..531d0375f0 100644 --- a/layout/style/jar.mn +++ b/layout/style/jar.mn @@ -10,6 +10,8 @@ toolkit.jar: res/plaintext.css (plaintext.css) res/viewsource.css (viewsource.css) res/counterstyles.css (counterstyles.css) + res/noscript.css (noscript.css) + res/noframes.css (noframes.css) * res/forms.css (forms.css) res/number-control.css (number-control.css) res/arrow.gif (arrow.gif) diff --git a/layout/style/moz.build b/layout/style/moz.build index f8d38703c7..0251ca879e 100644 --- a/layout/style/moz.build +++ b/layout/style/moz.build @@ -85,6 +85,7 @@ EXPORTS.mozilla += [ 'CSSVariableResolver.h', 'CSSVariableValues.h', 'IncrementalClearCOMRuleArray.h', + 'RuleNodeCacheConditions.h', 'StyleAnimationValue.h', ] @@ -161,6 +162,7 @@ UNIFIED_SOURCES += [ 'nsStyleTransformMatrix.cpp', 'nsStyleUtil.cpp', 'nsTransitionManager.cpp', + 'RuleNodeCacheConditions.cpp', 'StyleAnimationValue.cpp', 'StyleRule.cpp', 'SVGAttrAnimationRuleProcessor.cpp', diff --git a/layout/style/noframes.css b/layout/style/noframes.css new file mode 100644 index 0000000000..4d1adfdc1f --- /dev/null +++ b/layout/style/noframes.css @@ -0,0 +1,13 @@ +/* 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/. */ + +/* This sheet is added to the style set for documents with frames disabled */ + +noframes { + display: block; +} + +frame, frameset, iframe { + display: none !important; +} diff --git a/layout/style/noscript.css b/layout/style/noscript.css new file mode 100644 index 0000000000..f92b42a50c --- /dev/null +++ b/layout/style/noscript.css @@ -0,0 +1,9 @@ +/* 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/. */ + +/* This sheet is added to the style set for documents with script disabled */ + +noscript { + display: none !important; +} diff --git a/layout/style/nsCSSDataBlock.cpp b/layout/style/nsCSSDataBlock.cpp index 7e39ca667f..e2851fd37f 100644 --- a/layout/style/nsCSSDataBlock.cpp +++ b/layout/style/nsCSSDataBlock.cpp @@ -254,7 +254,8 @@ nsCSSCompressedDataBlock::MapRuleInfoInto(nsRuleData *aRuleData) const // We can't cache anything on the rule tree if we use any data from // the style context, since data cached in the rule tree could be // used with a style context with a different value. - aRuleData->mCanStoreInRuleTree = false; + uint8_t wm = WritingMode(aRuleData->mStyleContext).GetBits(); + aRuleData->mConditions.SetWritingModeDependency(wm); } nsCSSValue* target = aRuleData->ValueFor(iProp); if (target->GetUnit() == eCSSUnit_Null) { @@ -693,7 +694,8 @@ nsCSSExpandedDataBlock::MapRuleInfoInto(nsCSSProperty aPropID, nsCSSProperty physicalProp = aPropID; if (nsCSSProps::PropHasFlags(aPropID, CSS_PROPERTY_LOGICAL)) { EnsurePhysicalProperty(physicalProp, aRuleData); - aRuleData->mCanStoreInRuleTree = false; + uint8_t wm = WritingMode(aRuleData->mStyleContext).GetBits(); + aRuleData->mConditions.SetWritingModeDependency(wm); } nsCSSValue* dest = aRuleData->ValueFor(physicalProp); diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index e08a279650..350eaf4894 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -149,6 +149,10 @@ CSS_KEY(bidi-override, bidi_override) CSS_KEY(blink, blink) CSS_KEY(block, block) CSS_KEY(block-axis, block_axis) +CSS_KEY(block-end, block_end) +CSS_KEY(block-end-outside, block_end_outside) +CSS_KEY(block-start, block_start) +CSS_KEY(block-start-outside, block_start_outside) CSS_KEY(blur, blur) CSS_KEY(bold, bold) CSS_KEY(bold-fraktur, bold_fraktur) @@ -306,8 +310,10 @@ CSS_KEY(initial, initial) CSS_KEY(inline, inline) CSS_KEY(inline-axis, inline_axis) CSS_KEY(inline-block, inline_block) +CSS_KEY(inline-end, inline_end) CSS_KEY(inline-flex, inline_flex) CSS_KEY(inline-grid, inline_grid) +CSS_KEY(inline-start, inline_start) CSS_KEY(inline-table, inline_table) CSS_KEY(inset, inset) CSS_KEY(inside, inside) diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 27173a50ce..5a7c377c8c 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -882,6 +882,12 @@ const KTableValue nsCSSProps::kBoxSizingKTable[] = { }; const KTableValue nsCSSProps::kCaptionSideKTable[] = { + eCSSKeyword_block_start, NS_STYLE_CAPTION_SIDE_BSTART, + eCSSKeyword_block_end, NS_STYLE_CAPTION_SIDE_BEND, + eCSSKeyword_inline_start, NS_STYLE_CAPTION_SIDE_ISTART, + eCSSKeyword_inline_end, NS_STYLE_CAPTION_SIDE_IEND, + eCSSKeyword_block_start_outside, NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE, + eCSSKeyword_block_end_outside, NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE, eCSSKeyword_top, NS_STYLE_CAPTION_SIDE_TOP, eCSSKeyword_right, NS_STYLE_CAPTION_SIDE_RIGHT, eCSSKeyword_bottom, NS_STYLE_CAPTION_SIDE_BOTTOM, diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index c53da38787..af0ef6fe09 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -1274,7 +1274,7 @@ nsComputedDOMStyle::DoGetTransform() nsStyleTransformMatrix::TransformReferenceBox refBox(mInnerFrame, nsSize(0, 0)); - bool dummy; + RuleNodeCacheConditions dummy; gfx3DMatrix matrix = nsStyleTransformMatrix::ReadTransforms(display->mSpecifiedTransform->mHead, mStyleContextHolder, diff --git a/layout/style/nsLayoutStylesheetCache.cpp b/layout/style/nsLayoutStylesheetCache.cpp index 28160fce6b..d009d67fff 100644 --- a/layout/style/nsLayoutStylesheetCache.cpp +++ b/layout/style/nsLayoutStylesheetCache.cpp @@ -192,6 +192,32 @@ nsLayoutStylesheetCache::CounterStylesSheet() return gStyleCache->mCounterStylesSheet; } +CSSStyleSheet* +nsLayoutStylesheetCache::NoScriptSheet() +{ + EnsureGlobal(); + + if (!gStyleCache->mNoScriptSheet) { + LoadSheetURL("resource://gre-resources/noscript.css", + gStyleCache->mNoScriptSheet, true); + } + + return gStyleCache->mNoScriptSheet; +} + +CSSStyleSheet* +nsLayoutStylesheetCache::NoFramesSheet() +{ + EnsureGlobal(); + + if (!gStyleCache->mNoFramesSheet) { + LoadSheetURL("resource://gre-resources/noframes.css", + gStyleCache->mNoFramesSheet, true); + } + + return gStyleCache->mNoFramesSheet; +} + void nsLayoutStylesheetCache::Shutdown() { @@ -225,6 +251,8 @@ nsLayoutStylesheetCache::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf MEASURE(mHTMLSheet); MEASURE(mMathMLSheet); MEASURE(mMinimalXULSheet); + MEASURE(mNoFramesSheet); + MEASURE(mNoScriptSheet); MEASURE(mNumberControlSheet); MEASURE(mQuirkSheet); MEASURE(mSVGSheet); diff --git a/layout/style/nsLayoutStylesheetCache.h b/layout/style/nsLayoutStylesheetCache.h index b5c3068575..1af13a9731 100644 --- a/layout/style/nsLayoutStylesheetCache.h +++ b/layout/style/nsLayoutStylesheetCache.h @@ -48,6 +48,8 @@ class nsLayoutStylesheetCache final static mozilla::CSSStyleSheet* SVGSheet(); static mozilla::CSSStyleSheet* MathMLSheet(); static mozilla::CSSStyleSheet* CounterStylesSheet(); + static mozilla::CSSStyleSheet* NoScriptSheet(); + static mozilla::CSSStyleSheet* NoFramesSheet(); static void Shutdown(); @@ -78,6 +80,8 @@ private: nsRefPtr mHTMLSheet; nsRefPtr mMathMLSheet; nsRefPtr mMinimalXULSheet; + nsRefPtr mNoFramesSheet; + nsRefPtr mNoScriptSheet; nsRefPtr mNumberControlSheet; nsRefPtr mQuirkSheet; nsRefPtr mSVGSheet; diff --git a/layout/style/nsRuleData.cpp b/layout/style/nsRuleData.cpp index 7c8c419abc..a4ad5268ae 100644 --- a/layout/style/nsRuleData.cpp +++ b/layout/style/nsRuleData.cpp @@ -28,7 +28,6 @@ nsRuleData::GetPoisonOffset() nsRuleData::nsRuleData(uint32_t aSIDs, nsCSSValue* aValueStorage, nsPresContext* aContext, nsStyleContext* aStyleContext) : mSIDs(aSIDs), - mCanStoreInRuleTree(true), mPresContext(aContext), mStyleContext(aStyleContext), mValueStorage(aValueStorage) diff --git a/layout/style/nsRuleData.h b/layout/style/nsRuleData.h index 1b1a7bbb16..3fed3a556c 100644 --- a/layout/style/nsRuleData.h +++ b/layout/style/nsRuleData.h @@ -12,6 +12,7 @@ #define nsRuleData_h_ #include "mozilla/CSSVariableDeclarations.h" +#include "mozilla/RuleNodeCacheConditions.h" #include "nsCSSProps.h" #include "nsCSSValue.h" #include "nsStyleStructFwd.h" @@ -25,7 +26,7 @@ typedef void (*nsPostResolveFunc)(void* aStyleStruct, nsRuleData* aData); struct nsRuleData { const uint32_t mSIDs; - bool mCanStoreInRuleTree; + mozilla::RuleNodeCacheConditions mConditions; bool mIsImportantRule; uint16_t mLevel; // an nsStyleSet::sheetType nsPresContext* const mPresContext; diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 979054c018..f446a5f2f1 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -48,6 +48,8 @@ #include "nsCSSParser.h" #include "CounterStyleManager.h" #include "nsCSSPropertySet.h" +#include "mozilla/RuleNodeCacheConditions.h" +#include "nsDeviceContext.h" #if defined(_MSC_VER) || defined(__MINGW32__) #include @@ -84,7 +86,7 @@ static void ComputePositionValue(nsStyleContext* aStyleContext, const nsCSSValue& aValue, nsStyleBackground::Position& aComputedValue, - bool& aCanStoreInRuleTree); + RuleNodeCacheConditions& aConditions); /* * For storage of an |nsRuleNode|'s children in a PLDHashTable. @@ -227,7 +229,7 @@ static nscoord CalcLengthWith(const nsCSSValue& aValue, nsPresContext* aPresContext, bool aUseProvidedRootEmSize, bool aUseUserFontSet, - bool& aCanStoreInRuleTree); + RuleNodeCacheConditions& aConditions); struct CalcLengthCalcOps : public css::BasicCoordCalcOps, public css::NumbersAlreadyNormalizedOps @@ -239,19 +241,19 @@ struct CalcLengthCalcOps : public css::BasicCoordCalcOps, nsPresContext* const mPresContext; const bool mUseProvidedRootEmSize; const bool mUseUserFontSet; - bool& mCanStoreInRuleTree; + RuleNodeCacheConditions& mConditions; CalcLengthCalcOps(nscoord aFontSize, const nsStyleFont* aStyleFont, nsStyleContext* aStyleContext, nsPresContext* aPresContext, bool aUseProvidedRootEmSize, bool aUseUserFontSet, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) : mFontSize(aFontSize), mStyleFont(aStyleFont), mStyleContext(aStyleContext), mPresContext(aPresContext), mUseProvidedRootEmSize(aUseProvidedRootEmSize), mUseUserFontSet(aUseUserFontSet), - mCanStoreInRuleTree(aCanStoreInRuleTree) + mConditions(aConditions) { } @@ -259,7 +261,7 @@ struct CalcLengthCalcOps : public css::BasicCoordCalcOps, { return CalcLengthWith(aValue, mFontSize, mStyleFont, mStyleContext, mPresContext, mUseProvidedRootEmSize, - mUseUserFontSet, mCanStoreInRuleTree); + mUseUserFontSet, mConditions); } }; @@ -365,7 +367,7 @@ static nscoord CalcLengthWith(const nsCSSValue& aValue, // except when called from // CalcLengthWithInitialFont. bool aUseUserFontSet, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { NS_ASSERTION(aValue.IsLengthUnit() || aValue.IsCalcUnit(), "not a length or calc unit"); @@ -390,7 +392,7 @@ static nscoord CalcLengthWith(const nsCSSValue& aValue, CalcLengthCalcOps ops(aFontSize, aStyleFont, aStyleContext, aPresContext, aUseProvidedRootEmSize, aUseUserFontSet, - aCanStoreInRuleTree); + aConditions); return css::ComputeCalc(aValue, ops); } switch (aValue.GetUnit()) { @@ -440,9 +442,9 @@ static nscoord CalcLengthWith(const nsCSSValue& aValue, aPresContext->SetUsesRootEMUnits(true); nscoord rootFontSize; - // NOTE: Be very careful with |styleFont|, since we haven't set - // aCanStoreInRuleTree to false yet, so we don't want to introduce - // any dependencies on aStyleContext's data here. + // NOTE: Be very careful with |styleFont|, since we haven't added any + // conditions to aConditions or set it to uncacheable yet, so we don't + // want to introduce any dependencies on aStyleContext's data here. const nsStyleFont *styleFont = aStyleFont ? aStyleFont : aStyleContext->StyleFont(); @@ -494,7 +496,6 @@ static nscoord CalcLengthWith(const nsCSSValue& aValue, } // Common code for units that depend on the element's font data and // thus can't be stored in the rule tree: - aCanStoreInRuleTree = false; const nsStyleFont *styleFont = aStyleFont ? aStyleFont : aStyleContext->StyleFont(); if (aFontSize == -1) { @@ -506,6 +507,7 @@ static nscoord CalcLengthWith(const nsCSSValue& aValue, case eCSSUnit_EM: { // CSS2.1 specifies that this unit scales to the computed font // size, not the em-width in the font metrics, despite the name. + aConditions.SetFontSizeDependency(aFontSize); return ScaleCoordRound(aValue, float(aFontSize)); } case eCSSUnit_XHeight: { @@ -513,6 +515,7 @@ static nscoord CalcLengthWith(const nsCSSValue& aValue, nsRefPtr fm = GetMetricsFor(aPresContext, aStyleContext, styleFont, aFontSize, aUseUserFontSet); + aConditions.SetUncacheable(); return ScaleCoordRound(aValue, float(fm->XHeight())); } case eCSSUnit_Char: { @@ -524,6 +527,7 @@ static nscoord CalcLengthWith(const nsCSSValue& aValue, fm->GetThebesFontGroup()->GetFirstValidFont()-> GetMetrics(fm->Orientation()).zeroOrAveCharWidth; + aConditions.SetUncacheable(); return ScaleCoordRound(aValue, ceil(aPresContext->AppUnitsPerDevPixel() * zeroWidth)); } @@ -538,23 +542,23 @@ static nscoord CalcLengthWith(const nsCSSValue& aValue, nsRuleNode::CalcLength(const nsCSSValue& aValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { NS_ASSERTION(aStyleContext, "Must have style data"); return CalcLengthWith(aValue, -1, nullptr, aStyleContext, aPresContext, - false, true, aCanStoreInRuleTree); + false, true, aConditions); } /* Inline helper function to redirect requests to CalcLength. */ static inline nscoord CalcLength(const nsCSSValue& aValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { return nsRuleNode::CalcLength(aValue, aStyleContext, - aPresContext, aCanStoreInRuleTree); + aPresContext, aConditions); } /* static */ nscoord @@ -562,10 +566,10 @@ nsRuleNode::CalcLengthWithInitialFont(nsPresContext* aPresContext, const nsCSSValue& aValue) { nsStyleFont defaultFont(aPresContext); // FIXME: best language? - bool canStoreInRuleTree; + RuleNodeCacheConditions conditions; return CalcLengthWith(aValue, -1, &defaultFont, nullptr, aPresContext, - true, false, canStoreInRuleTree); + true, false, conditions); } struct LengthPercentPairCalcOps : public css::NumbersAlreadyNormalizedOps @@ -574,15 +578,15 @@ struct LengthPercentPairCalcOps : public css::NumbersAlreadyNormalizedOps LengthPercentPairCalcOps(nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) : mContext(aContext), mPresContext(aPresContext), - mCanStoreInRuleTree(aCanStoreInRuleTree), + mConditions(aConditions), mHasPercent(false) {} nsStyleContext* mContext; nsPresContext* mPresContext; - bool& mCanStoreInRuleTree; + RuleNodeCacheConditions& mConditions; bool mHasPercent; result_type ComputeLeafValue(const nsCSSValue& aValue) @@ -592,7 +596,7 @@ struct LengthPercentPairCalcOps : public css::NumbersAlreadyNormalizedOps return result_type(0, aValue.GetPercentValue()); } return result_type(CalcLength(aValue, mContext, mPresContext, - mCanStoreInRuleTree), + mConditions), 0.0f); } @@ -641,10 +645,10 @@ struct LengthPercentPairCalcOps : public css::NumbersAlreadyNormalizedOps static void SpecifiedCalcToComputedCalc(const nsCSSValue& aValue, nsStyleCoord& aCoord, nsStyleContext* aStyleContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { LengthPercentPairCalcOps ops(aStyleContext, aStyleContext->PresContext(), - aCanStoreInRuleTree); + aConditions); nsRuleNode::ComputedCalc vals = ComputeCalc(aValue, ops); nsStyleCoord::Calc* calcObj = new nsStyleCoord::Calc; @@ -660,10 +664,10 @@ SpecifiedCalcToComputedCalc(const nsCSSValue& aValue, nsStyleCoord& aCoord, nsRuleNode::SpecifiedCalcToComputedCalc(const nsCSSValue& aValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { LengthPercentPairCalcOps ops(aStyleContext, aPresContext, - aCanStoreInRuleTree); + aConditions); return ComputeCalc(aValue, ops); } @@ -767,7 +771,7 @@ static bool SetCoord(const nsCSSValue& aValue, nsStyleCoord& aCoord, const nsStyleCoord& aParentCoord, int32_t aMask, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { bool result = true; if (aValue.GetUnit() == eCSSUnit_Null) { @@ -778,7 +782,7 @@ static bool SetCoord(const nsCSSValue& aValue, nsStyleCoord& aCoord, (((aMask & SETCOORD_CALC_LENGTH_ONLY) != 0) && aValue.IsCalcUnit())) { nscoord len = CalcLength(aValue, aStyleContext, aPresContext, - aCanStoreInRuleTree); + aConditions); if ((aMask & SETCOORD_CALC_CLAMP_NONNEGATIVE) && len < 0) { NS_ASSERTION(aValue.IsCalcUnit(), "parser should have ensured no nonnegative lengths"); @@ -811,7 +815,7 @@ static bool SetCoord(const nsCSSValue& aValue, nsStyleCoord& aCoord, (((aMask & SETCOORD_UNSET_INHERIT) != 0) && aValue.GetUnit() == eCSSUnit_Unset)) { aCoord = aParentCoord; // just inherit value from parent - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); } else if (((aMask & SETCOORD_NORMAL) != 0) && (aValue.GetUnit() == eCSSUnit_Normal)) { @@ -828,7 +832,7 @@ static bool SetCoord(const nsCSSValue& aValue, nsStyleCoord& aCoord, else if (((aMask & SETCOORD_STORE_CALC) != 0) && (aValue.IsCalcUnit())) { SpecifiedCalcToComputedCalc(aValue, aCoord, aStyleContext, - aCanStoreInRuleTree); + aConditions); } else if (aValue.GetUnit() == eCSSUnit_Initial || (aValue.GetUnit() == eCSSUnit_Unset && @@ -896,13 +900,13 @@ static inline bool SetAbsCoord(const nsCSSValue& aValue, const nsStyleCoord dummyParentCoord; nsStyleContext* dummyStyleContext = nullptr; nsPresContext* dummyPresContext = nullptr; - bool dummyCanStoreInRuleTree = true; + RuleNodeCacheConditions dummyCacheKey; bool rv = SetCoord(aValue, aCoord, dummyParentCoord, aMask, dummyStyleContext, dummyPresContext, - dummyCanStoreInRuleTree); - MOZ_ASSERT(dummyCanStoreInRuleTree, - "SetCoord() should not modify dummyCanStoreInRuleTree."); + dummyCacheKey); + MOZ_ASSERT(dummyCacheKey.CacheableWithoutDependencies(), + "SetCoord() should not modify dummyCacheKey."); return rv; } @@ -915,7 +919,7 @@ SetPairCoords(const nsCSSValue& aValue, nsStyleCoord& aCoordX, nsStyleCoord& aCoordY, const nsStyleCoord& aParentX, const nsStyleCoord& aParentY, int32_t aMask, nsStyleContext* aStyleContext, - nsPresContext* aPresContext, bool& aCanStoreInRuleTree) + nsPresContext* aPresContext, RuleNodeCacheConditions& aConditions) { const nsCSSValue& valX = aValue.GetUnit() == eCSSUnit_Pair ? aValue.GetPairValue().mXValue : aValue; @@ -923,16 +927,16 @@ SetPairCoords(const nsCSSValue& aValue, aValue.GetUnit() == eCSSUnit_Pair ? aValue.GetPairValue().mYValue : aValue; bool cX = SetCoord(valX, aCoordX, aParentX, aMask, aStyleContext, - aPresContext, aCanStoreInRuleTree); + aPresContext, aConditions); mozilla::DebugOnly cY = SetCoord(valY, aCoordY, aParentY, aMask, - aStyleContext, aPresContext, aCanStoreInRuleTree); + aStyleContext, aPresContext, aConditions); MOZ_ASSERT(cX == cY, "changed one but not the other"); return cX; } static bool SetColor(const nsCSSValue& aValue, const nscolor aParentColor, nsPresContext* aPresContext, nsStyleContext *aContext, - nscolor& aResult, bool& aCanStoreInRuleTree) + nscolor& aResult, RuleNodeCacheConditions& aConditions) { bool result = false; nsCSSUnit unit = aValue.GetUnit(); @@ -983,7 +987,7 @@ static bool SetColor(const nsCSSValue& aValue, const nscolor aParentColor, case NS_COLOR_CURRENTCOLOR: // The data computed from this can't be shared in the rule tree // because they could be used on a node with a different color - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); if (aContext) { aResult = aContext->StyleColor()->mColor; result = true; @@ -1010,7 +1014,7 @@ static bool SetColor(const nsCSSValue& aValue, const nscolor aParentColor, else if (eCSSUnit_Inherit == unit) { aResult = aParentColor; result = true; - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); } else if (eCSSUnit_Enumerated == unit && aValue.GetIntValue() == NS_STYLE_COLOR_INHERIT_FROM_BODY) { @@ -1021,19 +1025,19 @@ static bool SetColor(const nsCSSValue& aValue, const nscolor aParentColor, // contexts (but NOT necessarily new rulenodes). aResult = aPresContext->BodyTextColor(); result = true; - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); } return result; } static void SetGradientCoord(const nsCSSValue& aValue, nsPresContext* aPresContext, nsStyleContext* aContext, nsStyleCoord& aResult, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { // OK to pass bad aParentCoord since we're not passing SETCOORD_INHERIT if (!SetCoord(aValue, aResult, nsStyleCoord(), SETCOORD_LPO | SETCOORD_BOX_POSITION | SETCOORD_STORE_CALC, - aContext, aPresContext, aCanStoreInRuleTree)) { + aContext, aPresContext, aConditions)) { NS_NOTREACHED("unexpected unit for gradient anchor point"); aResult.SetNoneValue(); } @@ -1041,7 +1045,7 @@ static void SetGradientCoord(const nsCSSValue& aValue, nsPresContext* aPresConte static void SetGradient(const nsCSSValue& aValue, nsPresContext* aPresContext, nsStyleContext* aContext, nsStyleGradient& aResult, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { MOZ_ASSERT(aValue.GetUnit() == eCSSUnit_Gradient, "The given data is not a gradient"); @@ -1051,11 +1055,11 @@ static void SetGradient(const nsCSSValue& aValue, nsPresContext* aPresContext, if (gradient->mIsExplicitSize) { SetCoord(gradient->GetRadiusX(), aResult.mRadiusX, nsStyleCoord(), SETCOORD_LP | SETCOORD_STORE_CALC, - aContext, aPresContext, aCanStoreInRuleTree); + aContext, aPresContext, aConditions); if (gradient->GetRadiusY().GetUnit() != eCSSUnit_None) { SetCoord(gradient->GetRadiusY(), aResult.mRadiusY, nsStyleCoord(), SETCOORD_LP | SETCOORD_STORE_CALC, - aContext, aPresContext, aCanStoreInRuleTree); + aContext, aPresContext, aConditions); aResult.mShape = NS_STYLE_GRADIENT_SHAPE_ELLIPTICAL; } else { aResult.mRadiusY = aResult.mRadiusX; @@ -1090,17 +1094,17 @@ static void SetGradient(const nsCSSValue& aValue, nsPresContext* aPresContext, // bg-position SetGradientCoord(gradient->mBgPos.mXValue, aPresContext, aContext, - aResult.mBgPosX, aCanStoreInRuleTree); + aResult.mBgPosX, aConditions); SetGradientCoord(gradient->mBgPos.mYValue, aPresContext, aContext, - aResult.mBgPosY, aCanStoreInRuleTree); + aResult.mBgPosY, aConditions); aResult.mRepeating = gradient->mIsRepeating; // angle const nsStyleCoord dummyParentCoord; if (!SetCoord(gradient->mAngle, aResult.mAngle, dummyParentCoord, SETCOORD_ANGLE, - aContext, aPresContext, aCanStoreInRuleTree)) { + aContext, aPresContext, aConditions)) { NS_ASSERTION(gradient->mAngle.GetUnit() == eCSSUnit_None, "bad unit for gradient angle"); aResult.mAngle.SetNoneValue(); @@ -1113,7 +1117,7 @@ static void SetGradient(const nsCSSValue& aValue, nsPresContext* aPresContext, if (!SetCoord(valueStop.mLocation, stop.mLocation, nsStyleCoord(), SETCOORD_LPO | SETCOORD_STORE_CALC, - aContext, aPresContext, aCanStoreInRuleTree)) { + aContext, aPresContext, aConditions)) { NS_NOTREACHED("unexpected unit for gradient stop location"); } @@ -1125,7 +1129,7 @@ static void SetGradient(const nsCSSValue& aValue, nsPresContext* aPresContext, "inherit is not a valid color for gradient stops"); if (!valueStop.mIsInterpolationHint) { SetColor(valueStop.mColor, NS_RGB(0, 0, 0), aPresContext, - aContext, stop.mColor, aCanStoreInRuleTree); + aContext, stop.mColor, aConditions); } else { // Always initialize to the same color so we don't need to worry // about comparisons. @@ -1176,7 +1180,7 @@ static void SetStyleImageToImageRect(nsStyleContext* aStyleContext, static void SetStyleImage(nsStyleContext* aStyleContext, const nsCSSValue& aValue, nsStyleImage& aResult, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { if (aValue.GetUnit() == eCSSUnit_Null) { return; @@ -1202,7 +1206,7 @@ static void SetStyleImage(nsStyleContext* aStyleContext, nsStyleGradient* gradient = new nsStyleGradient(); if (gradient) { SetGradient(aValue, aStyleContext->PresContext(), aStyleContext, - *gradient, aCanStoreInRuleTree); + *gradient, aConditions); aResult.SetGradientData(gradient); } break; @@ -1242,7 +1246,7 @@ template static void SetDiscrete(const nsCSSValue& aValue, FieldT & aField, - bool& aCanStoreInRuleTree, uint32_t aMask, + RuleNodeCacheConditions& aConditions, uint32_t aMask, FieldT aParentValue, T1 aInitialValue, T2 aAutoValue, @@ -1257,7 +1261,7 @@ SetDiscrete(const nsCSSValue& aValue, FieldT & aField, // every caller of SetDiscrete provides inherit and initial // alternatives, so we don't require them to say so in the mask case eCSSUnit_Inherit: - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aField = aParentValue; return; @@ -1312,7 +1316,7 @@ SetDiscrete(const nsCSSValue& aValue, FieldT & aField, case eCSSUnit_Unset: if (aMask & SETDSC_UNSET_INHERIT) { - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aField = aParentValue; return; } @@ -1337,7 +1341,7 @@ SetDiscrete(const nsCSSValue& aValue, FieldT & aField, #define SETFCT_UNSET_INITIAL 0x00800000 static void -SetFactor(const nsCSSValue& aValue, float& aField, bool& aCanStoreInRuleTree, +SetFactor(const nsCSSValue& aValue, float& aField, RuleNodeCacheConditions& aConditions, float aParentValue, float aInitialValue, uint32_t aFlags = 0) { switch (aValue.GetUnit()) { @@ -1360,7 +1364,7 @@ SetFactor(const nsCSSValue& aValue, float& aField, bool& aCanStoreInRuleTree, return; case eCSSUnit_Inherit: - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aField = aParentValue; return; @@ -1377,7 +1381,7 @@ SetFactor(const nsCSSValue& aValue, float& aField, bool& aCanStoreInRuleTree, case eCSSUnit_Unset: if (aFlags & SETFCT_UNSET_INHERIT) { - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aField = aParentValue; return; } @@ -2196,7 +2200,7 @@ nsRuleNode::ResolveVariableReferences(const nsStyleStructID aSID, tokenStream->mSheetURI, tokenStream->mBaseURI, tokenStream->mSheetPrincipal, nullptr, tokenStream->mLineNumber, tokenStream->mLineOffset); - aRuleData->mCanStoreInRuleTree = false; + aRuleData->mConditions.SetUncacheable(); anyTokenStreams = true; } @@ -2328,7 +2332,7 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID aSID, if (!highestNode) highestNode = rootNode; - if (!ruleData.mCanStoreInRuleTree) + if (!ruleData.mConditions.CacheableWithoutDependencies()) detail = eRulePartialMixed; // Treat as though some data is specified to avoid // the optimizations and force data computation. @@ -2390,7 +2394,8 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID aSID, typedef const void* (nsRuleNode::*ComputeFunc)(void*, const nsRuleData*, nsStyleContext*, nsRuleNode*, - RuleDetail, const bool); + RuleDetail, + const RuleNodeCacheConditions); static const ComputeFunc sComputeFuncs[] = { #define STYLE_STRUCT(name, checkdata_cb) &nsRuleNode::Compute##name##Data, #include "nsStyleStructList.h" @@ -2400,7 +2405,7 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID aSID, // We need to compute the data from the information that the rules specified. return (this->*sComputeFuncs[aSID])(startStruct, &ruleData, aContext, highestNode, detail, - ruleData.mCanStoreInRuleTree); + ruleData.mConditions); } const void* @@ -2589,9 +2594,9 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex nsStyle##type_* data_ = nullptr; \ mozilla::Maybe maybeFakeParentData; \ const nsStyle##type_* parentdata_ = nullptr; \ - bool canStoreInRuleTree = aCanStoreInRuleTree; \ + RuleNodeCacheConditions conditions = aConditions; \ \ - /* If |canStoreInRuleTree| might be true by the time we're done, we */ \ + /* If |conditions.Cacheable()| might be true by the time we're done, we */ \ /* can't call parentContext->Style##type_() since it could recur into */ \ /* setting the same struct on the same rule node, causing a leak. */ \ if (aRuleDetail != eRuleFullReset && \ @@ -2606,7 +2611,7 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex } \ if (eStyleStruct_##type_ == eStyleStruct_Variables) \ /* no need to copy construct an nsStyleVariables, as we will copy */ \ - /* inherited variables (and set canStoreInRuleTree to false) in */ \ + /* inherited variables (and call SetUncacheable()) in */ \ /* ComputeVariablesData */ \ data_ = new (mPresContext) nsStyle##type_ ctorargs_; \ else if (aStartStruct) \ @@ -2618,7 +2623,7 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex if (aRuleDetail != eRuleFullMixed && aRuleDetail != eRuleFullReset) { \ /* No question. We will have to inherit. Go ahead and init */ \ /* with inherited vals from parent. */ \ - canStoreInRuleTree = false; \ + conditions.SetUncacheable(); \ if (parentdata_) \ data_ = new (mPresContext) nsStyle##type_(*parentdata_); \ else \ @@ -2662,7 +2667,7 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex else \ data_ = new (mPresContext) nsStyle##type_ ctorargs_; \ \ - /* If |canStoreInRuleTree| might be true by the time we're done, we */ \ + /* If |conditions.Cacheable()| might be true by the time we're done, we */ \ /* can't call parentContext->Style##type_() since it could recur into */ \ /* setting the same struct on the same rule node, causing a leak. */ \ mozilla::Maybe maybeFakeParentData; \ @@ -2677,7 +2682,7 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex parentdata_ = maybeFakeParentData.ptr(); \ } \ } \ - bool canStoreInRuleTree = aCanStoreInRuleTree; + RuleNodeCacheConditions conditions = aConditions; /** * End an nsRuleNode::Compute*Data function for an inherited struct. @@ -2686,12 +2691,13 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex * @param data_ Variable holding the result of this function. */ #define COMPUTE_END_INHERITED(type_, data_) \ - NS_POSTCONDITION(!canStoreInRuleTree || aRuleDetail == eRuleFullReset || \ + NS_POSTCONDITION(!conditions.CacheableWithoutDependencies() || \ + aRuleDetail == eRuleFullReset || \ (aStartStruct && aRuleDetail == eRulePartialReset), \ - "canStoreInRuleTree must be false for inherited structs " \ - "unless all properties have been specified with values " \ - "other than inherit"); \ - if (canStoreInRuleTree) { \ + "conditions.CacheableWithoutDependencies() must be false " \ + "for inherited structs unless all properties have been " \ + "specified with values other than inherit"); \ + if (conditions.CacheableWithoutDependencies()) { \ /* We were fully specified and can therefore be cached right on the */ \ /* rule node. */ \ if (!aHighestNode->mStyleData.mInheritedData) { \ @@ -2721,30 +2727,41 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex * @param data_ Variable holding the result of this function. */ #define COMPUTE_END_RESET(type_, data_) \ - NS_POSTCONDITION(!canStoreInRuleTree || \ + NS_POSTCONDITION(!conditions.CacheableWithoutDependencies() || \ aRuleDetail == eRuleNone || \ aRuleDetail == eRulePartialReset || \ aRuleDetail == eRuleFullReset, \ - "canStoreInRuleTree must be false for reset structs " \ - "if any properties were specified as inherit"); \ - if (!canStoreInRuleTree) \ - /* We can't be cached in the rule node. We have to be put right */ \ - /* on the style context. */ \ - aContext->SetStyle(eStyleStruct_##type_, data_); \ - else { \ + "conditions.CacheableWithoutDependencies() must be false " \ + "for reset structs if any properties were specified as " \ + "inherit"); \ + if (conditions.CacheableWithoutDependencies()) { \ /* We were fully specified and can therefore be cached right on the */ \ /* rule node. */ \ if (!aHighestNode->mStyleData.mResetData) { \ aHighestNode->mStyleData.mResetData = \ - new (mPresContext) nsResetStyleData; \ + new (mPresContext) nsConditionalResetStyleData; \ } \ NS_ASSERTION(!aHighestNode->mStyleData.mResetData-> \ - mStyleStructs[eStyleStruct_##type_], \ + GetStyleData(eStyleStruct_##type_), \ "Going to leak style data"); \ aHighestNode->mStyleData.mResetData-> \ - mStyleStructs[eStyleStruct_##type_] = data_; \ + SetStyleData(eStyleStruct_##type_, data_); \ /* Propagate the bit down. */ \ PropagateDependentBit(eStyleStruct_##type_, aHighestNode, data_); \ + } else if (conditions.Cacheable()) { \ + if (!mStyleData.mResetData) { \ + mStyleData.mResetData = new (mPresContext) nsConditionalResetStyleData; \ + } \ + mStyleData.mResetData-> \ + SetStyleData(eStyleStruct_##type_, mPresContext, data_, conditions); \ + /* Tell the style context that it doesn't own the data */ \ + aContext-> \ + AddStyleBit(nsCachedStyleData::GetBitForSID(eStyleStruct_##type_)); \ + aContext->SetStyle(eStyleStruct_##type_, data_); \ + } else { \ + /* We can't be cached in the rule node. We have to be put right */ \ + /* on the style context. */ \ + aContext->SetStyle(eStyleStruct_##type_, data_); \ } \ \ return data_; @@ -3080,16 +3097,16 @@ struct SetFontSizeCalcOps : public css::BasicCoordCalcOps, const nsStyleFont* const mParentFont; nsPresContext* const mPresContext; const bool mAtRoot; - bool& mCanStoreInRuleTree; + RuleNodeCacheConditions& mConditions; SetFontSizeCalcOps(nscoord aParentSize, const nsStyleFont* aParentFont, nsPresContext* aPresContext, bool aAtRoot, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) : mParentSize(aParentSize), mParentFont(aParentFont), mPresContext(aPresContext), mAtRoot(aAtRoot), - mCanStoreInRuleTree(aCanStoreInRuleTree) + mConditions(aConditions) { } @@ -3103,13 +3120,13 @@ struct SetFontSizeCalcOps : public css::BasicCoordCalcOps, size = CalcLengthWith(aValue, mParentSize, mParentFont, nullptr, mPresContext, mAtRoot, - true, mCanStoreInRuleTree); + true, mConditions); if (!aValue.IsRelativeLengthUnit() && mParentFont->mAllowZoom) { size = nsStyleFont::ZoomText(mPresContext, size); } } else if (eCSSUnit_Percent == aValue.GetUnit()) { - mCanStoreInRuleTree = false; + mConditions.SetUncacheable(); // Note that % units use the parent's size unadjusted for scriptlevel // changes. A scriptlevel change between us and the parent is simply // ignored. @@ -3135,7 +3152,7 @@ nsRuleNode::SetFontSize(nsPresContext* aPresContext, nscoord aScriptLevelAdjustedParentSize, bool aUsedStartStruct, bool aAtRoot, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { // If false, means that *aSize has not been zoomed. If true, means that // *aSize has been zoomed iff aParentFont->mAllowZoom is true. @@ -3158,7 +3175,7 @@ nsRuleNode::SetFontSize(nsPresContext* aPresContext, } else if (NS_STYLE_FONT_SIZE_LARGER == value || NS_STYLE_FONT_SIZE_SMALLER == value) { - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); // Un-zoom so we use the tables correctly. We'll then rezoom due // to the |zoom = true| above. @@ -3193,7 +3210,7 @@ nsRuleNode::SetFontSize(nsPresContext* aPresContext, sizeValue->IsCalcUnit()) { SetFontSizeCalcOps ops(aParentSize, aParentFont, aPresContext, aAtRoot, - aCanStoreInRuleTree); + aConditions); *aSize = css::ComputeCalc(*sizeValue, ops); if (*aSize < 0) { MOZ_ASSERT(sizeValue->IsCalcUnit(), @@ -3210,7 +3227,7 @@ nsRuleNode::SetFontSize(nsPresContext* aPresContext, } else if (eCSSUnit_Inherit == sizeValue->GetUnit() || eCSSUnit_Unset == sizeValue->GetUnit()) { - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); // We apply scriptlevel change for this case, because the default is // to inherit and we don't want explicit "inherit" to differ from the // default. @@ -3232,7 +3249,7 @@ nsRuleNode::SetFontSize(nsPresContext* aPresContext, // There was no rule affecting the size but the size has been // affected by the parent's size via scriptlevel change. So we cannot // store the data in the rule tree. - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); *aSize = aScriptLevelAdjustedParentSize; sizeIsZoomedAccordingToParent = true; } else { @@ -3264,7 +3281,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, uint8_t aGenericFontID, const nsRuleData* aRuleData, const nsStyleFont* aParentFont, nsStyleFont* aFont, bool aUsedStartStruct, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { bool atRoot = !aContext->GetParent(); @@ -3423,7 +3440,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, } else if (eCSSUnit_Inherit == familyValue->GetUnit() || eCSSUnit_Unset == familyValue->GetUnit()) { - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aFont->mFont.fontlist = aParentFont->mFont.fontlist; aFont->mFont.systemFont = aParentFont->mFont.systemFont; aFont->mGenericID = aParentFont->mGenericID; @@ -3444,21 +3461,21 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, // -moz-math-variant: enum, inherit, initial SetDiscrete(*aRuleData->ValueForMathVariant(), aFont->mMathVariant, - aCanStoreInRuleTree, + aConditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, aParentFont->mMathVariant, NS_MATHML_MATHVARIANT_NONE, 0, 0, 0, 0); // -moz-math-display: enum, inherit, initial SetDiscrete(*aRuleData->ValueForMathDisplay(), aFont->mMathDisplay, - aCanStoreInRuleTree, + aConditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, aParentFont->mMathDisplay, NS_MATHML_DISPLAYSTYLE_INLINE, 0, 0, 0, 0); // font-smoothing: enum, inherit, initial SetDiscrete(*aRuleData->ValueForOsxFontSmoothing(), - aFont->mFont.smoothing, aCanStoreInRuleTree, + aFont->mFont.smoothing, aConditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, aParentFont->mFont.smoothing, defaultVariableFont->smoothing, @@ -3470,7 +3487,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, aFont->mFont.style = NS_FONT_STYLE_NORMAL; } else { SetDiscrete(*aRuleData->ValueForFontStyle(), - aFont->mFont.style, aCanStoreInRuleTree, + aFont->mFont.style, aConditions, SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT | SETDSC_UNSET_INHERIT, aParentFont->mFont.style, defaultVariableFont->style, @@ -3491,7 +3508,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, aFont->mFont.weight = value; break; case NS_STYLE_FONT_WEIGHT_BOLDER: { - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); int32_t inheritedValue = aParentFont->mFont.weight; if (inheritedValue <= 300) { aFont->mFont.weight = 400; @@ -3503,7 +3520,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, break; } case NS_STYLE_FONT_WEIGHT_LIGHTER: { - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); int32_t inheritedValue = aParentFont->mFont.weight; if (inheritedValue < 600) { aFont->mFont.weight = 100; @@ -3516,7 +3533,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, } } } else - SetDiscrete(*weightValue, aFont->mFont.weight, aCanStoreInRuleTree, + SetDiscrete(*weightValue, aFont->mFont.weight, aConditions, SETDSC_INTEGER | SETDSC_SYSTEM_FONT | SETDSC_UNSET_INHERIT, aParentFont->mFont.weight, defaultVariableFont->weight, @@ -3524,7 +3541,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, // font-stretch: enum, inherit, initial, -moz-system-font SetDiscrete(*aRuleData->ValueForFontStretch(), - aFont->mFont.stretch, aCanStoreInRuleTree, + aFont->mFont.stretch, aConditions, SETDSC_SYSTEM_FONT | SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, aParentFont->mFont.stretch, defaultVariableFont->stretch, @@ -3543,13 +3560,13 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, CalcLengthWith(*scriptMinSizeValue, aParentFont->mSize, aParentFont, nullptr, aPresContext, atRoot, true, - aCanStoreInRuleTree); + aConditions); } // -moz-script-size-multiplier: factor, inherit, initial SetFactor(*aRuleData->ValueForScriptSizeMultiplier(), aFont->mScriptSizeMultiplier, - aCanStoreInRuleTree, aParentFont->mScriptSizeMultiplier, + aConditions, aParentFont->mScriptSizeMultiplier, NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER, SETFCT_POSITIVE | SETFCT_UNSET_INHERIT); @@ -3557,7 +3574,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, const nsCSSValue* scriptLevelValue = aRuleData->ValueForScriptLevel(); if (eCSSUnit_Integer == scriptLevelValue->GetUnit()) { // "relative" - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aFont->mScriptLevel = ClampTo8Bit(aParentFont->mScriptLevel + scriptLevelValue->GetIntValue()); } else if (eCSSUnit_Number == scriptLevelValue->GetUnit()) { @@ -3566,14 +3583,14 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, } else if (eCSSUnit_Auto == scriptLevelValue->GetUnit()) { // auto - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aFont->mScriptLevel = ClampTo8Bit(aParentFont->mScriptLevel + (aParentFont->mMathDisplay == NS_MATHML_DISPLAYSTYLE_INLINE ? 1 : 0)); } else if (eCSSUnit_Inherit == scriptLevelValue->GetUnit() || eCSSUnit_Unset == scriptLevelValue->GetUnit()) { - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aFont->mScriptLevel = aParentFont->mScriptLevel; } else if (eCSSUnit_Initial == scriptLevelValue->GetUnit()) { @@ -3582,7 +3599,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, // font-kerning: none, enum, inherit, initial, -moz-system-font SetDiscrete(*aRuleData->ValueForFontKerning(), - aFont->mFont.kerning, aCanStoreInRuleTree, + aFont->mFont.kerning, aConditions, SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT | SETDSC_UNSET_INHERIT, aParentFont->mFont.kerning, defaultVariableFont->kerning, @@ -3590,7 +3607,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, // font-synthesis: none, enum (bit field), inherit, initial, -moz-system-font SetDiscrete(*aRuleData->ValueForFontSynthesis(), - aFont->mFont.synthesis, aCanStoreInRuleTree, + aFont->mFont.synthesis, aConditions, SETDSC_NONE | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT | SETDSC_UNSET_INHERIT, aParentFont->mFont.synthesis, @@ -3607,7 +3624,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, case eCSSUnit_Inherit: case eCSSUnit_Unset: aFont->mFont.CopyAlternates(aParentFont->mFont); - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); break; case eCSSUnit_Initial: @@ -3643,7 +3660,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, // font-variant-caps: normal, enum, inherit, initial, -moz-system-font SetDiscrete(*aRuleData->ValueForFontVariantCaps(), - aFont->mFont.variantCaps, aCanStoreInRuleTree, + aFont->mFont.variantCaps, aConditions, SETDSC_NORMAL | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT | SETDSC_UNSET_INHERIT, aParentFont->mFont.variantCaps, @@ -3653,7 +3670,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, // font-variant-east-asian: normal, enum (bit field), inherit, initial, // -moz-system-font SetDiscrete(*aRuleData->ValueForFontVariantEastAsian(), - aFont->mFont.variantEastAsian, aCanStoreInRuleTree, + aFont->mFont.variantEastAsian, aConditions, SETDSC_NORMAL | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT | SETDSC_UNSET_INHERIT, aParentFont->mFont.variantEastAsian, @@ -3663,7 +3680,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, // font-variant-ligatures: normal, none, enum (bit field), inherit, initial, // -moz-system-font SetDiscrete(*aRuleData->ValueForFontVariantLigatures(), - aFont->mFont.variantLigatures, aCanStoreInRuleTree, + aFont->mFont.variantLigatures, aConditions, SETDSC_NORMAL | SETDSC_NONE | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT | SETDSC_UNSET_INHERIT, aParentFont->mFont.variantLigatures, @@ -3673,7 +3690,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, // font-variant-numeric: normal, enum (bit field), inherit, initial, // -moz-system-font SetDiscrete(*aRuleData->ValueForFontVariantNumeric(), - aFont->mFont.variantNumeric, aCanStoreInRuleTree, + aFont->mFont.variantNumeric, aConditions, SETDSC_NORMAL | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT | SETDSC_UNSET_INHERIT, aParentFont->mFont.variantNumeric, @@ -3683,7 +3700,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, // font-variant-position: normal, enum, inherit, initial, // -moz-system-font SetDiscrete(*aRuleData->ValueForFontVariantPosition(), - aFont->mFont.variantPosition, aCanStoreInRuleTree, + aFont->mFont.variantPosition, aConditions, SETDSC_NORMAL | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT | SETDSC_UNSET_INHERIT, aParentFont->mFont.variantPosition, @@ -3705,7 +3722,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, case eCSSUnit_Inherit: case eCSSUnit_Unset: - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aFont->mFont.fontFeatureSettings = aParentFont->mFont.fontFeatureSettings; break; @@ -3729,7 +3746,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, aRuleData->ValueForFontLanguageOverride(); if (eCSSUnit_Inherit == languageOverrideValue->GetUnit() || eCSSUnit_Unset == languageOverrideValue->GetUnit()) { - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aFont->mFont.languageOverride = aParentFont->mFont.languageOverride; } else if (eCSSUnit_Normal == languageOverrideValue->GetUnit() || eCSSUnit_Initial == languageOverrideValue->GetUnit()) { @@ -3751,7 +3768,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, SetFontSize(aPresContext, aRuleData, aFont, aParentFont, &aFont->mSize, systemFont, aParentFont->mSize, scriptLevelAdjustedParentSize, - aUsedStartStruct, atRoot, aCanStoreInRuleTree); + aUsedStartStruct, atRoot, aConditions); if (aParentFont->mSize == aParentFont->mScriptUnconstrainedSize && scriptLevelAdjustedParentSize == scriptLevelAdjustedUnconstrainedParentSize) { // Fast path: we have not been affected by scriptminsize so we don't @@ -3765,7 +3782,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, &aFont->mScriptUnconstrainedSize, systemFont, aParentFont->mScriptUnconstrainedSize, scriptLevelAdjustedUnconstrainedParentSize, - aUsedStartStruct, atRoot, aCanStoreInRuleTree); + aUsedStartStruct, atRoot, aConditions); } NS_ASSERTION(aFont->mScriptUnconstrainedSize <= aFont->mSize, "scriptminsize should never be making things bigger"); @@ -3792,7 +3809,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, aFont->mFont.sizeAdjust = systemFont.sizeAdjust; } else SetFactor(*sizeAdjustValue, aFont->mFont.sizeAdjust, - aCanStoreInRuleTree, aParentFont->mFont.sizeAdjust, -1.0f, + aConditions, aParentFont->mFont.sizeAdjust, -1.0f, SETFCT_NONE | SETFCT_UNSET_INHERIT); } @@ -3865,7 +3882,6 @@ nsRuleNode::SetGenericFont(nsPresContext* aPresContext, } *aFont = parentFont; - bool dummy; uint32_t fontBit = nsCachedStyleData::GetBitForSID(eStyleStruct_Font); // use placement new[] on the result of alloca() to allocate a @@ -3909,6 +3925,7 @@ nsRuleNode::SetGenericFont(nsPresContext* aPresContext, ResolveVariableReferences(eStyleStruct_Font, &ruleData, aContext); + RuleNodeCacheConditions dummy; nsRuleNode::SetFont(aPresContext, context, aGenericFontID, &ruleData, &parentFont, aFont, false, dummy); @@ -3930,7 +3947,7 @@ nsRuleNode::ComputeFontData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_INHERITED(Font, (mPresContext), font, parentFont) @@ -3990,11 +4007,11 @@ nsRuleNode::ComputeFontData(void* aStartStruct, // continue the normal processing nsRuleNode::SetFont(mPresContext, aContext, generic, aRuleData, parentFont, font, - aStartStruct != nullptr, canStoreInRuleTree); + aStartStruct != nullptr, conditions); } else { // re-calculate the font as a generic font - canStoreInRuleTree = false; + conditions.SetUncacheable(); nsRuleNode::SetGenericFont(mPresContext, aContext, generic, font); } @@ -4019,7 +4036,7 @@ already_AddRefed nsRuleNode::GetShadowData(const nsCSSValueList* aList, nsStyleContext* aContext, bool aIsBoxShadow, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { uint32_t arrayLength = ListLength(aList); @@ -4042,13 +4059,13 @@ nsRuleNode::GetShadowData(const nsCSSValueList* aList, // OK to pass bad aParentCoord since we're not passing SETCOORD_INHERIT unitOK = SetCoord(arr->Item(0), tempCoord, nsStyleCoord(), SETCOORD_LENGTH | SETCOORD_CALC_LENGTH_ONLY, - aContext, mPresContext, aCanStoreInRuleTree); + aContext, mPresContext, aConditions); NS_ASSERTION(unitOK, "unexpected unit"); item->mXOffset = tempCoord.GetCoordValue(); unitOK = SetCoord(arr->Item(1), tempCoord, nsStyleCoord(), SETCOORD_LENGTH | SETCOORD_CALC_LENGTH_ONLY, - aContext, mPresContext, aCanStoreInRuleTree); + aContext, mPresContext, aConditions); NS_ASSERTION(unitOK, "unexpected unit"); item->mYOffset = tempCoord.GetCoordValue(); @@ -4057,7 +4074,7 @@ nsRuleNode::GetShadowData(const nsCSSValueList* aList, unitOK = SetCoord(arr->Item(2), tempCoord, nsStyleCoord(), SETCOORD_LENGTH | SETCOORD_CALC_LENGTH_ONLY | SETCOORD_CALC_CLAMP_NONNEGATIVE, - aContext, mPresContext, aCanStoreInRuleTree); + aContext, mPresContext, aConditions); NS_ASSERTION(unitOK, "unexpected unit"); item->mRadius = tempCoord.GetCoordValue(); } else { @@ -4068,7 +4085,7 @@ nsRuleNode::GetShadowData(const nsCSSValueList* aList, if (aIsBoxShadow && arr->Item(3).GetUnit() != eCSSUnit_Null) { unitOK = SetCoord(arr->Item(3), tempCoord, nsStyleCoord(), SETCOORD_LENGTH | SETCOORD_CALC_LENGTH_ONLY, - aContext, mPresContext, aCanStoreInRuleTree); + aContext, mPresContext, aConditions); NS_ASSERTION(unitOK, "unexpected unit"); item->mSpread = tempCoord.GetCoordValue(); } else { @@ -4079,7 +4096,7 @@ nsRuleNode::GetShadowData(const nsCSSValueList* aList, item->mHasColor = true; // 2nd argument can be bogus since inherit is not a valid color unitOK = SetColor(arr->Item(4), 0, mPresContext, aContext, item->mColor, - aCanStoreInRuleTree); + aConditions); NS_ASSERTION(unitOK, "unexpected unit"); } @@ -4101,13 +4118,13 @@ nsRuleNode::ComputeTextData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_INHERITED(Text, (), text, parentText) // tab-size: integer, inherit SetDiscrete(*aRuleData->ValueForTabSize(), - text->mTabSize, canStoreInRuleTree, + text->mTabSize, conditions, SETDSC_INTEGER | SETDSC_UNSET_INHERIT, parentText->mTabSize, NS_STYLE_TABSIZE_INITIAL, 0, 0, 0, 0); @@ -4116,7 +4133,7 @@ nsRuleNode::ComputeTextData(void* aStartStruct, text->mLetterSpacing, parentText->mLetterSpacing, SETCOORD_LH | SETCOORD_NORMAL | SETCOORD_INITIAL_NORMAL | SETCOORD_CALC_LENGTH_ONLY | SETCOORD_UNSET_INHERIT, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // text-shadow: none, list, inherit, initial const nsCSSValue* textShadowValue = aRuleData->ValueForTextShadow(); @@ -4127,20 +4144,20 @@ nsRuleNode::ComputeTextData(void* aStartStruct, // takes care of that if (textShadowValue->GetUnit() == eCSSUnit_Inherit || textShadowValue->GetUnit() == eCSSUnit_Unset) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); text->mTextShadow = parentText->mTextShadow; } else if (textShadowValue->GetUnit() == eCSSUnit_List || textShadowValue->GetUnit() == eCSSUnit_ListDep) { // List of arrays text->mTextShadow = GetShadowData(textShadowValue->GetListValue(), - aContext, false, canStoreInRuleTree); + aContext, false, conditions); } } // line-height: normal, number, length, percent, inherit const nsCSSValue* lineHeightValue = aRuleData->ValueForLineHeight(); if (eCSSUnit_Percent == lineHeightValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); // Use |mFont.size| to pick up minimum font size. text->mLineHeight.SetCoordValue( NSToCoordRound(float(aContext->StyleFont()->mFont.size) * @@ -4154,13 +4171,13 @@ nsRuleNode::ComputeTextData(void* aStartStruct, SetCoord(*lineHeightValue, text->mLineHeight, parentText->mLineHeight, SETCOORD_LEH | SETCOORD_FACTOR | SETCOORD_NORMAL | SETCOORD_UNSET_INHERIT, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); if (lineHeightValue->IsLengthUnit() && !lineHeightValue->IsRelativeLengthUnit()) { nscoord lh = nsStyleFont::ZoomText(mPresContext, text->mLineHeight.GetCoordValue()); - canStoreInRuleTree = false; + conditions.SetUncacheable(); const nsStyleFont *font = aContext->StyleFont(); nscoord minimumFontSize = mPresContext->MinFontSize(font->mLanguage); @@ -4186,14 +4203,14 @@ nsRuleNode::ComputeTextData(void* aStartStruct, } else if (eCSSUnit_Enumerated == textAlignValue->GetUnit() && NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT == textAlignValue->GetIntValue()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); uint8_t parentAlign = parentText->mTextAlign; text->mTextAlign = (NS_STYLE_TEXT_ALIGN_DEFAULT == parentAlign) ? NS_STYLE_TEXT_ALIGN_CENTER : parentAlign; } else if (eCSSUnit_Enumerated == textAlignValue->GetUnit() && NS_STYLE_TEXT_ALIGN_MATCH_PARENT == textAlignValue->GetIntValue()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); nsStyleContext* parent = aContext->GetParent(); if (parent) { uint8_t parentAlign = parentText->mTextAlign; @@ -4230,7 +4247,7 @@ nsRuleNode::ComputeTextData(void* aStartStruct, eCSSUnit_Unset == textAlignValue->GetUnit()) { text->mTextAlignTrue = parentText->mTextAlignTrue; } - SetDiscrete(*textAlignValue, text->mTextAlign, canStoreInRuleTree, + SetDiscrete(*textAlignValue, text->mTextAlign, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mTextAlign, NS_STYLE_TEXT_ALIGN_DEFAULT, 0, 0, 0, 0); @@ -4254,7 +4271,7 @@ nsRuleNode::ComputeTextData(void* aStartStruct, text->mTextAlignLastTrue = parentText->mTextAlignLastTrue; } SetDiscrete(*textAlignLastValue, text->mTextAlignLast, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mTextAlignLast, NS_STYLE_TEXT_ALIGN_AUTO, 0, 0, 0, 0); @@ -4263,22 +4280,22 @@ nsRuleNode::ComputeTextData(void* aStartStruct, SetCoord(*aRuleData->ValueForTextIndent(), text->mTextIndent, parentText->mTextIndent, SETCOORD_LPH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INHERIT, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // text-transform: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForTextTransform(), text->mTextTransform, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForTextTransform(), text->mTextTransform, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mTextTransform, NS_STYLE_TEXT_TRANSFORM_NONE, 0, 0, 0, 0); // white-space: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForWhiteSpace(), text->mWhiteSpace, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForWhiteSpace(), text->mWhiteSpace, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mWhiteSpace, NS_STYLE_WHITESPACE_NORMAL, 0, 0, 0, 0); // word-break: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForWordBreak(), text->mWordBreak, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForWordBreak(), text->mWordBreak, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mWordBreak, NS_STYLE_WORDBREAK_NORMAL, 0, 0, 0, 0); @@ -4291,7 +4308,7 @@ nsRuleNode::ComputeTextData(void* aStartStruct, nsStyleCoord::CoordConstructor), SETCOORD_LH | SETCOORD_NORMAL | SETCOORD_INITIAL_NORMAL | SETCOORD_CALC_LENGTH_ONLY | SETCOORD_UNSET_INHERIT, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { if (tempCoord.GetUnit() == eStyleUnit_Coord) { text->mWordSpacing = tempCoord.GetCoordValue(); } else if (tempCoord.GetUnit() == eStyleUnit_Normal) { @@ -4305,34 +4322,34 @@ nsRuleNode::ComputeTextData(void* aStartStruct, } // word-wrap: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForWordWrap(), text->mWordWrap, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForWordWrap(), text->mWordWrap, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mWordWrap, NS_STYLE_WORDWRAP_NORMAL, 0, 0, 0, 0); // hyphens: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForHyphens(), text->mHyphens, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForHyphens(), text->mHyphens, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mHyphens, NS_STYLE_HYPHENS_MANUAL, 0, 0, 0, 0); // ruby-align: enum, inherit, initial SetDiscrete(*aRuleData->ValueForRubyAlign(), - text->mRubyAlign, canStoreInRuleTree, + text->mRubyAlign, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mRubyAlign, NS_STYLE_RUBY_ALIGN_SPACE_AROUND, 0, 0, 0, 0); // ruby-position: enum, inherit, initial SetDiscrete(*aRuleData->ValueForRubyPosition(), - text->mRubyPosition, canStoreInRuleTree, + text->mRubyPosition, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mRubyPosition, NS_STYLE_RUBY_POSITION_OVER, 0, 0, 0, 0); // text-size-adjust: none, auto, inherit, initial SetDiscrete(*aRuleData->ValueForTextSizeAdjust(), text->mTextSizeAdjust, - canStoreInRuleTree, + conditions, SETDSC_NONE | SETDSC_AUTO | SETDSC_UNSET_INHERIT, parentText->mTextSizeAdjust, NS_STYLE_TEXT_SIZE_ADJUST_AUTO, // initial value @@ -4343,7 +4360,7 @@ nsRuleNode::ComputeTextData(void* aStartStruct, // text-combine-upright: enum, inherit, initial SetDiscrete(*aRuleData->ValueForTextCombineUpright(), text->mTextCombineUpright, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mTextCombineUpright, NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE, 0, 0, 0, 0); @@ -4351,7 +4368,7 @@ nsRuleNode::ComputeTextData(void* aStartStruct, // -moz-text-discard: enum, inherit, initial SetDiscrete(*aRuleData->ValueForControlCharacterVisibility(), text->mControlCharacterVisibility, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentText->mControlCharacterVisibility, NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN, 0, 0, 0, 0); @@ -4365,7 +4382,7 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(TextReset, (), text, parentText) @@ -4374,7 +4391,7 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, if (!SetCoord(*verticalAlignValue, text->mVerticalAlign, parentText->mVerticalAlign, SETCOORD_LPH | SETCOORD_ENUMERATED | SETCOORD_STORE_CALC, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { if (eCSSUnit_Initial == verticalAlignValue->GetUnit() || eCSSUnit_Unset == verticalAlignValue->GetUnit()) { text->mVerticalAlign.SetIntValue(NS_STYLE_VERTICAL_ALIGN_BASELINE, @@ -4399,7 +4416,7 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, } } } else if (eCSSUnit_Inherit == decorationLineValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); text->mTextDecorationLine = parentText->mTextDecorationLine; } else if (eCSSUnit_Initial == decorationLineValue->GetUnit() || eCSSUnit_Unset == decorationLineValue->GetUnit()) { @@ -4411,7 +4428,7 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, aRuleData->ValueForTextDecorationColor(); nscolor decorationColor; if (eCSSUnit_Inherit == decorationColorValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); if (parentContext) { bool isForeground; parentText->GetDecorationColor(decorationColor, isForeground); @@ -4429,7 +4446,7 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, text->SetDecorationColorToForeground(); } else if (SetColor(*decorationColorValue, 0, mPresContext, aContext, - decorationColor, canStoreInRuleTree)) { + decorationColor, conditions)) { text->SetDecorationColor(decorationColor); } else if (eCSSUnit_Initial == decorationColorValue->GetUnit() || @@ -4449,7 +4466,7 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, text->SetDecorationStyle(decorationStyleValue->GetIntValue()); } else if (eCSSUnit_Inherit == decorationStyleValue->GetUnit()) { text->SetDecorationStyle(parentText->GetDecorationStyle()); - canStoreInRuleTree = false; + conditions.SetUncacheable(); } else if (eCSSUnit_Initial == decorationStyleValue->GetUnit() || eCSSUnit_Unset == decorationStyleValue->GetUnit()) { text->SetDecorationStyle(NS_STYLE_TEXT_DECORATION_STYLE_SOLID); @@ -4462,12 +4479,12 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, eCSSUnit_Unset == textOverflowValue->GetUnit()) { text->mTextOverflow = nsStyleTextOverflow(); } else if (eCSSUnit_Inherit == textOverflowValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); text->mTextOverflow = parentText->mTextOverflow; } else if (eCSSUnit_Enumerated == textOverflowValue->GetUnit()) { // A single enumerated value. SetDiscrete(*textOverflowValue, text->mTextOverflow.mRight.mType, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED, parentText->mTextOverflow.mRight.mType, NS_STYLE_TEXT_OVERFLOW_CLIP, 0, 0, 0, 0); text->mTextOverflow.mRight.mString.Truncate(); @@ -4490,7 +4507,7 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, const nsCSSValue *textOverflowLeftValue = &textOverflowValuePair.mXValue; if (eCSSUnit_Enumerated == textOverflowLeftValue->GetUnit()) { SetDiscrete(*textOverflowLeftValue, text->mTextOverflow.mLeft.mType, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED, parentText->mTextOverflow.mLeft.mType, NS_STYLE_TEXT_OVERFLOW_CLIP, 0, 0, 0, 0); text->mTextOverflow.mLeft.mString.Truncate(); @@ -4502,7 +4519,7 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, const nsCSSValue *textOverflowRightValue = &textOverflowValuePair.mYValue; if (eCSSUnit_Enumerated == textOverflowRightValue->GetUnit()) { SetDiscrete(*textOverflowRightValue, text->mTextOverflow.mRight.mType, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED, parentText->mTextOverflow.mRight.mType, NS_STYLE_TEXT_OVERFLOW_CLIP, 0, 0, 0, 0); text->mTextOverflow.mRight.mString.Truncate(); @@ -4513,7 +4530,7 @@ nsRuleNode::ComputeTextResetData(void* aStartStruct, } // unicode-bidi: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForUnicodeBidi(), text->mUnicodeBidi, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForUnicodeBidi(), text->mUnicodeBidi, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentText->mUnicodeBidi, NS_STYLE_UNICODE_BIDI_NORMAL, 0, 0, 0, 0); @@ -4527,7 +4544,7 @@ nsRuleNode::ComputeUserInterfaceData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_INHERITED(UserInterface, (), ui, parentUI) @@ -4541,7 +4558,7 @@ nsRuleNode::ComputeUserInterfaceData(void* aStartStruct, if (cursorUnit == eCSSUnit_Inherit || cursorUnit == eCSSUnit_Unset) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); ui->mCursor = parentUI->mCursor; ui->CopyCursorArrayFrom(*parentUI); } @@ -4593,14 +4610,14 @@ nsRuleNode::ComputeUserInterfaceData(void* aStartStruct, // user-input: enum, inherit, initial SetDiscrete(*aRuleData->ValueForUserInput(), - ui->mUserInput, canStoreInRuleTree, + ui->mUserInput, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentUI->mUserInput, NS_STYLE_USER_INPUT_AUTO, 0, 0, 0, 0); // user-modify: enum, inherit, initial SetDiscrete(*aRuleData->ValueForUserModify(), - ui->mUserModify, canStoreInRuleTree, + ui->mUserModify, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentUI->mUserModify, NS_STYLE_USER_MODIFY_READ_ONLY, @@ -4608,14 +4625,14 @@ nsRuleNode::ComputeUserInterfaceData(void* aStartStruct, // user-focus: enum, inherit, initial SetDiscrete(*aRuleData->ValueForUserFocus(), - ui->mUserFocus, canStoreInRuleTree, + ui->mUserFocus, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentUI->mUserFocus, NS_STYLE_USER_FOCUS_NONE, 0, 0, 0, 0); // -moz-window-dragging: enum, inherit, initial SetDiscrete(*aRuleData->ValueForWindowDragging(), - ui->mWindowDragging, canStoreInRuleTree, + ui->mWindowDragging, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentUI->mWindowDragging, NS_STYLE_WINDOW_DRAGGING_NO_DRAG, 0, 0, 0, 0); @@ -4629,20 +4646,20 @@ nsRuleNode::ComputeUIResetData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(UIReset, (), ui, parentUI) // user-select: enum, inherit, initial SetDiscrete(*aRuleData->ValueForUserSelect(), - ui->mUserSelect, canStoreInRuleTree, + ui->mUserSelect, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentUI->mUserSelect, NS_STYLE_USER_SELECT_AUTO, 0, 0, 0, 0); // ime-mode: enum, inherit, initial SetDiscrete(*aRuleData->ValueForImeMode(), - ui->mIMEMode, canStoreInRuleTree, + ui->mIMEMode, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentUI->mIMEMode, NS_STYLE_IME_MODE_AUTO, 0, 0, 0, 0); @@ -4650,14 +4667,14 @@ nsRuleNode::ComputeUIResetData(void* aStartStruct, // force-broken-image-icons: integer, inherit, initial SetDiscrete(*aRuleData->ValueForForceBrokenImageIcon(), ui->mForceBrokenImageIcon, - canStoreInRuleTree, + conditions, SETDSC_INTEGER | SETDSC_UNSET_INITIAL, parentUI->mForceBrokenImageIcon, 0, 0, 0, 0, 0); // -moz-window-shadow: enum, inherit, initial SetDiscrete(*aRuleData->ValueForWindowShadow(), - ui->mWindowShadow, canStoreInRuleTree, + ui->mWindowShadow, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentUI->mWindowShadow, NS_STYLE_WINDOW_SHADOW_DEFAULT, 0, 0, 0, 0); @@ -4722,7 +4739,7 @@ CountTransitionProps(const TransitionPropInfo* aInfo, nsStyleDisplay* aDisplay, const nsStyleDisplay* aParentDisplay, const nsRuleData* aRuleData, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { // The four transition properties or eight animation properties are // stored in nsCSSDisplay in a single array for all properties. The @@ -4781,7 +4798,7 @@ CountTransitionProps(const TransitionPropInfo* aInfo, // calculate number of elements if (data.unit == eCSSUnit_Inherit) { data.num = aParentDisplay->*(info.sdCount); - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); } else if (data.list) { data.num = ListLength(data.list); } else { @@ -4843,7 +4860,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(Display, (), display, parentDisplay) @@ -4871,7 +4888,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, CountTransitionProps(transitionPropInfo, transitionPropData, ArrayLength(transitionPropData), display, parentDisplay, aRuleData, - canStoreInRuleTree); + conditions); display->mTransitions.SetLength(numTransitions); @@ -4894,8 +4911,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, // count for this property not equal to length MOZ_ASSERT(i < parentDisplay->mTransitionDelayCount, "delay.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); transition->SetDelay(parentDisplay->mTransitions[i].GetDelay()); } else if (delay.unit == eCSSUnit_Initial || delay.unit == eCSSUnit_Unset) { @@ -4920,8 +4937,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (duration.unit == eCSSUnit_Inherit) { MOZ_ASSERT(i < parentDisplay->mTransitionDurationCount, "duration.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); transition->SetDuration(parentDisplay->mTransitions[i].GetDuration()); } else if (duration.unit == eCSSUnit_Initial || duration.unit == eCSSUnit_Unset) { @@ -4945,8 +4962,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (property.unit == eCSSUnit_Inherit) { MOZ_ASSERT(i < parentDisplay->mTransitionPropertyCount, "property.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); transition->CopyPropertyFrom(parentDisplay->mTransitions[i]); } else if (property.unit == eCSSUnit_Initial || property.unit == eCSSUnit_Unset) { @@ -4980,8 +4997,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (timingFunction.unit == eCSSUnit_Inherit) { MOZ_ASSERT(i < parentDisplay->mTransitionTimingFunctionCount, "timingFunction.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); transition->SetTimingFunction( parentDisplay->mTransitions[i].GetTimingFunction()); } else if (timingFunction.unit == eCSSUnit_Initial || @@ -5027,7 +5044,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, CountTransitionProps(animationPropInfo, animationPropData, ArrayLength(animationPropData), display, parentDisplay, aRuleData, - canStoreInRuleTree); + conditions); display->mAnimations.SetLength(numAnimations); @@ -5050,8 +5067,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, // count for this property not equal to length MOZ_ASSERT(i < parentDisplay->mAnimationDelayCount, "animDelay.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); animation->SetDelay(parentDisplay->mAnimations[i].GetDelay()); } else if (animDelay.unit == eCSSUnit_Initial || animDelay.unit == eCSSUnit_Unset) { @@ -5076,8 +5093,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (animDuration.unit == eCSSUnit_Inherit) { MOZ_ASSERT(i < parentDisplay->mAnimationDurationCount, "animDuration.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); animation->SetDuration(parentDisplay->mAnimations[i].GetDuration()); } else if (animDuration.unit == eCSSUnit_Initial || animDuration.unit == eCSSUnit_Unset) { @@ -5101,8 +5118,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (animName.unit == eCSSUnit_Inherit) { MOZ_ASSERT(i < parentDisplay->mAnimationNameCount, "animName.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); animation->SetName(parentDisplay->mAnimations[i].GetName()); } else if (animName.unit == eCSSUnit_Initial || animName.unit == eCSSUnit_Unset) { @@ -5130,8 +5147,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (animTimingFunction.unit == eCSSUnit_Inherit) { MOZ_ASSERT(i < parentDisplay->mAnimationTimingFunctionCount, "animTimingFunction.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); animation->SetTimingFunction( parentDisplay->mAnimations[i].GetTimingFunction()); } else if (animTimingFunction.unit == eCSSUnit_Initial || @@ -5148,8 +5165,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (animDirection.unit == eCSSUnit_Inherit) { MOZ_ASSERT(i < parentDisplay->mAnimationDirectionCount, "animDirection.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); animation->SetDirection(parentDisplay->mAnimations[i].GetDirection()); } else if (animDirection.unit == eCSSUnit_Initial || animDirection.unit == eCSSUnit_Unset) { @@ -5166,8 +5183,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (animFillMode.unit == eCSSUnit_Inherit) { MOZ_ASSERT(i < parentDisplay->mAnimationFillModeCount, "animFillMode.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); animation->SetFillMode(parentDisplay->mAnimations[i].GetFillMode()); } else if (animFillMode.unit == eCSSUnit_Initial || animFillMode.unit == eCSSUnit_Unset) { @@ -5184,8 +5201,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (animPlayState.unit == eCSSUnit_Inherit) { MOZ_ASSERT(i < parentDisplay->mAnimationPlayStateCount, "animPlayState.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); animation->SetPlayState(parentDisplay->mAnimations[i].GetPlayState()); } else if (animPlayState.unit == eCSSUnit_Initial || animPlayState.unit == eCSSUnit_Unset) { @@ -5202,8 +5219,8 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (animIterationCount.unit == eCSSUnit_Inherit) { MOZ_ASSERT(i < parentDisplay->mAnimationIterationCountCount, "animIterationCount.num computed incorrectly"); - MOZ_ASSERT(!canStoreInRuleTree, - "should have made canStoreInRuleTree false above"); + MOZ_ASSERT(!conditions.Cacheable(), + "should have made conditions.Cacheable() false above"); animation->SetIterationCount(parentDisplay->mAnimations[i].GetIterationCount()); } else if (animIterationCount.unit == eCSSUnit_Initial || animIterationCount.unit == eCSSUnit_Unset) { @@ -5240,46 +5257,46 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } // opacity: factor, inherit, initial - SetFactor(*aRuleData->ValueForOpacity(), display->mOpacity, canStoreInRuleTree, + SetFactor(*aRuleData->ValueForOpacity(), display->mOpacity, conditions, parentDisplay->mOpacity, 1.0f, SETFCT_OPACITY | SETFCT_UNSET_INITIAL); // display: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForDisplay(), display->mDisplay, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForDisplay(), display->mDisplay, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mDisplay, NS_STYLE_DISPLAY_INLINE, 0, 0, 0, 0); // contain: none, enum, inherit, initial - SetDiscrete(*aRuleData->ValueForContain(), display->mContain, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForContain(), display->mContain, conditions, SETDSC_ENUMERATED | SETDSC_NONE | SETDSC_UNSET_INITIAL, parentDisplay->mContain, NS_STYLE_CONTAIN_NONE, 0, NS_STYLE_CONTAIN_NONE, 0, 0); // mix-blend-mode: enum, inherit, initial SetDiscrete(*aRuleData->ValueForMixBlendMode(), display->mMixBlendMode, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mMixBlendMode, NS_STYLE_BLEND_NORMAL, 0, 0, 0, 0); // scroll-behavior: enum, inherit, initial SetDiscrete(*aRuleData->ValueForScrollBehavior(), display->mScrollBehavior, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mScrollBehavior, NS_STYLE_SCROLL_BEHAVIOR_AUTO, 0, 0, 0, 0); // scroll-snap-type-x: none, enum, inherit, initial SetDiscrete(*aRuleData->ValueForScrollSnapTypeX(), display->mScrollSnapTypeX, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mScrollSnapTypeX, NS_STYLE_SCROLL_SNAP_TYPE_NONE, 0, 0, 0, 0); // scroll-snap-type-y: none, enum, inherit, initial SetDiscrete(*aRuleData->ValueForScrollSnapTypeY(), display->mScrollSnapTypeY, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mScrollSnapTypeY, NS_STYLE_SCROLL_SNAP_TYPE_NONE, 0, 0, 0, 0); @@ -5296,7 +5313,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, break; case eCSSUnit_Inherit: display->mScrollSnapPointsX = parentDisplay->mScrollSnapPointsX; - canStoreInRuleTree = false; + conditions.SetUncacheable(); break; case eCSSUnit_Function: { nsCSSValue::Array* func = scrollSnapPointsX.GetArrayValue(); @@ -5306,7 +5323,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, if (SetCoord(func->Item(1), coord, nsStyleCoord(), SETCOORD_LP | SETCOORD_STORE_CALC | SETCOORD_CALC_CLAMP_NONNEGATIVE, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { NS_ASSERTION(coord.GetUnit() == eStyleUnit_Coord || coord.GetUnit() == eStyleUnit_Percent || coord.GetUnit() == eStyleUnit_Calc, @@ -5331,7 +5348,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, break; case eCSSUnit_Inherit: display->mScrollSnapPointsY = parentDisplay->mScrollSnapPointsY; - canStoreInRuleTree = false; + conditions.SetUncacheable(); break; case eCSSUnit_Function: { nsCSSValue::Array* func = scrollSnapPointsY.GetArrayValue(); @@ -5341,7 +5358,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, if (SetCoord(func->Item(1), coord, nsStyleCoord(), SETCOORD_LP | SETCOORD_STORE_CALC | SETCOORD_CALC_CLAMP_NONNEGATIVE, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { NS_ASSERTION(coord.GetUnit() == eStyleUnit_Coord || coord.GetUnit() == eStyleUnit_Percent || coord.GetUnit() == eStyleUnit_Calc, @@ -5365,11 +5382,11 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, break; case eCSSUnit_Inherit: display->mScrollSnapDestination = parentDisplay->mScrollSnapDestination; - canStoreInRuleTree = false; + conditions.SetUncacheable(); break; default: { ComputePositionValue(aContext, snapDestination, - display->mScrollSnapDestination, canStoreInRuleTree); + display->mScrollSnapDestination, conditions); } } @@ -5388,7 +5405,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, break; case eCSSUnit_Inherit: display->mScrollSnapCoordinate = parentDisplay->mScrollSnapCoordinate; - canStoreInRuleTree = false; + conditions.SetUncacheable(); break; case eCSSUnit_List: { display->mScrollSnapCoordinate.Clear(); @@ -5400,7 +5417,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, item->mValue.GetUnit() != eCSSUnit_Unset, "unexpected unit"); Position* pos = display->mScrollSnapCoordinate.AppendElement(); - ComputePositionValue(aContext, item->mValue, *pos, canStoreInRuleTree); + ComputePositionValue(aContext, item->mValue, *pos, conditions); item = item->mNext; } while(item); break; @@ -5411,7 +5428,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, // isolation: enum, inherit, initial SetDiscrete(*aRuleData->ValueForIsolation(), display->mIsolation, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mIsolation, NS_STYLE_ISOLATION_AUTO, 0, 0, 0, 0); @@ -5423,7 +5440,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, // appearance: enum, inherit, initial SetDiscrete(*aRuleData->ValueForAppearance(), - display->mAppearance, canStoreInRuleTree, + display->mAppearance, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mAppearance, NS_THEME_NONE, 0, 0, 0, 0); @@ -5446,18 +5463,18 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, display->mBinding = nullptr; } else if (eCSSUnit_Inherit == bindingValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); display->mBinding = parentDisplay->mBinding; } // position: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForPosition(), display->mPosition, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForPosition(), display->mPosition, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mPosition, NS_STYLE_POSITION_STATIC, 0, 0, 0, 0); // clear: enum, inherit, initial - SetDiscrete(*aRuleData->ValueForClear(), display->mBreakType, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForClear(), display->mBreakType, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mBreakType, NS_STYLE_CLEAR_NONE, 0, 0, 0, 0); @@ -5478,7 +5495,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, display->mBreakBefore = false; } else if (eCSSUnit_Inherit == breakBeforeValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); display->mBreakBefore = parentDisplay->mBreakBefore; } @@ -5493,21 +5510,21 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, display->mBreakAfter = false; } else if (eCSSUnit_Inherit == breakAfterValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); display->mBreakAfter = parentDisplay->mBreakAfter; } // end temp fix // page-break-inside: enum, inherit, initial SetDiscrete(*aRuleData->ValueForPageBreakInside(), - display->mBreakInside, canStoreInRuleTree, + display->mBreakInside, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mBreakInside, NS_STYLE_PAGE_BREAK_AUTO, 0, 0, 0, 0); // touch-action: none, auto, enum, inherit, initial SetDiscrete(*aRuleData->ValueForTouchAction(), display->mTouchAction, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_AUTO | SETDSC_NONE | SETDSC_UNSET_INITIAL, parentDisplay->mTouchAction, @@ -5517,7 +5534,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, // float: enum, inherit, initial SetDiscrete(*aRuleData->ValueForFloat(), - display->mFloats, canStoreInRuleTree, + display->mFloats, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mFloats, NS_STYLE_FLOAT_NONE, 0, 0, 0, 0); @@ -5526,14 +5543,14 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, // overflow-x: enum, inherit, initial SetDiscrete(*aRuleData->ValueForOverflowX(), - display->mOverflowX, canStoreInRuleTree, + display->mOverflowX, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mOverflowX, NS_STYLE_OVERFLOW_VISIBLE, 0, 0, 0, 0); // overflow-y: enum, inherit, initial SetDiscrete(*aRuleData->ValueForOverflowY(), - display->mOverflowY, canStoreInRuleTree, + display->mOverflowY, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mOverflowY, NS_STYLE_OVERFLOW_VISIBLE, 0, 0, 0, 0); @@ -5548,7 +5565,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, display->mOverflowY == NS_STYLE_OVERFLOW_CLIP)) { // We can't store in the rule tree since a more specific rule might // change these conditions. - canStoreInRuleTree = false; + conditions.SetUncacheable(); // NS_STYLE_OVERFLOW_CLIP is a deprecated value, so if it's specified // in only one dimension, convert it to NS_STYLE_OVERFLOW_HIDDEN. @@ -5566,12 +5583,12 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } SetDiscrete(*aRuleData->ValueForOverflowClipBox(), display->mOverflowClipBox, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mOverflowClipBox, NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX, 0, 0, 0, 0); - SetDiscrete(*aRuleData->ValueForResize(), display->mResize, canStoreInRuleTree, + SetDiscrete(*aRuleData->ValueForResize(), display->mResize, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mResize, NS_STYLE_RESIZE_NONE, 0, 0, 0, 0); @@ -5580,7 +5597,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, const nsCSSValue* clipValue = aRuleData->ValueForClip(); switch (clipValue->GetUnit()) { case eCSSUnit_Inherit: - canStoreInRuleTree = false; + conditions.SetUncacheable(); display->mClipFlags = parentDisplay->mClipFlags; display->mClip = parentDisplay->mClip; break; @@ -5606,7 +5623,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (clipRect.mTop.IsLengthUnit()) { display->mClip.y = CalcLength(clipRect.mTop, aContext, - mPresContext, canStoreInRuleTree); + mPresContext, conditions); } if (clipRect.mBottom.GetUnit() == eCSSUnit_Auto) { @@ -5618,7 +5635,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (clipRect.mBottom.IsLengthUnit()) { display->mClip.height = CalcLength(clipRect.mBottom, aContext, - mPresContext, canStoreInRuleTree) - + mPresContext, conditions) - display->mClip.y; } @@ -5628,7 +5645,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (clipRect.mLeft.IsLengthUnit()) { display->mClip.x = CalcLength(clipRect.mLeft, aContext, - mPresContext, canStoreInRuleTree); + mPresContext, conditions); } if (clipRect.mRight.GetUnit() == eCSSUnit_Auto) { @@ -5640,7 +5657,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, } else if (clipRect.mRight.IsLengthUnit()) { display->mClip.width = CalcLength(clipRect.mRight, aContext, - mPresContext, canStoreInRuleTree) - + mPresContext, conditions) - display->mClip.x; } break; @@ -5667,7 +5684,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, // special handling in frame construction so they are also unsupported // for now. display->mOriginalDisplay = display->mDisplay = NS_STYLE_DISPLAY_INLINE; - canStoreInRuleTree = false; + conditions.SetUncacheable(); } if (nsCSSPseudoElements::firstLetter == pseudo) { @@ -5679,7 +5696,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, // We can't cache the data in the rule tree since if a more specific // rule has 'float: left' we'll end up with the wrong 'display' // property. - canStoreInRuleTree = false; + conditions.SetUncacheable(); } if (display->IsAbsolutelyPositionedStyle()) { @@ -5722,7 +5739,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, case eCSSUnit_Inherit: display->mSpecifiedTransform = parentDisplay->mSpecifiedTransform; - canStoreInRuleTree = false; + conditions.SetUncacheable(); break; case eCSSUnit_SharedList: { @@ -5788,7 +5805,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, case eCSSUnit_Inherit: display->mWillChange = parentDisplay->mWillChange; display->mWillChangeBitField = parentDisplay->mWillChangeBitField; - canStoreInRuleTree = false; + conditions.SetUncacheable(); break; case eCSSUnit_Initial: @@ -5822,7 +5839,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, SETCOORD_LPH | SETCOORD_INITIAL_HALF | SETCOORD_BOX_POSITION | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); mozilla::DebugOnly cY = SetCoord(valY, display->mTransformOrigin[1], @@ -5830,7 +5847,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, SETCOORD_LPH | SETCOORD_INITIAL_HALF | SETCOORD_BOX_POSITION | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); if (valZ.GetUnit() == eCSSUnit_Null) { // Null for the z component means a 0 translation, not @@ -5843,7 +5860,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, parentDisplay->mTransformOrigin[2], SETCOORD_LH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); MOZ_ASSERT(cY == cZ, "changed one but not the other"); } MOZ_ASSERT(cX == cY, "changed one but not the other"); @@ -5862,7 +5879,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, SETCOORD_LPH | SETCOORD_INITIAL_HALF | SETCOORD_BOX_POSITION | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); NS_ASSERTION(result, "Malformed -moz-perspective-origin parse!"); } @@ -5870,31 +5887,31 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, display->mChildPerspective, parentDisplay->mChildPerspective, SETCOORD_LAH | SETCOORD_INITIAL_NONE | SETCOORD_NONE | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); SetDiscrete(*aRuleData->ValueForBackfaceVisibility(), - display->mBackfaceVisibility, canStoreInRuleTree, + display->mBackfaceVisibility, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mBackfaceVisibility, NS_STYLE_BACKFACE_VISIBILITY_VISIBLE, 0, 0, 0, 0); // transform-style: enum, inherit, initial SetDiscrete(*aRuleData->ValueForTransformStyle(), - display->mTransformStyle, canStoreInRuleTree, + display->mTransformStyle, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mTransformStyle, NS_STYLE_TRANSFORM_STYLE_FLAT, 0, 0, 0, 0); // transform-box: enum, inherit, initial SetDiscrete(*aRuleData->ValueForTransformBox(), - display->mTransformBox, canStoreInRuleTree, + display->mTransformBox, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mTransformBox, NS_STYLE_TRANSFORM_BOX_BORDER_BOX, 0, 0, 0, 0); // orient: enum, inherit, initial SetDiscrete(*aRuleData->ValueForOrient(), - display->mOrient, canStoreInRuleTree, + display->mOrient, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentDisplay->mOrient, NS_STYLE_ORIENT_INLINE, 0, 0, 0, 0); @@ -5908,7 +5925,7 @@ nsRuleNode::ComputeVisibilityData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_INHERITED(Visibility, (mPresContext), visibility, parentVisibility) @@ -5919,7 +5936,7 @@ nsRuleNode::ComputeVisibilityData(void* aStartStruct, // direction: enum, inherit, initial SetDiscrete(*aRuleData->ValueForDirection(), visibility->mDirection, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentVisibility->mDirection, (GET_BIDI_OPTION_DIRECTION(mPresContext->GetBidi()) @@ -5929,28 +5946,28 @@ nsRuleNode::ComputeVisibilityData(void* aStartStruct, // visibility: enum, inherit, initial SetDiscrete(*aRuleData->ValueForVisibility(), visibility->mVisible, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentVisibility->mVisible, NS_STYLE_VISIBILITY_VISIBLE, 0, 0, 0, 0); // pointer-events: enum, inherit, initial SetDiscrete(*aRuleData->ValueForPointerEvents(), visibility->mPointerEvents, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentVisibility->mPointerEvents, NS_STYLE_POINTER_EVENTS_AUTO, 0, 0, 0, 0); // writing-mode: enum, inherit, initial SetDiscrete(*aRuleData->ValueForWritingMode(), visibility->mWritingMode, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentVisibility->mWritingMode, NS_STYLE_WRITING_MODE_HORIZONTAL_TB, 0, 0, 0, 0); // text-orientation: enum, inherit, initial SetDiscrete(*aRuleData->ValueForTextOrientation(), visibility->mTextOrientation, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentVisibility->mTextOrientation, NS_STYLE_TEXT_ORIENTATION_MIXED, 0, 0, 0, 0); @@ -5959,7 +5976,7 @@ nsRuleNode::ComputeVisibilityData(void* aStartStruct, const nsCSSValue* orientation = aRuleData->ValueForImageOrientation(); if (orientation->GetUnit() == eCSSUnit_Inherit || orientation->GetUnit() == eCSSUnit_Unset) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); visibility->mImageOrientation = parentVisibility->mImageOrientation; } else if (orientation->GetUnit() == eCSSUnit_Initial) { visibility->mImageOrientation = nsStyleImageOrientation(); @@ -6002,7 +6019,7 @@ nsRuleNode::ComputeColorData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_INHERITED(Color, (mPresContext), color, parentColor) @@ -6014,14 +6031,14 @@ nsRuleNode::ComputeColorData(void* aStartStruct, colorValue->GetIntValue() == NS_COLOR_CURRENTCOLOR) || colorValue->GetUnit() == eCSSUnit_Unset) { color->mColor = parentColor->mColor; - canStoreInRuleTree = false; + conditions.SetUncacheable(); } else if (colorValue->GetUnit() == eCSSUnit_Initial) { color->mColor = mPresContext->DefaultColor(); } else { SetColor(*colorValue, parentColor->mColor, mPresContext, aContext, - color->mColor, canStoreInRuleTree); + color->mColor, conditions); } COMPUTE_END_INHERITED(Color, color) @@ -6038,9 +6055,9 @@ struct BackgroundItemComputer static void ComputeValue(nsStyleContext* aStyleContext, const nsCSSValueList* aSpecifiedValue, uint8_t& aComputedValue, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { - SetDiscrete(aSpecifiedValue->mValue, aComputedValue, aCanStoreInRuleTree, + SetDiscrete(aSpecifiedValue->mValue, aComputedValue, aConditions, SETDSC_ENUMERATED, uint8_t(0), 0, 0, 0, 0, 0); } }; @@ -6051,7 +6068,7 @@ struct BackgroundItemComputer static void ComputeValue(nsStyleContext* aStyleContext, const nsCSSValuePairList* aSpecifiedValue, nsStyleBackground::Repeat& aComputedValue, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { NS_ASSERTION(aSpecifiedValue->mXValue.GetUnit() == eCSSUnit_Enumerated && (aSpecifiedValue->mYValue.GetUnit() == eCSSUnit_Enumerated || @@ -6110,10 +6127,10 @@ struct BackgroundItemComputer static void ComputeValue(nsStyleContext* aStyleContext, const nsCSSValueList* aSpecifiedValue, nsStyleImage& aComputedValue, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { SetStyleImage(aStyleContext, aSpecifiedValue->mValue, aComputedValue, - aCanStoreInRuleTree); + aConditions); } }; @@ -6127,7 +6144,7 @@ ComputePositionCoord(nsStyleContext* aStyleContext, const nsCSSValue& aEdge, const nsCSSValue& aOffset, PositionCoord* aResult, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { if (eCSSUnit_Percent == aOffset.GetUnit()) { aResult->mLength = 0; @@ -6136,13 +6153,13 @@ ComputePositionCoord(nsStyleContext* aStyleContext, } else if (aOffset.IsLengthUnit()) { aResult->mLength = CalcLength(aOffset, aStyleContext, aStyleContext->PresContext(), - aCanStoreInRuleTree); + aConditions); aResult->mPercent = 0.0f; aResult->mHasPercent = false; } else if (aOffset.IsCalcUnit()) { LengthPercentPairCalcOps ops(aStyleContext, aStyleContext->PresContext(), - aCanStoreInRuleTree); + aConditions); nsRuleNode::ComputedCalc vals = ComputeCalc(aOffset, ops); aResult->mLength = vals.mLength; aResult->mPercent = vals.mPercent; @@ -6177,7 +6194,7 @@ static void ComputePositionValue(nsStyleContext* aStyleContext, const nsCSSValue& aValue, nsStyleBackground::Position& aComputedValue, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { NS_ASSERTION(aValue.GetUnit() == eCSSUnit_Array, "unexpected unit for CSS value"); @@ -6198,11 +6215,11 @@ ComputePositionValue(nsStyleContext* aStyleContext, ComputePositionCoord(aStyleContext, xEdge, xOffset, &aComputedValue.mXPosition, - aCanStoreInRuleTree); + aConditions); ComputePositionCoord(aStyleContext, yEdge, yOffset, &aComputedValue.mYPosition, - aCanStoreInRuleTree); + aConditions); } template <> @@ -6211,10 +6228,10 @@ struct BackgroundItemComputer static void ComputeValue(nsStyleContext* aStyleContext, const nsCSSValueList* aSpecifiedValue, nsStyleBackground::Position& aComputedValue, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { ComputePositionValue(aStyleContext, aSpecifiedValue->mValue, - aComputedValue, aCanStoreInRuleTree); + aComputedValue, aConditions); } }; @@ -6240,7 +6257,7 @@ struct BackgroundItemComputer static void ComputeValue(nsStyleContext* aStyleContext, const nsCSSValuePairList* aSpecifiedValue, nsStyleBackground::Size& aComputedValue, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { nsStyleBackground::Size &size = aComputedValue; for (const BackgroundSizeAxis *axis = gBGSizeAxes, @@ -6290,7 +6307,7 @@ struct BackgroundItemComputer else if (specified.IsLengthUnit()) { (size.*(axis->result)).mLength = CalcLength(specified, aStyleContext, aStyleContext->PresContext(), - aCanStoreInRuleTree); + aConditions); (size.*(axis->result)).mPercent = 0.0f; (size.*(axis->result)).mHasPercent = false; size.*(axis->type) = nsStyleBackground::Size::eLengthPercentage; @@ -6298,7 +6315,7 @@ struct BackgroundItemComputer MOZ_ASSERT(specified.IsCalcUnit(), "unexpected unit"); LengthPercentPairCalcOps ops(aStyleContext, aStyleContext->PresContext(), - aCanStoreInRuleTree); + aConditions); nsRuleNode::ComputedCalc vals = ComputeCalc(specified, ops); (size.*(axis->result)).mLength = vals.mLength; (size.*(axis->result)).mPercent = vals.mPercent; @@ -6330,7 +6347,7 @@ SetBackgroundList(nsStyleContext* aStyleContext, uint32_t& aItemCount, uint32_t& aMaxItemCount, bool& aRebuild, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { switch (aValue.GetUnit()) { case eCSSUnit_Null: @@ -6338,7 +6355,7 @@ SetBackgroundList(nsStyleContext* aStyleContext, case eCSSUnit_Inherit: aRebuild = true; - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aLayers.EnsureLengthAtLeast(aParentItemCount); aItemCount = aParentItemCount; for (uint32_t i = 0; i < aParentItemCount; ++i) { @@ -6369,7 +6386,7 @@ SetBackgroundList(nsStyleContext* aStyleContext, BackgroundItemComputer ::ComputeValue(aStyleContext, item, aLayers[aItemCount-1].*aResultLocation, - aCanStoreInRuleTree); + aConditions); item = item->mNext; } while (item); break; @@ -6397,7 +6414,7 @@ SetBackgroundPairList(nsStyleContext* aStyleContext, uint32_t& aItemCount, uint32_t& aMaxItemCount, bool& aRebuild, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { switch (aValue.GetUnit()) { case eCSSUnit_Null: @@ -6405,7 +6422,7 @@ SetBackgroundPairList(nsStyleContext* aStyleContext, case eCSSUnit_Inherit: aRebuild = true; - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aLayers.EnsureLengthAtLeast(aParentItemCount); aItemCount = aParentItemCount; for (uint32_t i = 0; i < aParentItemCount; ++i) { @@ -6438,7 +6455,7 @@ SetBackgroundPairList(nsStyleContext* aStyleContext, BackgroundItemComputer ::ComputeValue(aStyleContext, item, aLayers[aItemCount-1].*aResultLocation, - aCanStoreInRuleTree); + aConditions); item = item->mNext; } while (item); break; @@ -6473,7 +6490,7 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(Background, (), bg, parentBG) @@ -6484,7 +6501,7 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, bg->mBackgroundColor = NS_RGBA(0, 0, 0, 0); } else if (!SetColor(*backColorValue, parentBG->mBackgroundColor, mPresContext, aContext, bg->mBackgroundColor, - canStoreInRuleTree)) { + conditions)) { NS_ASSERTION(eCSSUnit_Null == backColorValue->GetUnit(), "unexpected color unit"); } @@ -6498,7 +6515,7 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, bg->mLayers, parentBG->mLayers, &nsStyleBackground::Layer::mImage, initialImage, parentBG->mImageCount, bg->mImageCount, - maxItemCount, rebuild, canStoreInRuleTree); + maxItemCount, rebuild, conditions); // background-repeat: enum, inherit, initial [pair list] nsStyleBackground::Repeat initialRepeat; @@ -6508,7 +6525,7 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, parentBG->mLayers, &nsStyleBackground::Layer::mRepeat, initialRepeat, parentBG->mRepeatCount, bg->mRepeatCount, maxItemCount, rebuild, - canStoreInRuleTree); + conditions); // background-attachment: enum, inherit, initial [list] SetBackgroundList(aContext, *aRuleData->ValueForBackgroundAttachment(), @@ -6517,14 +6534,14 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, uint8_t(NS_STYLE_BG_ATTACHMENT_SCROLL), parentBG->mAttachmentCount, bg->mAttachmentCount, maxItemCount, rebuild, - canStoreInRuleTree); + conditions); // background-clip: enum, inherit, initial [list] SetBackgroundList(aContext, *aRuleData->ValueForBackgroundClip(), bg->mLayers, parentBG->mLayers, &nsStyleBackground::Layer::mClip, uint8_t(NS_STYLE_BG_CLIP_BORDER), parentBG->mClipCount, - bg->mClipCount, maxItemCount, rebuild, canStoreInRuleTree); + bg->mClipCount, maxItemCount, rebuild, conditions); // background-blend-mode: enum, inherit, initial [list] SetBackgroundList(aContext, *aRuleData->ValueForBackgroundBlendMode(), @@ -6532,7 +6549,7 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, parentBG->mLayers, &nsStyleBackground::Layer::mBlendMode, uint8_t(NS_STYLE_BLEND_NORMAL), parentBG->mBlendModeCount, bg->mBlendModeCount, maxItemCount, rebuild, - canStoreInRuleTree); + conditions); // background-origin: enum, inherit, initial [list] SetBackgroundList(aContext, *aRuleData->ValueForBackgroundOrigin(), @@ -6540,7 +6557,7 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, parentBG->mLayers, &nsStyleBackground::Layer::mOrigin, uint8_t(NS_STYLE_BG_ORIGIN_PADDING), parentBG->mOriginCount, bg->mOriginCount, maxItemCount, rebuild, - canStoreInRuleTree); + conditions); // background-position: enum, length, percent (flags), inherit [pair list] nsStyleBackground::Position initialPosition; @@ -6550,7 +6567,7 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, parentBG->mLayers, &nsStyleBackground::Layer::mPosition, initialPosition, parentBG->mPositionCount, bg->mPositionCount, maxItemCount, rebuild, - canStoreInRuleTree); + conditions); // background-size: enum, length, auto, inherit, initial [pair list] nsStyleBackground::Size initialSize; @@ -6560,7 +6577,7 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, parentBG->mLayers, &nsStyleBackground::Layer::mSize, initialSize, parentBG->mSizeCount, bg->mSizeCount, maxItemCount, rebuild, - canStoreInRuleTree); + conditions); if (rebuild) { // Delete any extra items. We need to keep layers in which any @@ -6599,7 +6616,7 @@ nsRuleNode::ComputeMarginData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(Margin, (), margin, parentMargin) @@ -6613,7 +6630,7 @@ nsRuleNode::ComputeMarginData(void* aStartStruct, coord, parentCoord, SETCOORD_LPAH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { margin->mMargin.Set(side, coord); } } @@ -6705,13 +6722,13 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(Border, (mPresContext), border, parentBorder) // box-decoration-break: enum, inherit, initial SetDiscrete(*aRuleData->ValueForBoxDecorationBreak(), - border->mBoxDecorationBreak, canStoreInRuleTree, + border->mBoxDecorationBreak, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentBorder->mBoxDecorationBreak, NS_STYLE_BOX_DECORATION_BREAK_SLICE, 0, 0, 0, 0); @@ -6730,13 +6747,13 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, case eCSSUnit_Inherit: border->mBoxShadow = parentBorder->mBoxShadow; - canStoreInRuleTree = false; + conditions.SetUncacheable(); break; case eCSSUnit_List: case eCSSUnit_ListDep: border->mBoxShadow = GetShadowData(boxShadowValue->GetListValue(), - aContext, true, canStoreInRuleTree); + aContext, true, conditions); break; default: @@ -6769,13 +6786,13 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, // OK to pass bad aParentCoord since we're not passing SETCOORD_INHERIT else if (SetCoord(value, coord, nsStyleCoord(), SETCOORD_LENGTH | SETCOORD_CALC_LENGTH_ONLY, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { NS_ASSERTION(coord.GetUnit() == eStyleUnit_Coord, "unexpected unit"); // clamp negative calc() to 0. border->SetBorderWidth(side, std::max(coord.GetCoordValue(), 0)); } else if (eCSSUnit_Inherit == value.GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); border->SetBorderWidth(side, parentBorder->GetComputedBorder().Side(side)); } @@ -6808,7 +6825,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, border->SetBorderStyle(side, NS_STYLE_BORDER_STYLE_NONE); } else if (eCSSUnit_Inherit == unit) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); border->SetBorderStyle(side, parentBorder->GetBorderStyle(side)); } } @@ -6838,7 +6855,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, break; case eCSSUnit_Inherit: { - canStoreInRuleTree = false; + conditions.SetUncacheable(); border->ClearBorderColors(side); if (parentContext) { nsBorderColors *parentColors; @@ -6860,7 +6877,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, const nsCSSValueList* list = value.GetListValue(); while (list) { if (SetColor(list->mValue, unused, mPresContext, - aContext, borderColor, canStoreInRuleTree)) + aContext, borderColor, conditions)) border->AppendBorderColor(side, borderColor); else { NS_NOTREACHED("unexpected item in -moz-border-*-colors list"); @@ -6883,7 +6900,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, NS_FOR_CSS_SIDES(side) { const nsCSSValue& value = *aRuleData->ValueFor(subprops[side]); if (eCSSUnit_Inherit == value.GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); if (parentContext) { parentBorder->GetBorderColor(side, borderColor, foreground); if (foreground) { @@ -6901,7 +6918,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, } } else if (SetColor(value, unused, mPresContext, aContext, borderColor, - canStoreInRuleTree)) { + conditions)) { border->SetBorderColor(side, borderColor); } else if (eCSSUnit_Enumerated == value.GetUnit()) { @@ -6936,7 +6953,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, if (SetPairCoords(radius, coordX, coordY, parentX, parentY, SETCOORD_LPH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { border->mBorderRadius.Set(cx, coordX); border->mBorderRadius.Set(cy, coordY); } @@ -6945,7 +6962,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, // float-edge: enum, inherit, initial SetDiscrete(*aRuleData->ValueForFloatEdge(), - border->mFloatEdge, canStoreInRuleTree, + border->mFloatEdge, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentBorder->mFloatEdge, NS_STYLE_FLOAT_EDGE_CONTENT, 0, 0, 0, 0); @@ -6953,13 +6970,13 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, // border-image-source const nsCSSValue* borderImageSource = aRuleData->ValueForBorderImageSource(); if (borderImageSource->GetUnit() == eCSSUnit_Inherit) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); border->mBorderImageSource = parentBorder->mBorderImageSource; } else { SetStyleImage(aContext, *borderImageSource, border->mBorderImageSource, - canStoreInRuleTree); + conditions); } nsCSSValue borderImageSliceValue; @@ -6970,7 +6987,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, // border-image-slice: fill SetDiscrete(borderImageSliceFill, border->mBorderImageFill, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentBorder->mBorderImageFill, NS_STYLE_BORDER_IMAGE_SLICE_NOFILL, 0, 0, 0, 0); @@ -6993,7 +7010,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, SETCOORD_FACTOR | SETCOORD_PERCENT | SETCOORD_INHERIT | SETCOORD_INITIAL_HUNDRED_PCT | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { border->mBorderImageSlice.Set(side, coord); } @@ -7003,7 +7020,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, parentBorder->mBorderImageWidth.Get(side), SETCOORD_LPAH | SETCOORD_FACTOR | SETCOORD_INITIAL_FACTOR_ONE | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { border->mBorderImageWidth.Set(side, coord); } @@ -7013,7 +7030,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, SETCOORD_LENGTH | SETCOORD_FACTOR | SETCOORD_INHERIT | SETCOORD_INITIAL_FACTOR_ZERO | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { border->mBorderImageOutset.Set(side, coord); } } @@ -7025,14 +7042,14 @@ nsRuleNode::ComputeBorderData(void* aStartStruct, SetDiscrete(borderImageRepeat.mXValue, border->mBorderImageRepeatH, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentBorder->mBorderImageRepeatH, NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH, 0, 0, 0, 0); SetDiscrete(borderImageRepeat.mYValue, border->mBorderImageRepeatV, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentBorder->mBorderImageRepeatV, NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH, 0, 0, 0, 0); @@ -7048,7 +7065,7 @@ nsRuleNode::ComputePaddingData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(Padding, (), padding, parentPadding) @@ -7062,7 +7079,7 @@ nsRuleNode::ComputePaddingData(void* aStartStruct, coord, parentCoord, SETCOORD_LPH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { padding->mPadding.Set(side, coord); } } @@ -7077,7 +7094,7 @@ nsRuleNode::ComputeOutlineData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(Outline, (mPresContext), outline, parentOutline) @@ -7092,7 +7109,7 @@ nsRuleNode::ComputeOutlineData(void* aStartStruct, SetCoord(*outlineWidthValue, outline->mOutlineWidth, parentOutline->mOutlineWidth, SETCOORD_LEH | SETCOORD_CALC_LENGTH_ONLY, aContext, - mPresContext, canStoreInRuleTree); + mPresContext, conditions); } // outline-offset: length, inherit @@ -7103,7 +7120,7 @@ nsRuleNode::ComputeOutlineData(void* aStartStruct, nsStyleCoord::CoordConstructor), SETCOORD_LH | SETCOORD_INITIAL_ZERO | SETCOORD_CALC_LENGTH_ONLY | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { outline->mOutlineOffset = tempCoord.GetCoordValue(); } else { NS_ASSERTION(outlineOffsetValue->GetUnit() == eCSSUnit_Null, @@ -7115,7 +7132,7 @@ nsRuleNode::ComputeOutlineData(void* aStartStruct, nscolor unused = NS_RGB(0,0,0); const nsCSSValue* outlineColorValue = aRuleData->ValueForOutlineColor(); if (eCSSUnit_Inherit == outlineColorValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); if (parentContext) { if (parentOutline->GetOutlineColor(outlineColor)) outline->SetOutlineColor(outlineColor); @@ -7132,7 +7149,7 @@ nsRuleNode::ComputeOutlineData(void* aStartStruct, } } else if (SetColor(*outlineColorValue, unused, mPresContext, - aContext, outlineColor, canStoreInRuleTree)) + aContext, outlineColor, conditions)) outline->SetOutlineColor(outlineColor); else if (eCSSUnit_Enumerated == outlineColorValue->GetUnit() || eCSSUnit_Initial == outlineColorValue->GetUnit() || @@ -7155,7 +7172,7 @@ nsRuleNode::ComputeOutlineData(void* aStartStruct, if (SetPairCoords(radius, coordX, coordY, parentX, parentY, SETCOORD_LPH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { outline->mOutlineRadius.Set(cx, coordX); outline->mOutlineRadius.Set(cy, coordY); } @@ -7174,7 +7191,7 @@ nsRuleNode::ComputeOutlineData(void* aStartStruct, eCSSUnit_Unset == unit) { outline->SetOutlineStyle(NS_STYLE_BORDER_STYLE_NONE); } else if (eCSSUnit_Inherit == unit) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); outline->SetOutlineStyle(parentOutline->GetOutlineStyle()); } @@ -7188,7 +7205,7 @@ nsRuleNode::ComputeListData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_INHERITED(List, (mPresContext), list, parentList) @@ -7197,7 +7214,7 @@ nsRuleNode::ComputeListData(void* aStartStruct, switch (typeValue->GetUnit()) { case eCSSUnit_Unset: case eCSSUnit_Inherit: { - canStoreInRuleTree = false; + conditions.SetUncacheable(); nsString type; parentList->GetListStyleType(type); list->SetListStyleType(type, parentList->GetCounterStyle()); @@ -7269,7 +7286,7 @@ nsRuleNode::ComputeListData(void* aStartStruct, } else if (eCSSUnit_Inherit == imageValue->GetUnit() || eCSSUnit_Unset == imageValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); NS_SET_IMAGE_REQUEST(list->SetListStyleImage, aContext, parentList->GetListStyleImage()) @@ -7277,7 +7294,7 @@ nsRuleNode::ComputeListData(void* aStartStruct, // list-style-position: enum, inherit, initial SetDiscrete(*aRuleData->ValueForListStylePosition(), - list->mListStylePosition, canStoreInRuleTree, + list->mListStylePosition, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentList->mListStylePosition, NS_STYLE_LIST_STYLE_POSITION_OUTSIDE, 0, 0, 0, 0); @@ -7287,7 +7304,7 @@ nsRuleNode::ComputeListData(void* aStartStruct, switch (imageRegionValue->GetUnit()) { case eCSSUnit_Inherit: case eCSSUnit_Unset: - canStoreInRuleTree = false; + conditions.SetUncacheable(); list->mImageRegion = parentList->mImageRegion; break; @@ -7306,27 +7323,27 @@ nsRuleNode::ComputeListData(void* aStartStruct, list->mImageRegion.y = 0; else if (rgnRect.mTop.IsLengthUnit()) list->mImageRegion.y = - CalcLength(rgnRect.mTop, aContext, mPresContext, canStoreInRuleTree); + CalcLength(rgnRect.mTop, aContext, mPresContext, conditions); if (rgnRect.mBottom.GetUnit() == eCSSUnit_Auto) list->mImageRegion.height = 0; else if (rgnRect.mBottom.IsLengthUnit()) list->mImageRegion.height = CalcLength(rgnRect.mBottom, aContext, mPresContext, - canStoreInRuleTree) - list->mImageRegion.y; + conditions) - list->mImageRegion.y; if (rgnRect.mLeft.GetUnit() == eCSSUnit_Auto) list->mImageRegion.x = 0; else if (rgnRect.mLeft.IsLengthUnit()) list->mImageRegion.x = - CalcLength(rgnRect.mLeft, aContext, mPresContext, canStoreInRuleTree); + CalcLength(rgnRect.mLeft, aContext, mPresContext, conditions); if (rgnRect.mRight.GetUnit() == eCSSUnit_Auto) list->mImageRegion.width = 0; else if (rgnRect.mRight.IsLengthUnit()) list->mImageRegion.width = CalcLength(rgnRect.mRight, aContext, mPresContext, - canStoreInRuleTree) - list->mImageRegion.x; + conditions) - list->mImageRegion.x; break; } @@ -7342,7 +7359,7 @@ SetGridTrackBreadth(const nsCSSValue& aValue, nsStyleCoord& aResult, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { nsCSSUnit unit = aValue.GetUnit(); if (unit == eCSSUnit_FlexFraction) { @@ -7355,7 +7372,7 @@ SetGridTrackBreadth(const nsCSSValue& aValue, const nsStyleCoord dummyParentCoord; SetCoord(aValue, aResult, dummyParentCoord, SETCOORD_LPE | SETCOORD_STORE_CALC, - aStyleContext, aPresContext, aCanStoreInRuleTree); + aStyleContext, aPresContext, aConditions); } } @@ -7365,7 +7382,7 @@ SetGridTrackSize(const nsCSSValue& aValue, nsStyleCoord& aResultMax, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { if (aValue.GetUnit() == eCSSUnit_Function) { // A minmax() function. @@ -7373,14 +7390,14 @@ SetGridTrackSize(const nsCSSValue& aValue, NS_ASSERTION(func->Item(0).GetKeywordValue() == eCSSKeyword_minmax, "Expected minmax(), got another function name"); SetGridTrackBreadth(func->Item(1), aResultMin, - aStyleContext, aPresContext, aCanStoreInRuleTree); + aStyleContext, aPresContext, aConditions); SetGridTrackBreadth(func->Item(2), aResultMax, - aStyleContext, aPresContext, aCanStoreInRuleTree); + aStyleContext, aPresContext, aConditions); } else { // A single , // specifies identical min and max sizing functions. SetGridTrackBreadth(aValue, aResultMin, - aStyleContext, aPresContext, aCanStoreInRuleTree); + aStyleContext, aPresContext, aConditions); aResultMax = aResultMin; } } @@ -7393,7 +7410,7 @@ SetGridAutoColumnsRows(const nsCSSValue& aValue, const nsStyleCoord& aParentValueMax, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { switch (aValue.GetUnit()) { @@ -7401,7 +7418,7 @@ SetGridAutoColumnsRows(const nsCSSValue& aValue, break; case eCSSUnit_Inherit: - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aResultMin = aParentValueMin; aResultMax = aParentValueMax; break; @@ -7417,7 +7434,7 @@ SetGridAutoColumnsRows(const nsCSSValue& aValue, default: SetGridTrackSize(aValue, aResultMin, aResultMax, - aStyleContext, aPresContext, aCanStoreInRuleTree); + aStyleContext, aPresContext, aConditions); } } @@ -7444,7 +7461,7 @@ SetGridTrackList(const nsCSSValue& aValue, const nsStyleGridTemplate& aParentValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { switch (aValue.GetUnit()) { @@ -7452,7 +7469,7 @@ SetGridTrackList(const nsCSSValue& aValue, break; case eCSSUnit_Inherit: - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aResult.mIsSubgrid = aParentValue.mIsSubgrid; aResult.mLineNameLists = aParentValue.mLineNameLists; aResult.mMinTrackSizingFunctions = aParentValue.mMinTrackSizingFunctions; @@ -7499,7 +7516,7 @@ SetGridTrackList(const nsCSSValue& aValue, nsStyleCoord& min = *aResult.mMinTrackSizingFunctions.AppendElement(); nsStyleCoord& max = *aResult.mMaxTrackSizingFunctions.AppendElement(); SetGridTrackSize(item->mValue, min, max, - aStyleContext, aPresContext, aCanStoreInRuleTree); + aStyleContext, aPresContext, aConditions); item = item->mNext; MOZ_ASSERT(item, "Expected a eCSSUnit_List of odd length"); @@ -7518,14 +7535,14 @@ static void SetGridTemplateAreas(const nsCSSValue& aValue, nsRefPtr* aResult, css::GridTemplateAreasValue* aParentValue, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { switch (aValue.GetUnit()) { case eCSSUnit_Null: break; case eCSSUnit_Inherit: - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); *aResult = aParentValue; break; @@ -7544,7 +7561,7 @@ static void SetGridLine(const nsCSSValue& aValue, nsStyleGridLine& aResult, const nsStyleGridLine& aParentValue, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { switch (aValue.GetUnit()) { @@ -7552,7 +7569,7 @@ SetGridLine(const nsCSSValue& aValue, break; case eCSSUnit_Inherit: - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aResult = aParentValue; break; @@ -7590,7 +7607,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(Position, (), pos, parentPos) @@ -7608,7 +7625,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, coord, parentCoord, SETCOORD_LPAH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree)) { + aContext, mPresContext, conditions)) { pos->mOffset.Set(side, coord); } } @@ -7641,7 +7658,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, pos->mWidth, parentPos->mWidth, SETCOORD_LPAEH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); const nsCSSValue* minWidth = aRuleData->ValueForMinWidth(); SetCoord(minWidth->GetUnit() == eCSSUnit_Enumerated && vertical ? @@ -7649,7 +7666,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, pos->mMinWidth, parentPos->mMinWidth, SETCOORD_LPAEH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); const nsCSSValue* maxWidth = aRuleData->ValueForMaxWidth(); SetCoord(maxWidth->GetUnit() == eCSSUnit_Enumerated && vertical ? @@ -7657,7 +7674,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, pos->mMaxWidth, parentPos->mMaxWidth, SETCOORD_LPOEH | SETCOORD_INITIAL_NONE | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); const nsCSSValue* height = aRuleData->ValueForHeight(); SetCoord(height->GetUnit() == eCSSUnit_Enumerated && !vertical ? @@ -7665,7 +7682,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, pos->mHeight, parentPos->mHeight, SETCOORD_LPAEH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); const nsCSSValue* minHeight = aRuleData->ValueForMinHeight(); SetCoord(minHeight->GetUnit() == eCSSUnit_Enumerated && !vertical ? @@ -7673,7 +7690,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, pos->mMinHeight, parentPos->mMinHeight, SETCOORD_LPAEH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); const nsCSSValue* maxHeight = aRuleData->ValueForMaxHeight(); SetCoord(maxHeight->GetUnit() == eCSSUnit_Enumerated && !vertical ? @@ -7681,25 +7698,25 @@ nsRuleNode::ComputePositionData(void* aStartStruct, pos->mMaxHeight, parentPos->mMaxHeight, SETCOORD_LPOEH | SETCOORD_INITIAL_NONE | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // box-sizing: enum, inherit, initial SetDiscrete(*aRuleData->ValueForBoxSizing(), - pos->mBoxSizing, canStoreInRuleTree, + pos->mBoxSizing, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentPos->mBoxSizing, NS_STYLE_BOX_SIZING_CONTENT, 0, 0, 0, 0); // align-content: enum, inherit, initial SetDiscrete(*aRuleData->ValueForAlignContent(), - pos->mAlignContent, canStoreInRuleTree, + pos->mAlignContent, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentPos->mAlignContent, NS_STYLE_ALIGN_CONTENT_STRETCH, 0, 0, 0, 0); // align-items: enum, inherit, initial SetDiscrete(*aRuleData->ValueForAlignItems(), - pos->mAlignItems, canStoreInRuleTree, + pos->mAlignItems, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentPos->mAlignItems, NS_STYLE_ALIGN_ITEMS_INITIAL_VALUE, 0, 0, 0, 0); @@ -7745,10 +7762,10 @@ nsRuleNode::ComputePositionData(void* aStartStruct, } pos->mAlignSelf = inheritedAlignSelf; - canStoreInRuleTree = false; + conditions.SetUncacheable(); } else { SetDiscrete(*aRuleData->ValueForAlignSelf(), - pos->mAlignSelf, canStoreInRuleTree, + pos->mAlignSelf, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentPos->mAlignSelf, // (unused -- we handled inherit above) NS_STYLE_ALIGN_SELF_AUTO, // initial == auto @@ -7764,10 +7781,10 @@ nsRuleNode::ComputePositionData(void* aStartStruct, } else { pos->mJustifyItems = NS_STYLE_JUSTIFY_AUTO; } - canStoreInRuleTree = false; + conditions.SetUncacheable(); } else { SetDiscrete(justifyItemsValue, - pos->mJustifyItems, canStoreInRuleTree, + pos->mJustifyItems, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentPos->mJustifyItems, // unused, we handle 'inherit' above NS_STYLE_JUSTIFY_AUTO, 0, 0, 0, 0); @@ -7778,51 +7795,51 @@ nsRuleNode::ComputePositionData(void* aStartStruct, SetCoord(*aRuleData->ValueForFlexBasis(), pos->mFlexBasis, parentPos->mFlexBasis, SETCOORD_LPAEH | SETCOORD_INITIAL_AUTO | SETCOORD_STORE_CALC | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // flex-direction: enum, inherit, initial SetDiscrete(*aRuleData->ValueForFlexDirection(), - pos->mFlexDirection, canStoreInRuleTree, + pos->mFlexDirection, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentPos->mFlexDirection, NS_STYLE_FLEX_DIRECTION_ROW, 0, 0, 0, 0); // flex-grow: float, inherit, initial SetFactor(*aRuleData->ValueForFlexGrow(), - pos->mFlexGrow, canStoreInRuleTree, + pos->mFlexGrow, conditions, parentPos->mFlexGrow, 0.0f, SETFCT_UNSET_INITIAL); // flex-shrink: float, inherit, initial SetFactor(*aRuleData->ValueForFlexShrink(), - pos->mFlexShrink, canStoreInRuleTree, + pos->mFlexShrink, conditions, parentPos->mFlexShrink, 1.0f, SETFCT_UNSET_INITIAL); // flex-wrap: enum, inherit, initial SetDiscrete(*aRuleData->ValueForFlexWrap(), - pos->mFlexWrap, canStoreInRuleTree, + pos->mFlexWrap, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentPos->mFlexWrap, NS_STYLE_FLEX_WRAP_NOWRAP, 0, 0, 0, 0); // order: integer, inherit, initial SetDiscrete(*aRuleData->ValueForOrder(), - pos->mOrder, canStoreInRuleTree, + pos->mOrder, conditions, SETDSC_INTEGER | SETDSC_UNSET_INITIAL, parentPos->mOrder, NS_STYLE_ORDER_INITIAL, 0, 0, 0, 0); // justify-content: enum, inherit, initial SetDiscrete(*aRuleData->ValueForJustifyContent(), - pos->mJustifyContent, canStoreInRuleTree, + pos->mJustifyContent, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentPos->mJustifyContent, NS_STYLE_JUSTIFY_CONTENT_FLEX_START, 0, 0, 0, 0); // object-fit: enum, inherit, initial SetDiscrete(*aRuleData->ValueForObjectFit(), - pos->mObjectFit, canStoreInRuleTree, + pos->mObjectFit, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentPos->mObjectFit, NS_STYLE_OBJECT_FIT_FILL, 0, 0, 0, 0); @@ -7833,7 +7850,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, case eCSSUnit_Null: break; case eCSSUnit_Inherit: - canStoreInRuleTree = false; + conditions.SetUncacheable(); pos->mObjectPosition = parentPos->mObjectPosition; break; case eCSSUnit_Initial: @@ -7842,7 +7859,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, break; default: ComputePositionValue(aContext, objectPosition, - pos->mObjectPosition, canStoreInRuleTree); + pos->mObjectPosition, conditions); } // grid-auto-flow @@ -7851,7 +7868,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, case eCSSUnit_Null: break; case eCSSUnit_Inherit: - canStoreInRuleTree = false; + conditions.SetUncacheable(); pos->mGridAutoFlow = parentPos->mGridAutoFlow; break; case eCSSUnit_Initial: @@ -7870,7 +7887,7 @@ nsRuleNode::ComputePositionData(void* aStartStruct, pos->mGridAutoColumnsMax, parentPos->mGridAutoColumnsMin, parentPos->mGridAutoColumnsMax, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // grid-auto-rows SetGridAutoColumnsRows(*aRuleData->ValueForGridAutoRows(), @@ -7878,56 +7895,56 @@ nsRuleNode::ComputePositionData(void* aStartStruct, pos->mGridAutoRowsMax, parentPos->mGridAutoRowsMin, parentPos->mGridAutoRowsMax, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // grid-template-columns SetGridTrackList(*aRuleData->ValueForGridTemplateColumns(), pos->mGridTemplateColumns, parentPos->mGridTemplateColumns, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // grid-template-rows SetGridTrackList(*aRuleData->ValueForGridTemplateRows(), pos->mGridTemplateRows, parentPos->mGridTemplateRows, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // grid-tempate-areas SetGridTemplateAreas(*aRuleData->ValueForGridTemplateAreas(), &pos->mGridTemplateAreas, parentPos->mGridTemplateAreas, - canStoreInRuleTree); + conditions); // grid-column-start SetGridLine(*aRuleData->ValueForGridColumnStart(), pos->mGridColumnStart, parentPos->mGridColumnStart, - canStoreInRuleTree); + conditions); // grid-column-end SetGridLine(*aRuleData->ValueForGridColumnEnd(), pos->mGridColumnEnd, parentPos->mGridColumnEnd, - canStoreInRuleTree); + conditions); // grid-row-start SetGridLine(*aRuleData->ValueForGridRowStart(), pos->mGridRowStart, parentPos->mGridRowStart, - canStoreInRuleTree); + conditions); // grid-row-end SetGridLine(*aRuleData->ValueForGridRowEnd(), pos->mGridRowEnd, parentPos->mGridRowEnd, - canStoreInRuleTree); + conditions); // z-index const nsCSSValue* zIndexValue = aRuleData->ValueForZIndex(); if (! SetCoord(*zIndexValue, pos->mZIndex, parentPos->mZIndex, SETCOORD_IA | SETCOORD_INITIAL_AUTO | SETCOORD_UNSET_INITIAL, - aContext, nullptr, canStoreInRuleTree)) { + aContext, nullptr, conditions)) { if (eCSSUnit_Inherit == zIndexValue->GetUnit()) { // handle inherit, because it's ok to inherit 'auto' here - canStoreInRuleTree = false; + conditions.SetUncacheable(); pos->mZIndex = parentPos->mZIndex; } } @@ -7941,13 +7958,13 @@ nsRuleNode::ComputeTableData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(Table, (), table, parentTable) // table-layout: enum, inherit, initial SetDiscrete(*aRuleData->ValueForTableLayout(), - table->mLayoutStrategy, canStoreInRuleTree, + table->mLayoutStrategy, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentTable->mLayoutStrategy, NS_STYLE_TABLE_LAYOUT_AUTO, 0, 0, 0, 0); @@ -7967,13 +7984,13 @@ nsRuleNode::ComputeTableBorderData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_INHERITED(TableBorder, (), table, parentTable) // border-collapse: enum, inherit, initial SetDiscrete(*aRuleData->ValueForBorderCollapse(), table->mBorderCollapse, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentTable->mBorderCollapse, NS_STYLE_BORDER_SEPARATE, 0, 0, 0, 0); @@ -7995,7 +8012,7 @@ nsRuleNode::ComputeTableBorderData(void* aStartStruct, SETCOORD_LH | SETCOORD_INITIAL_ZERO | SETCOORD_CALC_LENGTH_ONLY | SETCOORD_CALC_CLAMP_NONNEGATIVE | SETCOORD_UNSET_INHERIT, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); NS_ASSERTION(result, "malformed table border value"); table->mBorderSpacingCol = coordCol.GetCoordValue(); table->mBorderSpacingRow = coordRow.GetCoordValue(); @@ -8003,14 +8020,14 @@ nsRuleNode::ComputeTableBorderData(void* aStartStruct, // caption-side: enum, inherit, initial SetDiscrete(*aRuleData->ValueForCaptionSide(), - table->mCaptionSide, canStoreInRuleTree, + table->mCaptionSide, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentTable->mCaptionSide, NS_STYLE_CAPTION_SIDE_TOP, 0, 0, 0, 0); // empty-cells: enum, inherit, initial SetDiscrete(*aRuleData->ValueForEmptyCells(), - table->mEmptyCells, canStoreInRuleTree, + table->mEmptyCells, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentTable->mEmptyCells, NS_STYLE_TABLE_EMPTY_CELLS_SHOW, @@ -8025,7 +8042,7 @@ nsRuleNode::ComputeContentData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { uint32_t count; nsAutoString buffer; @@ -8047,7 +8064,7 @@ nsRuleNode::ComputeContentData(void* aStartStruct, break; case eCSSUnit_Inherit: - canStoreInRuleTree = false; + conditions.SetUncacheable(); count = parentContent->ContentCount(); if (NS_SUCCEEDED(content->AllocateContents(count))) { while (0 < count--) { @@ -8149,7 +8166,7 @@ nsRuleNode::ComputeContentData(void* aStartStruct, break; case eCSSUnit_Inherit: - canStoreInRuleTree = false; + conditions.SetUncacheable(); count = parentContent->CounterIncrementCount(); if (NS_SUCCEEDED(content->AllocateCounterIncrements(count))) { while (0 < count--) { @@ -8202,7 +8219,7 @@ nsRuleNode::ComputeContentData(void* aStartStruct, break; case eCSSUnit_Inherit: - canStoreInRuleTree = false; + conditions.SetUncacheable(); count = parentContent->CounterResetCount(); if (NS_SUCCEEDED(content->AllocateCounterResets(count))) { while (0 < count--) { @@ -8246,7 +8263,7 @@ nsRuleNode::ComputeContentData(void* aStartStruct, SetCoord(*aRuleData->ValueForMarkerOffset(), content->mMarkerOffset, parentContent->mMarkerOffset, SETCOORD_LH | SETCOORD_AUTO | SETCOORD_INITIAL_AUTO | SETCOORD_CALC_LENGTH_ONLY | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // If we ended up with an image, track it. for (uint32_t i = 0; i < content->ContentCount(); ++i) { @@ -8265,7 +8282,7 @@ nsRuleNode::ComputeQuotesData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_INHERITED(Quotes, (), quotes, parentQuotes) @@ -8276,7 +8293,7 @@ nsRuleNode::ComputeQuotesData(void* aStartStruct, break; case eCSSUnit_Inherit: case eCSSUnit_Unset: - canStoreInRuleTree = false; + conditions.SetUncacheable(); quotes->CopyFrom(*parentQuotes); break; case eCSSUnit_Initial: @@ -8320,54 +8337,54 @@ nsRuleNode::ComputeXULData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(XUL, (), xul, parentXUL) // box-align: enum, inherit, initial SetDiscrete(*aRuleData->ValueForBoxAlign(), - xul->mBoxAlign, canStoreInRuleTree, + xul->mBoxAlign, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentXUL->mBoxAlign, NS_STYLE_BOX_ALIGN_STRETCH, 0, 0, 0, 0); // box-direction: enum, inherit, initial SetDiscrete(*aRuleData->ValueForBoxDirection(), - xul->mBoxDirection, canStoreInRuleTree, + xul->mBoxDirection, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentXUL->mBoxDirection, NS_STYLE_BOX_DIRECTION_NORMAL, 0, 0, 0, 0); // box-flex: factor, inherit SetFactor(*aRuleData->ValueForBoxFlex(), - xul->mBoxFlex, canStoreInRuleTree, + xul->mBoxFlex, conditions, parentXUL->mBoxFlex, 0.0f, SETFCT_UNSET_INITIAL); // box-orient: enum, inherit, initial SetDiscrete(*aRuleData->ValueForBoxOrient(), - xul->mBoxOrient, canStoreInRuleTree, + xul->mBoxOrient, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentXUL->mBoxOrient, NS_STYLE_BOX_ORIENT_HORIZONTAL, 0, 0, 0, 0); // box-pack: enum, inherit, initial SetDiscrete(*aRuleData->ValueForBoxPack(), - xul->mBoxPack, canStoreInRuleTree, + xul->mBoxPack, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentXUL->mBoxPack, NS_STYLE_BOX_PACK_START, 0, 0, 0, 0); // box-ordinal-group: integer, inherit, initial SetDiscrete(*aRuleData->ValueForBoxOrdinalGroup(), - xul->mBoxOrdinal, canStoreInRuleTree, + xul->mBoxOrdinal, conditions, SETDSC_INTEGER | SETDSC_UNSET_INITIAL, parentXUL->mBoxOrdinal, 1, 0, 0, 0, 0); const nsCSSValue* stackSizingValue = aRuleData->ValueForStackSizing(); if (eCSSUnit_Inherit == stackSizingValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); xul->mStretchStack = parentXUL->mStretchStack; } else if (eCSSUnit_Initial == stackSizingValue->GetUnit() || eCSSUnit_Unset == stackSizingValue->GetUnit()) { @@ -8386,7 +8403,7 @@ nsRuleNode::ComputeColumnData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(Column, (mPresContext), column, parent) @@ -8396,14 +8413,14 @@ nsRuleNode::ComputeColumnData(void* aStartStruct, SETCOORD_LAH | SETCOORD_INITIAL_AUTO | SETCOORD_CALC_LENGTH_ONLY | SETCOORD_CALC_CLAMP_NONNEGATIVE | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // column-gap: length, inherit, normal SetCoord(*aRuleData->ValueForColumnGap(), column->mColumnGap, parent->mColumnGap, SETCOORD_LH | SETCOORD_NORMAL | SETCOORD_INITIAL_NORMAL | SETCOORD_CALC_LENGTH_ONLY | SETCOORD_UNSET_INITIAL, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); // clamp negative calc() to 0 if (column->mColumnGap.GetUnit() == eStyleUnit_Coord) { column->mColumnGap.SetCoordValue( @@ -8422,7 +8439,7 @@ nsRuleNode::ComputeColumnData(void* aStartStruct, column->mColumnCount = std::min(column->mColumnCount, nsStyleColumn::kMaxColumnCount); } else if (eCSSUnit_Inherit == columnCountValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); column->mColumnCount = parent->mColumnCount; } @@ -8443,11 +8460,11 @@ nsRuleNode::ComputeColumnData(void* aStartStruct, } else if (eCSSUnit_Inherit == widthValue.GetUnit()) { column->SetColumnRuleWidth(parent->GetComputedColumnRuleWidth()); - canStoreInRuleTree = false; + conditions.SetUncacheable(); } else if (widthValue.IsLengthUnit() || widthValue.IsCalcUnit()) { nscoord len = - CalcLength(widthValue, aContext, mPresContext, canStoreInRuleTree); + CalcLength(widthValue, aContext, mPresContext, conditions); if (len < 0) { // FIXME: This is untested (by test_value_storage.html) for // column-rule-width since it gets covered up by the border @@ -8471,14 +8488,14 @@ nsRuleNode::ComputeColumnData(void* aStartStruct, column->mColumnRuleStyle = NS_STYLE_BORDER_STYLE_NONE; } else if (eCSSUnit_Inherit == styleValue.GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); column->mColumnRuleStyle = parent->mColumnRuleStyle; } // column-rule-color: color, inherit const nsCSSValue& colorValue = *aRuleData->ValueForColumnRuleColor(); if (eCSSUnit_Inherit == colorValue.GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); column->mColumnRuleColorIsForeground = false; if (parent->mColumnRuleColorIsForeground) { if (parentContext) { @@ -8497,13 +8514,13 @@ nsRuleNode::ComputeColumnData(void* aStartStruct, column->mColumnRuleColorIsForeground = true; } else if (SetColor(colorValue, 0, mPresContext, aContext, - column->mColumnRuleColor, canStoreInRuleTree)) { + column->mColumnRuleColor, conditions)) { column->mColumnRuleColorIsForeground = false; } // column-fill: enum SetDiscrete(*aRuleData->ValueForColumnFill(), - column->mColumnFill, canStoreInRuleTree, + column->mColumnFill, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parent->mColumnFill, NS_STYLE_COLUMN_FILL_BALANCE, @@ -8516,14 +8533,14 @@ static void SetSVGPaint(const nsCSSValue& aValue, const nsStyleSVGPaint& parentPaint, nsPresContext* aPresContext, nsStyleContext *aContext, nsStyleSVGPaint& aResult, nsStyleSVGPaintType aInitialPaintType, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { nscolor color; if (aValue.GetUnit() == eCSSUnit_Inherit || aValue.GetUnit() == eCSSUnit_Unset) { aResult = parentPaint; - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); } else if (aValue.GetUnit() == eCSSUnit_None) { aResult.SetType(eStyleSVGPaintType_None); } else if (aValue.GetUnit() == eCSSUnit_Initial) { @@ -8531,7 +8548,7 @@ SetSVGPaint(const nsCSSValue& aValue, const nsStyleSVGPaint& parentPaint, aResult.mPaint.mColor = NS_RGB(0, 0, 0); aResult.mFallbackColor = NS_RGB(0, 0, 0); } else if (SetColor(aValue, NS_RGB(0, 0, 0), aPresContext, aContext, - color, aCanStoreInRuleTree)) { + color, aConditions)) { aResult.SetType(eStyleSVGPaintType_Color); aResult.mPaint.mColor = color; } else if (aValue.GetUnit() == eCSSUnit_Pair) { @@ -8564,7 +8581,7 @@ SetSVGPaint(const nsCSSValue& aValue, const nsStyleSVGPaint& parentPaint, MOZ_ASSERT(pair.mYValue.GetUnit() != eCSSUnit_Inherit, "cannot inherit fallback colour"); SetColor(pair.mYValue, NS_RGB(0, 0, 0), aPresContext, aContext, - aResult.mFallbackColor, aCanStoreInRuleTree); + aResult.mFallbackColor, aConditions); } } else { MOZ_ASSERT(aValue.GetUnit() == eCSSUnit_Null, @@ -8575,7 +8592,7 @@ SetSVGPaint(const nsCSSValue& aValue, const nsStyleSVGPaint& parentPaint, static void SetSVGOpacity(const nsCSSValue& aValue, float& aOpacityField, nsStyleSVGOpacitySource& aOpacityTypeField, - bool& aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, float aParentOpacity, nsStyleSVGOpacitySource aParentOpacityType) { if (eCSSUnit_Enumerated == aValue.GetUnit()) { @@ -8593,11 +8610,11 @@ SetSVGOpacity(const nsCSSValue& aValue, aOpacityField = 1.0f; } else if (eCSSUnit_Inherit == aValue.GetUnit() || eCSSUnit_Unset == aValue.GetUnit()) { - aCanStoreInRuleTree = false; + aConditions.SetUncacheable(); aOpacityField = aParentOpacity; aOpacityTypeField = aParentOpacityType; } else if (eCSSUnit_Null != aValue.GetUnit()) { - SetFactor(aValue, aOpacityField, aCanStoreInRuleTree, + SetFactor(aValue, aOpacityField, aConditions, aParentOpacity, 1.0f, SETFCT_OPACITY); aOpacityTypeField = eStyleSVGOpacitySource_Normal; } @@ -8609,27 +8626,27 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_INHERITED(SVG, (), svg, parentSVG) // clip-rule: enum, inherit, initial SetDiscrete(*aRuleData->ValueForClipRule(), - svg->mClipRule, canStoreInRuleTree, + svg->mClipRule, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentSVG->mClipRule, NS_STYLE_FILL_RULE_NONZERO, 0, 0, 0, 0); // color-interpolation: enum, inherit, initial SetDiscrete(*aRuleData->ValueForColorInterpolation(), - svg->mColorInterpolation, canStoreInRuleTree, + svg->mColorInterpolation, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentSVG->mColorInterpolation, NS_STYLE_COLOR_INTERPOLATION_SRGB, 0, 0, 0, 0); // color-interpolation-filters: enum, inherit, initial SetDiscrete(*aRuleData->ValueForColorInterpolationFilters(), - svg->mColorInterpolationFilters, canStoreInRuleTree, + svg->mColorInterpolationFilters, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentSVG->mColorInterpolationFilters, NS_STYLE_COLOR_INTERPOLATION_LINEARRGB, 0, 0, 0, 0); @@ -8637,26 +8654,26 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, // fill: SetSVGPaint(*aRuleData->ValueForFill(), parentSVG->mFill, mPresContext, aContext, - svg->mFill, eStyleSVGPaintType_Color, canStoreInRuleTree); + svg->mFill, eStyleSVGPaintType_Color, conditions); // fill-opacity: factor, inherit, initial, // context-fill-opacity, context-stroke-opacity nsStyleSVGOpacitySource contextFillOpacity = svg->mFillOpacitySource; SetSVGOpacity(*aRuleData->ValueForFillOpacity(), - svg->mFillOpacity, contextFillOpacity, canStoreInRuleTree, + svg->mFillOpacity, contextFillOpacity, conditions, parentSVG->mFillOpacity, parentSVG->mFillOpacitySource); svg->mFillOpacitySource = contextFillOpacity; // fill-rule: enum, inherit, initial SetDiscrete(*aRuleData->ValueForFillRule(), - svg->mFillRule, canStoreInRuleTree, + svg->mFillRule, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentSVG->mFillRule, NS_STYLE_FILL_RULE_NONZERO, 0, 0, 0, 0); // image-rendering: enum, inherit SetDiscrete(*aRuleData->ValueForImageRendering(), - svg->mImageRendering, canStoreInRuleTree, + svg->mImageRendering, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentSVG->mImageRendering, NS_STYLE_IMAGE_RENDERING_AUTO, 0, 0, 0, 0); @@ -8670,7 +8687,7 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, svg->mMarkerEnd = nullptr; } else if (eCSSUnit_Inherit == markerEndValue->GetUnit() || eCSSUnit_Unset == markerEndValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); svg->mMarkerEnd = parentSVG->mMarkerEnd; } @@ -8683,7 +8700,7 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, svg->mMarkerMid = nullptr; } else if (eCSSUnit_Inherit == markerMidValue->GetUnit() || eCSSUnit_Unset == markerMidValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); svg->mMarkerMid = parentSVG->mMarkerMid; } @@ -8696,7 +8713,7 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, svg->mMarkerStart = nullptr; } else if (eCSSUnit_Inherit == markerStartValue->GetUnit() || eCSSUnit_Unset == markerStartValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); svg->mMarkerStart = parentSVG->mMarkerStart; } @@ -8715,7 +8732,7 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, case eCSSUnit_Inherit: case eCSSUnit_Unset: - canStoreInRuleTree = false; + conditions.SetUncacheable(); svg->mPaintOrder = parentSVG->mPaintOrder; break; @@ -8729,7 +8746,7 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, // shape-rendering: enum, inherit SetDiscrete(*aRuleData->ValueForShapeRendering(), - svg->mShapeRendering, canStoreInRuleTree, + svg->mShapeRendering, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentSVG->mShapeRendering, NS_STYLE_SHAPE_RENDERING_AUTO, 0, 0, 0, 0); @@ -8737,7 +8754,7 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, // stroke: SetSVGPaint(*aRuleData->ValueForStroke(), parentSVG->mStroke, mPresContext, aContext, - svg->mStroke, eStyleSVGPaintType_None, canStoreInRuleTree); + svg->mStroke, eStyleSVGPaintType_None, conditions); // stroke-dasharray: , none, inherit, context-value const nsCSSValue* strokeDasharrayValue = aRuleData->ValueForStrokeDasharray(); @@ -8747,7 +8764,7 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, case eCSSUnit_Inherit: case eCSSUnit_Unset: - canStoreInRuleTree = false; + conditions.SetUncacheable(); svg->mStrokeDasharrayFromObject = parentSVG->mStrokeDasharrayFromObject; // only do the copy if weren't already set up by the copy constructor // FIXME Bug 389408: This is broken when aStartStruct is non-null! @@ -8804,7 +8821,7 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, SetCoord(value->mValue, svg->mStrokeDasharray[i++], nsStyleCoord(), SETCOORD_LP | SETCOORD_FACTOR, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); value = value->mNext; } } else { @@ -8830,19 +8847,19 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, svg->mStrokeDashoffset, parentSVG->mStrokeDashoffset, SETCOORD_LPH | SETCOORD_FACTOR | SETCOORD_INITIAL_ZERO | SETCOORD_UNSET_INHERIT, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); } // stroke-linecap: enum, inherit, initial SetDiscrete(*aRuleData->ValueForStrokeLinecap(), - svg->mStrokeLinecap, canStoreInRuleTree, + svg->mStrokeLinecap, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentSVG->mStrokeLinecap, NS_STYLE_STROKE_LINECAP_BUTT, 0, 0, 0, 0); // stroke-linejoin: enum, inherit, initial SetDiscrete(*aRuleData->ValueForStrokeLinejoin(), - svg->mStrokeLinejoin, canStoreInRuleTree, + svg->mStrokeLinejoin, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentSVG->mStrokeLinejoin, NS_STYLE_STROKE_LINEJOIN_MITER, 0, 0, 0, 0); @@ -8850,14 +8867,14 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, // stroke-miterlimit: , inherit SetFactor(*aRuleData->ValueForStrokeMiterlimit(), svg->mStrokeMiterlimit, - canStoreInRuleTree, + conditions, parentSVG->mStrokeMiterlimit, 4.0f, SETFCT_UNSET_INHERIT); // stroke-opacity: nsStyleSVGOpacitySource contextStrokeOpacity = svg->mStrokeOpacitySource; SetSVGOpacity(*aRuleData->ValueForStrokeOpacity(), - svg->mStrokeOpacity, contextStrokeOpacity, canStoreInRuleTree, + svg->mStrokeOpacity, contextStrokeOpacity, conditions, parentSVG->mStrokeOpacity, parentSVG->mStrokeOpacitySource); svg->mStrokeOpacitySource = contextStrokeOpacity; @@ -8882,19 +8899,19 @@ nsRuleNode::ComputeSVGData(void* aStartStruct, SetCoord(*strokeWidthValue, svg->mStrokeWidth, parentSVG->mStrokeWidth, SETCOORD_LPH | SETCOORD_FACTOR | SETCOORD_UNSET_INHERIT, - aContext, mPresContext, canStoreInRuleTree); + aContext, mPresContext, conditions); } // text-anchor: enum, inherit, initial SetDiscrete(*aRuleData->ValueForTextAnchor(), - svg->mTextAnchor, canStoreInRuleTree, + svg->mTextAnchor, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentSVG->mTextAnchor, NS_STYLE_TEXT_ANCHOR_START, 0, 0, 0, 0); // text-rendering: enum, inherit, initial SetDiscrete(*aRuleData->ValueForTextRendering(), - svg->mTextRendering, canStoreInRuleTree, + svg->mTextRendering, conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT, parentSVG->mTextRendering, NS_STYLE_TEXT_RENDERING_AUTO, 0, 0, 0, 0); @@ -8907,7 +8924,7 @@ nsRuleNode::SetStyleClipPathToCSSValue(nsStyleClipPath* aStyleClipPath, const nsCSSValue* aValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { MOZ_ASSERT(aValue->GetUnit() != eCSSUnit_ListDep || aValue->GetUnit() != eCSSUnit_List, @@ -8945,13 +8962,13 @@ nsRuleNode::SetStyleClipPathToCSSValue(nsStyleClipPath* aStyleClipPath, DebugOnly didSetCoordX = SetCoord(curPair->mXValue, xCoord, nsStyleCoord(), mask, aStyleContext, aPresContext, - aCanStoreInRuleTree); + aConditions); coordinates.AppendElement(xCoord); MOZ_ASSERT(didSetCoordX, "unexpected x coordinate unit"); DebugOnly didSetCoordY = SetCoord(curPair->mYValue, yCoord, nsStyleCoord(), mask, aStyleContext, aPresContext, - aCanStoreInRuleTree); + aConditions); coordinates.AppendElement(yCoord); MOZ_ASSERT(didSetCoordY, "unexpected y coordinate unit"); curPair = curPair->mNext; @@ -8980,7 +8997,7 @@ nsRuleNode::SetStyleClipPathToCSSValue(nsStyleClipPath* aStyleClipPath, nsStyleCoord(), mask, aStyleContext, aPresContext, - aCanStoreInRuleTree); + aConditions); MOZ_ASSERT(didSetRadius, "unexpected radius unit"); } else { radius.SetIntValue(NS_RADIUS_CLOSEST_SIDE, eStyleUnit_Enumerated); @@ -8991,7 +9008,7 @@ nsRuleNode::SetStyleClipPathToCSSValue(nsStyleClipPath* aStyleClipPath, if (positionVal.GetUnit() == eCSSUnit_Array) { ComputePositionValue(aStyleContext, positionVal, basicShape->GetPosition(), - aCanStoreInRuleTree); + aConditions); } else { MOZ_ASSERT(positionVal.GetUnit() == eCSSUnit_Null, "expected no value"); @@ -9021,7 +9038,7 @@ nsRuleNode::SetStyleClipPathToCSSValue(nsStyleClipPath* aStyleClipPath, DebugOnly didSetInset = SetCoord(val, inset, nsStyleCoord(), mask, aStyleContext, aPresContext, - aCanStoreInRuleTree); + aConditions); MOZ_ASSERT(didSetInset, "unexpected inset unit"); } coords.AppendElement(inset); @@ -9040,7 +9057,7 @@ nsRuleNode::SetStyleClipPathToCSSValue(nsStyleClipPath* aStyleClipPath, nsStyleCoord(), mask, aStyleContext, aPresContext, - aCanStoreInRuleTree); + aConditions); MOZ_ASSERT(didSetRadii, "unexpected radius unit"); insetRadius.Set(cx, coordX); insetRadius.Set(cy, coordY); @@ -9087,7 +9104,7 @@ nsRuleNode::SetStyleFilterToCSSValue(nsStyleFilter* aStyleFilter, const nsCSSValue& aValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { nsCSSUnit unit = aValue.GetUnit(); if (unit == eCSSUnit_URL) { @@ -9115,7 +9132,7 @@ nsRuleNode::SetStyleFilterToCSSValue(nsStyleFilter* aStyleFilter, filterFunction->Item(1).GetListValue(), aStyleContext, false, - aCanStoreInRuleTree); + aConditions); aStyleFilter->SetDropShadow(shadowArray); return true; } @@ -9137,7 +9154,7 @@ nsRuleNode::SetStyleFilterToCSSValue(nsStyleFilter* aStyleFilter, DebugOnly didSetCoord = SetCoord(arg, filterParameter, nsStyleCoord(), mask, aStyleContext, aPresContext, - aCanStoreInRuleTree); + aConditions); aStyleFilter->SetFilterParameter(filterParameter, type); MOZ_ASSERT(didSetCoord, "unexpected unit"); return true; @@ -9149,7 +9166,7 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_RESET(SVGReset, (), svgReset, parentSVGReset) @@ -9160,7 +9177,7 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, svgReset->mStopColor = NS_RGB(0, 0, 0); } else { SetColor(*stopColorValue, parentSVGReset->mStopColor, - mPresContext, aContext, svgReset->mStopColor, canStoreInRuleTree); + mPresContext, aContext, svgReset->mStopColor, conditions); } // flood-color: @@ -9170,7 +9187,7 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, svgReset->mFloodColor = NS_RGB(0, 0, 0); } else { SetColor(*floodColorValue, parentSVGReset->mFloodColor, - mPresContext, aContext, svgReset->mFloodColor, canStoreInRuleTree); + mPresContext, aContext, svgReset->mFloodColor, conditions); } // lighting-color: @@ -9181,7 +9198,7 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, } else { SetColor(*lightingColorValue, parentSVGReset->mLightingColor, mPresContext, aContext, svgReset->mLightingColor, - canStoreInRuleTree); + conditions); } // clip-path: url, || , none, inherit @@ -9195,7 +9212,7 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, svgReset->mClipPath = nsStyleClipPath(); break; case eCSSUnit_Inherit: - canStoreInRuleTree = false; + conditions.SetUncacheable(); svgReset->mClipPath = parentSVGReset->mClipPath; break; case eCSSUnit_URL: { @@ -9210,7 +9227,7 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, case eCSSUnit_ListDep: { svgReset->mClipPath = nsStyleClipPath(); SetStyleClipPathToCSSValue(&svgReset->mClipPath, clipPathValue, aContext, - mPresContext, canStoreInRuleTree); + mPresContext, conditions); break; } default: @@ -9219,20 +9236,20 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, // stop-opacity: SetFactor(*aRuleData->ValueForStopOpacity(), - svgReset->mStopOpacity, canStoreInRuleTree, + svgReset->mStopOpacity, conditions, parentSVGReset->mStopOpacity, 1.0f, SETFCT_OPACITY | SETFCT_UNSET_INITIAL); // flood-opacity: SetFactor(*aRuleData->ValueForFloodOpacity(), - svgReset->mFloodOpacity, canStoreInRuleTree, + svgReset->mFloodOpacity, conditions, parentSVGReset->mFloodOpacity, 1.0f, SETFCT_OPACITY | SETFCT_UNSET_INITIAL); // dominant-baseline: enum, inherit, initial SetDiscrete(*aRuleData->ValueForDominantBaseline(), svgReset->mDominantBaseline, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentSVGReset->mDominantBaseline, NS_STYLE_DOMINANT_BASELINE_AUTO, 0, 0, 0, 0); @@ -9240,7 +9257,7 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, // vector-effect: enum, inherit, initial SetDiscrete(*aRuleData->ValueForVectorEffect(), svgReset->mVectorEffect, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentSVGReset->mVectorEffect, NS_STYLE_VECTOR_EFFECT_NONE, 0, 0, 0, 0); @@ -9256,7 +9273,7 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, svgReset->mFilters.Clear(); break; case eCSSUnit_Inherit: - canStoreInRuleTree = false; + conditions.SetUncacheable(); svgReset->mFilters = parentSVGReset->mFilters; break; case eCSSUnit_List: @@ -9266,7 +9283,7 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, while (cur) { nsStyleFilter styleFilter; if (!SetStyleFilterToCSSValue(&styleFilter, cur->mValue, aContext, - mPresContext, canStoreInRuleTree)) { + mPresContext, conditions)) { svgReset->mFilters.Clear(); break; } @@ -9290,14 +9307,14 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, eCSSUnit_Unset == maskValue->GetUnit()) { svgReset->mMask = nullptr; } else if (eCSSUnit_Inherit == maskValue->GetUnit()) { - canStoreInRuleTree = false; + conditions.SetUncacheable(); svgReset->mMask = parentSVGReset->mMask; } // mask-type: enum, inherit, initial SetDiscrete(*aRuleData->ValueForMaskType(), svgReset->mMaskType, - canStoreInRuleTree, + conditions, SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL, parentSVGReset->mMaskType, NS_STYLE_MASK_TYPE_LUMINANCE, 0, 0, 0, 0); @@ -9311,7 +9328,7 @@ nsRuleNode::ComputeVariablesData(void* aStartStruct, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree) + const RuleNodeCacheConditions aConditions) { COMPUTE_START_INHERITED(Variables, (), variables, parentVariables) @@ -9322,7 +9339,7 @@ nsRuleNode::ComputeVariablesData(void* aStartStruct, CSSVariableResolver resolver(&variables->mVariables); resolver.Resolve(&parentVariables->mVariables, aRuleData->mVariables); - canStoreInRuleTree = false; + conditions.SetUncacheable(); COMPUTE_END_INHERITED(Variables, variables) } @@ -9338,7 +9355,7 @@ nsRuleNode::GetStyleData(nsStyleStructID aSID, "in some way."); const void *data; - data = mStyleData.GetStyleData(aSID); + data = mStyleData.GetStyleData(aSID, aContext); if (MOZ_LIKELY(data != nullptr)) return data; // We have a fully specified struct. Just return it. @@ -9797,9 +9814,9 @@ nsRuleNode::ComputeColor(const nsCSSValue& aValue, nsPresContext* aPresContext, MOZ_ASSERT(aValue.GetUnit() != eCSSUnit_Unset, "aValue shouldn't have eCSSUnit_Unset"); - bool canStoreInRuleTree; + RuleNodeCacheConditions conditions; bool ok = SetColor(aValue, NS_RGB(0, 0, 0), aPresContext, aStyleContext, - aResult, canStoreInRuleTree); + aResult, conditions); MOZ_ASSERT(ok || !(aPresContext && aStyleContext)); return ok; } diff --git a/layout/style/nsRuleNode.h b/layout/style/nsRuleNode.h index e031b5d724..854719adb9 100644 --- a/layout/style/nsRuleNode.h +++ b/layout/style/nsRuleNode.h @@ -11,19 +11,21 @@ #ifndef nsRuleNode_h___ #define nsRuleNode_h___ +#include "mozilla/PodOperations.h" #include "mozilla/RangedArray.h" +#include "mozilla/RuleNodeCacheConditions.h" #include "nsPresContext.h" #include "nsStyleStruct.h" -class nsStyleContext; -struct nsRuleData; -class nsIStyleRule; -struct nsCSSValueList; class nsCSSPropertySet; class nsCSSValue; - +class nsIStyleRule; +class nsStyleContext; class nsStyleCoord; +struct nsCSSRect; +struct nsCSSValueList; struct nsCSSValuePairList; +struct nsRuleData; struct nsInheritedStyleData { @@ -101,10 +103,146 @@ struct nsResetStyleData } }; +struct nsConditionalResetStyleData +{ + static uint32_t GetBitForSID(const nsStyleStructID aSID) { + return 1 << aSID; + } + + struct Entry + { + Entry(const mozilla::RuleNodeCacheConditions& aConditions, + void* aStyleStruct, + Entry* aNext) + : mConditions(aConditions), mStyleStruct(aStyleStruct), mNext(aNext) {} + + void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW { + return aContext->PresShell()-> + AllocateByObjectID(nsPresArena::nsConditionalResetStyleDataEntry_id, sz); + } + + const mozilla::RuleNodeCacheConditions mConditions; + void* const mStyleStruct; + Entry* const mNext; + }; + + // Each entry is either a pointer to a style struct or a + // pointer to an Entry object. A bit in mConditionalBits + // means that it is an Entry. + mozilla::RangedArray mEntries; + + uint32_t mConditionalBits; + + nsConditionalResetStyleData() + { + for (nsStyleStructID i = nsStyleStructID_Reset_Start; + i < nsStyleStructID_Reset_Start + nsStyleStructID_Reset_Count; + i = nsStyleStructID(i + 1)) { + mEntries[i] = nullptr; + } + mConditionalBits = 0; + } + + void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW { + return aContext->PresShell()-> + AllocateByObjectID(nsPresArena::nsConditionalResetStyleData_id, sz); + } + + void* GetStyleData(nsStyleStructID aSID) const { + if (mConditionalBits & GetBitForSID(aSID)) { + return nullptr; + } + return mEntries[aSID]; + } + + void* GetStyleData(nsStyleStructID aSID, + nsStyleContext* aStyleContext) const { + if (!(mConditionalBits & GetBitForSID(aSID))) { + return mEntries[aSID]; + } + Entry* e = static_cast(mEntries[aSID]); + MOZ_ASSERT(e, "if mConditionalBits bit is set, we must have at least one " + "conditional style struct"); + do { + if (e->mConditions.Matches(aStyleContext)) { + return e->mStyleStruct; + } + e = e->mNext; + } while (e); + return nullptr; + } + + void SetStyleData(nsStyleStructID aSID, void* aStyleStruct) { + MOZ_ASSERT(!(mConditionalBits & GetBitForSID(aSID)), + "rule node should not have unconditional and conditional style " + "data for a given struct"); + mEntries[aSID] = aStyleStruct; + } + + void SetStyleData(nsStyleStructID aSID, + nsPresContext* aPresContext, + void* aStyleStruct, + const mozilla::RuleNodeCacheConditions& aConditions) { + MOZ_ASSERT((mConditionalBits & GetBitForSID(aSID)) || + !mEntries[aSID], + "rule node should not have unconditional and conditional style " + "data for a given struct"); + MOZ_ASSERT(aConditions.CacheableWithDependencies(), + "don't call SetStyleData with a cache key that has no " + "conditions or is uncacheable"); +#ifdef DEBUG + for (Entry* e = static_cast(mEntries[aSID]); e; e = e->mNext) { + NS_WARN_IF_FALSE(e->mConditions != aConditions, + "wasteful to have duplicate conditional style data"); + } +#endif + + mConditionalBits |= GetBitForSID(aSID); + mEntries[aSID] = + new (aPresContext) Entry(aConditions, aStyleStruct, + static_cast(mEntries[aSID])); + } + + void Destroy(uint64_t aBits, nsPresContext* aContext) { +#define STYLE_STRUCT_RESET(name, checkdata_cb) \ + void* name##Ptr = mEntries[eStyleStruct_##name]; \ + if (name##Ptr) { \ + if (!(mConditionalBits & NS_STYLE_INHERIT_BIT(name))) { \ + if (!(aBits & NS_STYLE_INHERIT_BIT(name))) { \ + static_cast(name##Ptr)->Destroy(aContext); \ + } \ + } else { \ + Entry* e = static_cast(name##Ptr); \ + MOZ_ASSERT(e, "if mConditionalBits bit is set, we must have at least " \ + "one conditional style struct"); \ + do { \ + static_cast(e->mStyleStruct)->Destroy(aContext); \ + Entry* next = e->mNext; \ + aContext->PresShell()->FreeByObjectID( \ + nsPresArena::nsConditionalResetStyleDataEntry_id, e); \ + e = next; \ + } while (e); \ + } \ + } +#define STYLE_STRUCT_INHERITED(name, checkdata_cb) + +#include "nsStyleStructList.h" + +#undef STYLE_STRUCT_RESET +#undef STYLE_STRUCT_INHERITED + + aContext->PresShell()-> + FreeByObjectID(nsPresArena::nsConditionalResetStyleData_id, this); + } + +}; + struct nsCachedStyleData { nsInheritedStyleData* mInheritedData; - nsResetStyleData* mResetData; + nsConditionalResetStyleData* mResetData; static bool IsReset(const nsStyleStructID aSID) { MOZ_ASSERT(0 <= aSID && aSID < nsStyleStructID_Length, @@ -117,13 +255,27 @@ struct nsCachedStyleData } static uint32_t GetBitForSID(const nsStyleStructID aSID) { - return 1 << aSID; + return nsConditionalResetStyleData::GetBitForSID(aSID); } void* NS_FASTCALL GetStyleData(const nsStyleStructID aSID) { if (IsReset(aSID)) { if (mResetData) { - return mResetData->mStyleStructs[aSID]; + return mResetData->GetStyleData(aSID); + } + } else { + if (mInheritedData) { + return mInheritedData->mStyleStructs[aSID]; + } + } + return nullptr; + } + + void* NS_FASTCALL GetStyleData(const nsStyleStructID aSID, + nsStyleContext* aStyleContext) { + if (IsReset(aSID)) { + if (mResetData) { + return mResetData->GetStyleData(aSID, aStyleContext); } } else { if (mInheritedData) { @@ -137,9 +289,9 @@ struct nsCachedStyleData nsPresContext *aPresContext, void *aData) { if (IsReset(aSID)) { if (!mResetData) { - mResetData = new (aPresContext) nsResetStyleData; + mResetData = new (aPresContext) nsConditionalResetStyleData; } - mResetData->mStyleStructs[aSID] = aData; + mResetData->SetStyleData(aSID, aData); } else { if (!mInheritedData) { mInheritedData = new (aPresContext) nsInheritedStyleData; @@ -149,15 +301,15 @@ struct nsCachedStyleData } // Typesafe and faster versions of the above - #define STYLE_STRUCT_INHERITED(name_, checkdata_cb_) \ - nsStyle##name_ * NS_FASTCALL GetStyle##name_ () { \ - return mInheritedData ? static_cast( \ - mInheritedData->mStyleStructs[eStyleStruct_##name_]) : nullptr; \ + #define STYLE_STRUCT_INHERITED(name_, checkdata_cb_) \ + nsStyle##name_ * NS_FASTCALL GetStyle##name_ () { \ + return mInheritedData ? static_cast( \ + mInheritedData->mStyleStructs[eStyleStruct_##name_]) : nullptr; \ } - #define STYLE_STRUCT_RESET(name_, checkdata_cb_) \ - nsStyle##name_ * NS_FASTCALL GetStyle##name_ () { \ - return mResetData ? static_cast( \ - mResetData->mStyleStructs[eStyleStruct_##name_]) : nullptr; \ + #define STYLE_STRUCT_RESET(name_, checkdata_cb_) \ + nsStyle##name_ * NS_FASTCALL GetStyle##name_ (nsStyleContext* aContext) { \ + return mResetData ? static_cast( \ + mResetData->GetStyleData(eStyleStruct_##name_, aContext)) : nullptr; \ } #include "nsStyleStructList.h" #undef STYLE_STRUCT_RESET @@ -435,119 +587,119 @@ protected: const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeVisibilityData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeFontData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeColorData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeBackgroundData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeMarginData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeBorderData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputePaddingData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeOutlineData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeListData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputePositionData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeTableData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeTableBorderData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeContentData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeQuotesData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeTextData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeTextResetData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeUserInterfaceData(void* aStartStruct, @@ -555,49 +707,49 @@ protected: nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeUIResetData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeXULData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeColumnData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeSVGData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeSVGResetData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); const void* ComputeVariablesData(void* aStartStruct, const nsRuleData* aRuleData, nsStyleContext* aContext, nsRuleNode* aHighestNode, RuleDetail aRuleDetail, - const bool aCanStoreInRuleTree); + const mozilla::RuleNodeCacheConditions aConditions); // helpers for |ComputeFontData| that need access to |mNoneBits|: static void SetFontSize(nsPresContext* aPresContext, @@ -610,7 +762,7 @@ protected: nscoord aScriptLevelAdjustedParentSize, bool aUsedStartStruct, bool aAtRoot, - bool& aCanStoreInRuleTree); + mozilla::RuleNodeCacheConditions& aConditions); static void SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, @@ -619,7 +771,7 @@ protected: const nsStyleFont* aParentFont, nsStyleFont* aFont, bool aStartStruct, - bool& aCanStoreInRuleTree); + mozilla::RuleNodeCacheConditions& aConditions); static void SetGenericFont(nsPresContext* aPresContext, nsStyleContext* aContext, @@ -633,17 +785,17 @@ protected: GetShadowData(const nsCSSValueList* aList, nsStyleContext* aContext, bool aIsBoxShadow, - bool& aCanStoreInRuleTree); + mozilla::RuleNodeCacheConditions& aConditions); bool SetStyleFilterToCSSValue(nsStyleFilter* aStyleFilter, const nsCSSValue& aValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree); + mozilla::RuleNodeCacheConditions& aConditions); void SetStyleClipPathToCSSValue(nsStyleClipPath* aStyleClipPath, const nsCSSValue* aValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree); + mozilla::RuleNodeCacheConditions& aConditions); private: nsRuleNode(nsPresContext* aPresContext, nsRuleNode* aParent, @@ -703,7 +855,7 @@ public: // See comments in GetStyleData for an explanation of what the // code below does. - #define STYLE_STRUCT(name_, checkdata_cb_) \ + #define STYLE_STRUCT_INHERITED(name_, checkdata_cb_) \ template \ const nsStyle##name_* \ GetStyle##name_(nsStyleContext* aContext) \ @@ -727,8 +879,36 @@ public: MOZ_ASSERT(data, "should have aborted on out-of-memory"); \ return data; \ } + + #define STYLE_STRUCT_RESET(name_, checkdata_cb_) \ + template \ + const nsStyle##name_* \ + GetStyle##name_(nsStyleContext* aContext) \ + { \ + NS_ASSERTION(IsUsedDirectly(), \ + "if we ever call this on rule nodes that aren't used " \ + "directly, we should adjust handling of mDependentBits " \ + "in some way."); \ + \ + const nsStyle##name_ *data; \ + data = mStyleData.GetStyle##name_(aContext); \ + if (MOZ_LIKELY(data != nullptr)) \ + return data; \ + \ + if (!aComputeData) \ + return nullptr; \ + \ + data = static_cast \ + (WalkRuleTree(eStyleStruct_##name_, aContext)); \ + \ + MOZ_ASSERT(data, "should have aborted on out-of-memory"); \ + return data; \ + } + #include "nsStyleStructList.h" - #undef STYLE_STRUCT + + #undef STYLE_STRUCT_RESET + #undef STYLE_STRUCT_INHERITED /* * Garbage collection. Mark walks up the tree, marking any unmarked @@ -764,7 +944,7 @@ public: static nscoord CalcLength(const nsCSSValue& aValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree); + mozilla::RuleNodeCacheConditions& aConditions); struct ComputedCalc { nscoord mLength; @@ -777,7 +957,7 @@ public: SpecifiedCalcToComputedCalc(const nsCSSValue& aValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree); + mozilla::RuleNodeCacheConditions& aConditions); // Compute the value of an nsStyleCoord that IsCalcUnit(). // (Values that don't require aPercentageBasis should be handled @@ -799,7 +979,9 @@ public: return HaveChildren() || mStyleData.mInheritedData || mStyleData.mResetData; } - bool NodeHasCachedData(const nsStyleStructID aSID) { + // Note that this will return false if we have cached conditional + // style structs. + bool NodeHasCachedUnconditionalData(const nsStyleStructID aSID) { return !!mStyleData.GetStyleData(aSID); } diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index e44b64ff7a..b4a61ec061 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -957,12 +957,18 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) { #define NS_STYLE_TABLE_EMPTY_CELLS_HIDE 0 #define NS_STYLE_TABLE_EMPTY_CELLS_SHOW 1 -#define NS_STYLE_CAPTION_SIDE_TOP 0 -#define NS_STYLE_CAPTION_SIDE_RIGHT 1 -#define NS_STYLE_CAPTION_SIDE_BOTTOM 2 -#define NS_STYLE_CAPTION_SIDE_LEFT 3 -#define NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE 4 -#define NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE 5 +#define NS_STYLE_CAPTION_SIDE_BSTART 0 // matches eLogicalSideBStart +#define NS_STYLE_CAPTION_SIDE_BEND 1 // matches eLogicalSideBEnd +#define NS_STYLE_CAPTION_SIDE_ISTART 2 // matches eLogicalSideIStart +#define NS_STYLE_CAPTION_SIDE_IEND 3 // matches eLogicalSideIEnd +#define NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE 4 +#define NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE 5 +#define NS_STYLE_CAPTION_SIDE_TOP 6 +#define NS_STYLE_CAPTION_SIDE_RIGHT 7 +#define NS_STYLE_CAPTION_SIDE_BOTTOM 8 +#define NS_STYLE_CAPTION_SIDE_LEFT 9 +#define NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE 10 +#define NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE 11 // constants for cell "scope" attribute #define NS_STYLE_CELL_SCOPE_ROW 0 diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp index 6aa7a16e40..54e503777c 100644 --- a/layout/style/nsStyleContext.cpp +++ b/layout/style/nsStyleContext.cpp @@ -800,15 +800,15 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aOther, if (this##struct_) { \ const nsStyle##struct_* other##struct_ = aOther->Style##struct_(); \ nsChangeHint maxDifference = nsStyle##struct_::MaxDifference(); \ - nsChangeHint maxDifferenceNeverInherited = \ - nsStyle##struct_::MaxDifferenceNeverInherited(); \ + nsChangeHint differenceAlwaysHandledForDescendants = \ + nsStyle##struct_::DifferenceAlwaysHandledForDescendants(); \ if (this##struct_ == other##struct_) { \ /* The very same struct, so we know that there will be no */ \ /* differences. */ \ *aEqualStructs |= NS_STYLE_INHERIT_BIT(struct_); \ } else if (compare || \ (NS_SubtractHint(maxDifference, \ - maxDifferenceNeverInherited) & \ + differenceAlwaysHandledForDescendants) & \ aParentHintsNotHandledForDescendants)) { \ nsChangeHint difference = \ this##struct_->CalcDifference(*other##struct_); \ @@ -1220,7 +1220,7 @@ nsStyleContext::CombineVisitedColors(nscolor *aColors, bool aLinkIsVisited) nsStyleContext::AssertStyleStructMaxDifferenceValid() { #define STYLE_STRUCT(name, checkdata_cb) \ - MOZ_ASSERT(NS_IsHintSubset(nsStyle##name::MaxDifferenceNeverInherited(), \ + MOZ_ASSERT(NS_IsHintSubset(nsStyle##name::DifferenceAlwaysHandledForDescendants(), \ nsStyle##name::MaxDifference())); #include "nsStyleStructList.h" #undef STYLE_STRUCT diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 02ab4e0dfc..27f31f3fea 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -92,11 +92,12 @@ public: return NS_CombineHint(NS_STYLE_HINT_REFLOW, nsChangeHint_NeutralChange); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } static nsChangeHint CalcFontDifference(const nsFont& aFont1, const nsFont& aFont2); @@ -339,9 +340,9 @@ struct nsStyleColor { static nsChangeHint MaxDifference() { return NS_STYLE_HINT_VISUAL; } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics at all. + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants at all. return nsChangeHint(0); } @@ -377,9 +378,9 @@ struct nsStyleBackground { NS_CombineHint(NS_STYLE_HINT_VISUAL, nsChangeHint_NeutralChange)); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics at all. + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants at all. return nsChangeHint(0); } @@ -612,9 +613,9 @@ struct nsStyleMargin { return NS_CombineHint(nsChangeHint_NeedReflow, nsChangeHint_ClearAncestorIntrinsics); } - static nsChangeHint MaxDifferenceNeverInherited() { + static nsChangeHint DifferenceAlwaysHandledForDescendants() { // CalcDifference can return both nsChangeHint_ClearAncestorIntrinsics and - // nsChangeHint_NeedReflow as inherited hints. + // nsChangeHint_NeedReflow as hints not handled for descendants. return nsChangeHint(0); } @@ -655,9 +656,9 @@ struct nsStylePadding { return NS_SubtractHint(NS_STYLE_HINT_REFLOW, nsChangeHint_ClearDescendantIntrinsics); } - static nsChangeHint MaxDifferenceNeverInherited() { + static nsChangeHint DifferenceAlwaysHandledForDescendants() { // CalcDifference can return nsChangeHint_ClearAncestorIntrinsics as an - // inherited hint. + // hint not handled for descendants. return nsChangeHint(0); } @@ -848,11 +849,12 @@ struct nsStyleBorder { NS_CombineHint(nsChangeHint_BorderStyleNoneChange, nsChangeHint_NeutralChange)); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } void EnsureBorderColors() { @@ -1083,9 +1085,9 @@ struct nsStyleOutline { NS_CombineHint(nsChangeHint_RepaintFrame, nsChangeHint_NeutralChange)); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics at all. + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants at all. return nsChangeHint(0); } @@ -1176,11 +1178,12 @@ struct nsStyleList { return NS_CombineHint(NS_STYLE_HINT_FRAMECHANGE, nsChangeHint_NeutralChange); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } imgRequestProxy* GetListStyleImage() const { return mListStyleImage; } @@ -1441,14 +1444,15 @@ struct nsStyleTextReset { nsChangeHint CalcDifference(const nsStyleTextReset& aOther) const; static nsChangeHint MaxDifference() { return nsChangeHint( - NS_STYLE_HINT_REFLOW | + NS_STYLE_HINT_REFLOW | nsChangeHint_UpdateSubtreeOverflow); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } nsStyleCoord mVerticalAlign; // [reset] coord, percent, calc, enum (see nsStyleConsts.h) @@ -1481,11 +1485,12 @@ struct nsStyleText { static nsChangeHint MaxDifference() { return NS_STYLE_HINT_FRAMECHANGE; } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } uint8_t mTextAlign; // [inherited] see nsStyleConsts.h @@ -1672,11 +1677,12 @@ struct nsStyleVisibility { static nsChangeHint MaxDifference() { return NS_STYLE_HINT_FRAMECHANGE; } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } nsStyleImageOrientation mImageOrientation; // [inherited] @@ -1907,9 +1913,10 @@ struct nsStyleDisplay { nsChangeHint_AddOrRemoveTransform | nsChangeHint_NeutralChange); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference can return both nsChangeHint_ClearAncestorIntrinsics and - // nsChangeHint_NeedReflow as inherited hints. + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference can return all of the reflow hints that are + // sometimes handled for descendants as hints not handled for + // descendants. return nsChangeHint(0); } @@ -2160,11 +2167,12 @@ struct nsStyleTable { static nsChangeHint MaxDifference() { return NS_STYLE_HINT_FRAMECHANGE; } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } uint8_t mLayoutStrategy;// [reset] see nsStyleConsts.h NS_STYLE_TABLE_LAYOUT_* @@ -2192,9 +2200,10 @@ struct nsStylePosition { nsChangeHint(nsChangeHint_RecomputePosition | nsChangeHint_UpdateParentOverflow)); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference can return both nsChangeHint_ClearAncestorIntrinsics and - // nsChangeHint_NeedReflow as inherited hints. + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference can return all of the reflow hints that are + // sometimes handled for descendants as hints not handled for + // descendants. return nsChangeHint(0); } @@ -2346,13 +2355,19 @@ struct nsStyleTableBorder { static nsChangeHint MaxDifference() { return NS_STYLE_HINT_FRAMECHANGE; } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } + // Return the mCaptionSide value, with physical values resolved to + // the appropriate logical value for the given writing mode. + // (The definition of this is in WritingModes.h.) + inline uint8_t LogicalCaptionSide(mozilla::WritingMode aWM) const; + nscoord mBorderSpacingCol;// [inherited] nscoord mBorderSpacingRow;// [inherited] uint8_t mBorderCollapse;// [inherited] @@ -2444,11 +2459,12 @@ struct nsStyleQuotes { static nsChangeHint MaxDifference() { return NS_STYLE_HINT_FRAMECHANGE; } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } uint32_t QuotesCount(void) const { return mQuotesCount; } // [inherited] @@ -2518,11 +2534,12 @@ struct nsStyleContent { static nsChangeHint MaxDifference() { return NS_STYLE_HINT_FRAMECHANGE; } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } uint32_t ContentCount(void) const { return mContentCount; } // [reset] @@ -2630,11 +2647,12 @@ struct nsStyleUIReset { static nsChangeHint MaxDifference() { return NS_STYLE_HINT_FRAMECHANGE; } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } uint8_t mUserSelect; // [reset] (selection-style) @@ -2693,11 +2711,12 @@ struct nsStyleUserInterface { NS_CombineHint(nsChangeHint_UpdateCursor, nsChangeHint_NeutralChange)); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } uint8_t mUserInput; // [inherited] @@ -2737,11 +2756,12 @@ struct nsStyleXUL { static nsChangeHint MaxDifference() { return NS_STYLE_HINT_FRAMECHANGE; } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } float mBoxFlex; // [reset] see nsStyleConsts.h @@ -2773,11 +2793,12 @@ struct nsStyleColumn { return NS_CombineHint(NS_STYLE_HINT_FRAMECHANGE, nsChangeHint_NeutralChange); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } /** @@ -2866,9 +2887,10 @@ struct nsStyleSVG { NS_CombineHint(nsChangeHint_NeedReflow, nsChangeHint_NeedDirtyReflow)), // XXX remove nsChangeHint_NeedDirtyReflow: bug 876085 nsChangeHint_RepaintFrame); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow as an inherited hint - // and never returns nsChangeHint_ClearAncestorIntrinsics at all. + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns nsChangeHint_NeedReflow as a hint + // not handled for descendants, and never returns + // nsChangeHint_ClearAncestorIntrinsics at all. return nsChangeHint_NeedReflow; } @@ -3146,11 +3168,12 @@ struct nsStyleSVGReset { return NS_CombineHint(nsChangeHint_UpdateEffects, NS_CombineHint(nsChangeHint_UpdateOverflow, NS_STYLE_HINT_REFLOW)); } - static nsChangeHint MaxDifferenceNeverInherited() { - // CalcDifference never returns nsChangeHint_NeedReflow or - // nsChangeHint_ClearAncestorIntrinsics as inherited hints. - return NS_CombineHint(nsChangeHint_NeedReflow, - nsChangeHint_ClearAncestorIntrinsics); + static nsChangeHint DifferenceAlwaysHandledForDescendants() { + // CalcDifference never returns the reflow hints that are sometimes + // handled for descendants as hints not handled for descendants. + return nsChangeHint_NeedReflow | + nsChangeHint_ReflowChangesSizeOrPosition | + nsChangeHint_ClearAncestorIntrinsics; } bool HasFilters() const { @@ -3195,7 +3218,7 @@ struct nsStyleVariables { static nsChangeHint MaxDifference() { return nsChangeHint(0); } - static nsChangeHint MaxDifferenceNeverInherited() { + static nsChangeHint DifferenceAlwaysHandledForDescendants() { // CalcDifference never returns nsChangeHint_NeedReflow or // nsChangeHint_ClearAncestorIntrinsics at all. return nsChangeHint(0); diff --git a/layout/style/nsStyleTransformMatrix.cpp b/layout/style/nsStyleTransformMatrix.cpp index 05d04a98d8..2716b8cb67 100644 --- a/layout/style/nsStyleTransformMatrix.cpp +++ b/layout/style/nsStyleTransformMatrix.cpp @@ -9,8 +9,10 @@ #include "nsStyleTransformMatrix.h" #include "nsCSSValue.h" +#include "nsLayoutUtils.h" #include "nsPresContext.h" #include "nsRuleNode.h" +#include "nsSVGUtils.h" #include "nsCSSKeywords.h" #include "mozilla/StyleAnimationValue.h" #include "gfxMatrix.h" @@ -50,9 +52,44 @@ TransformReferenceBox::EnsureDimensionsAreCached() mIsCached = true; if (mFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT) { - // TODO: SVG needs to define what percentage translations resolve against. - mWidth = 0; - mHeight = 0; + if (!nsLayoutUtils::SVGTransformOriginEnabled()) { + mX = -mFrame->GetPosition().x; + mY = -mFrame->GetPosition().y; + mWidth = 0; + mHeight = 0; + } else + if (mFrame->StyleDisplay()->mTransformBox == + NS_STYLE_TRANSFORM_BOX_FILL_BOX) { + // Percentages in transforms resolve against the SVG bbox, and the + // transform is relative to the top-left of the SVG bbox. + gfxRect bbox = nsSVGUtils::GetBBox(const_cast(mFrame)); + nsRect bboxInAppUnits = + nsLayoutUtils::RoundGfxRectToAppRect(bbox, + mFrame->PresContext()->AppUnitsPerCSSPixel()); + // The mRect of an SVG nsIFrame is its user space bounds *including* + // stroke and markers, whereas bboxInAppUnits is its user space bounds + // including fill only. We need to note the offset of the reference box + // from the frame's mRect in mX/mY. + mX = bboxInAppUnits.x - mFrame->GetPosition().x; + mY = bboxInAppUnits.y - mFrame->GetPosition().y; + mWidth = bboxInAppUnits.width; + mHeight = bboxInAppUnits.height; + } else { + // The value 'border-box' is treated as 'view-box' for SVG content. + MOZ_ASSERT(mFrame->StyleDisplay()->mTransformBox == + NS_STYLE_TRANSFORM_BOX_VIEW_BOX || + mFrame->StyleDisplay()->mTransformBox == + NS_STYLE_TRANSFORM_BOX_BORDER_BOX, + "Unexpected value for 'transform-box'"); + // Percentages in transforms resolve against the width/height of the + // nearest viewport (or it's viewBox if one is applied), and the + // transform is relative to {0,0} in current user space. + mX = -mFrame->GetPosition().x; + mY = -mFrame->GetPosition().y; + Size contextSize = nsSVGUtils::GetContextSize(mFrame); + mWidth = nsPresContext::CSSPixelsToAppUnits(contextSize.width); + mHeight = nsPresContext::CSSPixelsToAppUnits(contextSize.height); + } return; } @@ -80,6 +117,8 @@ TransformReferenceBox::EnsureDimensionsAreCached() } #endif + mX = 0; + mY = 0; mWidth = rect.Width(); mHeight = rect.Height(); } @@ -89,6 +128,8 @@ TransformReferenceBox::Init(const nsSize& aDimensions) { MOZ_ASSERT(!mFrame && !mIsCached); + mX = 0; + mY = 0; mWidth = aDimensions.width; mHeight = aDimensions.height; mIsCached = true; @@ -109,7 +150,7 @@ float ProcessTranslatePart(const nsCSSValue& aValue, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, TransformReferenceBox* aRefBox, TransformReferenceBox::DimensionGetter aDimensionGetter) { @@ -133,12 +174,12 @@ ProcessTranslatePart(const nsCSSValue& aValue, } else if (aValue.IsCalcUnit()) { nsRuleNode::ComputedCalc result = nsRuleNode::SpecifiedCalcToComputedCalc(aValue, aContext, aPresContext, - aCanStoreInRuleTree); + aConditions); percent = result.mPercent; offset = result.mLength; } else { offset = nsRuleNode::CalcLength(aValue, aContext, aPresContext, - aCanStoreInRuleTree); + aConditions); } float translation = NSAppUnitsToFloatPixels(offset, @@ -165,7 +206,7 @@ ProcessMatrix(gfx3DMatrix& aMatrix, const nsCSSValue::Array* aData, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, TransformReferenceBox& aRefBox) { NS_PRECONDITION(aData->Count() == 7, "Invalid array!"); @@ -184,10 +225,10 @@ ProcessMatrix(gfx3DMatrix& aMatrix, * and their percent parts stored in aX[0] and aY[1]. */ result._31 = ProcessTranslatePart(aData->Item(5), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, &aRefBox, &TransformReferenceBox::Width); result._32 = ProcessTranslatePart(aData->Item(6), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, &aRefBox, &TransformReferenceBox::Height); aMatrix.PreMultiply(result); @@ -198,7 +239,7 @@ ProcessMatrix3D(gfx3DMatrix& aMatrix, const nsCSSValue::Array* aData, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, TransformReferenceBox& aRefBox) { NS_PRECONDITION(aData->Count() == 17, "Invalid array!"); @@ -220,13 +261,13 @@ ProcessMatrix3D(gfx3DMatrix& aMatrix, temp._44 = aData->Item(16).GetFloatValue(); temp._41 = ProcessTranslatePart(aData->Item(13), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, &aRefBox, &TransformReferenceBox::Width); temp._42 = ProcessTranslatePart(aData->Item(14), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, &aRefBox, &TransformReferenceBox::Height); temp._43 = ProcessTranslatePart(aData->Item(15), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, nullptr); aMatrix.PreMultiply(temp); @@ -238,7 +279,7 @@ ProcessInterpolateMatrix(gfx3DMatrix& aMatrix, const nsCSSValue::Array* aData, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, TransformReferenceBox& aRefBox) { NS_PRECONDITION(aData->Count() == 4, "Invalid array!"); @@ -247,13 +288,13 @@ ProcessInterpolateMatrix(gfx3DMatrix& aMatrix, if (aData->Item(1).GetUnit() == eCSSUnit_List) { matrix1 = nsStyleTransformMatrix::ReadTransforms(aData->Item(1).GetListValue(), aContext, aPresContext, - aCanStoreInRuleTree, + aConditions, aRefBox, nsPresContext::AppUnitsPerCSSPixel()); } if (aData->Item(2).GetUnit() == eCSSUnit_List) { matrix2 = ReadTransforms(aData->Item(2).GetListValue(), aContext, aPresContext, - aCanStoreInRuleTree, + aConditions, aRefBox, nsPresContext::AppUnitsPerCSSPixel()); } double progress = aData->Item(3).GetPercentValue(); @@ -269,7 +310,7 @@ ProcessTranslateX(gfx3DMatrix& aMatrix, const nsCSSValue::Array* aData, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, TransformReferenceBox& aRefBox) { NS_PRECONDITION(aData->Count() == 2, "Invalid array!"); @@ -277,7 +318,7 @@ ProcessTranslateX(gfx3DMatrix& aMatrix, Point3D temp; temp.x = ProcessTranslatePart(aData->Item(1), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, &aRefBox, &TransformReferenceBox::Width); aMatrix.Translate(temp); } @@ -288,7 +329,7 @@ ProcessTranslateY(gfx3DMatrix& aMatrix, const nsCSSValue::Array* aData, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, TransformReferenceBox& aRefBox) { NS_PRECONDITION(aData->Count() == 2, "Invalid array!"); @@ -296,7 +337,7 @@ ProcessTranslateY(gfx3DMatrix& aMatrix, Point3D temp; temp.y = ProcessTranslatePart(aData->Item(1), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, &aRefBox, &TransformReferenceBox::Height); aMatrix.Translate(temp); } @@ -306,14 +347,14 @@ ProcessTranslateZ(gfx3DMatrix& aMatrix, const nsCSSValue::Array* aData, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { NS_PRECONDITION(aData->Count() == 2, "Invalid array!"); Point3D temp; temp.z = ProcessTranslatePart(aData->Item(1), aContext, - aPresContext, aCanStoreInRuleTree, + aPresContext, aConditions, nullptr); aMatrix.Translate(temp); } @@ -324,7 +365,7 @@ ProcessTranslate(gfx3DMatrix& aMatrix, const nsCSSValue::Array* aData, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, TransformReferenceBox& aRefBox) { NS_PRECONDITION(aData->Count() == 2 || aData->Count() == 3, "Invalid array!"); @@ -332,13 +373,13 @@ ProcessTranslate(gfx3DMatrix& aMatrix, Point3D temp; temp.x = ProcessTranslatePart(aData->Item(1), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, &aRefBox, &TransformReferenceBox::Width); /* If we read in a Y component, set it appropriately */ if (aData->Count() == 3) { temp.y = ProcessTranslatePart(aData->Item(2), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, &aRefBox, &TransformReferenceBox::Height); } aMatrix.Translate(temp); @@ -349,7 +390,7 @@ ProcessTranslate3D(gfx3DMatrix& aMatrix, const nsCSSValue::Array* aData, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, TransformReferenceBox& aRefBox) { NS_PRECONDITION(aData->Count() == 4, "Invalid array!"); @@ -357,15 +398,15 @@ ProcessTranslate3D(gfx3DMatrix& aMatrix, Point3D temp; temp.x = ProcessTranslatePart(aData->Item(1), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, &aRefBox, &TransformReferenceBox::Width); temp.y = ProcessTranslatePart(aData->Item(2), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, &aRefBox, &TransformReferenceBox::Height); temp.z = ProcessTranslatePart(aData->Item(3), - aContext, aPresContext, aCanStoreInRuleTree, + aContext, aPresContext, aConditions, nullptr); aMatrix.Translate(temp); @@ -553,12 +594,12 @@ ProcessPerspective(gfx3DMatrix& aMatrix, const nsCSSValue::Array* aData, nsStyleContext *aContext, nsPresContext *aPresContext, - bool &aCanStoreInRuleTree) + RuleNodeCacheConditions& aConditions) { NS_PRECONDITION(aData->Count() == 2, "Invalid array!"); float depth = ProcessTranslatePart(aData->Item(1), aContext, - aPresContext, aCanStoreInRuleTree, + aPresContext, aConditions, nullptr); aMatrix.Perspective(depth); } @@ -573,7 +614,7 @@ MatrixForTransformFunction(gfx3DMatrix& aMatrix, const nsCSSValue::Array * aData, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, TransformReferenceBox& aRefBox) { NS_PRECONDITION(aData, "Why did you want to get data from a null array?"); @@ -586,23 +627,23 @@ MatrixForTransformFunction(gfx3DMatrix& aMatrix, switch (TransformFunctionOf(aData)) { case eCSSKeyword_translatex: ProcessTranslateX(aMatrix, aData, aContext, aPresContext, - aCanStoreInRuleTree, aRefBox); + aConditions, aRefBox); break; case eCSSKeyword_translatey: ProcessTranslateY(aMatrix, aData, aContext, aPresContext, - aCanStoreInRuleTree, aRefBox); + aConditions, aRefBox); break; case eCSSKeyword_translatez: ProcessTranslateZ(aMatrix, aData, aContext, aPresContext, - aCanStoreInRuleTree); + aConditions); break; case eCSSKeyword_translate: ProcessTranslate(aMatrix, aData, aContext, aPresContext, - aCanStoreInRuleTree, aRefBox); + aConditions, aRefBox); break; case eCSSKeyword_translate3d: ProcessTranslate3D(aMatrix, aData, aContext, aPresContext, - aCanStoreInRuleTree, aRefBox); + aConditions, aRefBox); break; case eCSSKeyword_scalex: ProcessScaleX(aMatrix, aData); @@ -643,19 +684,19 @@ MatrixForTransformFunction(gfx3DMatrix& aMatrix, break; case eCSSKeyword_matrix: ProcessMatrix(aMatrix, aData, aContext, aPresContext, - aCanStoreInRuleTree, aRefBox); + aConditions, aRefBox); break; case eCSSKeyword_matrix3d: ProcessMatrix3D(aMatrix, aData, aContext, aPresContext, - aCanStoreInRuleTree, aRefBox); + aConditions, aRefBox); break; case eCSSKeyword_interpolatematrix: ProcessInterpolateMatrix(aMatrix, aData, aContext, aPresContext, - aCanStoreInRuleTree, aRefBox); + aConditions, aRefBox); break; case eCSSKeyword_perspective: ProcessPerspective(aMatrix, aData, aContext, aPresContext, - aCanStoreInRuleTree); + aConditions); break; default: NS_NOTREACHED("Unknown transform function!"); @@ -677,7 +718,7 @@ gfx3DMatrix ReadTransforms(const nsCSSValueList* aList, nsStyleContext* aContext, nsPresContext* aPresContext, - bool &aCanStoreInRuleTree, + RuleNodeCacheConditions& aConditions, TransformReferenceBox& aRefBox, float aAppUnitsPerMatrixUnit) { @@ -692,7 +733,7 @@ ReadTransforms(const nsCSSValueList* aList, /* Read in a single transform matrix. */ MatrixForTransformFunction(result, currElem.GetArrayValue(), aContext, - aPresContext, aCanStoreInRuleTree, aRefBox); + aPresContext, aConditions, aRefBox); } float scale = float(nsPresContext::AppUnitsPerCSSPixel()) / aAppUnitsPerMatrixUnit; diff --git a/layout/style/nsStyleTransformMatrix.h b/layout/style/nsStyleTransformMatrix.h index ce1bd78135..8b27cb061f 100644 --- a/layout/style/nsStyleTransformMatrix.h +++ b/layout/style/nsStyleTransformMatrix.h @@ -17,6 +17,9 @@ class nsIFrame; class nsStyleContext; class nsPresContext; struct nsRect; +namespace mozilla { +class RuleNodeCacheConditions; +} /** * A helper to generate gfxMatrixes from css transform functions. @@ -79,11 +82,28 @@ namespace nsStyleTransformMatrix { void Init(const nsSize& aDimensions); + /** + * The offset of the reference box from the nsIFrame's TopLeft(). This + * is non-zero only in the case of SVG content. If we can successfully + * implement UNIFIED_CONTINUATIONS at some point in the future then it + * may also be non-zero for non-SVG content. + */ + nscoord X() { + EnsureDimensionsAreCached(); + return mX; + } + nscoord Y() { + EnsureDimensionsAreCached(); + return mY; + } + + /** + * The size of the reference box. + */ nscoord Width() { EnsureDimensionsAreCached(); return mWidth; } - nscoord Height() { EnsureDimensionsAreCached(); return mHeight; @@ -98,7 +118,7 @@ namespace nsStyleTransformMatrix { void EnsureDimensionsAreCached(); const nsIFrame* mFrame; - nscoord mWidth, mHeight; + nscoord mX, mY, mWidth, mHeight; bool mIsCached; }; @@ -111,7 +131,7 @@ namespace nsStyleTransformMatrix { float ProcessTranslatePart(const nsCSSValue& aValue, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + mozilla::RuleNodeCacheConditions& aConditions, TransformReferenceBox* aRefBox, TransformReferenceBox::DimensionGetter aDimensionGetter = nullptr); @@ -120,7 +140,7 @@ namespace nsStyleTransformMatrix { const nsCSSValue::Array* aData, nsStyleContext* aContext, nsPresContext* aPresContext, - bool& aCanStoreInRuleTree, + mozilla::RuleNodeCacheConditions& aConditions, TransformReferenceBox& aBounds); /** @@ -130,8 +150,8 @@ namespace nsStyleTransformMatrix { * @param aData The nsCSSValueList containing the transform functions * @param aContext The style context, used for unit conversion. * @param aPresContext The presentation context, used for unit conversion. - * @param aCanStoreInRuleTree Set to false if the result cannot be cached - * in the rule tree, otherwise untouched. + * @param aConditions Set to uncachable (by calling SetUncacheable()) if the + * result cannot be cached in the rule tree, otherwise untouched. * @param aBounds The frame's bounding rectangle. * @param aAppUnitsPerMatrixUnit The number of app units per device pixel. * @@ -142,7 +162,7 @@ namespace nsStyleTransformMatrix { gfx3DMatrix ReadTransforms(const nsCSSValueList* aList, nsStyleContext* aContext, nsPresContext* aPresContext, - bool &aCanStoreInRuleTree, + mozilla::RuleNodeCacheConditions& aConditions, TransformReferenceBox& aBounds, float aAppUnitsPerMatrixUnit); diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 5129e9c09c..45469c031b 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -2362,7 +2362,7 @@ var gCSSProperties = { inherited: true, type: CSS_TYPE_LONGHAND, initial_values: [ "top" ], - other_values: [ "right", "left", "bottom", "top-outside", "bottom-outside" ], + other_values: [ "block-start", "block-end", "inline-start", "inline-end", "block-start-outside", "block-end-outside", "bottom", "left", "right", "top-outside", "bottom-outside" ], invalid_values: [] }, "clear": { diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index bfa5d6a5de..a06471f9ca 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -3886,14 +3886,16 @@ SVGTextFrame::ReflowSVG() nsSVGEffects::UpdateEffects(this); } + // Now unset the various reflow bits. Do this before calling + // FinishAndStoreOverflow since FinishAndStoreOverflow can require glyph + // positions (to resolve transform-origin). + mState &= ~(NS_FRAME_FIRST_REFLOW | NS_FRAME_IS_DIRTY | + NS_FRAME_HAS_DIRTY_CHILDREN); + nsRect overflow = nsRect(nsPoint(0,0), mRect.Size()); nsOverflowAreas overflowAreas(overflow, overflow); FinishAndStoreOverflow(overflowAreas, mRect.Size()); - // Now unset the various reflow bits: - mState &= ~(NS_FRAME_FIRST_REFLOW | NS_FRAME_IS_DIRTY | - NS_FRAME_HAS_DIRTY_CHILDREN); - // XXX nsSVGContainerFrame::ReflowSVG only looks at its nsISVGChildFrame // children, and calls ConsiderChildOverflow on them. Does it matter // that ConsiderChildOverflow won't be called on our children? @@ -3927,10 +3929,22 @@ SVGTextFrame::GetBBoxContribution(const gfx::Matrix &aToBBoxUserspace, uint32_t aFlags) { NS_ASSERTION(GetFirstPrincipalChild(), "must have a child frame"); + SVGBBox bbox; + nsIFrame* kid = GetFirstPrincipalChild(); + if (kid && NS_SUBTREE_DIRTY(kid)) { + // Return an empty bbox if our kid's subtree is dirty. This may be called + // in that situation, e.g. when we're building a display list after an + // interrupted reflow. This can also be called during reflow before we've + // been reflowed, e.g. if an earlier sibling is calling FinishAndStoreOverflow and + // needs our parent's perspective matrix, which depends on the SVG bbox + // contribution of this frame. In the latter situation, when all siblings have + // been reflowed, the parent will compute its perspective and rerun + // FinishAndStoreOverflow for all its children. + return bbox; + } UpdateGlyphPositioning(); - SVGBBox bbox; nsPresContext* presContext = PresContext(); TextRenderedRunIterator it(this); diff --git a/layout/svg/nsSVGUtils.cpp b/layout/svg/nsSVGUtils.cpp index a395c61fae..c3d3a5ccc3 100644 --- a/layout/svg/nsSVGUtils.cpp +++ b/layout/svg/nsSVGUtils.cpp @@ -298,6 +298,22 @@ nsSVGUtils::NotifyAncestorsOfFilterRegionChange(nsIFrame *aFrame) } } +Size +nsSVGUtils::GetContextSize(const nsIFrame* aFrame) +{ + Size size; + + MOZ_ASSERT(aFrame->GetContent()->IsSVGElement(), "bad cast"); + const nsSVGElement* element = static_cast(aFrame->GetContent()); + + SVGSVGElement* ctx = element->GetCtx(); + if (ctx) { + size.width = ctx->GetLength(SVGContentUtils::X); + size.height = ctx->GetLength(SVGContentUtils::Y); + } + return size; +} + float nsSVGUtils::ObjectSpace(const gfxRect &aRect, const nsSVGLength2 *aLength) { diff --git a/layout/svg/nsSVGUtils.h b/layout/svg/nsSVGUtils.h index 70ba3fa450..9ffbd5768c 100644 --- a/layout/svg/nsSVGUtils.h +++ b/layout/svg/nsSVGUtils.h @@ -184,6 +184,7 @@ public: typedef mozilla::gfx::AntialiasMode AntialiasMode; typedef mozilla::gfx::FillRule FillRule; typedef mozilla::gfx::GeneralPattern GeneralPattern; + typedef mozilla::gfx::Size Size; static void Init(); @@ -250,6 +251,14 @@ public: */ static void NotifyAncestorsOfFilterRegionChange(nsIFrame *aFrame); + /** + * Percentage lengths in SVG are resolved against the width/height of the + * nearest viewport (or its viewBox, if set). This helper returns the size + * of this "context" for the given frame so that percentage values can be + * resolved. + */ + static Size GetContextSize(const nsIFrame* aFrame); + /* Computes the input length in terms of object space coordinates. Input: rect - bounding box length - length to be converted diff --git a/layout/svg/svg.css b/layout/svg/svg.css index cad64f40c4..8d5cad63cf 100644 --- a/layout/svg/svg.css +++ b/layout/svg/svg.css @@ -51,7 +51,7 @@ foreignObject { text-indent: 0; } -/* Set |transform-origin:0% 0%;| for all SVG elements except outer-, +/* Set |transform-origin:0 0;| for all SVG elements except outer-, noting that 'svg' as a child of 'foreignObject' counts as outer-. */ *:not(svg), diff --git a/layout/tables/BasicTableLayoutStrategy.cpp b/layout/tables/BasicTableLayoutStrategy.cpp index bd808034ef..1c18770a97 100644 --- a/layout/tables/BasicTableLayoutStrategy.cpp +++ b/layout/tables/BasicTableLayoutStrategy.cpp @@ -104,7 +104,7 @@ GetWidthInfo(nsRenderingContext *aRenderingContext, // outer edges near the end of this function. // XXX Should we ignore percentage padding? - nsIFrame::IntrinsicISizeOffsetData offsets = aFrame->IntrinsicISizeOffsets(aRenderingContext); + nsIFrame::IntrinsicISizeOffsetData offsets = aFrame->IntrinsicISizeOffsets(); // In quirks mode, table cell width should be content-box, // but height should be border box. diff --git a/layout/tables/FixedTableLayoutStrategy.cpp b/layout/tables/FixedTableLayoutStrategy.cpp index 8a929fc335..dbb93134dc 100644 --- a/layout/tables/FixedTableLayoutStrategy.cpp +++ b/layout/tables/FixedTableLayoutStrategy.cpp @@ -248,7 +248,7 @@ FixedTableLayoutStrategy::ComputeColumnISizes(const nsHTMLReflowState& aReflowSt } else if (styleWidth->GetUnit() == eStyleUnit_Percent) { // XXX This should use real percentage padding nsIFrame::IntrinsicISizeOffsetData offsets = - cellFrame->IntrinsicISizeOffsets(aReflowState.rendContext); + cellFrame->IntrinsicISizeOffsets(); float pct = styleWidth->GetPercentValue(); colWidth = NSToCoordFloor(pct * float(tableWidth)); diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 477638b3e8..f4061c6b6a 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -793,10 +793,9 @@ nsTableCellFrame::GetPrefISize(nsRenderingContext *aRenderingContext) } /* virtual */ nsIFrame::IntrinsicISizeOffsetData -nsTableCellFrame::IntrinsicISizeOffsets(nsRenderingContext* aRenderingContext) +nsTableCellFrame::IntrinsicISizeOffsets() { - IntrinsicISizeOffsetData result = - nsContainerFrame::IntrinsicISizeOffsets(aRenderingContext); + IntrinsicISizeOffsetData result = nsContainerFrame::IntrinsicISizeOffsets(); result.hMargin = 0; result.hPctMargin = 0; diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index 8302b3c883..7afcead7c1 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -117,8 +117,7 @@ public: virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override; virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override; - virtual IntrinsicISizeOffsetData - IntrinsicISizeOffsets(nsRenderingContext* aRenderingContext) override; + virtual IntrinsicISizeOffsetData IntrinsicISizeOffsets() override; virtual void Reflow(nsPresContext* aPresContext, nsHTMLReflowMetrics& aDesiredSize, diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index ac6cfa7068..7c87a3a8d8 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -1553,10 +1553,9 @@ nsTableFrame::GetPrefISize(nsRenderingContext *aRenderingContext) } /* virtual */ nsIFrame::IntrinsicISizeOffsetData -nsTableFrame::IntrinsicISizeOffsets(nsRenderingContext* aRenderingContext) +nsTableFrame::IntrinsicISizeOffsets() { - IntrinsicISizeOffsetData result = - nsContainerFrame::IntrinsicISizeOffsets(aRenderingContext); + IntrinsicISizeOffsetData result = nsContainerFrame::IntrinsicISizeOffsets(); result.hMargin = 0; result.hPctMargin = 0; diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h index ba790f23dc..cbca9e8b53 100644 --- a/layout/tables/nsTableFrame.h +++ b/layout/tables/nsTableFrame.h @@ -319,8 +319,7 @@ public: // border to the results of these functions. virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override; virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override; - virtual IntrinsicISizeOffsetData - IntrinsicISizeOffsets(nsRenderingContext* aRenderingContext) override; + virtual IntrinsicISizeOffsetData IntrinsicISizeOffsets() override; virtual mozilla::LogicalSize ComputeSize(nsRenderingContext *aRenderingContext, diff --git a/layout/tables/nsTableOuterFrame.cpp b/layout/tables/nsTableOuterFrame.cpp index 6095d3eb3a..f0cf4af62f 100644 --- a/layout/tables/nsTableOuterFrame.cpp +++ b/layout/tables/nsTableOuterFrame.cpp @@ -156,8 +156,8 @@ nsTableOuterFrame::RemoveFrame(ChildListID aListID, // The inner frame can't be removed so this should be the caption NS_PRECONDITION(kCaptionList == aListID, "can't remove inner frame"); - if (HasSideCaption()) { - // The old caption width had an effect on the inner table width so + if (HasSideCaption(GetWritingMode())) { + // The old caption isize had an effect on the inner table isize, so // we're going to need to reflow it. Mark it dirty InnerTableFrame()->AddStateBits(NS_FRAME_IS_DIRTY); } @@ -260,12 +260,15 @@ nsTableOuterFrame::GetChildMargin(nsPresContext* aPresContext, nscoord aAvailISize, LogicalMargin& aMargin) { + NS_ASSERTION(!aChildFrame->IsTableCaption(), + "didn't expect caption frame; writing-mode may be wrong!"); + // construct a reflow state to compute margin and padding. Auto margins // will not be computed at this time. // create and init the child reflow state // XXX We really shouldn't construct a reflow state to do this. - WritingMode wm = aChildFrame->GetWritingMode(); + WritingMode wm = aOuterRS.GetWritingMode(); LogicalSize availSize(wm, aAvailISize, aOuterRS.AvailableSize(wm).BSize(wm)); nsHTMLReflowState childRS(aPresContext, aOuterRS, aChildFrame, availSize, nullptr, nsHTMLReflowState::CALLER_WILL_INIT); @@ -278,8 +281,7 @@ static nsSize GetContainingBlockSize(const nsHTMLReflowState& aOuterRS) { nsSize size(0,0); - const nsHTMLReflowState* containRS = - aOuterRS.mCBReflowState; + const nsHTMLReflowState* containRS = aOuterRS.mCBReflowState; if (containRS) { size.width = containRS->ComputedWidth(); @@ -297,57 +299,58 @@ GetContainingBlockSize(const nsHTMLReflowState& aOuterRS) /* virtual */ nscoord nsTableOuterFrame::GetMinISize(nsRenderingContext *aRenderingContext) { - nscoord width = nsLayoutUtils::IntrinsicForContainer(aRenderingContext, + nscoord iSize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext, InnerTableFrame(), nsLayoutUtils::MIN_ISIZE); - DISPLAY_MIN_WIDTH(this, width); + DISPLAY_MIN_WIDTH(this, iSize); if (mCaptionFrames.NotEmpty()) { - nscoord capWidth = + nscoord capISize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext, mCaptionFrames.FirstChild(), nsLayoutUtils::MIN_ISIZE); - if (HasSideCaption()) { - width += capWidth; + if (HasSideCaption(GetWritingMode())) { + iSize += capISize; } else { - if (capWidth > width) { - width = capWidth; + if (capISize > iSize) { + iSize = capISize; } } } - return width; + return iSize; } /* virtual */ nscoord nsTableOuterFrame::GetPrefISize(nsRenderingContext *aRenderingContext) { - nscoord maxWidth; - DISPLAY_PREF_WIDTH(this, maxWidth); + nscoord maxISize; + DISPLAY_PREF_WIDTH(this, maxISize); - maxWidth = nsLayoutUtils::IntrinsicForContainer(aRenderingContext, + maxISize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext, InnerTableFrame(), nsLayoutUtils::PREF_ISIZE); + WritingMode wm = GetWritingMode(); if (mCaptionFrames.NotEmpty()) { - uint8_t captionSide = GetCaptionSide(); - switch(captionSide) { - case NS_STYLE_CAPTION_SIDE_LEFT: - case NS_STYLE_CAPTION_SIDE_RIGHT: + uint8_t captionSide = GetLogicalCaptionSide(wm); + switch (captionSide) { + case NS_STYLE_CAPTION_SIDE_ISTART: + case NS_STYLE_CAPTION_SIDE_IEND: { nscoord capMin = nsLayoutUtils::IntrinsicForContainer(aRenderingContext, mCaptionFrames.FirstChild(), nsLayoutUtils::MIN_ISIZE); - maxWidth += capMin; + maxISize += capMin; } break; default: { nsLayoutUtils::IntrinsicISizeType iwt; - if (captionSide == NS_STYLE_CAPTION_SIDE_TOP || - captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM) { - // Don't let the caption's pref width expand the table's pref - // width. + if (captionSide == NS_STYLE_CAPTION_SIDE_BSTART || + captionSide == NS_STYLE_CAPTION_SIDE_BEND) { + // Don't let the caption's pref isize expand the table's pref + // isize. iwt = nsLayoutUtils::MIN_ISIZE; } else { - NS_ASSERTION(captionSide == NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE || - captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE, + NS_ASSERTION(captionSide == NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE || + captionSide == NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE, "unexpected caption side"); iwt = nsLayoutUtils::PREF_ISIZE; } @@ -355,12 +358,12 @@ nsTableOuterFrame::GetPrefISize(nsRenderingContext *aRenderingContext) nsLayoutUtils::IntrinsicForContainer(aRenderingContext, mCaptionFrames.FirstChild(), iwt); - maxWidth = std::max(maxWidth, capPref); + maxISize = std::max(maxISize, capPref); } break; } } - return maxWidth; + return maxISize; } // Compute the margin-box inline size of aChildFrame given the inputs. @@ -369,33 +372,31 @@ nsTableOuterFrame::GetPrefISize(nsRenderingContext *aRenderingContext) static nscoord ChildShrinkWrapISize(nsRenderingContext *aRenderingContext, nsIFrame *aChildFrame, WritingMode aWM, - LogicalSize aCBSize, nscoord aAvailableWidth, + LogicalSize aCBSize, nscoord aAvailableISize, nscoord *aMarginResult = nullptr) { AutoMaybeDisableFontInflation an(aChildFrame); - // Not sure if it makes sense for different inner frames of a table to - // have orthogonal writing modes, but unless we enforce that - // somewhere, better to make sure that the size we pass to ComputeSize - // is in the child's writing mode. - WritingMode wm = aChildFrame->GetWritingMode(); - LogicalSize cbSize = aCBSize.ConvertTo(wm, aWM); + // For the caption frame, child's WM may differ from the table's main WM. + WritingMode childWM = aChildFrame->GetWritingMode(); - // On the other hand, the inline size that we pass to nsCSSOffsetState - // needs to be in the containing block's writing mode. - nsCSSOffsetState offsets(aChildFrame, aRenderingContext, aCBSize.ISize(aWM)); + nsCSSOffsetState offsets(aChildFrame, aRenderingContext, aWM, + aCBSize.ISize(aWM)); + LogicalSize marginSize = + offsets.ComputedLogicalMargin().Size(childWM).ConvertTo(aWM, childWM); + LogicalSize paddingSize = + offsets.ComputedLogicalPadding().Size(childWM).ConvertTo(aWM, childWM); + LogicalSize bpSize = + offsets.ComputedLogicalBorderPadding().Size(childWM).ConvertTo(aWM, + childWM); LogicalSize size = - aChildFrame->ComputeSize(aRenderingContext, - wm, cbSize, aAvailableWidth, - offsets.ComputedLogicalMargin().Size(wm), - offsets.ComputedLogicalBorderPadding().Size(wm) - - offsets.ComputedLogicalPadding().Size(wm), - offsets.ComputedLogicalPadding().Size(wm), - nsIFrame::ComputeSizeFlags::eShrinkWrap); - if (aMarginResult) - *aMarginResult = offsets.ComputedLogicalMargin().IStartEnd(wm); - return size.ISize(wm) + offsets.ComputedLogicalMargin().IStartEnd(wm) + - offsets.ComputedLogicalBorderPadding().IStartEnd(wm); + aChildFrame->ComputeSize(aRenderingContext, aWM, aCBSize, aAvailableISize, + marginSize, bpSize - paddingSize, paddingSize, + nsIFrame::ComputeSizeFlags::eShrinkWrap); + if (aMarginResult) { + *aMarginResult = offsets.ComputedLogicalMargin().IStartEnd(aWM); + } + return size.ISize(aWM) + marginSize.ISize(aWM) + bpSize.ISize(aWM); } /* virtual */ @@ -409,7 +410,7 @@ nsTableOuterFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext, const LogicalSize& aPadding, bool aShrinkWrap) { - nscoord kidAvailableWidth = aAvailableISize - aMargin.ISize(aWM); + nscoord kidAvailableISize = aAvailableISize - aMargin.ISize(aWM); NS_ASSERTION(aBorder.IsAllZero() && aPadding.IsAllZero(), "Table outer frames cannot have borders or paddings"); @@ -418,26 +419,26 @@ nsTableOuterFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext, // could be something that is not reflected in our GetMinISize and // GetPrefISize. See bug 349457 for an example. - // Match the availableWidth logic in Reflow. - uint8_t captionSide = GetCaptionSide(); + // Match the availableISize logic in Reflow. + uint8_t captionSide = GetLogicalCaptionSide(aWM); nscoord inlineSize; if (captionSide == NO_SIDE) { inlineSize = ChildShrinkWrapISize(aRenderingContext, InnerTableFrame(), aWM, - aCBSize, kidAvailableWidth); - } else if (captionSide == NS_STYLE_CAPTION_SIDE_LEFT || - captionSide == NS_STYLE_CAPTION_SIDE_RIGHT) { + aCBSize, kidAvailableISize); + } else if (captionSide == NS_STYLE_CAPTION_SIDE_ISTART || + captionSide == NS_STYLE_CAPTION_SIDE_IEND) { nscoord capISize = ChildShrinkWrapISize(aRenderingContext, mCaptionFrames.FirstChild(), aWM, - aCBSize, kidAvailableWidth); + aCBSize, kidAvailableISize); inlineSize = capISize + ChildShrinkWrapISize(aRenderingContext, InnerTableFrame(), aWM, aCBSize, - kidAvailableWidth - capISize); - } else if (captionSide == NS_STYLE_CAPTION_SIDE_TOP || - captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM) { + kidAvailableISize - capISize); + } else if (captionSide == NS_STYLE_CAPTION_SIDE_BSTART || + captionSide == NS_STYLE_CAPTION_SIDE_BEND) { nscoord margin; inlineSize = ChildShrinkWrapISize(aRenderingContext, InnerTableFrame(), aWM, - aCBSize, kidAvailableWidth, &margin); + aCBSize, kidAvailableISize, &margin); nscoord capISize = ChildShrinkWrapISize(aRenderingContext, mCaptionFrames.FirstChild(), aWM, aCBSize, inlineSize - margin); @@ -445,14 +446,14 @@ nsTableOuterFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext, inlineSize = capISize; } } else { - NS_ASSERTION(captionSide == NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE || - captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE, + NS_ASSERTION(captionSide == NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE || + captionSide == NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE, "unexpected caption-side"); inlineSize = ChildShrinkWrapISize(aRenderingContext, InnerTableFrame(), aWM, - aCBSize, kidAvailableWidth); + aCBSize, kidAvailableISize); nscoord capISize = ChildShrinkWrapISize(aRenderingContext, mCaptionFrames.FirstChild(), aWM, - aCBSize, kidAvailableWidth); + aCBSize, kidAvailableISize); if (capISize > inlineSize) { inlineSize = capISize; } @@ -462,10 +463,11 @@ nsTableOuterFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext, } uint8_t -nsTableOuterFrame::GetCaptionSide() +nsTableOuterFrame::GetLogicalCaptionSide(WritingMode aWM) { if (mCaptionFrames.NotEmpty()) { - return mCaptionFrames.FirstChild()->StyleTableBorder()->mCaptionSide; + return mCaptionFrames.FirstChild()->StyleTableBorder()-> + LogicalCaptionSide(aWM); } else { return NO_SIDE; // no caption @@ -483,125 +485,157 @@ nsTableOuterFrame::GetCaptionVerticalAlign() } void -nsTableOuterFrame::SetDesiredSize(uint8_t aCaptionSide, - const nsMargin& aInnerMargin, - const nsMargin& aCaptionMargin, - nscoord& aWidth, - nscoord& aHeight) +nsTableOuterFrame::SetDesiredSize(uint8_t aCaptionSide, + const LogicalSize& aInnerSize, + const LogicalSize& aCaptionSize, + const LogicalMargin& aInnerMargin, + const LogicalMargin& aCaptionMargin, + nscoord& aISize, + nscoord& aBSize, + WritingMode aWM) { - aWidth = aHeight = 0; + aISize = aBSize = 0; - nsRect innerRect = InnerTableFrame()->GetRect(); - nscoord innerWidth = innerRect.width; - - nsRect captionRect(0,0,0,0); - nscoord captionWidth = 0; - if (mCaptionFrames.NotEmpty()) { - captionRect = mCaptionFrames.FirstChild()->GetRect(); - captionWidth = captionRect.width; - } - switch(aCaptionSide) { - case NS_STYLE_CAPTION_SIDE_LEFT: - aWidth = std::max(aInnerMargin.left, aCaptionMargin.left + captionWidth + aCaptionMargin.right) + - innerWidth + aInnerMargin.right; + // compute the overall inline-size + switch (aCaptionSide) { + case NS_STYLE_CAPTION_SIDE_ISTART: + aISize = + std::max(aInnerMargin.IStart(aWM), + aCaptionMargin.IStartEnd(aWM) + aCaptionSize.ISize(aWM)) + + aInnerSize.ISize(aWM) + aInnerMargin.IEnd(aWM); break; - case NS_STYLE_CAPTION_SIDE_RIGHT: - aWidth = std::max(aInnerMargin.right, aCaptionMargin.left + captionWidth + aCaptionMargin.right) + - innerWidth + aInnerMargin.left; + case NS_STYLE_CAPTION_SIDE_IEND: + aISize = + std::max(aInnerMargin.IEnd(aWM), + aCaptionMargin.IStartEnd(aWM) + aCaptionSize.ISize(aWM)) + + aInnerSize.ISize(aWM) + aInnerMargin.IStart(aWM); break; default: - aWidth = aInnerMargin.left + innerWidth + aInnerMargin.right; - aWidth = std::max(aWidth, captionRect.XMost() + aCaptionMargin.right); - } - aHeight = innerRect.YMost() + aInnerMargin.bottom; - if (NS_STYLE_CAPTION_SIDE_BOTTOM != aCaptionSide) { - aHeight = std::max(aHeight, captionRect.YMost() + aCaptionMargin.bottom); - } - else { - aHeight = std::max(aHeight, captionRect.YMost() + aCaptionMargin.bottom + - aInnerMargin.bottom); + aISize = + std::max(aInnerMargin.IStartEnd(aWM) + aInnerSize.ISize(aWM), + aCaptionMargin.IStartEnd(aWM) + aCaptionSize.ISize(aWM)); + break; } + // compute the overall block-size + switch (aCaptionSide) { + case NS_STYLE_CAPTION_SIDE_BSTART: + case NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE: + aBSize = aInnerSize.BSize(aWM) + aInnerMargin.BEnd(aWM); + aBSize += + std::max(aInnerMargin.BStart(aWM), + aCaptionSize.BSize(aWM) + aCaptionMargin.BStartEnd(aWM)); + break; + case NS_STYLE_CAPTION_SIDE_BEND: + case NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE: + aBSize = aInnerSize.BSize(aWM) + aInnerMargin.BStart(aWM); + aBSize += + std::max(aInnerMargin.BEnd(aWM), + aCaptionSize.BSize(aWM) + aCaptionMargin.BStartEnd(aWM)); + break; + case NS_STYLE_CAPTION_SIDE_ISTART: + case NS_STYLE_CAPTION_SIDE_IEND: + aBSize = aInnerMargin.BStart(aWM); + aBSize += + std::max(aInnerSize.BSize(aWM) + aInnerMargin.BEnd(aWM), + aCaptionSize.BSize(aWM) + aCaptionMargin.BEnd(aWM)); + break; + default: + NS_ASSERTION(aCaptionSide == NO_SIDE, "unexpected caption side"); + aBSize = aInnerSize.BSize(aWM) + aInnerMargin.BStartEnd(aWM); + break; + } + + // negative sizes can upset overflow-area code + aISize = std::max(aISize, 0); + aBSize = std::max(aBSize, 0); } nsresult -nsTableOuterFrame::GetCaptionOrigin(uint32_t aCaptionSide, - const nsSize& aContainBlockSize, - const nsSize& aInnerSize, - const nsMargin& aInnerMargin, - const nsSize& aCaptionSize, - nsMargin& aCaptionMargin, - nsPoint& aOrigin) +nsTableOuterFrame::GetCaptionOrigin(uint32_t aCaptionSide, + const LogicalSize& aContainBlockSize, + const LogicalSize& aInnerSize, + const LogicalMargin& aInnerMargin, + const LogicalSize& aCaptionSize, + LogicalMargin& aCaptionMargin, + LogicalPoint& aOrigin, + WritingMode aWM) { - aOrigin.x = aOrigin.y = 0; - if ((NS_UNCONSTRAINEDSIZE == aInnerSize.width) || (NS_UNCONSTRAINEDSIZE == aInnerSize.height) || - (NS_UNCONSTRAINEDSIZE == aCaptionSize.width) || (NS_UNCONSTRAINEDSIZE == aCaptionSize.height)) { + aOrigin.I(aWM) = aOrigin.B(aWM) = 0; + if ((NS_UNCONSTRAINEDSIZE == aInnerSize.ISize(aWM)) || + (NS_UNCONSTRAINEDSIZE == aInnerSize.BSize(aWM)) || + (NS_UNCONSTRAINEDSIZE == aCaptionSize.ISize(aWM)) || + (NS_UNCONSTRAINEDSIZE == aCaptionSize.BSize(aWM))) { return NS_OK; } - if (mCaptionFrames.IsEmpty()) return NS_OK; - - NS_ASSERTION(NS_AUTOMARGIN != aCaptionMargin.left, "The computed caption margin is auto?"); - NS_ASSERTION(NS_AUTOMARGIN != aCaptionMargin.top, "The computed caption margin is auto?"); - NS_ASSERTION(NS_AUTOMARGIN != aCaptionMargin.bottom, "The computed caption margin is auto?"); - - // horizontal computation - switch(aCaptionSide) { - case NS_STYLE_CAPTION_SIDE_BOTTOM: - case NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE: { - // FIXME: Position relative to right edge for RTL. (Based on table - // direction or table parent direction?) - aOrigin.x = aCaptionMargin.left; - if (aCaptionSide == NS_STYLE_CAPTION_SIDE_BOTTOM) { - // We placed the caption using only the table's width as available - // width, and we should position it this way as well. - aOrigin.x += aInnerMargin.left; - } - } break; - case NS_STYLE_CAPTION_SIDE_LEFT: { - aOrigin.x = aCaptionMargin.left; - } break; - case NS_STYLE_CAPTION_SIDE_RIGHT: { - aOrigin.x = aInnerMargin.left + aInnerSize.width + aCaptionMargin.left; - } break; - default: { // top - NS_ASSERTION(aCaptionSide == NS_STYLE_CAPTION_SIDE_TOP || - aCaptionSide == NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE, - "unexpected caption side"); - // FIXME: Position relative to right edge for RTL. (Based on table - // direction or table parent direction?) - aOrigin.x = aCaptionMargin.left; - if (aCaptionSide == NS_STYLE_CAPTION_SIDE_TOP) { - // We placed the caption using only the table's width as available - // width, and we should position it this way as well. - aOrigin.x += aInnerMargin.left; - } - - } break; + if (mCaptionFrames.IsEmpty()) { + return NS_OK; } - // vertical computation + + NS_ASSERTION(NS_AUTOMARGIN != aCaptionMargin.IStart(aWM) && + NS_AUTOMARGIN != aCaptionMargin.BStart(aWM) && + NS_AUTOMARGIN != aCaptionMargin.BEnd(aWM), + "The computed caption margin is auto?"); + + // inline-dir computation switch (aCaptionSide) { - case NS_STYLE_CAPTION_SIDE_RIGHT: - case NS_STYLE_CAPTION_SIDE_LEFT: - aOrigin.y = aInnerMargin.top; + case NS_STYLE_CAPTION_SIDE_BEND: + case NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE: + aOrigin.I(aWM) = aCaptionMargin.IStart(aWM); + if (aCaptionSide == NS_STYLE_CAPTION_SIDE_BEND) { + // We placed the caption using only the table's isize as available + // isize, and we should position it this way as well. + aOrigin.I(aWM) += aInnerMargin.IStart(aWM); + } + break; + case NS_STYLE_CAPTION_SIDE_ISTART: + aOrigin.I(aWM) = aCaptionMargin.IStart(aWM); + break; + case NS_STYLE_CAPTION_SIDE_IEND: + aOrigin.I(aWM) = aInnerMargin.IStart(aWM) + aInnerSize.ISize(aWM) + + aCaptionMargin.IStart(aWM); + break; + default: // block-start + NS_ASSERTION(aCaptionSide == NS_STYLE_CAPTION_SIDE_BSTART || + aCaptionSide == NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE, + "unexpected caption side"); + aOrigin.I(aWM) = aCaptionMargin.IStart(aWM); + if (aCaptionSide == NS_STYLE_CAPTION_SIDE_BSTART) { + // We placed the caption using only the table's isize as available + // isize, and we should position it this way as well. + aOrigin.I(aWM) += aInnerMargin.IStart(aWM); + } + break; + } + // block-dir computation + switch (aCaptionSide) { + case NS_STYLE_CAPTION_SIDE_IEND: + case NS_STYLE_CAPTION_SIDE_ISTART: + aOrigin.B(aWM) = aInnerMargin.BStart(aWM); switch (GetCaptionVerticalAlign()) { case NS_STYLE_VERTICAL_ALIGN_MIDDLE: - aOrigin.y = std::max(0, aInnerMargin.top + ((aInnerSize.height - aCaptionSize.height) / 2)); + aOrigin.B(aWM) = std::max(0, aInnerMargin.BStart(aWM) + + ((aInnerSize.BSize(aWM) - + aCaptionSize.BSize(aWM)) / 2)); break; case NS_STYLE_VERTICAL_ALIGN_BOTTOM: - aOrigin.y = std::max(0, aInnerMargin.top + aInnerSize.height - aCaptionSize.height); + aOrigin.B(aWM) = std::max(0, aInnerMargin.BStart(aWM) + + aInnerSize.BSize(aWM) - + aCaptionSize.BSize(aWM)); break; default: break; } break; - case NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE: - case NS_STYLE_CAPTION_SIDE_BOTTOM: { - aOrigin.y = aInnerMargin.top + aInnerSize.height + aCaptionMargin.top; - } break; - case NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE: - case NS_STYLE_CAPTION_SIDE_TOP: { - aOrigin.y = aInnerMargin.top + aCaptionMargin.top; - } break; + case NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE: + case NS_STYLE_CAPTION_SIDE_BEND: + aOrigin.B(aWM) = aInnerMargin.BStart(aWM) + aInnerSize.BSize(aWM) + + aCaptionMargin.BStart(aWM); + break; + case NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE: + case NS_STYLE_CAPTION_SIDE_BSTART: + aOrigin.B(aWM) = aInnerMargin.BStart(aWM) + aCaptionMargin.BStart(aWM); + break; default: NS_NOTREACHED("Unknown caption alignment type"); break; @@ -610,82 +644,88 @@ nsTableOuterFrame::GetCaptionOrigin(uint32_t aCaptionSide, } nsresult -nsTableOuterFrame::GetInnerOrigin(uint32_t aCaptionSide, - const nsSize& aContainBlockSize, - const nsSize& aCaptionSize, - const nsMargin& aCaptionMargin, - const nsSize& aInnerSize, - nsMargin& aInnerMargin, - nsPoint& aOrigin) +nsTableOuterFrame::GetInnerOrigin(uint32_t aCaptionSide, + const LogicalSize& aContainBlockSize, + const LogicalSize& aCaptionSize, + const LogicalMargin& aCaptionMargin, + const LogicalSize& aInnerSize, + LogicalMargin& aInnerMargin, + LogicalPoint& aOrigin, + WritingMode aWM) { + NS_ASSERTION(NS_AUTOMARGIN != aCaptionMargin.IStart(aWM) && + NS_AUTOMARGIN != aCaptionMargin.IEnd(aWM), + "The computed caption margin is auto?"); + NS_ASSERTION(NS_AUTOMARGIN != aInnerMargin.IStart(aWM) && + NS_AUTOMARGIN != aInnerMargin.IEnd(aWM) && + NS_AUTOMARGIN != aInnerMargin.BStart(aWM) && + NS_AUTOMARGIN != aInnerMargin.BEnd(aWM), + "The computed inner margin is auto?"); - NS_ASSERTION(NS_AUTOMARGIN != aCaptionMargin.left, "The computed caption margin is auto?"); - NS_ASSERTION(NS_AUTOMARGIN != aCaptionMargin.right, "The computed caption margin is auto?"); - NS_ASSERTION(NS_AUTOMARGIN != aInnerMargin.left, "The computed inner margin is auto?"); - NS_ASSERTION(NS_AUTOMARGIN != aInnerMargin.right, "The computed inner margin is auto?"); - NS_ASSERTION(NS_AUTOMARGIN != aInnerMargin.top, "The computed inner margin is auto?"); - NS_ASSERTION(NS_AUTOMARGIN != aInnerMargin.bottom, "The computed inner margin is auto?"); - - aOrigin.x = aOrigin.y = 0; - if ((NS_UNCONSTRAINEDSIZE == aInnerSize.width) || (NS_UNCONSTRAINEDSIZE == aInnerSize.height) || - (NS_UNCONSTRAINEDSIZE == aCaptionSize.width) || (NS_UNCONSTRAINEDSIZE == aCaptionSize.height)) { + aOrigin.I(aWM) = aOrigin.B(aWM) = 0; + if ((NS_UNCONSTRAINEDSIZE == aInnerSize.ISize(aWM)) || + (NS_UNCONSTRAINEDSIZE == aInnerSize.BSize(aWM)) || + (NS_UNCONSTRAINEDSIZE == aCaptionSize.ISize(aWM)) || + (NS_UNCONSTRAINEDSIZE == aCaptionSize.BSize(aWM))) { return NS_OK; } - nscoord minCapWidth = aCaptionSize.width; - - minCapWidth += aCaptionMargin.left; - minCapWidth += aCaptionMargin.right; + nscoord minCapISize = + aCaptionSize.ISize(aWM) + aCaptionMargin.IStartEnd(aWM); - // horizontal computation + // inline-dir computation switch (aCaptionSide) { - case NS_STYLE_CAPTION_SIDE_LEFT: { - if (aInnerMargin.left < minCapWidth) { - // shift the inner table to get some place for the caption - aInnerMargin.right += aInnerMargin.left - minCapWidth; - aInnerMargin.right = std::max(0, aInnerMargin.right); - aInnerMargin.left = minCapWidth; - } - aOrigin.x = aInnerMargin.left; - } break; - default: { - NS_ASSERTION(aCaptionSide == NS_STYLE_CAPTION_SIDE_TOP || - aCaptionSide == NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE || - aCaptionSide == NS_STYLE_CAPTION_SIDE_BOTTOM || - aCaptionSide == NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE || - aCaptionSide == NS_STYLE_CAPTION_SIDE_RIGHT || - aCaptionSide == NO_SIDE, - "unexpected caption side"); - aOrigin.x = aInnerMargin.left; - } break; + case NS_STYLE_CAPTION_SIDE_ISTART: + if (aInnerMargin.IStart(aWM) < minCapISize) { + // shift the inner table to get some place for the caption + aInnerMargin.IEnd(aWM) += aInnerMargin.IStart(aWM) - minCapISize; + aInnerMargin.IEnd(aWM) = std::max(0, aInnerMargin.IEnd(aWM)); + aInnerMargin.IStart(aWM) = minCapISize; + } + aOrigin.I(aWM) = aInnerMargin.IStart(aWM); + break; + default: + NS_ASSERTION(aCaptionSide == NS_STYLE_CAPTION_SIDE_BSTART || + aCaptionSide == NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE || + aCaptionSide == NS_STYLE_CAPTION_SIDE_BEND || + aCaptionSide == NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE || + aCaptionSide == NS_STYLE_CAPTION_SIDE_IEND || + aCaptionSide == NO_SIDE, + "unexpected caption side"); + aOrigin.I(aWM) = aInnerMargin.IStart(aWM); + break; } - // vertical computation + // block-dir computation switch (aCaptionSide) { - case NS_STYLE_CAPTION_SIDE_BOTTOM: - case NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE: { - aOrigin.y = aInnerMargin.top; - } break; - case NS_STYLE_CAPTION_SIDE_LEFT: - case NS_STYLE_CAPTION_SIDE_RIGHT: { - aOrigin.y = aInnerMargin.top; + case NS_STYLE_CAPTION_SIDE_BEND: + case NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE: + aOrigin.B(aWM) = aInnerMargin.BStart(aWM); + break; + case NS_STYLE_CAPTION_SIDE_ISTART: + case NS_STYLE_CAPTION_SIDE_IEND: + aOrigin.B(aWM) = aInnerMargin.BStart(aWM); switch (GetCaptionVerticalAlign()) { case NS_STYLE_VERTICAL_ALIGN_MIDDLE: - aOrigin.y = std::max(aInnerMargin.top, (aCaptionSize.height - aInnerSize.height) / 2); + aOrigin.B(aWM) = + std::max(aInnerMargin.BStart(aWM), + (aCaptionSize.BSize(aWM) - aInnerSize.BSize(aWM)) / 2); break; case NS_STYLE_VERTICAL_ALIGN_BOTTOM: - aOrigin.y = std::max(aInnerMargin.top, aCaptionSize.height - aInnerSize.height); + aOrigin.B(aWM) = + std::max(aInnerMargin.BStart(aWM), + aCaptionSize.BSize(aWM) - aInnerSize.BSize(aWM)); break; default: break; } - } break; + break; case NO_SIDE: - case NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE: - case NS_STYLE_CAPTION_SIDE_TOP: { - aOrigin.y = aInnerMargin.top + aCaptionMargin.top + aCaptionSize.height + - aCaptionMargin.bottom; - } break; + case NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE: + case NS_STYLE_CAPTION_SIDE_BSTART: + aOrigin.B(aWM) = aInnerMargin.BStart(aWM) + aCaptionSize.BSize(aWM) + + aCaptionMargin.BStartEnd(aWM); + break; default: NS_NOTREACHED("Unknown caption alignment type"); break; @@ -731,9 +771,9 @@ nsTableOuterFrame::OuterBeginReflowChild(nsPresContext* aPresContext, // see if we need to reset top-of-page due to a caption if (aChildRS->mFlags.mIsTopOfPage && mCaptionFrames.FirstChild() == aChildFrame) { - uint8_t captionSide = GetCaptionSide(); - if (captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM || - captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE) { + uint8_t captionSide = GetLogicalCaptionSide(wm); + if (captionSide == NS_STYLE_CAPTION_SIDE_BEND || + captionSide == NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE) { aChildRS->mFlags.mIsTopOfPage = false; } } @@ -745,10 +785,16 @@ nsTableOuterFrame::OuterDoReflowChild(nsPresContext* aPresContext, const nsHTMLReflowState& aChildRS, nsHTMLReflowMetrics& aMetrics, nsReflowStatus& aStatus) -{ +{ + // Using zero as containerWidth here because we want consistency between + // the GetLogicalPosition and ReflowChild calls, to avoid unnecessarily + // changing the frame's coordinates; but we don't yet know its final + // position anyway so the actual value is unimportant. + const nscoord zeroCWidth = 0; + WritingMode wm = aChildRS.GetWritingMode(); - // use the current position as a best guess for placement - nsPoint childPt = aChildFrame->GetPosition(); + // Use the current position as a best guess for placement. + LogicalPoint childPt = aChildFrame->GetLogicalPosition(wm, zeroCWidth); uint32_t flags = NS_FRAME_NO_MOVE_FRAME; // We don't want to delete our next-in-flow's child if it's an inner table @@ -761,18 +807,12 @@ nsTableOuterFrame::OuterDoReflowChild(nsPresContext* aPresContext, } ReflowChild(aChildFrame, aPresContext, aMetrics, aChildRS, - childPt.x, childPt.y, flags, aStatus); + wm, childPt, zeroCWidth, flags, aStatus); } void -nsTableOuterFrame::UpdateReflowMetrics(uint8_t aCaptionSide, - nsHTMLReflowMetrics& aMet, - const nsMargin& aInnerMargin, - const nsMargin& aCaptionMargin) +nsTableOuterFrame::UpdateOverflowAreas(nsHTMLReflowMetrics& aMet) { - SetDesiredSize(aCaptionSide, aInnerMargin, aCaptionMargin, - aMet.Width(), aMet.Height()); - aMet.SetOverflowAreasToDesiredBounds(); ConsiderChildOverflow(aMet.mOverflowAreas, InnerTableFrame()); if (mCaptionFrames.NotEmpty()) { @@ -790,8 +830,6 @@ nsTableOuterFrame::Reflow(nsPresContext* aPresContext, DO_GLOBAL_REFLOW_COUNT("nsTableOuterFrame"); DISPLAY_REFLOW(aPresContext, this, aOuterRS, aDesiredSize, aStatus); - uint8_t captionSide = GetCaptionSide(); - // Initialize out parameters aDesiredSize.ClearSize(); aStatus = NS_FRAME_COMPLETE; @@ -821,104 +859,100 @@ nsTableOuterFrame::Reflow(nsPresContext* aPresContext, } // ComputeAutoSize has to match this logic. - WritingMode wm; + WritingMode wm = aOuterRS.GetWritingMode(); + uint8_t captionSide = GetLogicalCaptionSide(wm); + WritingMode captionWM = wm; // will be changed below if necessary + if (captionSide == NO_SIDE) { // We don't have a caption. - wm = InnerTableFrame()->GetWritingMode(); OuterBeginReflowChild(aPresContext, InnerTableFrame(), aOuterRS, innerRS, aOuterRS.ComputedSize(wm).ISize(wm)); - } else if (captionSide == NS_STYLE_CAPTION_SIDE_LEFT || - captionSide == NS_STYLE_CAPTION_SIDE_RIGHT) { + } else if (captionSide == NS_STYLE_CAPTION_SIDE_ISTART || + captionSide == NS_STYLE_CAPTION_SIDE_IEND) { // ComputeAutoSize takes care of making side captions small. Compute // the caption's size first, and tell the table to fit in what's left. - wm = mCaptionFrames.FirstChild()->GetWritingMode(); OuterBeginReflowChild(aPresContext, mCaptionFrames.FirstChild(), aOuterRS, captionRS, aOuterRS.ComputedSize(wm).ISize(wm)); + captionWM = captionRS->GetWritingMode(); nscoord innerAvailISize = aOuterRS.ComputedSize(wm).ISize(wm) - captionRS->ComputedSizeWithMarginBorderPadding(wm).ISize(wm); OuterBeginReflowChild(aPresContext, InnerTableFrame(), aOuterRS, innerRS, innerAvailISize); - - } else if (captionSide == NS_STYLE_CAPTION_SIDE_TOP || - captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM) { + } else if (captionSide == NS_STYLE_CAPTION_SIDE_BSTART || + captionSide == NS_STYLE_CAPTION_SIDE_BEND) { // Compute the table's size first, and then prevent the caption from - // being wider unless it has to be. + // being larger in the inline dir unless it has to be. // // Note that CSS 2.1 (but not 2.0) says: // The width of the anonymous box is the border-edge width of the // table box inside it - // We don't actually make our anonymous box that width (if we did, + // We don't actually make our anonymous box that isize (if we did, // it would break 'auto' margins), but this effectively does that. - wm = InnerTableFrame()->GetWritingMode(); OuterBeginReflowChild(aPresContext, InnerTableFrame(), aOuterRS, innerRS, aOuterRS.ComputedSize(wm).ISize(wm)); // It's good that CSS 2.1 says not to include margins, since we // can't, since they already been converted so they exactly - // fill the available width (ignoring the margin on one side if + // fill the available isize (ignoring the margin on one side if // neither are auto). (We take advantage of that later when we call // GetCaptionOrigin, though.) - nscoord innerBorderWidth = + nscoord innerBorderISize = innerRS->ComputedSizeWithBorderPadding(wm).ISize(wm); OuterBeginReflowChild(aPresContext, mCaptionFrames.FirstChild(), aOuterRS, - captionRS, innerBorderWidth); + captionRS, innerBorderISize); + captionWM = captionRS->GetWritingMode(); } else { - NS_ASSERTION(captionSide == NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE || - captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE, + NS_ASSERTION(captionSide == NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE || + captionSide == NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE, "unexpected caption-side"); // Size the table and the caption independently. - wm = mCaptionFrames.FirstChild()->GetWritingMode(); - OuterBeginReflowChild(aPresContext, mCaptionFrames.FirstChild(), aOuterRS, - captionRS, aOuterRS.ComputedSize(wm).ISize(wm)); - wm = InnerTableFrame()->GetWritingMode(); + captionWM = mCaptionFrames.FirstChild()->GetWritingMode(); + OuterBeginReflowChild(aPresContext, mCaptionFrames.FirstChild(), + aOuterRS, captionRS, + aOuterRS.ComputedSize(captionWM).ISize(captionWM)); OuterBeginReflowChild(aPresContext, InnerTableFrame(), aOuterRS, innerRS, aOuterRS.ComputedSize(wm).ISize(wm)); } // First reflow the caption. Maybe captionMet; - nsSize captionSize; - nsMargin captionMargin; + LogicalSize captionSize(wm); + LogicalMargin captionMargin(wm); if (mCaptionFrames.NotEmpty()) { - captionMet.emplace(captionRS->GetWritingMode()); + captionMet.emplace(wm); nsReflowStatus capStatus; // don't let the caption cause incomplete OuterDoReflowChild(aPresContext, mCaptionFrames.FirstChild(), *captionRS, *captionMet, capStatus); - captionSize.width = captionMet->Width(); - captionSize.height = captionMet->Height(); - captionMargin = captionRS->ComputedPhysicalMargin(); - // Now that we know the height of the caption, reduce the available height - // for the table frame if we are height constrained and the caption is above + captionSize.ISize(wm) = captionMet->ISize(wm); + captionSize.BSize(wm) = captionMet->BSize(wm); + captionMargin = + captionRS->ComputedLogicalMargin().ConvertTo(wm, captionWM); + // Now that we know the bsize of the caption, reduce the available bsize + // for the table frame if we are bsize constrained and the caption is above // or below the inner table. - if (NS_UNCONSTRAINEDSIZE != aOuterRS.AvailableHeight()) { - nscoord captionHeight = 0; + if (NS_UNCONSTRAINEDSIZE != aOuterRS.AvailableBSize()) { + nscoord captionBSize = 0; switch (captionSide) { - case NS_STYLE_CAPTION_SIDE_TOP: - case NS_STYLE_CAPTION_SIDE_BOTTOM: - case NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE: - case NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE: { - captionHeight = captionSize.height + captionMargin.TopBottom(); + case NS_STYLE_CAPTION_SIDE_BSTART: + case NS_STYLE_CAPTION_SIDE_BEND: + case NS_STYLE_CAPTION_SIDE_BSTART_OUTSIDE: + case NS_STYLE_CAPTION_SIDE_BEND_OUTSIDE: + captionBSize = captionSize.BSize(wm) + captionMargin.BStartEnd(wm); break; - } } - innerRS->AvailableHeight() = - std::max(0, innerRS->AvailableHeight() - captionHeight); + innerRS->AvailableBSize() = + std::max(0, innerRS->AvailableBSize() - captionBSize); } - } else { - captionSize.SizeTo(0,0); - captionMargin.SizeTo(0,0,0,0); } - // Then, now that we know how much to reduce the width of the inner + // Then, now that we know how much to reduce the isize of the inner // table to account for side captions, reflow the inner table. nsHTMLReflowMetrics innerMet(innerRS->GetWritingMode()); OuterDoReflowChild(aPresContext, InnerTableFrame(), *innerRS, innerMet, aStatus); - nsSize innerSize; - innerSize.width = innerMet.Width(); - innerSize.height = innerMet.Height(); - nsMargin innerMargin = innerRS->ComputedPhysicalMargin(); + LogicalSize innerSize(wm, innerMet.ISize(wm), innerMet.BSize(wm)); + LogicalMargin innerMargin = innerRS->ComputedLogicalMargin(); - nsSize containSize = GetContainingBlockSize(aOuterRS); + LogicalSize containSize(wm, GetContainingBlockSize(aOuterRS)); // Now that we've reflowed both we can place them. // XXXldb Most of the input variables here are now uninitialized! @@ -926,33 +960,47 @@ nsTableOuterFrame::Reflow(nsPresContext* aPresContext, // XXX Need to recompute inner table's auto margins for the case of side // captions. (Caption's are broken too, but that should be fixed earlier.) + // Compute the desiredSize so that we can use its Width() as containerWidth + // for the FinishReflowChild calls below. + LogicalSize desiredSize(wm); + SetDesiredSize(captionSide, innerSize, captionSize, + innerMargin, captionMargin, + desiredSize.ISize(wm), desiredSize.BSize(wm), wm); + aDesiredSize.SetSize(wm, desiredSize); + nscoord containerWidth = aDesiredSize.Width(); + // XXX It's possible for this to be NS_UNCONSTRAINEDSIZE, which will result + // in assertions from FinishReflowChild. + if (mCaptionFrames.NotEmpty()) { - nsPoint captionOrigin; - GetCaptionOrigin(captionSide, containSize, innerSize, - innerMargin, captionSize, captionMargin, captionOrigin); + LogicalPoint captionOrigin(wm); + GetCaptionOrigin(captionSide, containSize, innerSize, innerMargin, + captionSize, captionMargin, captionOrigin, wm); FinishReflowChild(mCaptionFrames.FirstChild(), aPresContext, *captionMet, - captionRS.ptr(), captionOrigin.x, captionOrigin.y, 0); + captionRS.ptr(), wm, captionOrigin, containerWidth, + 0); captionRS.reset(); } - // XXX If the height is constrained then we need to check whether + // XXX If the bsize is constrained then we need to check whether // everything still fits... - nsPoint innerOrigin; - GetInnerOrigin(captionSide, containSize, captionSize, - captionMargin, innerSize, innerMargin, innerOrigin); + LogicalPoint innerOrigin(wm); + GetInnerOrigin(captionSide, containSize, captionSize, captionMargin, + innerSize, innerMargin, innerOrigin, wm); FinishReflowChild(InnerTableFrame(), aPresContext, innerMet, innerRS.ptr(), - innerOrigin.x, innerOrigin.y, 0); + wm, innerOrigin, containerWidth, 0); innerRS.reset(); nsTableFrame::InvalidateTableFrame(InnerTableFrame(), origInnerRect, - origInnerVisualOverflow, innerFirstReflow); + origInnerVisualOverflow, + innerFirstReflow); if (mCaptionFrames.NotEmpty()) { - nsTableFrame::InvalidateTableFrame(mCaptionFrames.FirstChild(), origCaptionRect, + nsTableFrame::InvalidateTableFrame(mCaptionFrames.FirstChild(), + origCaptionRect, origCaptionVisualOverflow, captionFirstReflow); } - UpdateReflowMetrics(captionSide, aDesiredSize, innerMargin, captionMargin); + UpdateOverflowAreas(aDesiredSize); if (GetPrevInFlow()) { ReflowOverflowContainerChildren(aPresContext, aOuterRS, diff --git a/layout/tables/nsTableOuterFrame.h b/layout/tables/nsTableOuterFrame.h index 265e426281..23956c747e 100644 --- a/layout/tables/nsTableOuterFrame.h +++ b/layout/tables/nsTableOuterFrame.h @@ -188,37 +188,44 @@ protected: void InitChildReflowState(nsPresContext& aPresContext, nsHTMLReflowState& aReflowState); - uint8_t GetCaptionSide(); // NS_STYLE_CAPTION_SIDE_* or NO_SIDE + // Get a NS_STYLE_CAPTION_SIDE_* value, with physically-specified sides + // resolved to logical sides, or NO_SIDE if no caption is present. + uint8_t GetLogicalCaptionSide(mozilla::WritingMode aWM); - bool HasSideCaption() { - uint8_t captionSide = GetCaptionSide(); - return captionSide == NS_STYLE_CAPTION_SIDE_LEFT || - captionSide == NS_STYLE_CAPTION_SIDE_RIGHT; + bool HasSideCaption(mozilla::WritingMode aWM) { + uint8_t captionSide = GetLogicalCaptionSide(aWM); + return captionSide == NS_STYLE_CAPTION_SIDE_ISTART || + captionSide == NS_STYLE_CAPTION_SIDE_IEND; } uint8_t GetCaptionVerticalAlign(); - void SetDesiredSize(uint8_t aCaptionSide, - const nsMargin& aInnerMargin, - const nsMargin& aCaptionMargin, - nscoord& aWidth, - nscoord& aHeight); + void SetDesiredSize(uint8_t aCaptionSide, + const mozilla::LogicalSize& aInnerSize, + const mozilla::LogicalSize& aCaptionSize, + const mozilla::LogicalMargin& aInnerMargin, + const mozilla::LogicalMargin& aCaptionMargin, + nscoord& aISize, + nscoord& aBSize, + mozilla::WritingMode aWM); nsresult GetCaptionOrigin(uint32_t aCaptionSide, - const nsSize& aContainBlockSize, - const nsSize& aInnerSize, - const nsMargin& aInnerMargin, - const nsSize& aCaptionSize, - nsMargin& aCaptionMargin, - nsPoint& aOrigin); + const mozilla::LogicalSize& aContainBlockSize, + const mozilla::LogicalSize& aInnerSize, + const mozilla::LogicalMargin& aInnerMargin, + const mozilla::LogicalSize& aCaptionSize, + mozilla::LogicalMargin& aCaptionMargin, + mozilla::LogicalPoint& aOrigin, + mozilla::WritingMode aWM); nsresult GetInnerOrigin(uint32_t aCaptionSide, - const nsSize& aContainBlockSize, - const nsSize& aCaptionSize, - const nsMargin& aCaptionMargin, - const nsSize& aInnerSize, - nsMargin& aInnerMargin, - nsPoint& aOrigin); + const mozilla::LogicalSize& aContainBlockSize, + const mozilla::LogicalSize& aCaptionSize, + const mozilla::LogicalMargin& aCaptionMargin, + const mozilla::LogicalSize& aInnerSize, + mozilla::LogicalMargin& aInnerMargin, + mozilla::LogicalPoint& aOrigin, + mozilla::WritingMode aWM); // reflow the child (caption or innertable frame) void OuterBeginReflowChild(nsPresContext* aPresContext, @@ -233,14 +240,10 @@ protected: nsHTMLReflowMetrics& aMetrics, nsReflowStatus& aStatus); - // Set the reflow metrics - void UpdateReflowMetrics(uint8_t aCaptionSide, - nsHTMLReflowMetrics& aMet, - const nsMargin& aInnerMargin, - const nsMargin& aCaptionMargin); + // Set the overflow areas in our reflow metrics + void UpdateOverflowAreas(nsHTMLReflowMetrics& aMet); - // Get the margin. aMarginNoAuto is aMargin, but with auto - // margins set to 0 + // Get the margin. void GetChildMargin(nsPresContext* aPresContext, const nsHTMLReflowState& aOuterRS, nsIFrame* aChildFrame,