/* -*- 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/. */
Flex::Flex(Element* aParent, nsFlexContainerFrame* aFrame) : mParent(aParent) {
MOZ_ASSERT(aFrame, "Should never be instantiated with a null nsFlexContainerFrame");
// Eagerly create property values from aFrame, because we're not // going to keep it around. const ComputedFlexContainerInfo* containerInfo =
aFrame->GetFlexContainerInfo(); if (!containerInfo) { // It's weird but possible to fail to get a ComputedFlexContainerInfo // structure. Assign sensible default values.
mMainAxisDirection = FlexPhysicalDirection::Horizontal_lr;
mCrossAxisDirection = FlexPhysicalDirection::Vertical_tb; return;
}
mLines.SetLength(containerInfo->mLines.Length());
uint32_t index = 0; for (auto&& l : containerInfo->mLines) {
FlexLineValues* line = new FlexLineValues(this, &l);
mLines.ElementAt(index) = line;
index++;
}
¤ 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.0.17Bemerkung:
(vorverarbeitet)
¤
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.