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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleRuleCustom.cpp

Issue 1904423002: Remove Oilpan-only StyleSheet/ test failures from TestExpectations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/bindings/core/v8/custom/V8CSSStyleRuleCustom.cpp
diff --git a/third_party/WebKit/public/platform/WebDoublePoint.h b/third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleRuleCustom.cpp
similarity index 60%
copy from third_party/WebKit/public/platform/WebDoublePoint.h
copy to third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleRuleCustom.cpp
index d666e13379a0d23e55f6525c7c49c6c271ace9f8..f21277067630a4372d7e600dff92bd3c2b7514b6 100644
--- a/third_party/WebKit/public/platform/WebDoublePoint.h
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleRuleCustom.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 Google Inc. All rights reserved.
+ * Copyright (C) 2007-2011 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,58 +28,31 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebDoublePoint_h
-#define WebDoublePoint_h
+#include "bindings/core/v8/V8CSSStyleRule.h"
-#include "WebCommon.h"
+#include "core/css/CSSRule.h"
+#include "core/css/CSSStyleSheet.h"
+#include "core/css/CSSValue.h"
-#if INSIDE_BLINK
-#include "platform/geometry/DoublePoint.h"
-#endif
+using namespace WTF;
namespace blink {
-struct WebDoublePoint {
- double x;
- double y;
-
- WebDoublePoint()
- : x(0.0)
- , y(0.0)
- {
- }
-
- WebDoublePoint(double x, double y)
- : x(x)
- , y(y)
- {
- }
-
-#if INSIDE_BLINK
- WebDoublePoint(const DoublePoint& p)
- : x(p.x())
- , y(p.y())
- {
+void V8CSSStyleRule::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* scriptWrappable, const v8::Persistent<v8::Object>& wrapper)
+{
+ CSSStyleRule* impl = scriptWrappable->toImpl<CSSStyleRule>();
+ v8::Local<v8::Object> context = v8::Local<v8::Object>::New(isolate, wrapper);
+ v8::Context::Scope scope(context->CreationContext());
+ CSSRule* parentRule = impl->parentRule();
+ if (parentRule) {
+ if (DOMDataStore::containsWrapper(parentRule, isolate))
+ DOMDataStore::setWrapperReference(wrapper, parentRule, isolate);
}
-
- operator DoublePoint() const
- {
- return DoublePoint(x, y);
+ CSSStyleSheet* parentStyleSheet = impl->parentStyleSheet();
+ if (parentStyleSheet) {
+ if (DOMDataStore::containsWrapper(parentStyleSheet, isolate))
+ DOMDataStore::setWrapperReference(wrapper, parentStyleSheet, isolate);
}
-#endif
-
-};
-
-inline bool operator==(const WebDoublePoint& a, const WebDoublePoint& b)
-{
- return a.x == b.x && a.y == b.y;
-}
-
-inline bool operator!=(const WebDoublePoint& a, const WebDoublePoint& b)
-{
- return !(a == b);
}
} // namespace blink
-
-#endif

Powered by Google App Engine
This is Rietveld 408576698