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

Unified Diff: pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js

Issue 24129004: fix shadowdom polyfill (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « pkg/shadow_dom/lib/shadow_dom.min.js ('k') | pkg/shadow_dom/tool/build.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
diff --git a/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js b/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
index 828a4fcde5e83adabcd5d50175a2462df1686b87..57c8c5941c10074b71e8bb260701df0c01e7ed4b 100644
--- a/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
+++ b/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
@@ -38,11 +38,9 @@
// Fix up class names for Firefox.
// For some of them (like HTMLFormElement and HTMLInputElement),
// the "constructor" property of the unwrapped nodes points at the
- // wrapper.
- // Note: it is safe to check for the GeneratedWrapper string because
- // we know it is some kind of Shadow DOM wrapper object.
- var ctor = obj.constructor;
- if (ctor && ctor.name == 'GeneratedWrapper') {
+ // same constructor as the wrapper.
+ var ctor = obj.constructor
+ if (ctor === unwrapped.constructor) {
var name = ctor._ShadowDOMPolyfill$cacheTag_;
if (!name) {
name = Object.prototype.toString.call(unwrapped);
« no previous file with comments | « pkg/shadow_dom/lib/shadow_dom.min.js ('k') | pkg/shadow_dom/tool/build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698