| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 TextControlInnerContainer::TextControlInnerContainer(Document* document) | 54 TextControlInnerContainer::TextControlInnerContainer(Document* document) |
| 55 : HTMLDivElement(divTag, document) | 55 : HTMLDivElement(divTag, document) |
| 56 { | 56 { |
| 57 } | 57 } |
| 58 | 58 |
| 59 PassRefPtr<TextControlInnerContainer> TextControlInnerContainer::create(Document
* document) | 59 PassRefPtr<TextControlInnerContainer> TextControlInnerContainer::create(Document
* document) |
| 60 { | 60 { |
| 61 return adoptRef(new TextControlInnerContainer(document)); | 61 return adoptRef(new TextControlInnerContainer(document)); |
| 62 } | 62 } |
| 63 | 63 |
| 64 RenderObject* TextControlInnerContainer::createRenderer(RenderArena* arena, Rend
erStyle*) | 64 RenderObject* TextControlInnerContainer::createRenderer(RenderStyle*) |
| 65 { | 65 { |
| 66 return new (arena) RenderTextControlInnerContainer(this); | 66 return new RenderTextControlInnerContainer(this); |
| 67 } | 67 } |
| 68 | 68 |
| 69 TextControlInnerElement::TextControlInnerElement(Document* document) | 69 TextControlInnerElement::TextControlInnerElement(Document* document) |
| 70 : HTMLDivElement(divTag, document) | 70 : HTMLDivElement(divTag, document) |
| 71 { | 71 { |
| 72 setHasCustomStyleCallbacks(); | 72 setHasCustomStyleCallbacks(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 PassRefPtr<TextControlInnerElement> TextControlInnerElement::create(Document* do
cument) | 75 PassRefPtr<TextControlInnerElement> TextControlInnerElement::create(Document* do
cument) |
| 76 { | 76 { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // cause events to be sent to the TextControlInnerTextElement. To | 108 // cause events to be sent to the TextControlInnerTextElement. To |
| 109 // prevent an infinite loop, we must check for this case before sending | 109 // prevent an infinite loop, we must check for this case before sending |
| 110 // the event up the chain. | 110 // the event up the chain. |
| 111 if (shadowAncestor) | 111 if (shadowAncestor) |
| 112 shadowAncestor->defaultEventHandler(event); | 112 shadowAncestor->defaultEventHandler(event); |
| 113 } | 113 } |
| 114 if (!event->defaultHandled()) | 114 if (!event->defaultHandled()) |
| 115 HTMLDivElement::defaultEventHandler(event); | 115 HTMLDivElement::defaultEventHandler(event); |
| 116 } | 116 } |
| 117 | 117 |
| 118 RenderObject* TextControlInnerTextElement::createRenderer(RenderArena* arena, Re
nderStyle*) | 118 RenderObject* TextControlInnerTextElement::createRenderer(RenderStyle*) |
| 119 { | 119 { |
| 120 return new (arena) RenderTextControlInnerBlock(this); | 120 return new RenderTextControlInnerBlock(this); |
| 121 } | 121 } |
| 122 | 122 |
| 123 PassRefPtr<RenderStyle> TextControlInnerTextElement::customStyleForRenderer() | 123 PassRefPtr<RenderStyle> TextControlInnerTextElement::customStyleForRenderer() |
| 124 { | 124 { |
| 125 RenderTextControl* parentRenderer = toRenderTextControl(shadowHost()->render
er()); | 125 RenderTextControl* parentRenderer = toRenderTextControl(shadowHost()->render
er()); |
| 126 return parentRenderer->createInnerTextStyle(parentRenderer->style()); | 126 return parentRenderer->createInnerTextStyle(parentRenderer->style()); |
| 127 } | 127 } |
| 128 | 128 |
| 129 // ---------------------------- | 129 // ---------------------------- |
| 130 | 130 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 } | 438 } |
| 439 | 439 |
| 440 void InputFieldSpeechButtonElement::stopSpeechInput() | 440 void InputFieldSpeechButtonElement::stopSpeechInput() |
| 441 { | 441 { |
| 442 if (m_state == Recording) | 442 if (m_state == Recording) |
| 443 speechInput()->stopRecording(m_listenerId); | 443 speechInput()->stopRecording(m_listenerId); |
| 444 } | 444 } |
| 445 #endif // ENABLE(INPUT_SPEECH) | 445 #endif // ENABLE(INPUT_SPEECH) |
| 446 | 446 |
| 447 } | 447 } |
| OLD | NEW |