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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 1910263003: Generate CSSPropertyEquality instead of using hand-updated file. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests2! Created 4 years, 7 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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index be3ddf545b90cda7010d4ef6ec899ebe6f5cbc85..3eb9aaf6a2ecee92663abbb6b4d0018b4890edff 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -38,6 +38,7 @@
#include "core/HTMLNames.h"
#include "core/SVGNames.h"
#include "core/animation/AnimationTimeline.h"
+#include "core/css/CSSPropertyEquality.h"
#include "core/css/StyleSheetContents.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/css/resolver/StyleResolverStats.h"
@@ -2594,4 +2595,15 @@ String Internals::getProgrammaticScrollAnimationState(Node* node) const
return String();
}
+bool Internals::isCSSPropertyEqual(String property, Element* a, Element* b, ExceptionState& exceptionState) const
+{
+ CSSPropertyID id = cssPropertyID(property);
+ if (id == CSSPropertyInvalid) {
+ exceptionState.throwDOMException(InvalidAccessError, "Invalid property.");
+ return false;
+ }
+
+ return CSSPropertyEquality::propertiesEqual(id, *a->ensureComputedStyle(), *b->ensureComputedStyle());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698