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

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

Issue 267303004: Oilpan: cleanup based on review comments after removal of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
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 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 , m_wasFocusedByMouse(false) 58 , m_wasFocusedByMouse(false)
59 { 59 {
60 setHasCustomStyleCallbacks(); 60 setHasCustomStyleCallbacks();
61 associateByParser(form); 61 associateByParser(form);
62 } 62 }
63 63
64 HTMLFormControlElement::~HTMLFormControlElement() 64 HTMLFormControlElement::~HTMLFormControlElement()
65 { 65 {
66 #if !ENABLE(OILPAN) 66 #if !ENABLE(OILPAN)
67 setForm(0); 67 setForm(0);
68 hideVisibleValidationMessage();
haraken 2014/05/07 12:50:20 tkent-san: I'm not sure if we can remove this. See
Mads Ager (chromium) 2014/05/08 09:08:59 Kent confirmed that this can be removed on the oth
69 #endif 68 #endif
70 } 69 }
71 70
72 String HTMLFormControlElement::formEnctype() const 71 String HTMLFormControlElement::formEnctype() const
73 { 72 {
74 const AtomicString& formEnctypeAttr = fastGetAttribute(formenctypeAttr); 73 const AtomicString& formEnctypeAttr = fastGetAttribute(formenctypeAttr);
75 if (formEnctypeAttr.isNull()) 74 if (formEnctypeAttr.isNull())
76 return emptyString(); 75 return emptyString();
77 return FormSubmission::Attributes::parseEncodingType(formEnctypeAttr); 76 return FormSubmission::Attributes::parseEncodingType(formEnctypeAttr);
78 } 77 }
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 { 415 {
417 if (m_validationMessage) 416 if (m_validationMessage)
418 m_validationMessage->requestToHideMessage(); 417 m_validationMessage->requestToHideMessage();
419 } 418 }
420 419
421 bool HTMLFormControlElement::checkValidity(Vector<RefPtr<FormAssociatedElement> >* unhandledInvalidControls) 420 bool HTMLFormControlElement::checkValidity(Vector<RefPtr<FormAssociatedElement> >* unhandledInvalidControls)
422 { 421 {
423 if (!willValidate() || isValidFormControlElement()) 422 if (!willValidate() || isValidFormControlElement())
424 return true; 423 return true;
425 // An event handler can deref this object. 424 // An event handler can deref this object.
426 RefPtr<HTMLFormControlElement> protector(this); 425 RefPtrWillBeRawPtr<HTMLFormControlElement> protector(this);
427 RefPtr<Document> originalDocument(document()); 426 RefPtrWillBeRawPtr<Document> originalDocument(document());
428 bool needsDefaultAction = dispatchEvent(Event::createCancelable(EventTypeNam es::invalid)); 427 bool needsDefaultAction = dispatchEvent(Event::createCancelable(EventTypeNam es::invalid));
429 if (needsDefaultAction && unhandledInvalidControls && inDocument() && origin alDocument == document()) 428 if (needsDefaultAction && unhandledInvalidControls && inDocument() && origin alDocument == document())
430 unhandledInvalidControls->append(this); 429 unhandledInvalidControls->append(this);
431 return false; 430 return false;
432 } 431 }
433 432
434 bool HTMLFormControlElement::isValidFormControlElement() 433 bool HTMLFormControlElement::isValidFormControlElement()
435 { 434 {
436 // If the following assertion fails, setNeedsValidityCheck() is not called 435 // If the following assertion fails, setNeedsValidityCheck() is not called
437 // correctly when something which changes validity is updated. 436 // correctly when something which changes validity is updated.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 497
499 void HTMLFormControlElement::setFocus(bool flag) 498 void HTMLFormControlElement::setFocus(bool flag)
500 { 499 {
501 LabelableElement::setFocus(flag); 500 LabelableElement::setFocus(flag);
502 501
503 if (!flag && wasChangedSinceLastFormControlChangeEvent()) 502 if (!flag && wasChangedSinceLastFormControlChangeEvent())
504 dispatchFormControlChangeEvent(); 503 dispatchFormControlChangeEvent();
505 } 504 }
506 505
507 } // namespace Webcore 506 } // namespace Webcore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698