Bug 1293739 - Part 2: Rename nsCSSPropertySet to nsCSSPropertyIDSet. r=dholbert

The previous patch in this series renamed nsCSSProperty to nsCSSPropertyID.
This patch renames nsCSSPropertySet to nsCSSPropertyIDSet accordingly.

This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSPropertySet\b/nsCSSPropertyIDSet/g' -i''

Then:

  hg mv layout/style/nsCSSPropertySet.h layout/style/nsCSSPropertyIDSet.h

... and finally, manually renaming nsCSSPropertySet in the include guard in
nsCSSPropertyIDSet.h.

(NOTE: Re-landing this patch on a CLOSED TREE to correctly-address the merge bustage that closed the tree.)

MozReview-Commit-ID: ASUNs7FWbKP

--HG--
rename : layout/style/nsCSSPropertySet.h => layout/style/nsCSSPropertyIDSet.h
This commit is contained in:
Jonathan Chan 2016-08-16 18:46:58 -07:00
Родитель 4b87f11bd9
Коммит b35975ec17
18 изменённых файлов: 65 добавлений и 65 удалений

Просмотреть файл

@ -9,7 +9,7 @@
#include "mozilla/StyleAnimationValue.h"
#include "nsCSSPropertyID.h"
#include "nsCSSPropertySet.h"
#include "nsCSSPropertyIDSet.h"
#include "nsIStyleRule.h"
#include "nsISupportsImpl.h" // For NS_DECL_ISUPPORTS
#include "nsRuleNode.h" // For nsCachedStyleData

Просмотреть файл

@ -769,7 +769,7 @@ Animation::HasLowerCompositeOrderThan(const Animation& aOther) const
void
Animation::ComposeStyle(RefPtr<AnimValuesStyleRule>& aStyleRule,
nsCSSPropertySet& aSetProperties)
nsCSSPropertyIDSet& aSetProperties)
{
if (!mEffect) {
return;

Просмотреть файл

@ -33,7 +33,7 @@
#endif
struct JSContext;
class nsCSSPropertySet;
class nsCSSPropertyIDSet;
class nsIDocument;
class nsPresContext;
@ -313,7 +313,7 @@ public:
* properties that are changed are added to |aSetProperties|.
*/
void ComposeStyle(RefPtr<AnimValuesStyleRule>& aStyleRule,
nsCSSPropertySet& aSetProperties);
nsCSSPropertyIDSet& aSetProperties);
void NotifyEffectTimingUpdated();

Просмотреть файл

@ -18,7 +18,7 @@
#include "mozilla/RestyleManagerHandle.h"
#include "mozilla/RestyleManagerHandleInlines.h"
#include "nsComputedDOMStyle.h" // nsComputedDOMStyle::GetPresShellForContent
#include "nsCSSPropertySet.h"
#include "nsCSSPropertyIDSet.h"
#include "nsCSSProps.h"
#include "nsIPresShell.h"
#include "nsLayoutUtils.h"
@ -598,7 +598,7 @@ EffectCompositor::ComposeAnimationRule(dom::Element* aElement,
// animation with the *highest* composite order wins.
// As a result, we iterate from last animation to first and, if a
// property has already been set, we don't change it.
nsCSSPropertySet properties;
nsCSSPropertyIDSet properties;
for (KeyframeEffectReadOnly* effect : Reversed(sortedEffectList)) {
effect->GetAnimation()->ComposeStyle(animationRule, properties);
@ -613,12 +613,12 @@ EffectCompositor::ComposeAnimationRule(dom::Element* aElement,
/* static */ void
EffectCompositor::GetOverriddenProperties(nsStyleContext* aStyleContext,
EffectSet& aEffectSet,
nsCSSPropertySet&
nsCSSPropertyIDSet&
aPropertiesOverridden)
{
AutoTArray<nsCSSPropertyID, LayerAnimationInfo::kRecords> propertiesToTrack;
{
nsCSSPropertySet propertiesToTrackAsSet;
nsCSSPropertyIDSet propertiesToTrackAsSet;
for (KeyframeEffectReadOnly* effect : aEffectSet) {
for (const AnimationProperty& property : effect->Properties()) {
if (nsCSSProps::PropHasFlags(property.mProperty,
@ -670,13 +670,13 @@ EffectCompositor::UpdateCascadeResults(EffectSet& aEffectSet,
// We only do this for properties that we can animate on the compositor
// since we will apply other properties on the main thread where the usual
// cascade applies.
nsCSSPropertySet overriddenProperties;
nsCSSPropertyIDSet overriddenProperties;
if (aStyleContext) {
GetOverriddenProperties(aStyleContext, aEffectSet, overriddenProperties);
}
bool changed = false;
nsCSSPropertySet animatedProperties;
nsCSSPropertyIDSet animatedProperties;
// Iterate from highest to lowest composite order.
for (KeyframeEffectReadOnly* effect : Reversed(sortedEffectList)) {

Просмотреть файл

@ -18,7 +18,7 @@
#include "nsIStyleRuleProcessor.h"
#include "nsTArray.h"
class nsCSSPropertySet;
class nsCSSPropertyIDSet;
class nsIFrame;
class nsIStyleRule;
class nsPresContext;
@ -235,7 +235,7 @@ private:
static void
GetOverriddenProperties(nsStyleContext* aStyleContext,
EffectSet& aEffectSet,
nsCSSPropertySet& aPropertiesOverridden);
nsCSSPropertyIDSet& aPropertiesOverridden);
static void
UpdateCascadeResults(EffectSet& aEffectSet,

Просмотреть файл

@ -16,7 +16,7 @@
#include "Layers.h" // For Layer
#include "nsComputedDOMStyle.h" // nsComputedDOMStyle::GetStyleContextForElement
#include "nsContentUtils.h" // nsContentUtils::ReportToConsole
#include "nsCSSPropertySet.h"
#include "nsCSSPropertyIDSet.h"
#include "nsCSSProps.h" // For nsCSSProps::PropHasFlags
#include "nsCSSPseudoElements.h" // For CSSPseudoElementType
#include "nsDOMMutationObserver.h" // For nsAutoAnimationMutationBatch
@ -575,8 +575,8 @@ KeyframeEffectReadOnly::UpdateProperties(nsStyleContext* aStyleContext)
}
// Preserve the state of mWinsInCascade and mIsRunningOnCompositor flags.
nsCSSPropertySet winningInCascadeProperties;
nsCSSPropertySet runningOnCompositorProperties;
nsCSSPropertyIDSet winningInCascadeProperties;
nsCSSPropertyIDSet runningOnCompositorProperties;
for (const AnimationProperty& property : mProperties) {
if (property.mWinsInCascade) {
@ -611,7 +611,7 @@ KeyframeEffectReadOnly::UpdateProperties(nsStyleContext* aStyleContext)
void
KeyframeEffectReadOnly::ComposeStyle(RefPtr<AnimValuesStyleRule>& aStyleRule,
nsCSSPropertySet& aSetProperties)
nsCSSPropertyIDSet& aSetProperties)
{
ComputedTiming computedTiming = GetComputedTiming();
mProgressOnLastCompose = computedTiming.mProgress;

Просмотреть файл

@ -32,7 +32,7 @@
#include "mozilla/dom/Nullable.h"
struct JSContext;
class nsCSSPropertySet;
class nsCSSPropertyIDSet;
class nsIContent;
class nsIDocument;
class nsIFrame;
@ -310,7 +310,7 @@ public:
// contained in |aSetProperties|.
// Any updated properties are added to |aSetProperties|.
void ComposeStyle(RefPtr<AnimValuesStyleRule>& aStyleRule,
nsCSSPropertySet& aSetProperties);
nsCSSPropertyIDSet& aSetProperties);
// Returns true if at least one property is being animated on compositor.
bool IsRunningOnCompositor() const;
void SetIsRunningOnCompositor(nsCSSPropertyID aProperty, bool aIsRunning);

Просмотреть файл

@ -592,7 +592,7 @@ KeyframeUtils::GetComputedKeyframeValues(const nsTArray<Keyframe>& aKeyframes,
nsTArray<ComputedKeyframeValues> result(len);
for (const Keyframe& frame : aKeyframes) {
nsCSSPropertySet propertiesOnThisKeyframe;
nsCSSPropertyIDSet propertiesOnThisKeyframe;
ComputedKeyframeValues* computedValues = result.AppendElement();
for (const PropertyValuePair& pair :
PropertyPriorityIterator(frame.mPropertyValues)) {
@ -1331,9 +1331,9 @@ RequiresAdditiveAnimation(const nsTArray<Keyframe>& aKeyframes,
// So as long as this check catches most cases, and we don't do anything
// horrible in one of the cases we can't detect, it should be sufficient.
nsCSSPropertySet properties; // All properties encountered.
nsCSSPropertySet propertiesWithFromValue; // Those with a defined 0% value.
nsCSSPropertySet propertiesWithToValue; // Those with a defined 100% value.
nsCSSPropertyIDSet properties; // All properties encountered.
nsCSSPropertyIDSet propertiesWithFromValue; // Those with a defined 0% value.
nsCSSPropertyIDSet propertiesWithToValue; // Those with a defined 100% value.
auto addToPropertySets = [&](nsCSSPropertyID aProperty, double aOffset) {
properties.AddProperty(aProperty);
@ -1505,7 +1505,7 @@ GetCumulativeDistances(const nsTArray<ComputedKeyframeValues>& aValues,
// a) If aPacedProperty is a shorthand property, get its components.
// Otherwise, just add the longhand property into the set.
size_t pacedPropertyCount = 0;
nsCSSPropertySet pacedPropertySet;
nsCSSPropertyIDSet pacedPropertySet;
bool isShorthand = nsCSSProps::IsShorthand(aPacedProperty);
if (isShorthand) {
CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(p, aPacedProperty,

Просмотреть файл

@ -9,7 +9,7 @@
#include "ActiveLayerTracker.h"
#include "gfxPlatform.h"
#include "nsCSSPropertySet.h"
#include "nsCSSPropertyIDSet.h"
#include "nsCSSValue.h"
#include "nsCycleCollectionParticipant.h"
#include "nsStyleContext.h"

Просмотреть файл

@ -43,7 +43,7 @@ EXPORTS += [
'nsCSSParser.h',
'nsCSSPropAliasList.h',
'nsCSSPropertyID.h',
'nsCSSPropertySet.h',
'nsCSSPropertyIDSet.h',
'nsCSSPropList.h',
'nsCSSPropLogicalGroupList.h',
'nsCSSProps.h',

Просмотреть файл

@ -549,12 +549,12 @@ private:
nsTArray<PropertyValuePair> GetKeyframePropertyValues(
nsPresContext* aPresContext,
nsCSSKeyframeRule* aKeyframeRule,
nsCSSPropertySet& aAnimatedProperties);
nsCSSPropertyIDSet& aAnimatedProperties);
void FillInMissingKeyframeValues(
nsPresContext* aPresContext,
nsCSSPropertySet aAnimatedProperties,
nsCSSPropertySet aPropertiesSetAtStart,
nsCSSPropertySet aPropertiesSetAtEnd,
nsCSSPropertyIDSet aAnimatedProperties,
nsCSSPropertyIDSet aPropertiesSetAtStart,
nsCSSPropertyIDSet aPropertiesSetAtEnd,
const Maybe<ComputedTimingFunction>& aInheritedTimingFunction,
nsTArray<Keyframe>& aKeyframes);
void AppendProperty(nsPresContext* aPresContext,
@ -717,7 +717,7 @@ CSSAnimationBuilder::BuildAnimationFrames(nsPresContext* aPresContext,
// First, make up Keyframe objects for each rule
nsTArray<Keyframe> keyframes;
nsCSSPropertySet animatedProperties;
nsCSSPropertyIDSet animatedProperties;
for (auto ruleIdx = 0, ruleEnd = aRule->StyleRuleCount();
ruleIdx != ruleEnd; ++ruleIdx) {
@ -754,9 +754,9 @@ CSSAnimationBuilder::BuildAnimationFrames(nsPresContext* aPresContext,
});
// Then walk backwards through the keyframes and drop overridden properties.
nsCSSPropertySet propertiesSetAtCurrentOffset;
nsCSSPropertySet propertiesSetAtStart;
nsCSSPropertySet propertiesSetAtEnd;
nsCSSPropertyIDSet propertiesSetAtCurrentOffset;
nsCSSPropertyIDSet propertiesSetAtStart;
nsCSSPropertyIDSet propertiesSetAtEnd;
double currentOffset = -1.0;
for (size_t keyframeIdx = keyframes.Length();
keyframeIdx > 0;
@ -874,7 +874,7 @@ nsTArray<PropertyValuePair>
CSSAnimationBuilder::GetKeyframePropertyValues(
nsPresContext* aPresContext,
nsCSSKeyframeRule* aKeyframeRule,
nsCSSPropertySet& aAnimatedProperties)
nsCSSPropertyIDSet& aAnimatedProperties)
{
nsTArray<PropertyValuePair> result;
RefPtr<nsStyleContext> styleContext =
@ -949,9 +949,9 @@ FindMatchingKeyframe(
void
CSSAnimationBuilder::FillInMissingKeyframeValues(
nsPresContext* aPresContext,
nsCSSPropertySet aAnimatedProperties,
nsCSSPropertySet aPropertiesSetAtStart,
nsCSSPropertySet aPropertiesSetAtEnd,
nsCSSPropertyIDSet aAnimatedProperties,
nsCSSPropertyIDSet aPropertiesSetAtStart,
nsCSSPropertyIDSet aPropertiesSetAtEnd,
const Maybe<ComputedTimingFunction>& aInheritedTimingFunction,
nsTArray<Keyframe>& aKeyframes)
{

Просмотреть файл

@ -523,14 +523,14 @@ nsCSSExpandedDataBlock::ComputeNumProps(uint32_t* aNumPropsNormal,
uint32_t* aNumPropsImportant)
{
*aNumPropsNormal = *aNumPropsImportant = 0;
for (size_t iHigh = 0; iHigh < nsCSSPropertySet::kChunkCount; ++iHigh) {
for (size_t iHigh = 0; iHigh < nsCSSPropertyIDSet::kChunkCount; ++iHigh) {
if (!mPropertiesSet.HasPropertyInChunk(iHigh))
continue;
for (size_t iLow = 0; iLow < nsCSSPropertySet::kBitsInChunk; ++iLow) {
for (size_t iLow = 0; iLow < nsCSSPropertyIDSet::kBitsInChunk; ++iLow) {
if (!mPropertiesSet.HasPropertyAt(iHigh, iLow))
continue;
#ifdef DEBUG
nsCSSPropertyID iProp = nsCSSPropertySet::CSSPropertyAt(iHigh, iLow);
nsCSSPropertyID iProp = nsCSSPropertyIDSet::CSSPropertyAt(iHigh, iLow);
#endif
MOZ_ASSERT(!nsCSSProps::IsShorthand(iProp), "out of range");
MOZ_ASSERT(PropertyAt(iProp)->GetUnit() != eCSSUnit_Null,
@ -605,11 +605,11 @@ nsCSSExpandedDataBlock::Compress(nsCSSCompressedDataBlock **aNormalBlock,
// assert that we didn't have any other properties on this expanded data
// block that we didn't find in aOrder
uint32_t numPropsInSet = 0;
for (size_t iHigh = 0; iHigh < nsCSSPropertySet::kChunkCount; iHigh++) {
for (size_t iHigh = 0; iHigh < nsCSSPropertyIDSet::kChunkCount; iHigh++) {
if (!mPropertiesSet.HasPropertyInChunk(iHigh)) {
continue;
}
for (size_t iLow = 0; iLow < nsCSSPropertySet::kBitsInChunk; iLow++) {
for (size_t iLow = 0; iLow < nsCSSPropertyIDSet::kBitsInChunk; iLow++) {
if (mPropertiesSet.HasPropertyAt(iHigh, iLow)) {
numPropsInSet++;
}
@ -640,13 +640,13 @@ nsCSSExpandedDataBlock::AddLonghandProperty(nsCSSPropertyID aProperty,
void
nsCSSExpandedDataBlock::Clear()
{
for (size_t iHigh = 0; iHigh < nsCSSPropertySet::kChunkCount; ++iHigh) {
for (size_t iHigh = 0; iHigh < nsCSSPropertyIDSet::kChunkCount; ++iHigh) {
if (!mPropertiesSet.HasPropertyInChunk(iHigh))
continue;
for (size_t iLow = 0; iLow < nsCSSPropertySet::kBitsInChunk; ++iLow) {
for (size_t iLow = 0; iLow < nsCSSPropertyIDSet::kBitsInChunk; ++iLow) {
if (!mPropertiesSet.HasPropertyAt(iHigh, iLow))
continue;
nsCSSPropertyID iProp = nsCSSPropertySet::CSSPropertyAt(iHigh, iLow);
nsCSSPropertyID iProp = nsCSSPropertyIDSet::CSSPropertyAt(iHigh, iLow);
ClearLonghandProperty(iProp);
}
}

Просмотреть файл

@ -14,7 +14,7 @@
#include "mozilla/MemoryReporting.h"
#include "nsCSSProps.h"
#include "nsCSSPropertySet.h"
#include "nsCSSPropertyIDSet.h"
#include "nsCSSValue.h"
#include "nsStyleStruct.h"
#include "imgRequestProxy.h"
@ -316,11 +316,11 @@ private:
* properties (the norm) and to allow quickly checking whether a
* property is set in this block.
*/
nsCSSPropertySet mPropertiesSet;
nsCSSPropertyIDSet mPropertiesSet;
/*
* mPropertiesImportant indicates which properties are '!important'.
*/
nsCSSPropertySet mPropertiesImportant;
nsCSSPropertyIDSet mPropertiesImportant;
/*
* Return the storage location within |this| of the value of the

Просмотреть файл

@ -4,8 +4,8 @@
/* bit vectors for sets of CSS properties */
#ifndef nsCSSPropertySet_h__
#define nsCSSPropertySet_h__
#ifndef nsCSSPropertyIDSet_h__
#define nsCSSPropertyIDSet_h__
#include "mozilla/ArrayUtils.h"
#include "mozilla/PodOperations.h"
@ -14,13 +14,13 @@
#include <limits.h> // for CHAR_BIT
/**
* nsCSSPropertySet maintains a set of non-shorthand CSS properties. In
* nsCSSPropertyIDSet maintains a set of non-shorthand CSS properties. In
* other words, for each longhand CSS property we support, it has a bit
* for whether that property is in the set.
*/
class nsCSSPropertySet {
class nsCSSPropertyIDSet {
public:
nsCSSPropertySet() { Empty(); }
nsCSSPropertyIDSet() { Empty(); }
// auto-generated copy-constructor OK
void AssertInSetRange(nsCSSPropertyID aProperty) const {
@ -63,7 +63,7 @@ public:
}
}
bool Equals(const nsCSSPropertySet& aOther) const {
bool Equals(const nsCSSPropertyIDSet& aOther) const {
return mozilla::PodEqual(mProperties, aOther.mProperties);
}
@ -95,4 +95,4 @@ private:
property_set_type mProperties[kChunkCount];
};
#endif /* !defined(nsCSSPropertySet_h__) */
#endif /* !defined(nsCSSPropertyIDSet_h__) */

Просмотреть файл

@ -53,7 +53,7 @@
#include "CSSVariableResolver.h"
#include "nsCSSParser.h"
#include "CounterStyleManager.h"
#include "nsCSSPropertySet.h"
#include "nsCSSPropertyIDSet.h"
#include "mozilla/RuleNodeCacheConditions.h"
#include "nsDeviceContext.h"
#include "nsQueryObject.h"
@ -10618,7 +10618,7 @@ nsRuleNode::HasAuthorSpecifiedRules(nsStyleContext* aStyleContext,
nsRuleNode::ComputePropertiesOverridingAnimation(
const nsTArray<nsCSSPropertyID>& aProperties,
nsStyleContext* aStyleContext,
nsCSSPropertySet& aPropertiesOverridden)
nsCSSPropertyIDSet& aPropertiesOverridden)
{
/*
* Set up an nsRuleData with all the structs needed for all of the

Просмотреть файл

@ -20,7 +20,7 @@
#include "nsPresContext.h"
#include "nsStyleStruct.h"
class nsCSSPropertySet;
class nsCSSPropertyIDSet;
class nsCSSValue;
class nsIStyleRule;
class nsStyleContext;
@ -965,7 +965,7 @@ public:
ComputePropertiesOverridingAnimation(
const nsTArray<nsCSSPropertyID>& aProperties,
nsStyleContext* aStyleContext,
nsCSSPropertySet& aPropertiesOverridden);
nsCSSPropertyIDSet& aPropertiesOverridden);
// Expose this so media queries can use it
static nscoord CalcLengthWithInitialFont(nsPresContext* aPresContext,

Просмотреть файл

@ -17,7 +17,7 @@
#include "nsRefreshDriver.h"
#include "nsRuleProcessorData.h"
#include "nsRuleWalker.h"
#include "nsCSSPropertySet.h"
#include "nsCSSPropertyIDSet.h"
#include "mozilla/EffectCompositor.h"
#include "mozilla/EffectSet.h"
#include "mozilla/EventDispatcher.h"
@ -468,7 +468,7 @@ nsTransitionManager::UpdateTransitions(
// 'transition-property' on down, and later ones will override earlier
// ones (tracked using |whichStarted|).
bool startedAny = false;
nsCSSPropertySet whichStarted;
nsCSSPropertyIDSet whichStarted;
for (uint32_t i = aDisp->mTransitionPropertyCount; i-- != 0; ) {
const StyleTransition& t = aDisp->mTransitions[i];
// Check the combined duration (combination of delay and duration)
@ -520,7 +520,7 @@ nsTransitionManager::UpdateTransitions(
if (aElementTransitions) {
bool checkProperties =
aDisp->mTransitions[0].GetProperty() != eCSSPropertyExtra_all_properties;
nsCSSPropertySet allTransitionProperties;
nsCSSPropertyIDSet allTransitionProperties;
if (checkProperties) {
for (uint32_t i = aDisp->mTransitionPropertyCount; i-- != 0; ) {
const StyleTransition& t = aDisp->mTransitions[i];
@ -598,7 +598,7 @@ nsTransitionManager::ConsiderStartingTransition(
nsStyleContext* aOldStyleContext,
nsStyleContext* aNewStyleContext,
bool* aStartedAny,
nsCSSPropertySet* aWhichStarted)
nsCSSPropertyIDSet* aWhichStarted)
{
// IsShorthand itself will assert if aProperty is not a property.
MOZ_ASSERT(!nsCSSProps::IsShorthand(aProperty),

Просмотреть файл

@ -19,7 +19,7 @@
class nsIGlobalObject;
class nsStyleContext;
class nsPresContext;
class nsCSSPropertySet;
class nsCSSPropertyIDSet;
namespace mozilla {
enum class CSSPseudoElementType : uint8_t;
@ -406,7 +406,7 @@ protected:
nsStyleContext* aOldStyleContext,
nsStyleContext* aNewStyleContext,
bool* aStartedAny,
nsCSSPropertySet* aWhichStarted);
nsCSSPropertyIDSet* aWhichStarted);
nsTArray<mozilla::Keyframe> GetTransitionKeyframes(
nsStyleContext* aStyleContext,