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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 1952893003: Implement custom element construction and some 'define' checks (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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 1318
1319 void LocalDOMWindow::cancelIdleCallback(int id) 1319 void LocalDOMWindow::cancelIdleCallback(int id)
1320 { 1320 {
1321 if (Document* document = this->document()) 1321 if (Document* document = this->document())
1322 document->cancelIdleCallback(id); 1322 document->cancelIdleCallback(id);
1323 } 1323 }
1324 1324
1325 CustomElementsRegistry* LocalDOMWindow::customElements() const 1325 CustomElementsRegistry* LocalDOMWindow::customElements() const
1326 { 1326 {
1327 if (!m_customElements) 1327 if (!m_customElements)
1328 m_customElements = CustomElementsRegistry::create(); 1328 m_customElements = CustomElementsRegistry::create(frame()->script().isol ate());
1329 return m_customElements.get(); 1329 return m_customElements.get();
1330 } 1330 }
1331 1331
1332 bool LocalDOMWindow::addEventListenerInternal(const AtomicString& eventType, Eve ntListener* listener, const EventListenerOptions& options) 1332 bool LocalDOMWindow::addEventListenerInternal(const AtomicString& eventType, Eve ntListener* listener, const EventListenerOptions& options)
1333 { 1333 {
1334 if (!EventTarget::addEventListenerInternal(eventType, listener, options)) 1334 if (!EventTarget::addEventListenerInternal(eventType, listener, options))
1335 return false; 1335 return false;
1336 1336
1337 if (frame() && frame()->host()) 1337 if (frame() && frame()->host())
1338 frame()->host()->eventHandlerRegistry().didAddEventHandler(*this, eventT ype, options); 1338 frame()->host()->eventHandlerRegistry().didAddEventHandler(*this, eventT ype, options);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 { 1537 {
1538 // If the LocalDOMWindow still has a frame reference, that frame must point 1538 // If the LocalDOMWindow still has a frame reference, that frame must point
1539 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation 1539 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1540 // where script execution leaks between different LocalDOMWindows. 1540 // where script execution leaks between different LocalDOMWindows.
1541 if (m_frameObserver->frame()) 1541 if (m_frameObserver->frame())
1542 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this); 1542 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this);
1543 return m_frameObserver->frame(); 1543 return m_frameObserver->frame();
1544 } 1544 }
1545 1545
1546 } // namespace blink 1546 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698