/* -*- 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/. */
if (auto* element = dom::Element::FromNode(*aContent)) { if (constauto* style = Servo_Element_GetMaybeOutOfDateStyle(element)) { if (!style->SelfOrAncestorHasContainStyle()) { return GetRootScope();
}
}
}
for (; aContent; aContent = aContent->GetFlattenedTreeParent()) { if (auto* scope = mScopes.Get(aContent)) { return *scope;
}
}
void ContainStyleScopeManager::DestroyScope(ContainStyleScope* aScope) { // Deleting a scope modifies the array of children in its parent, so we don't // use an iterator here. while (!aScope->GetChildren().IsEmpty()) {
DestroyScope(aScope->GetChildren().ElementAt(0));
}
mScopes.Remove(aScope->GetContent());
}
bool ContainStyleScopeManager::DestroyCounterNodesFor(nsIFrame* aFrame) { bool result = false; for (auto* scope = &GetScopeForContent(aFrame->GetContent()); scope;
scope = scope->GetParent()) {
result |= scope->GetCounterManager().DestroyNodesFor(aFrame);
} return result;
}
#ifdef ACCESSIBILITY staticbool GetFirstCounterValueForScopeAndFrame(ContainStyleScope* aScope,
nsIFrame* aFrame,
CounterValue& aOrdinal) { if (aScope->GetCounterManager().GetFirstCounterValueForFrame(aFrame,
aOrdinal)) { returntrue;
} for (auto* child : aScope->GetChildren()) { if (GetFirstCounterValueForScopeAndFrame(child, aFrame, aOrdinal)) { returntrue;
}
}
returnfalse;
}
void ContainStyleScopeManager::GetSpokenCounterText(nsIFrame* aFrame,
nsAString& aText) { using Tag = StyleCounterStyle::Tag; constauto& listStyleType = aFrame->StyleList()->mListStyleType; switch (listStyleType.tag) { case Tag::None: return; case Tag::String:
listStyleType.AsString().AsAtom()->ToString(aText); return; case Tag::Symbols: case Tag::Name: break;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.