| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 // An InputTypeView object represents the UI-specific part of an | 65 // An InputTypeView object represents the UI-specific part of an |
| 66 // HTMLInputElement. Do not expose instances of InputTypeView and classes | 66 // HTMLInputElement. Do not expose instances of InputTypeView and classes |
| 67 // derived from it to classes other than HTMLInputElement. | 67 // derived from it to classes other than HTMLInputElement. |
| 68 class InputTypeView : public RefCounted<InputTypeView> { | 68 class InputTypeView : public RefCounted<InputTypeView> { |
| 69 WTF_MAKE_NONCOPYABLE(InputTypeView); | 69 WTF_MAKE_NONCOPYABLE(InputTypeView); |
| 70 WTF_MAKE_FAST_ALLOCATED; | 70 WTF_MAKE_FAST_ALLOCATED; |
| 71 | 71 |
| 72 public: | 72 public: |
| 73 static PassRefPtr<InputTypeView> create(HTMLInputElement*); |
| 73 virtual ~InputTypeView(); | 74 virtual ~InputTypeView(); |
| 74 | 75 |
| 75 virtual bool sizeShouldIncludeDecoration(int defaultSize, int& preferredSize
) const; | 76 virtual bool sizeShouldIncludeDecoration(int defaultSize, int& preferredSize
) const; |
| 76 virtual void handleClickEvent(MouseEvent*); | 77 virtual void handleClickEvent(MouseEvent*); |
| 77 virtual void handleMouseDownEvent(MouseEvent*); | 78 virtual void handleMouseDownEvent(MouseEvent*); |
| 78 virtual PassOwnPtr<ClickHandlingState> willDispatchClick(); | 79 virtual PassOwnPtr<ClickHandlingState> willDispatchClick(); |
| 79 virtual void didDispatchClick(Event*, const ClickHandlingState&); | 80 virtual void didDispatchClick(Event*, const ClickHandlingState&); |
| 80 virtual void handleDOMActivateEvent(Event*); | 81 virtual void handleDOMActivateEvent(Event*); |
| 81 virtual void handleKeydownEvent(KeyboardEvent*); | 82 virtual void handleKeydownEvent(KeyboardEvent*); |
| 82 virtual void handleKeypressEvent(KeyboardEvent*); | 83 virtual void handleKeypressEvent(KeyboardEvent*); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 HTMLInputElement* element() const { return m_element; } | 115 HTMLInputElement* element() const { return m_element; } |
| 115 | 116 |
| 116 private: | 117 private: |
| 117 // Raw pointer because the HTMLInputElement object owns this InputTypeView | 118 // Raw pointer because the HTMLInputElement object owns this InputTypeView |
| 118 // object. | 119 // object. |
| 119 HTMLInputElement* m_element; | 120 HTMLInputElement* m_element; |
| 120 }; | 121 }; |
| 121 | 122 |
| 122 } // namespace WebCore | 123 } // namespace WebCore |
| 123 #endif | 124 #endif |
| OLD | NEW |