diff options
Diffstat (limited to 'Source/WebCore/rendering/style/StyleRareNonInheritedData.h')
-rw-r--r-- | Source/WebCore/rendering/style/StyleRareNonInheritedData.h | 204 |
1 files changed, 113 insertions, 91 deletions
diff --git a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h b/Source/WebCore/rendering/style/StyleRareNonInheritedData.h index 4523f3be4..b58abae3e 100644 --- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h +++ b/Source/WebCore/rendering/style/StyleRareNonInheritedData.h @@ -2,7 +2,7 @@ * Copyright (C) 2000 Lars Knoll (knoll@kde.org) * (C) 2000 Antti Koivisto (koivisto@kde.org) * (C) 2000 Dirk Mueller (mueller@kde.org) - * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2003-2017 Apple Inc. All rights reserved. * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) * * This library is free software; you can redistribute it and/or @@ -22,30 +22,32 @@ * */ -#ifndef StyleRareNonInheritedData_h -#define StyleRareNonInheritedData_h +#pragma once #include "BasicShapes.h" +#include "CSSPropertyNames.h" #include "ClipPathOperation.h" #include "CounterDirectives.h" #include "CursorData.h" #include "DataRef.h" #include "FillLayer.h" +#include "LengthPoint.h" #include "LineClampValue.h" #include "NinePieceImage.h" #include "ShapeValue.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassRefPtr.h> +#include "StyleContentAlignmentData.h" +#include "StyleSelfAlignmentData.h" +#include "WillChangeData.h" +#include <memory> #include <wtf/Vector.h> namespace WebCore { class AnimationList; +class ContentData; class ShadowData; class StyleDeprecatedFlexibleBoxData; -#if ENABLE(CSS_FILTERS) class StyleFilterData; -#endif class StyleFlexibleBoxData; class StyleGridData; class StyleGridItemData; @@ -53,18 +55,16 @@ class StyleMarqueeData; class StyleMultiColData; class StyleReflection; class StyleResolver; +class StyleScrollSnapArea; +class StyleScrollSnapPort; class StyleTransformData; -class ContentData; struct LengthSize; - -#if ENABLE(DASHBOARD_SUPPORT) struct StyleDashboardRegion; -#endif // Page size type. -// StyleRareNonInheritedData::m_pageSize is meaningful only when -// StyleRareNonInheritedData::m_pageSizeType is PAGE_SIZE_RESOLVED. +// StyleRareNonInheritedData::pageSize is meaningful only when +// StyleRareNonInheritedData::pageSizeType is PAGE_SIZE_RESOLVED. enum PageSizeType { PAGE_SIZE_AUTO, // size: auto PAGE_SIZE_AUTO_LANDSCAPE, // size: landscape @@ -77,126 +77,150 @@ enum PageSizeType { // actually uses one of these properties. class StyleRareNonInheritedData : public RefCounted<StyleRareNonInheritedData> { public: - static PassRef<StyleRareNonInheritedData> create() { return adoptRef(*new StyleRareNonInheritedData); } - PassRef<StyleRareNonInheritedData> copy() const; + static Ref<StyleRareNonInheritedData> create() { return adoptRef(*new StyleRareNonInheritedData); } + Ref<StyleRareNonInheritedData> copy() const; ~StyleRareNonInheritedData(); bool operator==(const StyleRareNonInheritedData&) const; - bool operator!=(const StyleRareNonInheritedData& o) const { return !(*this == o); } + bool operator!=(const StyleRareNonInheritedData& other) const { return !(*this == other); } bool contentDataEquivalent(const StyleRareNonInheritedData&) const; - bool counterDataEquivalent(const StyleRareNonInheritedData&) const; - bool shadowDataEquivalent(const StyleRareNonInheritedData&) const; - bool reflectionDataEquivalent(const StyleRareNonInheritedData&) const; - bool animationDataEquivalent(const StyleRareNonInheritedData&) const; - bool transitionDataEquivalent(const StyleRareNonInheritedData&) const; + bool hasFilters() const; + +#if ENABLE(FILTERS_LEVEL_2) + bool hasBackdropFilters() const; +#endif + bool hasOpacity() const { return opacity < 1; } + bool hasAnimationsOrTransitions() const { return animations || transitions; } + float opacity; - float m_aspectRatioDenominator; - float m_aspectRatioNumerator; + float aspectRatioDenominator; + float aspectRatioNumerator; - float m_perspective; - Length m_perspectiveOriginX; - Length m_perspectiveOriginY; + float perspective; + Length perspectiveOriginX; + Length perspectiveOriginY; LineClampValue lineClamp; // An Apple extension. + + IntSize initialLetter; + #if ENABLE(DASHBOARD_SUPPORT) - Vector<StyleDashboardRegion> m_dashboardRegions; + Vector<StyleDashboardRegion> dashboardRegions; +#endif + + DataRef<StyleDeprecatedFlexibleBoxData> deprecatedFlexibleBox; // Flexible box properties + DataRef<StyleFlexibleBoxData> flexibleBox; + DataRef<StyleMarqueeData> marquee; // Marquee properties + DataRef<StyleMultiColData> multiCol; // CSS3 multicol properties + DataRef<StyleTransformData> transform; // Transform properties (rotate, scale, skew, etc.) + DataRef<StyleFilterData> filter; // Filter operations (url, sepia, blur, etc.) + +#if ENABLE(FILTERS_LEVEL_2) + DataRef<StyleFilterData> backdropFilter; // Filter operations (url, sepia, blur, etc.) #endif - DataRef<StyleDeprecatedFlexibleBoxData> m_deprecatedFlexibleBox; // Flexible box properties - DataRef<StyleFlexibleBoxData> m_flexibleBox; - DataRef<StyleMarqueeData> m_marquee; // Marquee properties - DataRef<StyleMultiColData> m_multiCol; // CSS3 multicol properties - DataRef<StyleTransformData> m_transform; // Transform properties (rotate, scale, skew, etc.) + DataRef<StyleGridData> grid; + DataRef<StyleGridItemData> gridItem; -#if ENABLE(CSS_FILTERS) - DataRef<StyleFilterData> m_filter; // Filter operations (url, sepia, blur, etc.) +#if ENABLE(CSS_SCROLL_SNAP) + DataRef<StyleScrollSnapPort> scrollSnapPort; + DataRef<StyleScrollSnapArea> scrollSnapArea; #endif - DataRef<StyleGridData> m_grid; - DataRef<StyleGridItemData> m_gridItem; + std::unique_ptr<ContentData> content; + std::unique_ptr<CounterDirectiveMap> counterDirectives; + String altText; - std::unique_ptr<ContentData> m_content; - OwnPtr<CounterDirectiveMap> m_counterDirectives; - String m_altText; + std::unique_ptr<ShadowData> boxShadow; // For box-shadow decorations. - OwnPtr<ShadowData> m_boxShadow; // For box-shadow decorations. + RefPtr<WillChangeData> willChange; // Null indicates 'auto'. - RefPtr<StyleReflection> m_boxReflect; + RefPtr<StyleReflection> boxReflect; - OwnPtr<AnimationList> m_animations; - OwnPtr<AnimationList> m_transitions; + std::unique_ptr<AnimationList> animations; + std::unique_ptr<AnimationList> transitions; - FillLayer m_mask; - NinePieceImage m_maskBoxImage; + FillLayer mask; + NinePieceImage maskBoxImage; - LengthSize m_pageSize; + LengthSize pageSize; + LengthPoint objectPosition; -#if ENABLE(CSS_SHAPES) - RefPtr<ShapeValue> m_shapeInside; - RefPtr<ShapeValue> m_shapeOutside; - Length m_shapeMargin; - Length m_shapePadding; - float m_shapeImageThreshold; -#endif + RefPtr<ShapeValue> shapeOutside; + Length shapeMargin; + float shapeImageThreshold; - RefPtr<ClipPathOperation> m_clipPath; + RefPtr<ClipPathOperation> clipPath; - Color m_textDecorationColor; - Color m_visitedLinkTextDecorationColor; - Color m_visitedLinkBackgroundColor; - Color m_visitedLinkOutlineColor; - Color m_visitedLinkBorderLeftColor; - Color m_visitedLinkBorderRightColor; - Color m_visitedLinkBorderTopColor; - Color m_visitedLinkBorderBottomColor; + Color textDecorationColor; + Color visitedLinkTextDecorationColor; + Color visitedLinkBackgroundColor; + Color visitedLinkOutlineColor; + Color visitedLinkBorderLeftColor; + Color visitedLinkBorderRightColor; + Color visitedLinkBorderTopColor; + Color visitedLinkBorderBottomColor; - int m_order; + int order; - AtomicString m_flowThread; - AtomicString m_regionThread; - unsigned m_regionFragment : 1; // RegionFragment + AtomicString flowThread; + AtomicString regionThread; - unsigned m_regionBreakAfter : 2; // EPageBreak - unsigned m_regionBreakBefore : 2; // EPageBreak - unsigned m_regionBreakInside : 2; // EPageBreak + StyleContentAlignmentData alignContent; + StyleSelfAlignmentData alignItems; + StyleSelfAlignmentData alignSelf; + StyleContentAlignmentData justifyContent; + StyleSelfAlignmentData justifyItems; + StyleSelfAlignmentData justifySelf; - unsigned m_pageSizeType : 2; // PageSizeType - unsigned m_transformStyle3D : 1; // ETransformStyle3D - unsigned m_backfaceVisibility : 1; // EBackfaceVisibility +#if ENABLE(TOUCH_EVENTS) + unsigned touchAction : 1; // TouchAction +#endif + + unsigned regionFragment : 1; // RegionFragment + + unsigned pageSizeType : 2; // PageSizeType + unsigned transformStyle3D : 1; // ETransformStyle3D + unsigned backfaceVisibility : 1; // EBackfaceVisibility - unsigned m_alignContent : 3; // EAlignContent - unsigned m_alignItems : 3; // EAlignItems - unsigned m_alignSelf : 3; // EAlignItems - unsigned m_justifyContent : 3; // EJustifyContent unsigned userDrag : 2; // EUserDrag unsigned textOverflow : 1; // Whether or not lines that spill out should be truncated with "..." unsigned marginBeforeCollapse : 2; // EMarginCollapse unsigned marginAfterCollapse : 2; // EMarginCollapse - unsigned m_appearance : 6; // EAppearance - unsigned m_borderFit : 1; // EBorderFit - unsigned m_textCombine : 1; // CSS3 text-combine properties - - unsigned m_textDecorationStyle : 3; // TextDecorationStyle - unsigned m_wrapFlow: 3; // WrapFlow - unsigned m_wrapThrough: 1; // WrapThrough + unsigned appearance : 6; // EAppearance + unsigned borderFit : 1; // EBorderFit + unsigned textCombine : 1; // CSS3 text-combine properties -#if USE(ACCELERATED_COMPOSITING) - unsigned m_runningAcceleratedAnimation : 1; -#endif + unsigned textDecorationStyle : 3; // TextDecorationStyle - unsigned m_hasAspectRatio : 1; // Whether or not an aspect ratio has been specified. + unsigned aspectRatioType : 2; #if ENABLE(CSS_COMPOSITING) - unsigned m_effectiveBlendMode: 5; // EBlendMode + unsigned effectiveBlendMode: 5; // EBlendMode + unsigned isolation : 1; // Isolation +#endif + +#if ENABLE(APPLE_PAY) + unsigned applePayButtonStyle : 2; + unsigned applePayButtonType : 3; #endif - unsigned m_objectFit : 3; // ObjectFit + unsigned objectFit : 3; // ObjectFit + + unsigned breakBefore : 4; // BreakBetween + unsigned breakAfter : 4; + unsigned breakInside : 3; // BreakInside + unsigned resize : 2; // EResize + + unsigned hasAttrContent : 1; + + unsigned isPlaceholderStyle : 1; private: StyleRareNonInheritedData(); @@ -204,5 +228,3 @@ private: }; } // namespace WebCore - -#endif // StyleRareNonInheritedData_h |