OLD | NEW |
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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2055 if (dispatchDOMActivateEvent(detail, event) != DispatchEventResult::NotC
anceled) | 2055 if (dispatchDOMActivateEvent(detail, event) != DispatchEventResult::NotC
anceled) |
2056 event->setDefaultHandled(); | 2056 event->setDefaultHandled(); |
2057 } else if (eventType == EventTypeNames::contextmenu) { | 2057 } else if (eventType == EventTypeNames::contextmenu) { |
2058 if (Page* page = document().page()) | 2058 if (Page* page = document().page()) |
2059 page->contextMenuController().handleContextMenuEvent(event); | 2059 page->contextMenuController().handleContextMenuEvent(event); |
2060 } else if (eventType == EventTypeNames::textInput) { | 2060 } else if (eventType == EventTypeNames::textInput) { |
2061 if (event->hasInterface(EventNames::TextEvent)) { | 2061 if (event->hasInterface(EventNames::TextEvent)) { |
2062 if (LocalFrame* frame = document().frame()) | 2062 if (LocalFrame* frame = document().frame()) |
2063 frame->eventHandler().defaultTextInputEventHandler(toTextEvent(e
vent)); | 2063 frame->eventHandler().defaultTextInputEventHandler(toTextEvent(e
vent)); |
2064 } | 2064 } |
2065 #if OS(WIN) | 2065 } else if (RuntimeEnabledFeatures::panScrollingEnabled() |
2066 } else if (eventType == EventTypeNames::mousedown && event->isMouseEvent())
{ | 2066 && eventType == EventTypeNames::mousedown |
| 2067 && event->isMouseEvent()) { |
2067 MouseEvent* mouseEvent = toMouseEvent(event); | 2068 MouseEvent* mouseEvent = toMouseEvent(event); |
2068 if (mouseEvent->button() == static_cast<short>(WebPointerProperties::But
ton::Middle)) { | 2069 if (mouseEvent->button() == static_cast<short>(WebPointerProperties::But
ton::Middle)) { |
2069 if (enclosingLinkEventParentOrSelf()) | 2070 if (enclosingLinkEventParentOrSelf()) |
2070 return; | 2071 return; |
2071 | 2072 |
2072 // Avoid that canBeScrolledAndHasScrollableArea changes layout tree | 2073 // Avoid that canBeScrolledAndHasScrollableArea changes layout tree |
2073 // structure. | 2074 // structure. |
2074 // FIXME: We should avoid synchronous layout if possible. We can | 2075 // FIXME: We should avoid synchronous layout if possible. We can |
2075 // remove this synchronous layout if we avoid synchronous layout in | 2076 // remove this synchronous layout if we avoid synchronous layout in |
2076 // LayoutTextControlSingleLine::scrollHeight | 2077 // LayoutTextControlSingleLine::scrollHeight |
2077 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 2078 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
2078 LayoutObject* layoutObject = this->layoutObject(); | 2079 LayoutObject* layoutObject = this->layoutObject(); |
2079 while (layoutObject && (!layoutObject->isBox() || !toLayoutBox(layou
tObject)->canBeScrolledAndHasScrollableArea())) | 2080 while (layoutObject && (!layoutObject->isBox() || !toLayoutBox(layou
tObject)->canBeScrolledAndHasScrollableArea())) |
2080 layoutObject = layoutObject->parent(); | 2081 layoutObject = layoutObject->parent(); |
2081 | 2082 |
2082 if (layoutObject) { | 2083 if (layoutObject) { |
2083 if (LocalFrame* frame = document().frame()) | 2084 if (LocalFrame* frame = document().frame()) |
2084 frame->eventHandler().startPanScrolling(layoutObject); | 2085 frame->eventHandler().startPanScrolling(layoutObject); |
2085 } | 2086 } |
2086 } | 2087 } |
2087 #endif | |
2088 } else if (event->type() == EventTypeNames::webkitEditableContentChanged) { | 2088 } else if (event->type() == EventTypeNames::webkitEditableContentChanged) { |
2089 // TODO(chongz): Remove after shipped. | 2089 // TODO(chongz): Remove after shipped. |
2090 // New InputEvent are dispatched in Editor::appliedEditing, etc. | 2090 // New InputEvent are dispatched in Editor::appliedEditing, etc. |
2091 if (!RuntimeEnabledFeatures::inputEventEnabled()) | 2091 if (!RuntimeEnabledFeatures::inputEventEnabled()) |
2092 dispatchInputEvent(); | 2092 dispatchInputEvent(); |
2093 } | 2093 } |
2094 } | 2094 } |
2095 | 2095 |
2096 void Node::willCallDefaultEventHandler(const Event&) | 2096 void Node::willCallDefaultEventHandler(const Event&) |
2097 { | 2097 { |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2401 if (node) { | 2401 if (node) { |
2402 std::stringstream stream; | 2402 std::stringstream stream; |
2403 node->printNodePathTo(stream); | 2403 node->printNodePathTo(stream); |
2404 LOG(INFO) << stream.str(); | 2404 LOG(INFO) << stream.str(); |
2405 } else { | 2405 } else { |
2406 LOG(INFO) << "Cannot showNodePath for <null>"; | 2406 LOG(INFO) << "Cannot showNodePath for <null>"; |
2407 } | 2407 } |
2408 } | 2408 } |
2409 | 2409 |
2410 #endif | 2410 #endif |
OLD | NEW |