Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.cpp

Issue 2202453002: Remove the CSS Properties API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More removals Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.cpp
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.cpp
deleted file mode 100644
index 28b75d53e3f941853f90a91671e40b0291b52717..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2015 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.
-
-#include "core/css/properties/CSSPropertyDescriptor.h"
-
-namespace blink {
-
-namespace {
-
-// This is the maximum number of properties that can be used at any one time.
-const static size_t propertyArraySize = lastCSSProperty + 1;
-static CSSPropertyDescriptor cssPropertyDescriptorsById[propertyArraySize];
-
-} // namespace
-
-void CSSPropertyDescriptor::add(CSSPropertyDescriptor descriptor)
-{
- ASSERT(descriptor.m_id >= 0 && static_cast<size_t>(descriptor.m_id) < propertyArraySize);
- ASSERT(descriptor.m_valid);
- cssPropertyDescriptorsById[descriptor.m_id] = descriptor;
-}
-
-const CSSPropertyDescriptor* CSSPropertyDescriptor::get(CSSPropertyID id)
-{
- static bool arrayInitialized = false;
- if (!arrayInitialized) {
- for (size_t i = 0; i < propertyArraySize; ++i)
- cssPropertyDescriptorsById[i].m_valid = false;
- arrayInitialized = true;
- }
-
- if (cssPropertyDescriptorsById[id].m_valid)
- return &cssPropertyDescriptorsById[id];
- return nullptr;
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698