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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 RefPtr<RenderStyle> originalStyle = originalStyleForRenderer(); | 155 RefPtr<RenderStyle> originalStyle = originalStyleForRenderer(); |
156 RefPtr<RenderStyle> style = RenderStyle::clone(originalStyle.get()); | 156 RefPtr<RenderStyle> style = RenderStyle::clone(originalStyle.get()); |
157 RenderStyle* inputStyle = hostInput()->renderStyle(); | 157 RenderStyle* inputStyle = hostInput()->renderStyle(); |
158 ASSERT(inputStyle); | 158 ASSERT(inputStyle); |
159 style->setWidth(Length(inputStyle->fontSize(), Fixed)); | 159 style->setWidth(Length(inputStyle->fontSize(), Fixed)); |
160 style->setHeight(Length(inputStyle->fontSize(), Fixed)); | 160 style->setHeight(Length(inputStyle->fontSize(), Fixed)); |
161 updateImage(); | 161 updateImage(); |
162 return style.release(); | 162 return style.release(); |
163 } | 163 } |
164 | 164 |
165 RenderObject* TextFieldDecorationElement::createRenderer(RenderArena* arena, Ren
derStyle*) | 165 RenderObject* TextFieldDecorationElement::createRenderer(RenderStyle*) |
166 { | 166 { |
167 RenderImage* image = new (arena) RenderImage(this); | 167 RenderImage* image = new RenderImage(this); |
168 image->setImageResource(RenderImageResource::create()); | 168 image->setImageResource(RenderImageResource::create()); |
169 return image; | 169 return image; |
170 } | 170 } |
171 | 171 |
172 void TextFieldDecorationElement::attach(const AttachContext& context) | 172 void TextFieldDecorationElement::attach(const AttachContext& context) |
173 { | 173 { |
174 HTMLDivElement::attach(context); | 174 HTMLDivElement::attach(context); |
175 updateImage(); | 175 updateImage(); |
176 } | 176 } |
177 | 177 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 bool TextFieldDecorationElement::willRespondToMouseClickEvents() | 227 bool TextFieldDecorationElement::willRespondToMouseClickEvents() |
228 { | 228 { |
229 const HTMLInputElement* input = hostInput(); | 229 const HTMLInputElement* input = hostInput(); |
230 if (!input->isDisabledOrReadOnly()) | 230 if (!input->isDisabledOrReadOnly()) |
231 return true; | 231 return true; |
232 | 232 |
233 return HTMLDivElement::willRespondToMouseClickEvents(); | 233 return HTMLDivElement::willRespondToMouseClickEvents(); |
234 } | 234 } |
235 | 235 |
236 } // namespace WebCore | 236 } // namespace WebCore |
OLD | NEW |