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

Side by Side Diff: Source/core/frame/LocalFrame.cpp

Issue 311903002: Remove dead notification for number of wheel event handlers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another try. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/loader/EmptyClients.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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 document->updateLayoutIgnorePendingStylesheets(); 503 document->updateLayoutIgnorePendingStylesheets();
504 } 504 }
505 505
506 void LocalFrame::deviceOrPageScaleFactorChanged() 506 void LocalFrame::deviceOrPageScaleFactorChanged()
507 { 507 {
508 document()->mediaQueryAffectingValueChanged(); 508 document()->mediaQueryAffectingValueChanged();
509 for (RefPtr<LocalFrame> child = tree().firstChild(); child; child = child->t ree().nextSibling()) 509 for (RefPtr<LocalFrame> child = tree().firstChild(); child; child = child->t ree().nextSibling())
510 child->deviceOrPageScaleFactorChanged(); 510 child->deviceOrPageScaleFactorChanged();
511 } 511 }
512 512
513 void LocalFrame::notifyChromeClientWheelEventHandlerCountChanged() const
514 {
515 // FIXME: No-one is using this information, so remove this code.
516 // Ensure that this method is being called on the main frame of the page.
517 ASSERT(isMainFrame());
518
519 EventHandlerRegistry& registry = m_host->eventHandlerRegistry();
520 unsigned count = 0;
521 if (const EventTargetSet* targets = registry.eventHandlerTargets(EventHandle rRegistry::WheelEvent)) {
522 for (EventTargetSet::const_iterator iter = targets->begin(); iter != tar gets->end(); ++iter)
523 count += iter->value;
524 }
525
526 m_host->chrome().client().numWheelEventHandlersChanged(count);
527 }
528
529 bool LocalFrame::isURLAllowed(const KURL& url) const 513 bool LocalFrame::isURLAllowed(const KURL& url) const
530 { 514 {
531 // We allow one level of self-reference because some sites depend on that, 515 // We allow one level of self-reference because some sites depend on that,
532 // but we don't allow more than one. 516 // but we don't allow more than one.
533 if (page()->subframeCount() >= Page::maxNumberOfFrames) 517 if (page()->subframeCount() >= Page::maxNumberOfFrames)
534 return false; 518 return false;
535 bool foundSelfReference = false; 519 bool foundSelfReference = false;
536 for (const LocalFrame* frame = this; frame; frame = frame->tree().parent()) { 520 for (const LocalFrame* frame = this; frame; frame = frame->tree().parent()) {
537 if (equalIgnoringFragmentIdentifier(frame->document()->url(), url)) { 521 if (equalIgnoringFragmentIdentifier(frame->document()->url(), url)) {
538 if (foundSelfReference) 522 if (foundSelfReference)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 LocalFrame* LocalFrame::localFrameRoot() 641 LocalFrame* LocalFrame::localFrameRoot()
658 { 642 {
659 LocalFrame* curFrame = this; 643 LocalFrame* curFrame = this;
660 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame()) 644 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame())
661 curFrame = curFrame->tree().parent(); 645 curFrame = curFrame->tree().parent();
662 646
663 return curFrame; 647 return curFrame;
664 } 648 }
665 649
666 } // namespace WebCore 650 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698