| 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 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
| 22 * | 22 * |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #include "config.h" | 25 #include "config.h" |
| 26 #include "core/html/HTMLFormElement.h" | 26 #include "core/html/HTMLFormElement.h" |
| 27 | 27 |
| 28 #include <limits> | 28 #include <limits> |
| 29 #include "bindings/v8/ScriptController.h" | 29 #include "bindings/v8/ScriptController.h" |
| 30 #include "bindings/v8/ScriptEventListener.h" | 30 #include "bindings/v8/ScriptEventListener.h" |
| 31 #include "bindings/v8/V8DOMActivityLogger.h" |
| 31 #include "core/HTMLNames.h" | 32 #include "core/HTMLNames.h" |
| 32 #include "core/dom/Attribute.h" | 33 #include "core/dom/Attribute.h" |
| 33 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
| 34 #include "core/dom/ElementTraversal.h" | 35 #include "core/dom/ElementTraversal.h" |
| 35 #include "core/dom/IdTargetObserverRegistry.h" | 36 #include "core/dom/IdTargetObserverRegistry.h" |
| 36 #include "core/events/AutocompleteErrorEvent.h" | 37 #include "core/events/AutocompleteErrorEvent.h" |
| 37 #include "core/events/Event.h" | 38 #include "core/events/Event.h" |
| 38 #include "core/events/GenericEventQueue.h" | 39 #include "core/events/GenericEventQueue.h" |
| 39 #include "core/events/ScopedEventQueue.h" | 40 #include "core/events/ScopedEventQueue.h" |
| 40 #include "core/frame/LocalDOMWindow.h" | 41 #include "core/frame/LocalDOMWindow.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 bool formIsTablePart = display == TABLE || display == INLINE_TABLE || displa
y == TABLE_ROW_GROUP | 130 bool formIsTablePart = display == TABLE || display == INLINE_TABLE || displa
y == TABLE_ROW_GROUP |
| 130 || display == TABLE_HEADER_GROUP || display == TABLE_FOOTER_GROUP || dis
play == TABLE_ROW | 131 || display == TABLE_HEADER_GROUP || display == TABLE_FOOTER_GROUP || dis
play == TABLE_ROW |
| 131 || display == TABLE_COLUMN_GROUP || display == TABLE_COLUMN || display =
= TABLE_CELL | 132 || display == TABLE_COLUMN_GROUP || display == TABLE_COLUMN || display =
= TABLE_CELL |
| 132 || display == TABLE_CAPTION; | 133 || display == TABLE_CAPTION; |
| 133 | 134 |
| 134 return formIsTablePart; | 135 return formIsTablePart; |
| 135 } | 136 } |
| 136 | 137 |
| 137 Node::InsertionNotificationRequest HTMLFormElement::insertedInto(ContainerNode*
insertionPoint) | 138 Node::InsertionNotificationRequest HTMLFormElement::insertedInto(ContainerNode*
insertionPoint) |
| 138 { | 139 { |
| 140 if (insertionPoint->isInTreeScope()) { |
| 141 V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivi
tyLoggerIfIsolatedWorld(); |
| 142 if (activityLogger) { |
| 143 Vector<String> argv; |
| 144 argv.append("form"); |
| 145 argv.append(fastGetAttribute(methodAttr)); |
| 146 argv.append(fastGetAttribute(actionAttr)); |
| 147 activityLogger->logEvent("blinkAddElement", 3, argv.data()); |
| 148 } |
| 149 } |
| 139 HTMLElement::insertedInto(insertionPoint); | 150 HTMLElement::insertedInto(insertionPoint); |
| 140 if (insertionPoint->inDocument()) | 151 if (insertionPoint->inDocument()) |
| 141 this->document().didAssociateFormControl(this); | 152 this->document().didAssociateFormControl(this); |
| 142 return InsertionDone; | 153 return InsertionDone; |
| 143 } | 154 } |
| 144 | 155 |
| 145 template<class T> | 156 template<class T> |
| 146 void notifyFormRemovedFromTree(const T& elements, Node& root) | 157 void notifyFormRemovedFromTree(const T& elements, Node& root) |
| 147 { | 158 { |
| 148 size_t size = elements.size(); | 159 size_t size = elements.size(); |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 } | 810 } |
| 800 | 811 |
| 801 void HTMLFormElement::setDemoted(bool demoted) | 812 void HTMLFormElement::setDemoted(bool demoted) |
| 802 { | 813 { |
| 803 if (demoted) | 814 if (demoted) |
| 804 UseCounter::count(document(), UseCounter::DemotedFormElement); | 815 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 805 m_wasDemoted = demoted; | 816 m_wasDemoted = demoted; |
| 806 } | 817 } |
| 807 | 818 |
| 808 } // namespace | 819 } // namespace |
| OLD | NEW |