| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 LocalFrame* frame = document()->frame(); | 85 LocalFrame* frame = document()->frame(); |
| 86 if (!frame) | 86 if (!frame) |
| 87 return; | 87 return; |
| 88 | 88 |
| 89 // FIXME: Why does this check settings? | 89 // FIXME: Why does this check settings? |
| 90 if (!frame->settings() || !frame->loader().allowPlugins(NotAboutToInstantiat
ePlugin)) | 90 if (!frame->settings() || !frame->loader().allowPlugins(NotAboutToInstantiat
ePlugin)) |
| 91 return; | 91 return; |
| 92 | 92 |
| 93 HTMLHtmlElement* rootElement = HTMLHtmlElement::create(*document()); | 93 HTMLHtmlElement* rootElement = HTMLHtmlElement::create(*document()); |
| 94 document()->appendChild(rootElement); |
| 94 rootElement->insertedByParser(); | 95 rootElement->insertedByParser(); |
| 95 document()->appendChild(rootElement); | |
| 96 frame->loader().dispatchDocumentElementAvailable(); | |
| 97 frame->loader().runScriptsAtDocumentElementAvailable(); | |
| 98 if (isStopped()) | 96 if (isStopped()) |
| 99 return; // runScriptsAtDocumentElementAvailable can detach the frame. | 97 return; // runScriptsAtDocumentElementAvailable can detach the frame. |
| 100 | 98 |
| 101 HTMLBodyElement* body = HTMLBodyElement::create(*document()); | 99 HTMLBodyElement* body = HTMLBodyElement::create(*document()); |
| 102 body->setAttribute(styleAttr, "background-color: rgb(38,38,38); height: 100%
; width: 100%; overflow: hidden; margin: 0"); | 100 body->setAttribute(styleAttr, "background-color: rgb(38,38,38); height: 100%
; width: 100%; overflow: hidden; margin: 0"); |
| 103 rootElement->appendChild(body); | 101 rootElement->appendChild(body); |
| 104 if (isStopped()) | 102 if (isStopped()) |
| 105 return; // Possibly detached by a mutation event listener installed in r
unScriptsAtDocumentElementAvailable. | 103 return; // Possibly detached by a mutation event listener installed in r
unScriptsAtDocumentElementAvailable. |
| 106 | 104 |
| 107 m_embedElement = HTMLEmbedElement::create(*document()); | 105 m_embedElement = HTMLEmbedElement::create(*document()); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 HTMLDocument::detach(context); | 196 HTMLDocument::detach(context); |
| 199 } | 197 } |
| 200 | 198 |
| 201 DEFINE_TRACE(PluginDocument) | 199 DEFINE_TRACE(PluginDocument) |
| 202 { | 200 { |
| 203 visitor->trace(m_pluginNode); | 201 visitor->trace(m_pluginNode); |
| 204 HTMLDocument::trace(visitor); | 202 HTMLDocument::trace(visitor); |
| 205 } | 203 } |
| 206 | 204 |
| 207 } // namespace blink | 205 } // namespace blink |
| OLD | NEW |