| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 return element.release(); | 161 return element.release(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 const AtomicString& SearchFieldDecorationElement::shadowPseudoId() const | 164 const AtomicString& SearchFieldDecorationElement::shadowPseudoId() const |
| 165 { | 165 { |
| 166 DEFINE_STATIC_LOCAL(AtomicString, resultsDecorationId, ("-webkit-search-resu
lts-decoration", AtomicString::ConstructFromLiteral)); | 166 DEFINE_STATIC_LOCAL(AtomicString, resultsDecorationId, ("-webkit-search-resu
lts-decoration", AtomicString::ConstructFromLiteral)); |
| 167 DEFINE_STATIC_LOCAL(AtomicString, decorationId, ("-webkit-search-decoration"
, AtomicString::ConstructFromLiteral)); | 167 DEFINE_STATIC_LOCAL(AtomicString, decorationId, ("-webkit-search-decoration"
, AtomicString::ConstructFromLiteral)); |
| 168 Element* host = shadowHost(); | 168 Element* host = shadowHost(); |
| 169 if (!host) | 169 if (!host) |
| 170 return resultsDecorationId; | 170 return resultsDecorationId; |
| 171 if (host->hasTagName(inputTag)) { | 171 if (isHTMLInputElement(*host)) { |
| 172 if (toHTMLInputElement(host)->maxResults() < 0) | 172 if (toHTMLInputElement(host)->maxResults() < 0) |
| 173 return decorationId; | 173 return decorationId; |
| 174 return resultsDecorationId; | 174 return resultsDecorationId; |
| 175 } | 175 } |
| 176 return resultsDecorationId; | 176 return resultsDecorationId; |
| 177 } | 177 } |
| 178 | 178 |
| 179 void SearchFieldDecorationElement::defaultEventHandler(Event* event) | 179 void SearchFieldDecorationElement::defaultEventHandler(Event* event) |
| 180 { | 180 { |
| 181 // On mousedown, focus the search field | 181 // On mousedown, focus the search field |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 } | 462 } |
| 463 | 463 |
| 464 void InputFieldSpeechButtonElement::stopSpeechInput() | 464 void InputFieldSpeechButtonElement::stopSpeechInput() |
| 465 { | 465 { |
| 466 if (m_state == Recording) | 466 if (m_state == Recording) |
| 467 speechInput()->stopRecording(m_listenerId); | 467 speechInput()->stopRecording(m_listenerId); |
| 468 } | 468 } |
| 469 #endif // ENABLE(INPUT_SPEECH) | 469 #endif // ENABLE(INPUT_SPEECH) |
| 470 | 470 |
| 471 } | 471 } |
| OLD | NEW |