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

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

Issue 31063004: Have Frame::loader() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/ImageDocument.cpp ('k') | Source/core/html/PluginDocument.cpp » ('j') | 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 }; 71 };
72 72
73 void MediaDocumentParser::createDocumentStructure() 73 void MediaDocumentParser::createDocumentStructure()
74 { 74 {
75 ASSERT(document()); 75 ASSERT(document());
76 RefPtr<HTMLHtmlElement> rootElement = HTMLHtmlElement::create(*document()); 76 RefPtr<HTMLHtmlElement> rootElement = HTMLHtmlElement::create(*document());
77 rootElement->insertedByParser(); 77 rootElement->insertedByParser();
78 document()->appendChild(rootElement); 78 document()->appendChild(rootElement);
79 79
80 if (document()->frame()) 80 if (document()->frame())
81 document()->frame()->loader()->dispatchDocumentElementAvailable(); 81 document()->frame()->loader().dispatchDocumentElementAvailable();
82 82
83 RefPtr<HTMLHeadElement> head = HTMLHeadElement::create(*document()); 83 RefPtr<HTMLHeadElement> head = HTMLHeadElement::create(*document());
84 RefPtr<HTMLMetaElement> meta = HTMLMetaElement::create(*document()); 84 RefPtr<HTMLMetaElement> meta = HTMLMetaElement::create(*document());
85 meta->setAttribute(nameAttr, "viewport"); 85 meta->setAttribute(nameAttr, "viewport");
86 meta->setAttribute(contentAttr, "width=device-width"); 86 meta->setAttribute(contentAttr, "width=device-width");
87 head->appendChild(meta.release()); 87 head->appendChild(meta.release());
88 88
89 RefPtr<HTMLVideoElement> media = HTMLVideoElement::create(*document()); 89 RefPtr<HTMLVideoElement> media = HTMLVideoElement::create(*document());
90 media->setAttribute(controlsAttr, ""); 90 media->setAttribute(controlsAttr, "");
91 media->setAttribute(autoplayAttr, ""); 91 media->setAttribute(autoplayAttr, "");
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 if (video->canPlay()) 160 if (video->canPlay())
161 video->play(); 161 video->play();
162 } else 162 } else
163 video->pause(); 163 video->pause();
164 event->setDefaultHandled(); 164 event->setDefaultHandled();
165 } 165 }
166 } 166 }
167 } 167 }
168 168
169 } 169 }
OLDNEW
« no previous file with comments | « Source/core/html/ImageDocument.cpp ('k') | Source/core/html/PluginDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698