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

Side by Side Diff: Source/core/html/HTMLFormElement.cpp

Issue 351923005: Refactoring activity logger. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
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 * 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 else if (name == accept_charsetAttr) 513 else if (name == accept_charsetAttr)
514 m_attributes.setAcceptCharset(value); 514 m_attributes.setAcceptCharset(value);
515 else if (name == onautocompleteAttr) 515 else if (name == onautocompleteAttr)
516 setAttributeEventListener(EventTypeNames::autocomplete, createAttributeE ventListener(this, name, value, eventParameterName())); 516 setAttributeEventListener(EventTypeNames::autocomplete, createAttributeE ventListener(this, name, value, eventParameterName()));
517 else if (name == onautocompleteerrorAttr) 517 else if (name == onautocompleteerrorAttr)
518 setAttributeEventListener(EventTypeNames::autocompleteerror, createAttri buteEventListener(this, name, value, eventParameterName())); 518 setAttributeEventListener(EventTypeNames::autocompleteerror, createAttri buteEventListener(this, name, value, eventParameterName()));
519 else 519 else
520 HTMLElement::parseAttribute(name, value); 520 HTMLElement::parseAttribute(name, value);
521 } 521 }
522 522
523 void HTMLFormElement::attributeWillChange(const QualifiedName& name, const Atomi cString& oldValue, const AtomicString& newValue)
524 {
525 if (name == actionAttr && inDocument()) {
526 V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivi tyLoggerIfIsolatedWorld();
527 if (activityLogger) {
528 Vector<String> argv;
529 argv.append("form");
530 argv.append(actionAttr.toString());
531 argv.append(oldValue);
532 argv.append(newValue);
533 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data ());
534 }
535 }
536 HTMLElement::attributeWillChange(name, oldValue, newValue);
537 }
538
523 void HTMLFormElement::associate(FormAssociatedElement& e) 539 void HTMLFormElement::associate(FormAssociatedElement& e)
524 { 540 {
525 m_associatedElementsAreDirty = true; 541 m_associatedElementsAreDirty = true;
526 m_associatedElements.clear(); 542 m_associatedElements.clear();
527 } 543 }
528 544
529 void HTMLFormElement::disassociate(FormAssociatedElement& e) 545 void HTMLFormElement::disassociate(FormAssociatedElement& e)
530 { 546 {
531 m_associatedElementsAreDirty = true; 547 m_associatedElementsAreDirty = true;
532 m_associatedElements.clear(); 548 m_associatedElements.clear();
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 } 826 }
811 827
812 void HTMLFormElement::setDemoted(bool demoted) 828 void HTMLFormElement::setDemoted(bool demoted)
813 { 829 {
814 if (demoted) 830 if (demoted)
815 UseCounter::count(document(), UseCounter::DemotedFormElement); 831 UseCounter::count(document(), UseCounter::DemotedFormElement);
816 m_wasDemoted = demoted; 832 m_wasDemoted = demoted;
817 } 833 }
818 834
819 } // namespace 835 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698