source: webkit/trunk/Source/WebCore/css/CSSRule.cpp

Last change on this file was 291946, checked in by [email protected], 3 years ago

Use static_assert instead of COMPILE_ASSERT
https://bugs.webkit.org/show_bug.cgi?id=238417

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • assembler/ARM64Assembler.h:
  • assembler/ARMv7Assembler.h:
  • assembler/MacroAssemblerX86Common.h:
  • bytecode/Opcode.h:
  • bytecode/VirtualRegister.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined):
(JSC::DFG::SpeculativeJIT::compileToBooleanObjectOrOther):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):

  • inspector/InspectorProtocolTypes.h:

(Inspector::Protocol::BindingTraits<JSON::ArrayOf<T>>::runtimeCast):

  • inspector/scripts/codegen/cpp_generator_templates.py:
  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
  • inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
  • inspector/scripts/tests/expected/type-with-open-parameters.json-result:
  • jit/FPRInfo.h:
  • jit/GPRInfo.h:
  • parser/Parser.h:
  • runtime/JSCell.cpp:
  • runtime/JSObject.h:
  • runtime/SmallStrings.cpp:

(JSC::SmallStrings::SmallStrings):

  • runtime/Structure.h:

(JSC::Structure::outOfLineCapacity):

  • yarr/YarrInterpreter.cpp:

Source/WebCore:

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • contentextensions/DFANode.h:
  • css/CSSBasicShapes.cpp:

(WebCore::buildPolygonString):

  • css/CSSProperty.cpp:
  • css/CSSRule.cpp:
  • css/CSSValue.cpp:
  • css/StyleProperties.cpp:
  • css/StyleRule.cpp:
  • css/calc/CSSCalcOperationNode.cpp:

(WebCore::sortingCategoryForType):

  • dom/ElementData.cpp:
  • dom/NodeRareData.cpp:
  • dom/ShadowRoot.cpp:
  • dom/SpaceSplitString.cpp:
  • dom/StyledElement.cpp:
  • dom/TreeScope.cpp:
  • editing/HTMLInterchange.cpp:

(WebCore::convertHTMLTextToInterchangeFormat):

  • html/HTMLTrackElement.cpp:
  • html/track/VTTCue.cpp:
  • platform/Length.cpp:
  • platform/ScrollableArea.cpp:
  • platform/UserAgentQuirks.h:

(WebCore::UserAgentQuirks::UserAgentQuirks):

  • platform/graphics/FontCascadeDescription.cpp:
  • platform/graphics/Region.cpp:

(WebCore::Region::Shape::shapeOperation):

  • platform/graphics/TextRun.cpp:
  • platform/text/BidiContext.cpp:
  • platform/text/TextFlags.h:
  • platform/win/ImportedFunctionsEnumerator.cpp:

(WebCore::ImportedFunctionsEnumerator::addressOfCurrentFunctionPointer const):

  • rendering/BreakLines.cpp:
  • rendering/FloatingObjects.cpp:
  • rendering/LegacyInlineBox.cpp:
  • rendering/LegacyInlineFlowBox.cpp:
  • rendering/LegacyInlineTextBox.cpp:
  • rendering/LegacyRootInlineBox.cpp:
  • rendering/RenderBlock.cpp:
  • rendering/RenderBlockFlow.cpp:
  • rendering/RenderBox.cpp:
  • rendering/RenderObject.cpp:
  • rendering/RenderTableCell.cpp:
  • rendering/RenderText.cpp:
  • rendering/style/FillLayer.cpp:
  • rendering/style/RenderStyle.cpp:
  • rendering/style/StyleBoxData.cpp:
  • rendering/style/StyleRareInheritedData.cpp:
  • rendering/style/WillChangeData.h:
  • rendering/svg/SVGInlineTextBox.cpp:
  • style/RuleData.cpp:
  • svg/GradientAttributes.h:

Source/WebKit:

  • Platform/IPC/Connection.h:

(IPC::Connection::send):
(IPC::Connection::sendWithAsyncReply):
(IPC::Connection::sendSync):

  • Platform/IPC/MessageSender.h:
  • Platform/IPC/unix/ConnectionUnix.cpp:

(IPC::Connection::sendOutgoingMessage):

  • UIProcess/AuxiliaryProcessProxy.h:

(WebKit::AuxiliaryProcessProxy::send):
(WebKit::AuxiliaryProcessProxy::sendSync):
(WebKit::AuxiliaryProcessProxy::sendWithAsyncReply):

Source/WebKitLegacy/mac:

  • Plugins/WebBasePluginPackage.mm:

(-[WebBasePluginPackage isNativeLibraryData:]):

  • WebView/WebDynamicScrollBarsView.mm:

Source/WTF:

Use C++ static_assert instead of COMPILE_ASSERT.
Currently keeping it since it was also used in Internal code too.

  • wtf/CrossThreadCopier.cpp:
  • wtf/JSONValues.cpp:

(WTF::JSONImpl::ObjectBase::asObject):
(WTF::JSONImpl::ObjectBase::asObject const):
(WTF::JSONImpl::ArrayBase::asArray):

  • wtf/JSONValues.h:
  • wtf/glib/FileSystemGlib.cpp:

(WTF::FileSystemImpl::lockFile):

  • wtf/posix/FileSystemPOSIX.cpp:

(WTF::FileSystemImpl::lockFile):

  • wtf/text/AtomString.h:
  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1/*
2 * (C) 1999-2003 Lars Knoll ([email protected])
3 * (C) 2002-2003 Dirk Mueller ([email protected])
4 * Copyright (C) 2002-2021 Apple Inc. All rights reserved.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 */
21
22#include "config.h"
23#include "CSSRule.h"
24
25#include "CSSStyleSheet.h"
26#include "StyleRule.h"
27#include "StyleSheetContents.h"
28
29namespace WebCore {
30
31struct SameSizeAsCSSRule : public RefCounted<SameSizeAsCSSRule> {
32 virtual ~SameSizeAsCSSRule();
33 unsigned char bitfields;
34 void* pointerUnion;
35};
36
37static_assert(sizeof(CSSRule) == sizeof(SameSizeAsCSSRule), "CSSRule should stay small");
38
39ExceptionOr<void> CSSRule::setCssText(const String&)
40{
41 return { };
42}
43
44const CSSParserContext& CSSRule::parserContext() const
45{
46 CSSStyleSheet* styleSheet = parentStyleSheet();
47 return styleSheet ? styleSheet->contents().parserContext() : strictCSSParserContext();
48}
49
50} // namespace WebCore
Note: See TracBrowser for help on using the repository browser.