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

Side by Side Diff: third_party/WebKit/Source/web/WebLabelElement.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: Add BLINK_IMPLEMENTATION guard. 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 30 matching lines...) Expand all
41 WebElement WebLabelElement::correspondingControl() 41 WebElement WebLabelElement::correspondingControl()
42 { 42 {
43 return WebElement(unwrap<HTMLLabelElement>()->control()); 43 return WebElement(unwrap<HTMLLabelElement>()->control());
44 } 44 }
45 45
46 WebLabelElement::WebLabelElement(const PassRefPtrWillBeRawPtr<HTMLLabelElement>& elem) 46 WebLabelElement::WebLabelElement(const PassRefPtrWillBeRawPtr<HTMLLabelElement>& elem)
47 : WebElement(elem) 47 : WebElement(elem)
48 { 48 {
49 } 49 }
50 50
51 DEFINE_WEB_NODE_TYPE_CASTS(WebLabelElement, isHTMLLabelElement(constUnwrap<Node> ()));
52
51 WebLabelElement& WebLabelElement::operator=(const PassRefPtrWillBeRawPtr<HTMLLab elElement>& elem) 53 WebLabelElement& WebLabelElement::operator=(const PassRefPtrWillBeRawPtr<HTMLLab elElement>& elem)
52 { 54 {
53 m_private = elem; 55 m_private = elem;
54 return *this; 56 return *this;
55 } 57 }
56 58
57 WebLabelElement::operator PassRefPtrWillBeRawPtr<HTMLLabelElement>() const 59 WebLabelElement::operator PassRefPtrWillBeRawPtr<HTMLLabelElement>() const
58 { 60 {
59 return toHTMLLabelElement(m_private.get()); 61 return toHTMLLabelElement(m_private.get());
60 } 62 }
61 63
62 } // namespace blink 64 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebInputElement.cpp ('k') | third_party/WebKit/Source/web/WebNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698