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

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

Issue 321023002: Avoid branching in createAttributeEventListener (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing 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
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | Source/core/html/HTMLFrameElementBase.cpp » ('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) 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 m_attributes.parseAction(value); 480 m_attributes.parseAction(value);
481 else if (name == targetAttr) 481 else if (name == targetAttr)
482 m_attributes.setTarget(value); 482 m_attributes.setTarget(value);
483 else if (name == methodAttr) 483 else if (name == methodAttr)
484 m_attributes.updateMethodType(value); 484 m_attributes.updateMethodType(value);
485 else if (name == enctypeAttr) 485 else if (name == enctypeAttr)
486 m_attributes.updateEncodingType(value); 486 m_attributes.updateEncodingType(value);
487 else if (name == accept_charsetAttr) 487 else if (name == accept_charsetAttr)
488 m_attributes.setAcceptCharset(value); 488 m_attributes.setAcceptCharset(value);
489 else if (name == onautocompleteAttr) 489 else if (name == onautocompleteAttr)
490 setAttributeEventListener(EventTypeNames::autocomplete, createAttributeE ventListener(this, name, value)); 490 setAttributeEventListener(EventTypeNames::autocomplete, createAttributeE ventListener(this, name, value, eventParameterName()));
491 else if (name == onautocompleteerrorAttr) 491 else if (name == onautocompleteerrorAttr)
492 setAttributeEventListener(EventTypeNames::autocompleteerror, createAttri buteEventListener(this, name, value)); 492 setAttributeEventListener(EventTypeNames::autocompleteerror, createAttri buteEventListener(this, name, value, eventParameterName()));
493 else 493 else
494 HTMLElement::parseAttribute(name, value); 494 HTMLElement::parseAttribute(name, value);
495 } 495 }
496 496
497 void HTMLFormElement::associate(FormAssociatedElement& e) 497 void HTMLFormElement::associate(FormAssociatedElement& e)
498 { 498 {
499 m_associatedElementsAreDirty = true; 499 m_associatedElementsAreDirty = true;
500 m_associatedElements.clear(); 500 m_associatedElements.clear();
501 } 501 }
502 502
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 } 784 }
785 785
786 void HTMLFormElement::setDemoted(bool demoted) 786 void HTMLFormElement::setDemoted(bool demoted)
787 { 787 {
788 if (demoted) 788 if (demoted)
789 UseCounter::count(document(), UseCounter::DemotedFormElement); 789 UseCounter::count(document(), UseCounter::DemotedFormElement);
790 m_wasDemoted = demoted; 790 m_wasDemoted = demoted;
791 } 791 }
792 792
793 } // namespace 793 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | Source/core/html/HTMLFrameElementBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698