| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 RefPtr<HTMLBodyElement> body = HTMLBodyElement::create(*document()); | 92 RefPtr<HTMLBodyElement> body = HTMLBodyElement::create(*document()); |
| 93 body->setAttribute(marginwidthAttr, "0"); | 93 body->setAttribute(marginwidthAttr, "0"); |
| 94 body->setAttribute(marginheightAttr, "0"); | 94 body->setAttribute(marginheightAttr, "0"); |
| 95 body->setAttribute(styleAttr, "background-color: rgb(38,38,38)"); | 95 body->setAttribute(styleAttr, "background-color: rgb(38,38,38)"); |
| 96 rootElement->appendChild(body); | 96 rootElement->appendChild(body); |
| 97 | 97 |
| 98 m_embedElement = HTMLEmbedElement::create(*document()); | 98 m_embedElement = HTMLEmbedElement::create(*document()); |
| 99 m_embedElement->setAttribute(widthAttr, "100%"); | 99 m_embedElement->setAttribute(widthAttr, "100%"); |
| 100 m_embedElement->setAttribute(heightAttr, "100%"); | 100 m_embedElement->setAttribute(heightAttr, "100%"); |
| 101 m_embedElement->setAttribute(nameAttr, "plugin"); | 101 m_embedElement->setAttribute(nameAttr, "plugin"); |
| 102 m_embedElement->setAttribute(srcAttr, document()->url().string()); | 102 m_embedElement->setAttribute(srcAttr, AtomicString(document()->url().string(
))); |
| 103 m_embedElement->setAttribute(typeAttr, document()->loader()->mimeType()); | 103 m_embedElement->setAttribute(typeAttr, document()->loader()->mimeType()); |
| 104 body->appendChild(m_embedElement); | 104 body->appendChild(m_embedElement); |
| 105 | 105 |
| 106 toPluginDocument(document())->setPluginNode(m_embedElement.get()); | 106 toPluginDocument(document())->setPluginNode(m_embedElement.get()); |
| 107 | 107 |
| 108 document()->updateLayout(); | 108 document()->updateLayout(); |
| 109 | 109 |
| 110 // We need the plugin to load synchronously so we can get the PluginView | 110 // We need the plugin to load synchronously so we can get the PluginView |
| 111 // below so flush the layout tasks now instead of waiting on the timer. | 111 // below so flush the layout tasks now instead of waiting on the timer. |
| 112 frame->view()->flushAnyPendingPostLayoutTasks(); | 112 frame->view()->flushAnyPendingPostLayoutTasks(); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // with how many times we call beforeload on object elements. <rdar://proble
m/8441094>. | 188 // with how many times we call beforeload on object elements. <rdar://proble
m/8441094>. |
| 189 if (!shouldLoadPluginManually()) | 189 if (!shouldLoadPluginManually()) |
| 190 return; | 190 return; |
| 191 | 191 |
| 192 DocumentLoader* documentLoader = frame()->loader().activeDocumentLoader(); | 192 DocumentLoader* documentLoader = frame()->loader().activeDocumentLoader(); |
| 193 documentLoader->cancelMainResourceLoad(ResourceError::cancelledError(documen
tLoader->request().url())); | 193 documentLoader->cancelMainResourceLoad(ResourceError::cancelledError(documen
tLoader->request().url())); |
| 194 setShouldLoadPluginManually(false); | 194 setShouldLoadPluginManually(false); |
| 195 } | 195 } |
| 196 | 196 |
| 197 } | 197 } |
| OLD | NEW |