| OLD | NEW |
| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 DEFINE_STATIC_LOCAL(RefPtr<Image>, imageStateNormal, (Image::loadPlatformRes
ource("inputSpeech"))); | 85 DEFINE_STATIC_LOCAL(RefPtr<Image>, imageStateNormal, (Image::loadPlatformRes
ource("inputSpeech"))); |
| 86 DEFINE_STATIC_LOCAL(RefPtr<Image>, imageStateRecording, (Image::loadPlatform
Resource("inputSpeechRecording"))); | 86 DEFINE_STATIC_LOCAL(RefPtr<Image>, imageStateRecording, (Image::loadPlatform
Resource("inputSpeechRecording"))); |
| 87 DEFINE_STATIC_LOCAL(RefPtr<Image>, imageStateWaiting, (Image::loadPlatformRe
source("inputSpeechWaiting"))); | 87 DEFINE_STATIC_LOCAL(RefPtr<Image>, imageStateWaiting, (Image::loadPlatformRe
source("inputSpeechWaiting"))); |
| 88 | 88 |
| 89 InputFieldSpeechButtonElement* speechButton = toInputFieldSpeechButtonElemen
t(element); | 89 InputFieldSpeechButtonElement* speechButton = toInputFieldSpeechButtonElemen
t(element); |
| 90 Image* image = imageStateNormal.get(); | 90 Image* image = imageStateNormal.get(); |
| 91 if (speechButton->state() == InputFieldSpeechButtonElement::Recording) | 91 if (speechButton->state() == InputFieldSpeechButtonElement::Recording) |
| 92 image = imageStateRecording.get(); | 92 image = imageStateRecording.get(); |
| 93 else if (speechButton->state() == InputFieldSpeechButtonElement::Recognizing
) | 93 else if (speechButton->state() == InputFieldSpeechButtonElement::Recognizing
) |
| 94 image = imageStateWaiting.get(); | 94 image = imageStateWaiting.get(); |
| 95 paintInfo.context->drawImage(image, object->style()->colorSpace(), pixelSnap
pedIntRect(buttonRect)); | 95 paintInfo.context->drawImage(image, pixelSnappedIntRect(buttonRect)); |
| 96 | 96 |
| 97 return false; | 97 return false; |
| 98 } | 98 } |
| 99 | 99 |
| 100 } // namespace WebCore | 100 } // namespace WebCore |
| 101 | 101 |
| 102 #endif // ENABLE(INPUT_SPEECH) | 102 #endif // ENABLE(INPUT_SPEECH) |
| OLD | NEW |