source: webkit/trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h

Last change on this file was 293563, checked in by Chris Dumez, 3 years ago

Prepare more of the code base for making the AtomString(const String&) constructor explicit
https://bugs.webkit.org/show_bug.cgi?id=239711

Reviewed by Darin Adler.

Prepare more of the code base for making the AtomString(const String&) constructor explicit.
This helps us find cases where we atomize unnecessarily or not early enough, thus causing
unnecessary String allocations.

  • Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didReceiveResponse):

  • Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::processResponse):

  • Source/WebKit/WebProcess/WebPage/WebPage.cpp:

(WebKit::dumpHistoryItem):

  • Source/WTF/wtf/text/StringImpl.h:
  • Source/WebCore/Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::create):

  • Source/WebCore/Modules/highlight/HighlightRegister.cpp:

(WebCore::HighlightRegister::setFromMapLike):
(WebCore::HighlightRegister::remove):

  • Source/WebCore/Modules/highlight/HighlightRegister.h:

(WebCore::HighlightRegister::map const):

  • Source/WebCore/Modules/highlight/HighlightRegister.idl:
  • Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl:
  • Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.idl:
  • Source/WebCore/Modules/mediastream/RTCDataChannel.idl:
  • Source/WebCore/Modules/mediastream/RTCDataChannelEvent.idl:
  • Source/WebCore/Modules/pictureinpicture/PictureInPictureEvent.idl:
  • Source/WebCore/Modules/push-api/PushEvent.idl:
  • Source/WebCore/Modules/push-api/PushSubscriptionChangeEvent.idl:
  • Source/WebCore/Modules/speech/SpeechSynthesisErrorEvent.idl:
  • Source/WebCore/Modules/webaudio/AudioProcessingEvent.idl:
  • Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.idl:
  • Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:

(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::readStatusLine):

  • Source/WebCore/Modules/websockets/WebSocketHandshake.h:
  • Source/WebCore/animation/AnimationPlaybackEvent.idl:
  • Source/WebCore/css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::customPropertyValue):
(WebCore::ComputedStyleExtractor::customPropertyText):

  • Source/WebCore/css/CSSComputedStyleDeclaration.h:
  • Source/WebCore/css/CSSVariableReferenceValue.cpp:

(WebCore::resolveVariableReference):

  • Source/WebCore/css/ContainerQueryParser.cpp:

(WebCore::ContainerQueryParser::consumeFilteredContainerQuery):
(WebCore::consumeFeatureName):

  • Source/WebCore/css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeFontPaletteValuesRule):
(WebCore::CSSParserImpl::consumeKeyframesRule):

  • Source/WebCore/css/parser/CSSParserSelector.cpp:

(WebCore::CSSParserSelector::parsePseudoElementSelector):
(WebCore::CSSParserSelector::parsePseudoClassSelector):

  • Source/WebCore/css/typedom/CSSStyleValue.cpp:

(WebCore::CSSStyleValue::parse):
(WebCore::CSSStyleValue::parseAll):

  • Source/WebCore/css/typedom/CSSStyleValue.h:
  • Source/WebCore/css/typedom/CSSStyleValue.idl:
  • Source/WebCore/css/typedom/CSSStyleValueFactory.cpp:

(WebCore::CSSStyleValueFactory::extractCustomCSSValues):
(WebCore::CSSStyleValueFactory::parseStyleValue):

  • Source/WebCore/css/typedom/CSSStyleValueFactory.h:
  • Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp:

(WebCore::ComputedStylePropertyMapReadOnly::get const):
(WebCore::ComputedStylePropertyMapReadOnly::getAll const):
(WebCore::ComputedStylePropertyMapReadOnly::has const):

  • Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.h:
  • Source/WebCore/css/typedom/StylePropertyMapReadOnly.h:
  • Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl:
  • Source/WebCore/dom/AnimationEvent.idl:
  • Source/WebCore/dom/Document.cpp:

(WebCore::Document::setContentLanguage):
(WebCore::Document::processMetaHttpEquiv):

  • Source/WebCore/dom/Document.h:

(WebCore::Document::contentLanguage const):
(WebCore::Document::baseTarget const):

  • Source/WebCore/dom/Element.h:

(WebCore::Element::target const):

  • Source/WebCore/dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::KeyboardEvent):
(WebCore::KeyboardEvent::initKeyboardEvent):

  • Source/WebCore/dom/KeyboardEvent.h:
  • Source/WebCore/dom/KeyboardEvent.idl:
  • Source/WebCore/dom/PointerEvent.cpp:

(WebCore::PointerEvent::create):

  • Source/WebCore/dom/PointerEvent.h:
  • Source/WebCore/dom/PopStateEvent.idl:
  • Source/WebCore/dom/ScriptElement.cpp:

(WebCore::ScriptElement::requestModuleScript):

  • Source/WebCore/dom/StyledElement.cpp:
  • Source/WebCore/history/HistoryItem.cpp:

(WebCore::HistoryItem::reset):
(WebCore::HistoryItem::target const):
(WebCore::HistoryItem::setTarget):
(WebCore::HistoryItem::childItemWithTarget):

  • Source/WebCore/history/HistoryItem.h:
  • Source/WebCore/html/Autofill.cpp:

(WebCore::AutofillData::createFromHTMLFormControlElement):

  • Source/WebCore/html/BaseButtonInputType.cpp:

(WebCore::BaseButtonInputType::setValue):

  • Source/WebCore/html/BaseCheckableInputType.cpp:

(WebCore::BaseCheckableInputType::setValue):

  • Source/WebCore/html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::setupDateTimeChooserParameters):

  • Source/WebCore/html/CustomPaintImage.cpp:

(WebCore::extractComputedProperty):
(WebCore::CustomPaintImage::doCustomPaint):

  • Source/WebCore/html/CustomPaintImage.h:
  • Source/WebCore/html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::target const):
(WebCore::HTMLAnchorElement::effectiveTarget const):

  • Source/WebCore/html/HTMLAnchorElement.h:
  • Source/WebCore/html/HTMLAreaElement.cpp:

(WebCore::HTMLAreaElement::target const):

  • Source/WebCore/html/HTMLAreaElement.h:
  • Source/WebCore/html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::target const):

  • Source/WebCore/html/HTMLBaseElement.h:
  • Source/WebCore/html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::target const):
(WebCore::HTMLFormElement::effectiveTarget const):

  • Source/WebCore/html/HTMLFormElement.h:
  • Source/WebCore/html/HTMLHtmlElement.idl:
  • Source/WebCore/html/HTMLIFrameElement.idl:
  • Source/WebCore/html/HTMLImageElement.idl:
  • Source/WebCore/html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::target const):

  • Source/WebCore/html/HTMLLinkElement.h:
  • Source/WebCore/html/track/AudioTrack.idl:
  • Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:
  • Source/WebCore/loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::startPreflight):

  • Source/WebCore/loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::loadRequest):

  • Source/WebCore/loader/FormSubmission.cpp:

(WebCore::FormSubmission::FormSubmission):

  • Source/WebCore/loader/FormSubmission.h:

(WebCore::FormSubmission::Attributes::target const):
(WebCore::FormSubmission::Attributes::setTarget):
(WebCore::FormSubmission::target const):

  • Source/WebCore/loader/FrameLoadRequest.cpp:

(WebCore::FrameLoadRequest::FrameLoadRequest):

  • Source/WebCore/loader/FrameLoadRequest.h:

(WebCore::FrameLoadRequest::FrameLoadRequest):
(WebCore::FrameLoadRequest::frameName const):
(WebCore::FrameLoadRequest::setFrameName):

  • Source/WebCore/loader/FrameLoader.cpp:

(WebCore::FrameLoader::changeLocation):
(WebCore::extractContentLanguageFromHeader):
(WebCore::FrameLoader::didBeginDocument):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):

  • Source/WebCore/loader/FrameLoader.h:
  • Source/WebCore/loader/HistoryController.cpp:

(WebCore::FrameLoader::HistoryController::recursiveGoToItem):

  • Source/WebCore/loader/LinkLoader.cpp:

(WebCore::LinkLoader::preloadIfNeeded):

  • Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::shouldStoreResourceAsFlatFile):

  • Source/WebCore/page/DOMWindow.cpp:

(WebCore::DOMWindow::name const):
(WebCore::DOMWindow::setName):

  • Source/WebCore/page/DOMWindow.h:
  • Source/WebCore/page/DOMWindow.idl:
  • Source/WebCore/page/DragController.cpp:

(WebCore::documentFragmentFromDragData):

  • Source/WebCore/page/ModalContainerObserver.h:

(WebCore::ModalContainerObserver::overrideSearchTermForTesting):

  • Source/WebCore/page/Navigator.cpp:

(WebCore::Navigator::initializePluginAndMimeTypeArrays):

  • Source/WebCore/page/PageSerializer.cpp:

(WebCore::PageSerializer::SerializerMarkupAccumulator::appendCustomAttributes):

  • Source/WebCore/page/Quirks.cpp:

(WebCore::Quirks::triggerOptionalStorageAccessQuirk const):

  • Source/WebCore/platform/graphics/FontCache.cpp:

(WebCore::FontCache::cachedFontPlatformData):

  • Source/WebCore/platform/graphics/FontDescription.cpp:

(WebCore::computeSpecializedChineseLocale):

  • Source/WebCore/platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::load):
(WebCore::MediaPlayer::supportsType):

  • Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp:

(WebCore::FontDescription::platformResolveGenericFamily):

  • Source/WebCore/platform/graphics/filters/FilterOperation.cpp:

(WebCore::ReferenceFilterOperation::ReferenceFilterOperation):

  • Source/WebCore/platform/graphics/filters/FilterOperation.h:

(WebCore::ReferenceFilterOperation::create):
(WebCore::ReferenceFilterOperation::fragment const):

  • Source/WebCore/platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::settings):

  • Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::capabilities):
(WebCore::CoreAudioCaptureSource::settings):

  • Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::settings):
(WebCore::MockRealtimeAudioSource::capabilities):

  • Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::capabilities):
(WebCore::MockRealtimeVideoSource::settings):

  • Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp:
  • Source/WebCore/platform/network/ResourceHandle.cpp:

(WebCore::ResourceHandle::create):
(WebCore::ResourceHandle::loadResourceSynchronously):

  • Source/WebCore/platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::crossThreadData const):
(WebCore::ResourceResponseBase::fromCrossThreadData):
(WebCore::ResourceResponseBase::mimeType const):
(WebCore::ResourceResponseBase::setMimeType):
(WebCore::ResourceResponseBase::textEncodingName const):
(WebCore::ResourceResponseBase::setTextEncodingName):
(WebCore::ResourceResponseBase::httpVersion const):
(WebCore::ResourceResponseBase::setHTTPVersion):

  • Source/WebCore/platform/network/ResourceResponseBase.h:
  • Source/WebCore/plugins/DOMMimeType.cpp:

(WebCore::DOMMimeType::type const):

  • Source/WebCore/plugins/DOMMimeType.h:
  • Source/WebCore/plugins/DOMPlugin.cpp:

(WebCore::DOMPlugin::supportedPropertyNames const):

  • Source/WebCore/plugins/DOMPluginArray.cpp:

(WebCore::DOMPluginArray::supportedPropertyNames const):

  • Source/WebCore/plugins/PluginData.h:
  • Source/WebCore/rendering/MarkedText.h:
  • Source/WebCore/rendering/PathOperation.cpp:

(WebCore::ReferencePathOperation::create):
(WebCore::ReferencePathOperation::ReferencePathOperation):

  • Source/WebCore/rendering/PathOperation.h:
  • Source/WebCore/rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::addCustomPaintWatchProperty):

  • Source/WebCore/rendering/style/RenderStyle.h:
  • Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):

  • Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
  • Source/WebCore/style/RuleSetBuilder.cpp:

(WebCore::Style::RuleSetBuilder::pushCascadeLayer):

  • Source/WebCore/style/StyleBuilder.cpp:

(WebCore::Style::Builder::applyCustomProperty):

  • Source/WebCore/style/StyleBuilder.h:
  • Source/WebCore/style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertPathOperation):

  • Source/WebCore/style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyValueListStyleType):
(WebCore::Style::BuilderCustom::applyValueWebkitLocale):
(WebCore::Style::BuilderCustom::applyValueFontFamily):
(WebCore::Style::BuilderCustom::applyValueTextEmphasisStyle):
(WebCore::Style::BuilderCustom::applyValueCounter):
(WebCore::Style::BuilderCustom::applyValueAlt):

  • Source/WebCore/style/StyleBuilderState.cpp:

(WebCore::Style::BuilderState::createFilterOperations):

  • Source/WebCore/svg/SVGAElement.cpp:

(WebCore::SVGAElement::defaultEventHandler):

  • Source/WebCore/svg/SVGAElement.h:
  • Source/WebCore/svg/SVGElement.cpp:

(WebCore::SVGElement::synchronizeAttribute):
(WebCore::SVGElement::synchronizeAllAttributes):
(WebCore::SVGElement::commitPropertyChange):
(WebCore::SVGElement::insertedIntoAncestor):
(WebCore::SVGElement::buildPendingResourcesIfNeeded):

  • Source/WebCore/svg/SVGElement.h:

(WebCore::SVGElement::className const):

  • Source/WebCore/svg/SVGURIReference.cpp:

(WebCore::SVGURIReference::fragmentIdentifierFromIRIString):
(WebCore::SVGURIReference::targetElementFromIRIString):

  • Source/WebCore/svg/SVGURIReference.h:
  • Source/WebCore/svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::updateUserAgentShadowTree):
(WebCore::SVGUseElement::findTarget const):

  • Source/WebCore/svg/SVGUseElement.h:
  • Source/WebCore/svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::Condition::Condition):
(WebCore::SVGSMILElement::buildPendingResource):
(WebCore::SVGSMILElement::parseCondition):

  • Source/WebCore/svg/animation/SVGSMILElement.h:
  • Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp:

(WebCore::SVGFilterBuilder::calculateFilterOutsets):

  • Source/WebCore/testing/Internals.cpp:

(WebCore::Internals::overrideModalContainerSearchTermForTesting):

  • Source/WebCore/testing/Internals.h:
  • Source/WebCore/testing/Internals.idl:
  • Source/WebCore/worklets/PaintWorkletGlobalScope.cpp:

(WebCore::PaintWorkletGlobalScope::PaintDefinition::PaintDefinition):
(WebCore::PaintWorkletGlobalScope::registerPaint):

  • Source/WebCore/worklets/PaintWorkletGlobalScope.h:
  • Source/WebCore/worklets/PaintWorkletGlobalScope.idl:
  • Source/WebCore/xml/CustomXPathNSResolver.cpp:

(WebCore::CustomXPathNSResolver::lookupNamespaceURI):

  • Source/WebCore/xml/XPathGrammar.cpp:
  • Source/WebCore/xml/XPathParser.cpp:

(WebCore::XPath::Parser::expandQualifiedName):

  • Source/WebCore/xml/XPathParser.h:

Canonical link: https://commits.webkit.org/250077@main

  • Property svn:eol-style set to native
File size: 6.6 KB
Line 
1/*
2 * Copyright (C) 2004 Zack Rusin <[email protected]>
3 * Copyright (C) 2004-2019 Apple Inc. All rights reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301 USA
19 */
20
21#pragma once
22
23#include "Animation.h"
24#include "CSSStyleDeclaration.h"
25#include "RenderStyleConstants.h"
26#include "SVGRenderStyleDefs.h"
27#include "TextFlags.h"
28#include <wtf/IsoMalloc.h>
29#include <wtf/RefPtr.h>
30#include <wtf/text/WTFString.h>
31
32namespace WebCore {
33
34class CSSFontStyleValue;
35class CSSPrimitiveValue;
36class CSSValueList;
37class Color;
38class Element;
39class FilterOperations;
40class FontSelectionValue;
41class MutableStyleProperties;
42class Node;
43class RenderElement;
44class RenderStyle;
45class SVGPaint;
46class ShadowData;
47class StyleProperties;
48class StylePropertyShorthand;
49
50enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true };
51
52enum AdjustPixelValuesForComputedStyle { AdjustPixelValues, DoNotAdjustPixelValues };
53
54class ComputedStyleExtractor {
55 WTF_MAKE_FAST_ALLOCATED;
56public:
57 ComputedStyleExtractor(Node*, bool allowVisitedStyle = false, PseudoId = PseudoId::None);
58 ComputedStyleExtractor(Element*, bool allowVisitedStyle = false, PseudoId = PseudoId::None);
59
60 enum class PropertyValueType : bool { Resolved, Computed };
61 RefPtr<CSSValue> propertyValue(CSSPropertyID, EUpdateLayout = UpdateLayout, PropertyValueType = PropertyValueType::Resolved);
62 RefPtr<CSSValue> valueForPropertyInStyle(const RenderStyle&, CSSPropertyID, RenderElement* = nullptr);
63 String customPropertyText(const AtomString& propertyName);
64 RefPtr<CSSValue> customPropertyValue(const AtomString& propertyName);
65
66 // Helper methods for HTML editing.
67 Ref<MutableStyleProperties> copyPropertiesInSet(const CSSPropertyID* set, unsigned length);
68 Ref<MutableStyleProperties> copyProperties();
69 RefPtr<CSSPrimitiveValue> getFontSizeCSSValuePreferringKeyword();
70 bool useFixedFontDefaultSize();
71 bool propertyMatches(CSSPropertyID, const CSSValue*);
72
73 static Ref<CSSValue> valueForFilter(const RenderStyle&, const FilterOperations&, AdjustPixelValuesForComputedStyle = AdjustPixelValues);
74
75 static Ref<CSSPrimitiveValue> fontNonKeywordWeightFromStyleValue(FontSelectionValue);
76 static Ref<CSSPrimitiveValue> fontWeightFromStyleValue(FontSelectionValue);
77 static Ref<CSSPrimitiveValue> fontNonKeywordStretchFromStyleValue(FontSelectionValue);
78 static Ref<CSSPrimitiveValue> fontStretchFromStyleValue(FontSelectionValue);
79 static Ref<CSSFontStyleValue> fontNonKeywordStyleFromStyleValue(FontSelectionValue);
80 static Ref<CSSFontStyleValue> fontStyleFromStyleValue(std::optional<FontSelectionValue>, FontStyleAxis);
81
82 static void addValueForAnimationPropertyToList(CSSValueList&, CSSPropertyID, const Animation*);
83
84private:
85 // The renderer we should use for resolving layout-dependent properties.
86 RenderElement* styledRenderer() const;
87
88 RefPtr<CSSValue> svgPropertyValue(CSSPropertyID);
89 Ref<CSSValue> adjustSVGPaintForCurrentColor(SVGPaintType, const String& url, const Color&, const Color& currentColor) const;
90 static Ref<CSSValue> valueForShadow(const ShadowData*, CSSPropertyID, const RenderStyle&, AdjustPixelValuesForComputedStyle = AdjustPixelValues);
91 Ref<CSSPrimitiveValue> currentColorOrValidColor(const RenderStyle*, const Color&) const;
92
93 Ref<CSSValueList> getCSSPropertyValuesForShorthandProperties(const StylePropertyShorthand&);
94 RefPtr<CSSValueList> getCSSPropertyValuesFor2SidesShorthand(const StylePropertyShorthand&);
95 RefPtr<CSSValueList> getCSSPropertyValuesFor4SidesShorthand(const StylePropertyShorthand&);
96
97 size_t getLayerCount(CSSPropertyID);
98 Ref<CSSValue> getFillLayerPropertyShorthandValue(CSSPropertyID, const StylePropertyShorthand& propertiesBeforeSlashSeparator, const StylePropertyShorthand& propertiesAfterSlashSeparator, CSSPropertyID lastLayerProperty);
99 Ref<CSSValue> getBackgroundShorthandValue();
100 Ref<CSSValue> getMaskShorthandValue();
101 Ref<CSSValueList> getCSSPropertyValuesForGridShorthand(const StylePropertyShorthand&);
102
103 RefPtr<Element> m_element;
104 PseudoId m_pseudoElementSpecifier;
105 bool m_allowVisitedStyle;
106};
107
108class CSSComputedStyleDeclaration final : public CSSStyleDeclaration {
109 WTF_MAKE_ISO_ALLOCATED_EXPORT(CSSComputedStyleDeclaration, WEBCORE_EXPORT);
110public:
111 WEBCORE_EXPORT static Ref<CSSComputedStyleDeclaration> create(Element&, bool allowVisitedStyle = false, StringView pseudoElementName = StringView { });
112 virtual ~CSSComputedStyleDeclaration();
113
114 WEBCORE_EXPORT void ref() final;
115 WEBCORE_EXPORT void deref() final;
116
117 String getPropertyValue(CSSPropertyID) const;
118
119private:
120 CSSComputedStyleDeclaration(Element&, bool allowVisitedStyle, StringView);
121
122 // CSSOM functions. Don't make these public.
123 CSSRule* parentRule() const final;
124 unsigned length() const final;
125 String item(unsigned index) const final;
126 RefPtr<DeprecatedCSSOMValue> getPropertyCSSValue(const String& propertyName) final;
127 String getPropertyValue(const String& propertyName) final;
128 String getPropertyPriority(const String& propertyName) final;
129 String getPropertyShorthand(const String& propertyName) final;
130 bool isPropertyImplicit(const String& propertyName) final;
131 ExceptionOr<void> setProperty(const String& propertyName, const String& value, const String& priority) final;
132 ExceptionOr<String> removeProperty(const String& propertyName) final;
133 String cssText() const final;
134 ExceptionOr<void> setCssText(const String&) final;
135 RefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) final;
136 String getPropertyValueInternal(CSSPropertyID) final;
137 ExceptionOr<void> setPropertyInternal(CSSPropertyID, const String& value, bool important) final;
138 Ref<MutableStyleProperties> copyProperties() const final;
139
140 RefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID, EUpdateLayout = UpdateLayout) const;
141
142 const Settings* settings() const final;
143
144 mutable Ref<Element> m_element;
145 PseudoId m_pseudoElementSpecifier;
146 bool m_allowVisitedStyle;
147 unsigned m_refCount { 1 };
148};
149
150} // namespace WebCore
Note: See TracBrowser for help on using the repository browser.