2017-06-11 05:27:45 +00:00
|
|
|
/* -*- 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/. */
|
|
|
|
|
|
|
|
#include "mozilla/ServoStyleContext.h"
|
|
|
|
|
|
|
|
#include "nsStyleConsts.h"
|
|
|
|
#include "nsStyleStruct.h"
|
|
|
|
#include "nsPresContext.h"
|
|
|
|
|
|
|
|
#include "mozilla/ServoBindings.h"
|
|
|
|
|
|
|
|
using namespace mozilla;
|
|
|
|
|
|
|
|
ServoStyleContext::ServoStyleContext(nsStyleContext* aParent,
|
|
|
|
nsPresContext* aPresContext,
|
|
|
|
nsIAtom* aPseudoTag,
|
|
|
|
CSSPseudoElementType aPseudoType,
|
2017-07-17 18:42:08 +00:00
|
|
|
ServoComputedValuesForgotten aComputedValues)
|
2017-06-11 05:27:45 +00:00
|
|
|
: nsStyleContext(aParent, aPseudoTag, aPseudoType),
|
2017-07-17 18:42:08 +00:00
|
|
|
mSource(aComputedValues)
|
2017-06-11 05:27:45 +00:00
|
|
|
{
|
|
|
|
mPresContext = aPresContext;
|
2017-07-17 18:42:08 +00:00
|
|
|
AddStyleBit(Servo_ComputedValues_GetStyleBits(&mSource));
|
2017-06-11 05:27:45 +00:00
|
|
|
|
|
|
|
FinishConstruction();
|
|
|
|
|
|
|
|
// No need to call ApplyStyleFixups here, since fixups are handled by Servo when
|
|
|
|
// producing the ServoComputedValues.
|
|
|
|
}
|