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

Unified Diff: third_party/WebKit/Source/core/frame/DeprecationHelper.h

Issue 1585383003: Add deprecation message for -webkit-background-composite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/frame/DeprecationHelper.h
diff --git a/third_party/WebKit/Source/core/fetch/FetchInitiatorInfo.h b/third_party/WebKit/Source/core/frame/DeprecationHelper.h
similarity index 53%
copy from third_party/WebKit/Source/core/fetch/FetchInitiatorInfo.h
copy to third_party/WebKit/Source/core/frame/DeprecationHelper.h
index a9490a48debeacfcc707d7db9ec86653070981b3..f2a423b84587bb33d733fccf47de76d597873b47 100644
--- a/third_party/WebKit/Source/core/fetch/FetchInitiatorInfo.h
+++ b/third_party/WebKit/Source/core/frame/DeprecationHelper.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Google, Inc. All rights reserved.
+ * Copyright (C) 2016 Google, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,55 +23,49 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef FetchInitiatorInfo_h
-#define FetchInitiatorInfo_h
+#ifndef DeprecationHelper_h
+#define DeprecationHelper_h
-#include "wtf/Allocator.h"
-#include "wtf/text/AtomicString.h"
-#include "wtf/text/TextPosition.h"
+#include "core/CSSPropertyNames.h"
+#include "core/CoreExport.h"
+#include "wtf/BitVector.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/text/WTFString.h"
+#include <v8.h>
namespace blink {
-struct FetchInitiatorInfo {
- DISALLOW_NEW();
- FetchInitiatorInfo()
- : name()
- , position(TextPosition::belowRangePosition())
- , startTime(0.0)
- {
- }
+class LocalFrame;
- // When adding members, CrossThreadFetchInitiatorInfoData should be
- // updated.
- AtomicString name;
- TextPosition position;
- double startTime;
-};
-
-// Encode AtomicString as String to cross threads.
-struct CrossThreadFetchInitiatorInfoData {
+class DeprecationHelper {
alancutter (OOO until 2018) 2016/01/21 00:58:38 Probably don't need "Helper" in the name.
nainar 2016/01/21 02:39:07 Done.
DISALLOW_NEW();
- explicit CrossThreadFetchInitiatorInfoData(const FetchInitiatorInfo& info)
- : name(info.name.string().isolatedCopy())
- , position(info.position)
- , startTime(info.startTime)
+ WTF_MAKE_NONCOPYABLE(DeprecationHelper);
+public:
+ DeprecationHelper();
+ ~DeprecationHelper();
+
+ void count(CSSPropertyID propertyID)
alancutter (OOO until 2018) 2016/01/21 00:58:38 count() doesn't make sense outside of UseCounter,
nainar 2016/01/21 02:39:07 Done.
{
+ ASSERT(propertyID >= CSSPropertyInvalid);
alancutter (OOO until 2018) 2016/01/21 00:58:38 Why is CSSPropertyInvalid a valid propertyID?
nainar 2016/01/21 02:39:07 Fixed.
+ ASSERT(propertyID <= lastUnresolvedCSSProperty);
+ m_CSSPropertyDeprecationBits.quickSet(propertyID);
}
-
- operator FetchInitiatorInfo() const
+ bool isCounted(CSSPropertyID propertyID)
{
- FetchInitiatorInfo info;
- info.name = AtomicString(name);
- info.position = position;
- info.startTime = startTime;
- return info;
+ ASSERT(propertyID >= CSSPropertyInvalid);
+ ASSERT(propertyID <= lastUnresolvedCSSProperty);
+ return m_CSSPropertyDeprecationBits.quickGet(propertyID);
}
+ static void showDeprecationWarning(const LocalFrame*, CSSPropertyID);
+ // CSSPropertyIDs that aren't deprecated return an empty string.
+ static String deprecationMessage(CSSPropertyID);
- String name;
- TextPosition position;
- double startTime;
+protected:
+ BitVector m_CSSPropertyDeprecationBits;
};
} // namespace blink
-#endif
+#endif // DeprecationHelper_h

Powered by Google App Engine
This is Rietveld 408576698