| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 { | 201 { |
| 202 return ImageDocumentParser::create(this); | 202 return ImageDocumentParser::create(this); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void ImageDocument::createDocumentStructure() | 205 void ImageDocument::createDocumentStructure() |
| 206 { | 206 { |
| 207 HTMLHtmlElement* rootElement = HTMLHtmlElement::create(*this); | 207 HTMLHtmlElement* rootElement = HTMLHtmlElement::create(*this); |
| 208 appendChild(rootElement); | 208 appendChild(rootElement); |
| 209 rootElement->insertedByParser(); | 209 rootElement->insertedByParser(); |
| 210 | 210 |
| 211 frame()->loader().dispatchDocumentElementAvailable(); | |
| 212 frame()->loader().runScriptsAtDocumentElementAvailable(); | |
| 213 if (isStopped()) | 211 if (isStopped()) |
| 214 return; // runScriptsAtDocumentElementAvailable can detach the frame. | 212 return; // runScriptsAtDocumentElementAvailable can detach the frame. |
| 215 | 213 |
| 216 HTMLHeadElement* head = HTMLHeadElement::create(*this); | 214 HTMLHeadElement* head = HTMLHeadElement::create(*this); |
| 217 HTMLMetaElement* meta = HTMLMetaElement::create(*this); | 215 HTMLMetaElement* meta = HTMLMetaElement::create(*this); |
| 218 meta->setAttribute(nameAttr, "viewport"); | 216 meta->setAttribute(nameAttr, "viewport"); |
| 219 meta->setAttribute(contentAttr, "width=device-width, minimum-scale=0.1"); | 217 meta->setAttribute(contentAttr, "width=device-width, minimum-scale=0.1"); |
| 220 head->appendChild(meta); | 218 head->appendChild(meta); |
| 221 | 219 |
| 222 HTMLBodyElement* body = HTMLBodyElement::create(*this); | 220 HTMLBodyElement* body = HTMLBodyElement::create(*this); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 } | 440 } |
| 443 | 441 |
| 444 bool ImageEventListener::operator==(const EventListener& listener) const | 442 bool ImageEventListener::operator==(const EventListener& listener) const |
| 445 { | 443 { |
| 446 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) | 444 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) |
| 447 return m_doc == imageEventListener->m_doc; | 445 return m_doc == imageEventListener->m_doc; |
| 448 return false; | 446 return false; |
| 449 } | 447 } |
| 450 | 448 |
| 451 } // namespace blink | 449 } // namespace blink |
| OLD | NEW |