| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |