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

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

Issue 15724005: [Binding] Support primitive type for union member (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: do not inherit getter. rename DoNotCheckJSProperty to OverrideBuiltins Created 7 years, 7 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 HTMLElement::finishParsingChildren(); 701 HTMLElement::finishParsingChildren();
702 document()->formController()->restoreControlStateIn(*this); 702 document()->formController()->restoreControlStateIn(*this);
703 } 703 }
704 704
705 void HTMLFormElement::copyNonAttributePropertiesFromElement(const Element& sourc e) 705 void HTMLFormElement::copyNonAttributePropertiesFromElement(const Element& sourc e)
706 { 706 {
707 m_wasDemoted = static_cast<const HTMLFormElement&>(source).m_wasDemoted; 707 m_wasDemoted = static_cast<const HTMLFormElement&>(source).m_wasDemoted;
708 HTMLElement::copyNonAttributePropertiesFromElement(source); 708 HTMLElement::copyNonAttributePropertiesFromElement(source);
709 } 709 }
710 710
711 void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, RefPtr<Node List>& returnValue1, RefPtr<Node>& returnValue2) 711 void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, bool& retur nValue0Enabled, RefPtr<NodeList>& returnValue0, bool& returnValue1Enabled, RefPt r<Node>& returnValue1)
712 { 712 {
713 // Call getNamedElements twice, first time check if it has a value 713 // Call getNamedElements twice, first time check if it has a value
714 // and let HTMLFormElement update its cache. 714 // and let HTMLFormElement update its cache.
715 // See issue: 867404 715 // See issue: 867404
716 { 716 {
717 Vector<RefPtr<Node> > elements; 717 Vector<RefPtr<Node> > elements;
718 getNamedElements(name, elements); 718 getNamedElements(name, elements);
719 if (elements.isEmpty()) 719 if (elements.isEmpty())
720 return; 720 return;
721 } 721 }
722 722
723 // Second call may return different results from the first call, 723 // Second call may return different results from the first call,
724 // but if the first the size cannot be zero. 724 // but if the first the size cannot be zero.
725 Vector<RefPtr<Node> > elements; 725 Vector<RefPtr<Node> > elements;
726 getNamedElements(name, elements); 726 getNamedElements(name, elements);
727 ASSERT(!elements.isEmpty()); 727 ASSERT(!elements.isEmpty());
728 728
729 if (elements.size() == 1) { 729 if (elements.size() == 1) {
730 returnValue2 = elements.at(0); 730 returnValue1Enabled = true;
731 returnValue1 = elements.at(0);
731 return; 732 return;
732 } 733 }
733 734
734 returnValue1 = NamedNodesCollection::create(elements); 735 returnValue0Enabled = true;
736 returnValue0 = NamedNodesCollection::create(elements);
735 } 737 }
736 738
737 } // namespace 739 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698