Chromium Code Reviews| Index: Source/core/dom/StyleChangeReason.h |
| diff --git a/Source/core/dom/StyleChangeReason.h b/Source/core/dom/StyleChangeReason.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..83f8ea53b311adcf4e2de165a431f3b758cf109c |
| --- /dev/null |
| +++ b/Source/core/dom/StyleChangeReason.h |
| @@ -0,0 +1,84 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef StyleChangeReason_h |
| +#define StyleChangeReason_h |
| + |
| +#include "wtf/Assertions.h" |
| + |
| +namespace blink { |
| + |
| +enum StyleChangeReason { |
|
pdr.
2014/09/06 22:36:28
Please add a comment here about what this is for,
kouhei (in TOK)
2014/09/06 23:10:34
Ack. I think we should rename the type too so that
kouhei (in TOK)
2014/09/08 23:29:12
Done.
|
| + StyleRecalcDueToActivePseudoClass, |
|
pdr.
2014/09/06 22:36:28
Ultimately we will need to send this data via a tr
kouhei (in TOK)
2014/09/06 23:10:34
Integers route seems better to me, as it would lik
kouhei (in TOK)
2014/09/08 23:29:12
Done.
|
| + StyleRecalcDueToActiveStylesheetsUpdate, |
| + StyleRecalcDueToAnimation, |
| + StyleRecalcDueToAttribute, |
| + StyleRecalcDueToAuthorStyles, |
| + StyleRecalcDueToCellBorderPaddingChange, |
| + StyleRecalcDueToChildren, |
| + StyleRecalcDueToControl, |
| + StyleRecalcDueToControlValue, |
| + StyleRecalcDueToCustomElement, |
| + StyleRecalcDueToDesignMode, |
| + StyleRecalcDueToDetach, |
| + StyleRecalcDueToDirectionality, |
| + StyleRecalcDueToDisabledPseudoClass, |
| + StyleRecalcDueToDrag, |
| + StyleRecalcDueToEmptyPseudoClass, |
| + StyleRecalcDueToExitingCompositingMode, |
| + StyleRecalcDueToFocusPseudoClass, |
| + StyleRecalcDueToFontSizeChange, |
| + StyleRecalcDueToFonts, |
| + StyleRecalcDueToFrameSet, |
| + StyleRecalcDueToFullScreen, |
| + StyleRecalcDueToHoverPseudoClass, |
| + StyleRecalcDueToImageAltText, |
| + StyleRecalcDueToInline, |
| + StyleRecalcDueToInsertionPoint, |
| + StyleRecalcDueToInspector, |
| + StyleRecalcDueToInvalidPseudoClass, |
| + StyleRecalcDueToLanguage, |
| + StyleRecalcDueToLayerUpdate, |
| + StyleRecalcDueToLinkColorChange, |
| + StyleRecalcDueToPlatformColorChange, |
| + StyleRecalcDueToPlugin, |
| + StyleRecalcDueToRequiredOptionalPseudoClass, |
| + StyleRecalcDueToResolver, |
| + StyleRecalcDueToSVGContainerSizeChange, |
| + StyleRecalcDueToSVGCursor, |
| + StyleRecalcDueToSVGFilterLayerUpdateHack, |
| + StyleRecalcDueToSVGUseElement, |
| + StyleRecalcDueToSeamlessIFrame, |
| + StyleRecalcDueToSelector, |
| + StyleRecalcDueToShadow, |
| + StyleRecalcDueToSiblingSelector, |
| + StyleRecalcDueToStyleInheritanceChange, |
| + StyleRecalcDueToStyleSheetChange, |
| + StyleRecalcDueToTreeScope, |
| + StyleRecalcDueToValidity, |
| + StyleRecalcDueToViewportUnits, |
| + StyleRecalcDueToVisitedLink, |
| + StyleRecalcDueToVisuallyOrdered, |
| + StyleRecalcDueToWritingModeChange, |
| + StyleRecalcDueToZoom, |
|
rune
2014/09/08 08:27:57
These constants are very tied up to implementation
kouhei (in TOK)
2014/09/08 23:29:12
These are internal reasons, but we still want to h
|
| +}; |
| + |
| +#define DISALLOW_COMPARISON_OPERATOR(TYPE, OP) \ |
| + inline bool OP(TYPE, TYPE) \ |
| + { \ |
| + ASSERT_NOT_REACHED(); \ |
| + return true; \ |
| + } |
| +#define DISALLOW_ALL_COMPARISON_OPERATORS(TYPE) \ |
|
pdr.
2014/09/06 22:36:27
Clever!
|
| + DISALLOW_COMPARISON_OPERATOR(TYPE, operator>) \ |
| + DISALLOW_COMPARISON_OPERATOR(TYPE, operator<) \ |
| + DISALLOW_COMPARISON_OPERATOR(TYPE, operator<=) \ |
| + DISALLOW_COMPARISON_OPERATOR(TYPE, operator>=) \ |
| + DISALLOW_COMPARISON_OPERATOR(TYPE, operator==) \ |
| + DISALLOW_COMPARISON_OPERATOR(TYPE, operator!=) |
| +DISALLOW_ALL_COMPARISON_OPERATORS(StyleChangeReason) |
|
pdr.
2014/09/06 22:36:27
We may end up needing to make these operators priv
|
| + |
| +} // namespace blink |
| + |
| +#endif // StyleChangeReason_h |