OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 TextFieldDecoratorImpl::~TextFieldDecoratorImpl() | 55 TextFieldDecoratorImpl::~TextFieldDecoratorImpl() |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 WebTextFieldDecoratorClient* TextFieldDecoratorImpl::decoratorClient() | 59 WebTextFieldDecoratorClient* TextFieldDecoratorImpl::decoratorClient() |
60 { | 60 { |
61 return m_client; | 61 return m_client; |
62 } | 62 } |
63 | 63 |
64 bool TextFieldDecoratorImpl::willAddDecorationTo(HTMLInputElement* input) | 64 bool TextFieldDecoratorImpl::willAddDecorationTo(Handle<HTMLInputElement> input) |
65 { | 65 { |
66 ASSERT(input); | 66 ASSERT(input); |
67 return m_client->shouldAddDecorationTo(WebInputElement(input)); | 67 return m_client->shouldAddDecorationTo(WebInputElement(input)); |
68 } | 68 } |
69 | 69 |
70 bool TextFieldDecoratorImpl::visibleByDefault() | 70 bool TextFieldDecoratorImpl::visibleByDefault() |
71 { | 71 { |
72 return m_client->visibleByDefault(); | 72 return m_client->visibleByDefault(); |
73 } | 73 } |
74 | 74 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 if (imageName.isEmpty()) | 119 if (imageName.isEmpty()) |
120 m_cachedImageForHoverState = imageForNormalState(); | 120 m_cachedImageForHoverState = imageForNormalState(); |
121 else { | 121 else { |
122 RefPtr<Image> image = Image::loadPlatformResource(imageName.data()); | 122 RefPtr<Image> image = Image::loadPlatformResource(imageName.data()); |
123 m_cachedImageForHoverState = new CachedImage(image.get()); | 123 m_cachedImageForHoverState = new CachedImage(image.get()); |
124 } | 124 } |
125 } | 125 } |
126 return m_cachedImageForHoverState.get(); | 126 return m_cachedImageForHoverState.get(); |
127 } | 127 } |
128 | 128 |
129 void TextFieldDecoratorImpl::handleClick(HTMLInputElement* input) | 129 void TextFieldDecoratorImpl::handleClick(Handle<HTMLInputElement> input) |
130 { | 130 { |
131 ASSERT(input); | 131 ASSERT(input); |
132 WebInputElement webInput(input); | 132 WebInputElement webInput(input); |
133 m_client->handleClick(webInput); | 133 m_client->handleClick(webInput); |
134 } | 134 } |
135 | 135 |
136 void TextFieldDecoratorImpl::willDetach(HTMLInputElement* input) | 136 void TextFieldDecoratorImpl::willDetach(Handle<HTMLInputElement> input) |
137 { | 137 { |
138 ASSERT(input); | 138 ASSERT(input); |
139 WebInputElement webInput(input); | 139 WebInputElement webInput(input); |
140 m_client->willDetach(webInput); | 140 m_client->willDetach(webInput); |
141 } | 141 } |
142 | 142 |
143 } | 143 } |
OLD | NEW |