Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: third_party/WebKit/Source/core/html/MediaDocument.cpp

Issue 1804733002: Remove redundant call to DocumentParser::finish(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void MediaDocumentParser::appendBytes(const char*, size_t) 109 void MediaDocumentParser::appendBytes(const char*, size_t)
110 { 110 {
111 if (m_didBuildDocumentStructure) 111 if (m_didBuildDocumentStructure)
112 return; 112 return;
113 113
114 LocalFrame* frame = document()->frame(); 114 LocalFrame* frame = document()->frame();
115 if (!frame->loader().client()->allowMedia(document()->url())) 115 if (!frame->loader().client()->allowMedia(document()->url()))
116 return; 116 return;
117 117
118 createDocumentStructure(); 118 createDocumentStructure();
119 finish();
120 } 119 }
121 120
122 MediaDocument::MediaDocument(const DocumentInit& initializer) 121 MediaDocument::MediaDocument(const DocumentInit& initializer)
123 : HTMLDocument(initializer, MediaDocumentClass) 122 : HTMLDocument(initializer, MediaDocumentClass)
124 { 123 {
125 setCompatibilityMode(QuirksMode); 124 setCompatibilityMode(QuirksMode);
126 lockCompatibilityMode(); 125 lockCompatibilityMode();
127 } 126 }
128 127
129 PassRefPtrWillBeRawPtr<DocumentParser> MediaDocument::createParser() 128 PassRefPtrWillBeRawPtr<DocumentParser> MediaDocument::createParser()
(...skipping 15 matching lines...) Expand all
145 KeyboardEvent* keyboardEvent = toKeyboardEvent(event); 144 KeyboardEvent* keyboardEvent = toKeyboardEvent(event);
146 if (keyboardEvent->keyIdentifier() == "U+0020" || keyboardEvent->keyCode () == VKEY_MEDIA_PLAY_PAUSE) { 145 if (keyboardEvent->keyIdentifier() == "U+0020" || keyboardEvent->keyCode () == VKEY_MEDIA_PLAY_PAUSE) {
147 // space or media key (play/pause) 146 // space or media key (play/pause)
148 video->togglePlayState(); 147 video->togglePlayState();
149 event->setDefaultHandled(); 148 event->setDefaultHandled();
150 } 149 }
151 } 150 }
152 } 151 }
153 152
154 } // namespace blink 153 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698