| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel (eric@webkit.org) | 2 * Copyright (C) 2006 Eric Seidel (eric@webkit.org) |
| 3 * Copyright (C) 2008 Apple, Inc. All rights reserved. | 3 * Copyright (C) 2008 Apple, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 m_page.set(new Page(m_chromeClient.get(), dummyContextMenuClient, dummyE
ditorClient, dummyDragClient, dummyInspectorClient)); | 233 m_page.set(new Page(m_chromeClient.get(), dummyContextMenuClient, dummyE
ditorClient, dummyDragClient, dummyInspectorClient)); |
| 234 m_page->settings()->setJavaScriptEnabled(false); | 234 m_page->settings()->setJavaScriptEnabled(false); |
| 235 m_page->settings()->setPluginsEnabled(false); | 235 m_page->settings()->setPluginsEnabled(false); |
| 236 | 236 |
| 237 m_frame = Frame::create(m_page.get(), 0, dummyFrameLoaderClient); | 237 m_frame = Frame::create(m_page.get(), 0, dummyFrameLoaderClient); |
| 238 m_frameView = new FrameView(m_frame.get()); | 238 m_frameView = new FrameView(m_frame.get()); |
| 239 m_frameView->deref(); // FIXME: FrameView starts with a refcount of 1 | 239 m_frameView->deref(); // FIXME: FrameView starts with a refcount of 1 |
| 240 m_frame->setView(m_frameView.get()); | 240 m_frame->setView(m_frameView.get()); |
| 241 m_frame->init(); | 241 m_frame->init(); |
| 242 ResourceRequest fakeRequest(KURL("")); | 242 ResourceRequest fakeRequest(KURL("")); |
| 243 m_frame->loader()->load(fakeRequest); // Make sure the DocumentLoader is
created | 243 m_frame->loader()->load(fakeRequest, false); // Make sure the DocumentLo
ader is created |
| 244 m_frame->loader()->cancelContentPolicyCheck(); // cancel any policy chec
ks | 244 m_frame->loader()->cancelContentPolicyCheck(); // cancel any policy chec
ks |
| 245 m_frame->loader()->commitProvisionalLoad(0); | 245 m_frame->loader()->commitProvisionalLoad(0); |
| 246 m_frame->loader()->setResponseMIMEType("image/svg+xml"); | 246 m_frame->loader()->setResponseMIMEType("image/svg+xml"); |
| 247 m_frame->loader()->begin(KURL()); // create the empty document | 247 m_frame->loader()->begin(KURL()); // create the empty document |
| 248 m_frame->loader()->write(m_data->data(), m_data->size()); | 248 m_frame->loader()->write(m_data->data(), m_data->size()); |
| 249 m_frame->loader()->end(); | 249 m_frame->loader()->end(); |
| 250 m_frameView->setTransparent(true); // SVG Images are transparent. | 250 m_frameView->setTransparent(true); // SVG Images are transparent. |
| 251 } | 251 } |
| 252 return m_frameView; | 252 return m_frameView; |
| 253 } | 253 } |
| 254 | 254 |
| 255 } | 255 } |
| 256 | 256 |
| 257 #endif // ENABLE(SVG) | 257 #endif // ENABLE(SVG) |
| OLD | NEW |