2016-02-24 10:01:10 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#include "mozilla/ServoStyleSet.h"
|
|
|
|
|
2016-07-13 23:42:47 +03:00
|
|
|
#include "mozilla/ServoRestyleManager.h"
|
2016-02-24 10:01:10 +03:00
|
|
|
#include "nsCSSAnonBoxes.h"
|
2016-03-18 23:14:07 +03:00
|
|
|
#include "nsCSSPseudoElements.h"
|
2016-04-29 07:01:44 +03:00
|
|
|
#include "nsIDocumentInlines.h"
|
2016-03-18 23:14:07 +03:00
|
|
|
#include "nsStyleContext.h"
|
2016-02-26 04:51:02 +03:00
|
|
|
#include "nsStyleSet.h"
|
2016-02-24 10:01:10 +03:00
|
|
|
|
|
|
|
using namespace mozilla;
|
|
|
|
using namespace mozilla::dom;
|
|
|
|
|
2016-02-24 10:01:12 +03:00
|
|
|
ServoStyleSet::ServoStyleSet()
|
2016-03-18 23:14:07 +03:00
|
|
|
: mPresContext(nullptr)
|
|
|
|
, mRawSet(Servo_InitStyleSet())
|
2016-01-27 05:02:04 +03:00
|
|
|
, mBatching(0)
|
2016-02-24 10:01:12 +03:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-02-24 10:01:10 +03:00
|
|
|
void
|
|
|
|
ServoStyleSet::Init(nsPresContext* aPresContext)
|
|
|
|
{
|
2016-03-18 23:14:07 +03:00
|
|
|
mPresContext = aPresContext;
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ServoStyleSet::BeginShutdown()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ServoStyleSet::Shutdown()
|
|
|
|
{
|
2016-01-27 05:02:04 +03:00
|
|
|
mRawSet = nullptr;
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
ServoStyleSet::GetAuthorStyleDisabled() const
|
|
|
|
{
|
2016-02-24 10:01:12 +03:00
|
|
|
return false;
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
ServoStyleSet::SetAuthorStyleDisabled(bool aStyleDisabled)
|
|
|
|
{
|
|
|
|
MOZ_CRASH("stylo: not implemented");
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ServoStyleSet::BeginUpdate()
|
|
|
|
{
|
2016-02-24 10:01:12 +03:00
|
|
|
++mBatching;
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
ServoStyleSet::EndUpdate()
|
|
|
|
{
|
2016-02-24 10:01:12 +03:00
|
|
|
MOZ_ASSERT(mBatching > 0);
|
|
|
|
if (--mBatching > 0) {
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ... do something ...
|
|
|
|
return NS_OK;
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<nsStyleContext>
|
|
|
|
ServoStyleSet::ResolveStyleFor(Element* aElement,
|
|
|
|
nsStyleContext* aParentContext)
|
|
|
|
{
|
2016-04-29 07:04:16 +03:00
|
|
|
return GetContext(aElement, aParentContext, nullptr,
|
|
|
|
CSSPseudoElementType::NotPseudo);
|
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<nsStyleContext>
|
|
|
|
ServoStyleSet::GetContext(nsIContent* aContent,
|
|
|
|
nsStyleContext* aParentContext,
|
|
|
|
nsIAtom* aPseudoTag,
|
|
|
|
CSSPseudoElementType aPseudoType)
|
|
|
|
{
|
|
|
|
RefPtr<ServoComputedValues> computedValues = dont_AddRef(Servo_GetComputedValues(aContent));
|
2016-03-18 23:14:07 +03:00
|
|
|
MOZ_ASSERT(computedValues);
|
2016-04-29 03:56:37 +03:00
|
|
|
return GetContext(computedValues.forget(), aParentContext, aPseudoTag, aPseudoType);
|
|
|
|
}
|
2016-03-18 23:14:07 +03:00
|
|
|
|
2016-04-29 03:56:37 +03:00
|
|
|
already_AddRefed<nsStyleContext>
|
|
|
|
ServoStyleSet::GetContext(already_AddRefed<ServoComputedValues> aComputedValues,
|
|
|
|
nsStyleContext* aParentContext,
|
|
|
|
nsIAtom* aPseudoTag,
|
|
|
|
CSSPseudoElementType aPseudoType)
|
|
|
|
{
|
2016-03-18 23:14:07 +03:00
|
|
|
// XXXbholley: nsStyleSet does visited handling here.
|
|
|
|
|
|
|
|
// XXXbholley: Figure out the correct thing to pass here. Does this fixup
|
|
|
|
// duplicate something that servo already does?
|
|
|
|
bool skipFixup = false;
|
|
|
|
|
2016-04-29 07:04:16 +03:00
|
|
|
return NS_NewStyleContext(aParentContext, mPresContext, aPseudoTag,
|
|
|
|
aPseudoType,
|
2016-04-29 03:56:37 +03:00
|
|
|
Move(aComputedValues), skipFixup);
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<nsStyleContext>
|
|
|
|
ServoStyleSet::ResolveStyleFor(Element* aElement,
|
|
|
|
nsStyleContext* aParentContext,
|
|
|
|
TreeMatchContext& aTreeMatchContext)
|
|
|
|
{
|
2016-04-27 05:34:49 +03:00
|
|
|
// aTreeMatchContext is used to speed up selector matching,
|
|
|
|
// but if the element already has a ServoComputedValues computed in
|
|
|
|
// advance, then we shouldn't need to use it.
|
|
|
|
return ResolveStyleFor(aElement, aParentContext);
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<nsStyleContext>
|
2016-04-29 07:01:44 +03:00
|
|
|
ServoStyleSet::ResolveStyleForText(nsIContent* aTextNode,
|
|
|
|
nsStyleContext* aParentContext)
|
|
|
|
{
|
2016-04-29 07:04:16 +03:00
|
|
|
MOZ_ASSERT(aTextNode && aTextNode->IsNodeOfType(nsINode::eTEXT));
|
|
|
|
return GetContext(aTextNode, aParentContext, nsCSSAnonBoxes::mozText,
|
|
|
|
CSSPseudoElementType::AnonBox);
|
2016-04-29 07:01:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<nsStyleContext>
|
|
|
|
ServoStyleSet::ResolveStyleForOtherNonElement(nsStyleContext* aParentContext)
|
2016-02-24 10:01:10 +03:00
|
|
|
{
|
2016-05-06 01:32:00 +03:00
|
|
|
RefPtr<ServoComputedValues> computedValues =
|
|
|
|
Servo_InheritComputedValues(
|
|
|
|
aParentContext->StyleSource().AsServoComputedValues());
|
|
|
|
MOZ_ASSERT(computedValues);
|
|
|
|
|
|
|
|
return GetContext(computedValues.forget(), aParentContext,
|
|
|
|
nsCSSAnonBoxes::mozOtherNonElement,
|
|
|
|
CSSPseudoElementType::AnonBox);
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<nsStyleContext>
|
|
|
|
ServoStyleSet::ResolvePseudoElementStyle(Element* aParentElement,
|
|
|
|
CSSPseudoElementType aType,
|
|
|
|
nsStyleContext* aParentContext,
|
|
|
|
Element* aPseudoElement)
|
|
|
|
{
|
2016-05-05 03:59:10 +03:00
|
|
|
if (aPseudoElement) {
|
|
|
|
NS_ERROR("stylo: We don't support CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE yet");
|
|
|
|
}
|
2016-04-29 03:56:37 +03:00
|
|
|
MOZ_ASSERT(aParentContext);
|
|
|
|
MOZ_ASSERT(aType < CSSPseudoElementType::Count);
|
|
|
|
nsIAtom* pseudoTag = nsCSSPseudoElements::GetPseudoAtom(aType);
|
|
|
|
|
|
|
|
RefPtr<ServoComputedValues> computedValues =
|
|
|
|
Servo_GetComputedValuesForPseudoElement(
|
|
|
|
aParentContext->StyleSource().AsServoComputedValues(),
|
|
|
|
aParentElement, pseudoTag, mRawSet.get(), /* is_probe = */ false);
|
|
|
|
MOZ_ASSERT(computedValues);
|
|
|
|
|
|
|
|
return GetContext(computedValues.forget(), aParentContext, pseudoTag, aType);
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// aFlags is an nsStyleSet flags bitfield
|
|
|
|
already_AddRefed<nsStyleContext>
|
|
|
|
ServoStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
|
|
|
|
nsStyleContext* aParentContext,
|
|
|
|
uint32_t aFlags)
|
|
|
|
{
|
2016-02-26 04:51:02 +03:00
|
|
|
MOZ_ASSERT(nsCSSAnonBoxes::IsAnonBox(aPseudoTag));
|
|
|
|
|
|
|
|
MOZ_ASSERT(aFlags == 0 ||
|
|
|
|
aFlags == nsStyleSet::eSkipParentDisplayBasedStyleFixup);
|
2016-03-18 23:14:07 +03:00
|
|
|
bool skipFixup = aFlags & nsStyleSet::eSkipParentDisplayBasedStyleFixup;
|
|
|
|
|
|
|
|
ServoComputedValues* parentStyle =
|
|
|
|
aParentContext ? aParentContext->StyleSource().AsServoComputedValues()
|
|
|
|
: nullptr;
|
|
|
|
RefPtr<ServoComputedValues> computedValues =
|
2016-04-27 00:09:03 +03:00
|
|
|
dont_AddRef(Servo_GetComputedValuesForAnonymousBox(parentStyle, aPseudoTag,
|
|
|
|
mRawSet.get()));
|
2016-03-18 23:14:07 +03:00
|
|
|
MOZ_ASSERT(computedValues);
|
|
|
|
|
2016-05-05 05:33:00 +03:00
|
|
|
return NS_NewStyleContext(aParentContext, mPresContext, aPseudoTag,
|
2016-03-18 23:14:07 +03:00
|
|
|
CSSPseudoElementType::AnonBox,
|
|
|
|
computedValues.forget(), skipFixup);
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// manage the set of style sheets in the style set
|
|
|
|
nsresult
|
|
|
|
ServoStyleSet::AppendStyleSheet(SheetType aType,
|
2016-02-24 10:01:12 +03:00
|
|
|
ServoStyleSheet* aSheet)
|
2016-02-24 10:01:10 +03:00
|
|
|
{
|
2016-02-26 04:51:02 +03:00
|
|
|
MOZ_ASSERT(aSheet);
|
|
|
|
MOZ_ASSERT(aSheet->IsApplicable());
|
|
|
|
MOZ_ASSERT(nsStyleSet::IsCSSSheetType(aType));
|
|
|
|
|
|
|
|
mSheets[aType].RemoveElement(aSheet);
|
|
|
|
mSheets[aType].AppendElement(aSheet);
|
|
|
|
|
2016-02-26 05:57:42 +03:00
|
|
|
// Maintain a mirrored list of sheets on the servo side.
|
|
|
|
Servo_AppendStyleSheet(aSheet->RawSheet(), mRawSet.get());
|
|
|
|
|
2016-02-26 04:51:02 +03:00
|
|
|
return NS_OK;
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
ServoStyleSet::PrependStyleSheet(SheetType aType,
|
2016-02-24 10:01:12 +03:00
|
|
|
ServoStyleSheet* aSheet)
|
2016-02-24 10:01:10 +03:00
|
|
|
{
|
2016-02-26 04:51:02 +03:00
|
|
|
MOZ_ASSERT(aSheet);
|
|
|
|
MOZ_ASSERT(aSheet->IsApplicable());
|
|
|
|
MOZ_ASSERT(nsStyleSet::IsCSSSheetType(aType));
|
|
|
|
|
|
|
|
mSheets[aType].RemoveElement(aSheet);
|
|
|
|
mSheets[aType].InsertElementAt(0, aSheet);
|
|
|
|
|
2016-02-26 05:57:42 +03:00
|
|
|
// Maintain a mirrored list of sheets on the servo side.
|
|
|
|
Servo_PrependStyleSheet(aSheet->RawSheet(), mRawSet.get());
|
|
|
|
|
2016-02-26 04:51:02 +03:00
|
|
|
return NS_OK;
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
ServoStyleSet::RemoveStyleSheet(SheetType aType,
|
2016-02-24 10:01:12 +03:00
|
|
|
ServoStyleSheet* aSheet)
|
2016-02-24 10:01:10 +03:00
|
|
|
{
|
2016-02-26 05:57:42 +03:00
|
|
|
MOZ_ASSERT(aSheet);
|
|
|
|
MOZ_ASSERT(aSheet->IsApplicable());
|
|
|
|
MOZ_ASSERT(nsStyleSet::IsCSSSheetType(aType));
|
|
|
|
|
|
|
|
mSheets[aType].RemoveElement(aSheet);
|
|
|
|
|
|
|
|
// Maintain a mirrored list of sheets on the servo side.
|
|
|
|
Servo_RemoveStyleSheet(aSheet->RawSheet(), mRawSet.get());
|
|
|
|
|
|
|
|
return NS_OK;
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
ServoStyleSet::ReplaceSheets(SheetType aType,
|
2016-02-24 10:01:12 +03:00
|
|
|
const nsTArray<RefPtr<ServoStyleSheet>>& aNewSheets)
|
2016-02-24 10:01:10 +03:00
|
|
|
{
|
|
|
|
MOZ_CRASH("stylo: not implemented");
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
ServoStyleSet::InsertStyleSheetBefore(SheetType aType,
|
2016-02-24 10:01:12 +03:00
|
|
|
ServoStyleSheet* aNewSheet,
|
|
|
|
ServoStyleSheet* aReferenceSheet)
|
2016-02-24 10:01:10 +03:00
|
|
|
{
|
2016-04-29 07:01:44 +03:00
|
|
|
MOZ_ASSERT(aNewSheet);
|
|
|
|
MOZ_ASSERT(aReferenceSheet);
|
|
|
|
MOZ_ASSERT(aNewSheet->IsApplicable());
|
|
|
|
|
|
|
|
mSheets[aType].RemoveElement(aNewSheet);
|
|
|
|
size_t idx = mSheets[aType].IndexOf(aReferenceSheet);
|
|
|
|
if (idx == mSheets[aType].NoIndex) {
|
|
|
|
return NS_ERROR_INVALID_ARG;
|
|
|
|
}
|
|
|
|
|
|
|
|
mSheets[aType].InsertElementAt(idx, aNewSheet);
|
|
|
|
|
|
|
|
// Maintain a mirrored list of sheets on the servo side.
|
|
|
|
Servo_InsertStyleSheetBefore(aNewSheet->RawSheet(),
|
|
|
|
aReferenceSheet->RawSheet(), mRawSet.get());
|
|
|
|
|
|
|
|
return NS_OK;
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
int32_t
|
|
|
|
ServoStyleSet::SheetCount(SheetType aType) const
|
|
|
|
{
|
2016-02-26 04:51:02 +03:00
|
|
|
MOZ_ASSERT(nsStyleSet::IsCSSSheetType(aType));
|
|
|
|
return mSheets[aType].Length();
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
2016-02-24 10:01:12 +03:00
|
|
|
ServoStyleSheet*
|
2016-02-24 10:01:10 +03:00
|
|
|
ServoStyleSet::StyleSheetAt(SheetType aType,
|
|
|
|
int32_t aIndex) const
|
|
|
|
{
|
2016-02-26 04:51:02 +03:00
|
|
|
MOZ_ASSERT(nsStyleSet::IsCSSSheetType(aType));
|
|
|
|
return mSheets[aType][aIndex];
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
2016-02-24 10:01:12 +03:00
|
|
|
ServoStyleSet::RemoveDocStyleSheet(ServoStyleSheet* aSheet)
|
2016-02-24 10:01:10 +03:00
|
|
|
{
|
2016-04-29 07:01:44 +03:00
|
|
|
return RemoveStyleSheet(SheetType::Doc, aSheet);
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
2016-02-24 10:01:12 +03:00
|
|
|
ServoStyleSet::AddDocStyleSheet(ServoStyleSheet* aSheet,
|
2016-02-24 10:01:10 +03:00
|
|
|
nsIDocument* aDocument)
|
|
|
|
{
|
2016-04-29 07:01:44 +03:00
|
|
|
StyleSheetHandle::RefPtr strong(aSheet);
|
|
|
|
|
|
|
|
mSheets[SheetType::Doc].RemoveElement(aSheet);
|
|
|
|
|
|
|
|
size_t index =
|
|
|
|
aDocument->FindDocStyleSheetInsertionPoint(mSheets[SheetType::Doc], aSheet);
|
|
|
|
mSheets[SheetType::Doc].InsertElementAt(index, aSheet);
|
|
|
|
|
|
|
|
// Maintain a mirrored list of sheets on the servo side.
|
|
|
|
ServoStyleSheet* followingSheet =
|
|
|
|
mSheets[SheetType::Doc].SafeElementAt(index + 1);
|
|
|
|
if (followingSheet) {
|
|
|
|
Servo_InsertStyleSheetBefore(aSheet->RawSheet(), followingSheet->RawSheet(),
|
|
|
|
mRawSet.get());
|
|
|
|
} else {
|
|
|
|
Servo_AppendStyleSheet(aSheet->RawSheet(), mRawSet.get());
|
|
|
|
}
|
|
|
|
|
2016-02-26 05:57:42 +03:00
|
|
|
return NS_OK;
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<nsStyleContext>
|
|
|
|
ServoStyleSet::ProbePseudoElementStyle(Element* aParentElement,
|
|
|
|
CSSPseudoElementType aType,
|
|
|
|
nsStyleContext* aParentContext)
|
|
|
|
{
|
2016-04-29 03:56:37 +03:00
|
|
|
MOZ_ASSERT(aParentContext);
|
|
|
|
MOZ_ASSERT(aType < CSSPseudoElementType::Count);
|
|
|
|
nsIAtom* pseudoTag = nsCSSPseudoElements::GetPseudoAtom(aType);
|
|
|
|
|
|
|
|
RefPtr<ServoComputedValues> computedValues =
|
|
|
|
Servo_GetComputedValuesForPseudoElement(
|
|
|
|
aParentContext->StyleSource().AsServoComputedValues(),
|
|
|
|
aParentElement, pseudoTag, mRawSet.get(), /* is_probe = */ true);
|
|
|
|
|
|
|
|
if (!computedValues) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
// For :before and :after pseudo-elements, having display: none or no
|
|
|
|
// 'content' property is equivalent to not having the pseudo-element
|
|
|
|
// at all.
|
|
|
|
if (computedValues &&
|
|
|
|
(pseudoTag == nsCSSPseudoElements::before ||
|
|
|
|
pseudoTag == nsCSSPseudoElements::after)) {
|
|
|
|
const nsStyleDisplay *display = Servo_GetStyleDisplay(computedValues);
|
|
|
|
const nsStyleContent *content = Servo_GetStyleContent(computedValues);
|
|
|
|
// XXXldb What is contentCount for |content: ""|?
|
|
|
|
if (display->mDisplay == NS_STYLE_DISPLAY_NONE ||
|
|
|
|
content->ContentCount() == 0) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return GetContext(computedValues.forget(), aParentContext, pseudoTag, aType);
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<nsStyleContext>
|
|
|
|
ServoStyleSet::ProbePseudoElementStyle(Element* aParentElement,
|
|
|
|
CSSPseudoElementType aType,
|
|
|
|
nsStyleContext* aParentContext,
|
|
|
|
TreeMatchContext& aTreeMatchContext,
|
|
|
|
Element* aPseudoElement)
|
|
|
|
{
|
2016-05-05 03:59:10 +03:00
|
|
|
if (aPseudoElement) {
|
|
|
|
NS_ERROR("stylo: We don't support CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE yet");
|
|
|
|
}
|
2016-04-29 03:56:37 +03:00
|
|
|
return ProbePseudoElementStyle(aParentElement, aType, aParentContext);
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsRestyleHint
|
|
|
|
ServoStyleSet::HasStateDependentStyle(dom::Element* aElement,
|
|
|
|
EventStates aStateMask)
|
|
|
|
{
|
2016-07-14 00:37:56 +03:00
|
|
|
NS_ERROR("stylo: HasStateDependentStyle not implemented");
|
|
|
|
return nsRestyleHint(0);
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsRestyleHint
|
|
|
|
ServoStyleSet::HasStateDependentStyle(dom::Element* aElement,
|
|
|
|
CSSPseudoElementType aPseudoType,
|
|
|
|
dom::Element* aPseudoElement,
|
|
|
|
EventStates aStateMask)
|
|
|
|
{
|
2016-07-14 00:37:56 +03:00
|
|
|
NS_ERROR("stylo: HasStateDependentStyle not implemented");
|
|
|
|
return nsRestyleHint(0);
|
2016-02-24 10:01:10 +03:00
|
|
|
}
|
2016-05-25 09:55:49 +03:00
|
|
|
|
|
|
|
void
|
2016-07-13 23:42:47 +03:00
|
|
|
ServoStyleSet::RestyleSubtree(nsINode* aNode, bool aForce)
|
2016-05-25 09:55:49 +03:00
|
|
|
{
|
2016-07-13 23:42:47 +03:00
|
|
|
if (aForce) {
|
|
|
|
MOZ_ASSERT(aNode->IsContent());
|
|
|
|
ServoRestyleManager::DirtyTree(aNode->AsContent());
|
|
|
|
}
|
|
|
|
|
2016-05-25 09:55:49 +03:00
|
|
|
Servo_RestyleSubtree(aNode, mRawSet.get());
|
|
|
|
}
|