OLD | NEW |
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 15 matching lines...) Expand all Loading... |
26 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 26 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
27 * Boston, MA 02110-1301, USA. | 27 * Boston, MA 02110-1301, USA. |
28 */ | 28 */ |
29 | 29 |
30 #include "config.h" | 30 #include "config.h" |
31 #include "core/frame/LocalFrame.h" | 31 #include "core/frame/LocalFrame.h" |
32 | 32 |
33 #include "RuntimeEnabledFeatures.h" | 33 #include "RuntimeEnabledFeatures.h" |
34 #include "bindings/v8/ScriptController.h" | 34 #include "bindings/v8/ScriptController.h" |
35 #include "core/dom/DocumentType.h" | 35 #include "core/dom/DocumentType.h" |
36 #include "core/dom/WheelController.h" | |
37 #include "core/editing/Editor.h" | 36 #include "core/editing/Editor.h" |
38 #include "core/editing/FrameSelection.h" | 37 #include "core/editing/FrameSelection.h" |
39 #include "core/editing/InputMethodController.h" | 38 #include "core/editing/InputMethodController.h" |
40 #include "core/editing/SpellChecker.h" | 39 #include "core/editing/SpellChecker.h" |
41 #include "core/editing/htmlediting.h" | 40 #include "core/editing/htmlediting.h" |
42 #include "core/editing/markup.h" | 41 #include "core/editing/markup.h" |
43 #include "core/events/Event.h" | 42 #include "core/events/Event.h" |
44 #include "core/fetch/ResourceFetcher.h" | 43 #include "core/fetch/ResourceFetcher.h" |
45 #include "core/frame/DOMWindow.h" | 44 #include "core/frame/DOMWindow.h" |
| 45 #include "core/frame/EventHandlerRegistry.h" |
46 #include "core/frame/FrameConsole.h" | 46 #include "core/frame/FrameConsole.h" |
47 #include "core/frame/FrameHost.h" | 47 #include "core/frame/FrameHost.h" |
48 #include "core/frame/FrameView.h" | 48 #include "core/frame/FrameView.h" |
49 #include "core/frame/Settings.h" | 49 #include "core/frame/Settings.h" |
50 #include "core/html/HTMLFrameElementBase.h" | 50 #include "core/html/HTMLFrameElementBase.h" |
51 #include "core/inspector/InspectorInstrumentation.h" | 51 #include "core/inspector/InspectorInstrumentation.h" |
52 #include "core/loader/FrameLoaderClient.h" | 52 #include "core/loader/FrameLoaderClient.h" |
53 #include "core/page/Chrome.h" | 53 #include "core/page/Chrome.h" |
54 #include "core/page/EventHandler.h" | 54 #include "core/page/EventHandler.h" |
55 #include "core/page/FocusController.h" | 55 #include "core/page/FocusController.h" |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 503 |
504 void LocalFrame::deviceOrPageScaleFactorChanged() | 504 void LocalFrame::deviceOrPageScaleFactorChanged() |
505 { | 505 { |
506 document()->mediaQueryAffectingValueChanged(); | 506 document()->mediaQueryAffectingValueChanged(); |
507 for (RefPtr<LocalFrame> child = tree().firstChild(); child; child = child->t
ree().nextSibling()) | 507 for (RefPtr<LocalFrame> child = tree().firstChild(); child; child = child->t
ree().nextSibling()) |
508 child->deviceOrPageScaleFactorChanged(); | 508 child->deviceOrPageScaleFactorChanged(); |
509 } | 509 } |
510 | 510 |
511 void LocalFrame::notifyChromeClientWheelEventHandlerCountChanged() const | 511 void LocalFrame::notifyChromeClientWheelEventHandlerCountChanged() const |
512 { | 512 { |
| 513 // FIXME: No-one is using this information, so remove this code. |
513 // Ensure that this method is being called on the main frame of the page. | 514 // Ensure that this method is being called on the main frame of the page. |
514 ASSERT(isMainFrame()); | 515 ASSERT(isMainFrame()); |
515 | 516 |
| 517 EventHandlerRegistry& registry = m_host->eventHandlerRegistry(); |
516 unsigned count = 0; | 518 unsigned count = 0; |
517 for (const LocalFrame* frame = this; frame; frame = frame->tree().traverseNe
xt()) { | 519 if (const EventTargetSet* targets = registry.eventHandlerTargets(EventHandle
rRegistry::WheelEvent)) { |
518 if (frame->document()) | 520 for (EventTargetSet::const_iterator iter = targets->begin(); iter != tar
gets->end(); ++iter) |
519 count += WheelController::from(*frame->document())->wheelEventHandle
rCount(); | 521 count += iter->value; |
520 } | 522 } |
521 | 523 |
522 m_host->chrome().client().numWheelEventHandlersChanged(count); | 524 m_host->chrome().client().numWheelEventHandlersChanged(count); |
523 } | 525 } |
524 | 526 |
525 bool LocalFrame::isURLAllowed(const KURL& url) const | 527 bool LocalFrame::isURLAllowed(const KURL& url) const |
526 { | 528 { |
527 // We allow one level of self-reference because some sites depend on that, | 529 // We allow one level of self-reference because some sites depend on that, |
528 // but we don't allow more than one. | 530 // but we don't allow more than one. |
529 if (page()->subframeCount() >= Page::maxNumberOfFrames) | 531 if (page()->subframeCount() >= Page::maxNumberOfFrames) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 LocalFrame* LocalFrame::localFrameRoot() | 655 LocalFrame* LocalFrame::localFrameRoot() |
654 { | 656 { |
655 LocalFrame* curFrame = this; | 657 LocalFrame* curFrame = this; |
656 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) | 658 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) |
657 curFrame = curFrame->tree().parent(); | 659 curFrame = curFrame->tree().parent(); |
658 | 660 |
659 return curFrame; | 661 return curFrame; |
660 } | 662 } |
661 | 663 |
662 } // namespace WebCore | 664 } // namespace WebCore |
OLD | NEW |