OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 return adoptRefWillBeNoop(new MediaDocumentParser(document)); | 56 return adoptRefWillBeNoop(new MediaDocumentParser(document)); |
57 } | 57 } |
58 | 58 |
59 private: | 59 private: |
60 explicit MediaDocumentParser(Document* document) | 60 explicit MediaDocumentParser(Document* document) |
61 : RawDataDocumentParser(document) | 61 : RawDataDocumentParser(document) |
62 , m_didBuildDocumentStructure(false) | 62 , m_didBuildDocumentStructure(false) |
63 { | 63 { |
64 } | 64 } |
65 | 65 |
66 virtual void appendBytes(const char*, size_t) OVERRIDE; | 66 virtual void appendBytes(const char*, size_t) override; |
67 | 67 |
68 void createDocumentStructure(); | 68 void createDocumentStructure(); |
69 | 69 |
70 bool m_didBuildDocumentStructure; | 70 bool m_didBuildDocumentStructure; |
71 }; | 71 }; |
72 | 72 |
73 void MediaDocumentParser::createDocumentStructure() | 73 void MediaDocumentParser::createDocumentStructure() |
74 { | 74 { |
75 ASSERT(document()); | 75 ASSERT(document()); |
76 RefPtrWillBeRawPtr<HTMLHtmlElement> rootElement = HTMLHtmlElement::create(*d
ocument()); | 76 RefPtrWillBeRawPtr<HTMLHtmlElement> rootElement = HTMLHtmlElement::create(*d
ocument()); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 KeyboardEvent* keyboardEvent = toKeyboardEvent(event); | 147 KeyboardEvent* keyboardEvent = toKeyboardEvent(event); |
148 if (keyboardEvent->keyIdentifier() == "U+0020" || keyboardEvent->keyCode
() == VKEY_MEDIA_PLAY_PAUSE) { | 148 if (keyboardEvent->keyIdentifier() == "U+0020" || keyboardEvent->keyCode
() == VKEY_MEDIA_PLAY_PAUSE) { |
149 // space or media key (play/pause) | 149 // space or media key (play/pause) |
150 video->togglePlayState(); | 150 video->togglePlayState(); |
151 event->setDefaultHandled(); | 151 event->setDefaultHandled(); |
152 } | 152 } |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 } | 156 } |
OLD | NEW |