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

Unified Diff: third_party/WebKit/Source/core/frame/Deprecation.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/Deprecation.h
diff --git a/third_party/WebKit/Source/core/fetch/FetchInitiatorInfo.h b/third_party/WebKit/Source/core/frame/Deprecation.h
similarity index 54%
copy from third_party/WebKit/Source/core/fetch/FetchInitiatorInfo.h
copy to third_party/WebKit/Source/core/frame/Deprecation.h
index a9490a48debeacfcc707d7db9ec86653070981b3..8b5777ac96e21b802211cb907f721fa9b10c2949 100644
--- a/third_party/WebKit/Source/core/fetch/FetchInitiatorInfo.h
+++ b/third_party/WebKit/Source/core/frame/Deprecation.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Google, Inc. All rights reserved.
+ * Copyright (C) 2016 Google, Inc. All rights reserved.
Timothy Loh 2016/01/25 00:40:00 short license header? https://www.chromium.org/bli
nainar 2016/01/25 03:48:24 Done.
*
* 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 Deprecation_h
+#define Deprecation_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>
Timothy Loh 2016/01/25 00:40:00 surely we don't need so many includes? I don't see
nainar 2016/01/25 03:48:24 Done.
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 Deprecation {
DISALLOW_NEW();
- explicit CrossThreadFetchInitiatorInfoData(const FetchInitiatorInfo& info)
- : name(info.name.string().isolatedCopy())
- , position(info.position)
- , startTime(info.startTime)
+ WTF_MAKE_NONCOPYABLE(Deprecation);
+public:
+ Deprecation();
+ ~Deprecation();
+
+ void suppress(CSSPropertyID propertyID)
Timothy Loh 2016/01/25 00:40:00 why public? also no need to put the definitions in
nainar 2016/01/25 03:48:24 Made private.
{
+ ASSERT(propertyID >= firstCSSProperty);
+ ASSERT(propertyID <= lastUnresolvedCSSProperty);
+ m_CSSPropertyDeprecationBits.quickSet(propertyID);
}
-
- operator FetchInitiatorInfo() const
+ bool isSuppressed(CSSPropertyID propertyID)
{
- FetchInitiatorInfo info;
- info.name = AtomicString(name);
- info.position = position;
- info.startTime = startTime;
- return info;
+ ASSERT(propertyID >= firstCSSProperty);
+ ASSERT(propertyID <= lastUnresolvedCSSProperty);
+ return m_CSSPropertyDeprecationBits.quickGet(propertyID);
}
+ static void showConsoleWarning(const LocalFrame*, CSSPropertyID);
Timothy Loh 2016/01/25 00:40:00 extra space after ,
nainar 2016/01/25 03:48:24 Done.
+ // CSSPropertyIDs that aren't deprecated return an empty string.
+ static String deprecationMessage(CSSPropertyID);
- String name;
- TextPosition position;
- double startTime;
+protected:
+ BitVector m_CSSPropertyDeprecationBits;
Timothy Loh 2016/01/25 00:40:00 case is weird, probably m_cssProper..
nainar 2016/01/25 03:48:24 Done.
};
} // namespace blink
-#endif
+#endif // Deprecation_h

Powered by Google App Engine
This is Rietveld 408576698