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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 26828003: Count beforeload separately for isolated worlds (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | Source/core/page/UseCounter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 3652 matching lines...) Expand 10 before | Expand all | Expand 10 after
3663 addListenerType(OVERFLOWCHANGED_LISTENER); 3663 addListenerType(OVERFLOWCHANGED_LISTENER);
3664 } else if (eventType == EventTypeNames::webkitAnimationStart || (RuntimeEnab ledFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::ani mationstart)) { 3664 } else if (eventType == EventTypeNames::webkitAnimationStart || (RuntimeEnab ledFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::ani mationstart)) {
3665 addListenerType(ANIMATIONSTART_LISTENER); 3665 addListenerType(ANIMATIONSTART_LISTENER);
3666 } else if (eventType == EventTypeNames::webkitAnimationEnd || (RuntimeEnable dFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::anima tionend)) { 3666 } else if (eventType == EventTypeNames::webkitAnimationEnd || (RuntimeEnable dFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::anima tionend)) {
3667 addListenerType(ANIMATIONEND_LISTENER); 3667 addListenerType(ANIMATIONEND_LISTENER);
3668 } else if (eventType == EventTypeNames::webkitAnimationIteration || (Runtime EnabledFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames: :animationiteration)) { 3668 } else if (eventType == EventTypeNames::webkitAnimationIteration || (Runtime EnabledFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames: :animationiteration)) {
3669 addListenerType(ANIMATIONITERATION_LISTENER); 3669 addListenerType(ANIMATIONITERATION_LISTENER);
3670 } else if (eventType == EventTypeNames::webkitTransitionEnd || eventType == EventTypeNames::transitionend) { 3670 } else if (eventType == EventTypeNames::webkitTransitionEnd || eventType == EventTypeNames::transitionend) {
3671 addListenerType(TRANSITIONEND_LISTENER); 3671 addListenerType(TRANSITIONEND_LISTENER);
3672 } else if (eventType == EventTypeNames::beforeload) { 3672 } else if (eventType == EventTypeNames::beforeload) {
3673 UseCounter::count(*this, UseCounter::BeforeLoadEvent); 3673 if (m_frame && m_frame->script()->shouldBypassMainWorldContentSecurityPo licy()) {
3674 UseCounter::count(*this, UseCounter::BeforeLoadEventInIsolatedWorld) ;
3675 } else {
3676 UseCounter::count(*this, UseCounter::BeforeLoadEvent);
3677 }
3674 addListenerType(BEFORELOAD_LISTENER); 3678 addListenerType(BEFORELOAD_LISTENER);
3675 } else if (eventType == EventTypeNames::scroll) { 3679 } else if (eventType == EventTypeNames::scroll) {
3676 addListenerType(SCROLL_LISTENER); 3680 addListenerType(SCROLL_LISTENER);
3677 } 3681 }
3678 } 3682 }
3679 3683
3680 CSSStyleDeclaration* Document::getOverrideStyle(Element*, const String&) 3684 CSSStyleDeclaration* Document::getOverrideStyle(Element*, const String&)
3681 { 3685 {
3682 return 0; 3686 return 0;
3683 } 3687 }
(...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after
5285 { 5289 {
5286 return DocumentLifecycleNotifier::create(this); 5290 return DocumentLifecycleNotifier::create(this);
5287 } 5291 }
5288 5292
5289 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5293 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5290 { 5294 {
5291 return static_cast<DocumentLifecycleNotifier*>(ExecutionContext::lifecycleNo tifier()); 5295 return static_cast<DocumentLifecycleNotifier*>(ExecutionContext::lifecycleNo tifier());
5292 } 5296 }
5293 5297
5294 } // namespace WebCore 5298 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698