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

Side by Side Diff: third_party/WebKit/Source/web/WebFormElement.cpp

Issue 1365203002: Make WebNode::to<Type>() (and toConst) casts contain type asserts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove more bad casts in WebFrameTest. Created 5 years, 2 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void WebFormElement::finishRequestAutocomplete(WebFormElement::AutocompleteResul t result) 97 void WebFormElement::finishRequestAutocomplete(WebFormElement::AutocompleteResul t result)
98 { 98 {
99 unwrap<HTMLFormElement>()->finishRequestAutocomplete(static_cast<HTMLFormEle ment::AutocompleteResult>(result)); 99 unwrap<HTMLFormElement>()->finishRequestAutocomplete(static_cast<HTMLFormEle ment::AutocompleteResult>(result));
100 } 100 }
101 101
102 WebFormElement::WebFormElement(const PassRefPtrWillBeRawPtr<HTMLFormElement>& e) 102 WebFormElement::WebFormElement(const PassRefPtrWillBeRawPtr<HTMLFormElement>& e)
103 : WebElement(e) 103 : WebElement(e)
104 { 104 {
105 } 105 }
106 106
107 DEFINE_WEB_NODE_TYPE_CASTS(WebFormElement, isHTMLFormElement(constUnwrap<Node>() ));
108
107 WebFormElement& WebFormElement::operator=(const PassRefPtrWillBeRawPtr<HTMLFormE lement>& e) 109 WebFormElement& WebFormElement::operator=(const PassRefPtrWillBeRawPtr<HTMLFormE lement>& e)
108 { 110 {
109 m_private = e; 111 m_private = e;
110 return *this; 112 return *this;
111 } 113 }
112 114
113 WebFormElement::operator PassRefPtrWillBeRawPtr<HTMLFormElement>() const 115 WebFormElement::operator PassRefPtrWillBeRawPtr<HTMLFormElement>() const
114 { 116 {
115 return toHTMLFormElement(m_private.get()); 117 return toHTMLFormElement(m_private.get());
116 } 118 }
117 119
118 } // namespace blink 120 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698