Bug 1355348 - Move ServoComputedValuesWithParent to separate file; r=hiro

We will use this type later in this patch series in nsSMILCSSProperty so this
patch moves it to a separate file so it can be re-used.

MozReview-Commit-ID: 4Z7YbsQ9xz4

--HG--
extra : rebase_source : 0f6f7248d1a4dfc77360829f3a0e6ed263f156db
This commit is contained in:
Brian Birtles 2017-04-26 13:00:11 +09:00
parent a7d2fa0411
commit f37fe9b84d
10 changed files with 36 additions and 8 deletions

View File

@ -19,6 +19,7 @@
#include "mozilla/LookAndFeel.h" // For LookAndFeel::GetInt
#include "mozilla/KeyframeUtils.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoComputedValuesWithParent.h"
#include "mozilla/Telemetry.h"
#include "mozilla/TypeTraits.h"
#include "Layers.h" // For Layer

View File

@ -43,6 +43,7 @@ class AnimValuesStyleRule;
enum class CSSPseudoElementType : uint8_t;
class ErrorResult;
struct AnimationRule;
struct ServoComputedValuesWithParent;
struct TimingParams;
namespace dom {
@ -104,13 +105,6 @@ struct AnimationProperty
}
};
struct ServoComputedValuesWithParent
{
const ServoComputedValues* mCurrentStyle;
const ServoComputedValues* mParentStyle;
explicit operator bool() const { return true; }
};
struct ElementPropertyTransition;
namespace dom {

View File

@ -11,6 +11,7 @@
#include "mozilla/RangedArray.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoBindingTypes.h"
#include "mozilla/ServoComputedValuesWithParent.h"
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/TimingParams.h"
#include "mozilla/dom/BaseKeyframeTypesBinding.h" // For FastBaseKeyframe etc.

View File

@ -0,0 +1,27 @@
/* -*- 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/. */
#ifndef mozilla_ServoComputedValuesWithParent_h
#define mozilla_ServoComputedValuesWithParent_h
#include "mozilla/ServoBindingTypes.h"
namespace mozilla {
/**
* A tuple of a set of computed values along with the computed values for the
* corresponding element's parent.
*/
struct ServoComputedValuesWithParent
{
const ServoComputedValues* mCurrentStyle;
const ServoComputedValues* mParentStyle;
explicit operator bool() const { return true; }
};
} // namespace mozilla
#endif // mozilla_ServoComputedValuesWithParent_h

View File

@ -38,6 +38,7 @@ EXPORTS.mozilla += [
'KeyframeUtils.h',
'PendingAnimationTracker.h',
'PseudoElementHashEntry.h',
'ServoComputedValuesWithParent.h',
'TimingParams.h',
]

View File

@ -51,6 +51,7 @@
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/SystemGroup.h"
#include "mozilla/ServoMediaList.h"
#include "mozilla/ServoComputedValuesWithParent.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ElementInlines.h"
#include "mozilla/dom/HTMLTableCellElement.h"

View File

@ -13,7 +13,7 @@
#include "mozilla/dom/ChildIterator.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ElementInlines.h"
#include "mozilla/dom/KeyframeEffectReadOnly.h"
#include "mozilla/ServoComputedValuesWithParent.h"
#include "nsCSSAnonBoxes.h"
#include "nsCSSPseudoElements.h"
#include "nsCSSRuleProcessor.h"

View File

@ -11,6 +11,7 @@
#include "mozilla/EffectCompositor.h"
#include "mozilla/EffectSet.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/ServoComputedValuesWithParent.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/dom/DocumentTimeline.h"

View File

@ -22,6 +22,7 @@
#include "mozilla/EffectCompositor.h"
#include "mozilla/EffectSet.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/ServoComputedValuesWithParent.h"
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/dom/DocumentTimeline.h"
#include "mozilla/dom/Element.h"

View File

@ -25,6 +25,7 @@ class nsCSSPropertyIDSet;
namespace mozilla {
enum class CSSPseudoElementType : uint8_t;
struct Keyframe;
struct ServoComputedValuesWithParent;
struct StyleTransition;
} // namespace mozilla