| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 HTMLHeadElement* head = HTMLHeadElement::create(*this); | 217 HTMLHeadElement* head = HTMLHeadElement::create(*this); |
| 218 HTMLMetaElement* meta = HTMLMetaElement::create(*this); | 218 HTMLMetaElement* meta = HTMLMetaElement::create(*this); |
| 219 meta->setAttribute(nameAttr, "viewport"); | 219 meta->setAttribute(nameAttr, "viewport"); |
| 220 meta->setAttribute(contentAttr, "width=device-width, minimum-scale=0.1"); | 220 meta->setAttribute(contentAttr, "width=device-width, minimum-scale=0.1"); |
| 221 head->appendChild(meta); | 221 head->appendChild(meta); |
| 222 | 222 |
| 223 HTMLBodyElement* body = HTMLBodyElement::create(*this); | 223 HTMLBodyElement* body = HTMLBodyElement::create(*this); |
| 224 body->setAttribute(styleAttr, "margin: 0px;"); | 224 body->setAttribute(styleAttr, "margin: 0px;"); |
| 225 | 225 |
| 226 frame()->loader().client()->dispatchWillInsertBody(); | 226 willInsertBody(); |
| 227 | 227 |
| 228 m_imageElement = HTMLImageElement::create(*this); | 228 m_imageElement = HTMLImageElement::create(*this); |
| 229 m_imageElement->setAttribute(styleAttr, "-webkit-user-select: none"); | 229 m_imageElement->setAttribute(styleAttr, "-webkit-user-select: none"); |
| 230 m_imageElement->setLoadingImageDocument(); | 230 m_imageElement->setLoadingImageDocument(); |
| 231 m_imageElement->setSrc(url().getString()); | 231 m_imageElement->setSrc(url().getString()); |
| 232 body->appendChild(m_imageElement.get()); | 232 body->appendChild(m_imageElement.get()); |
| 233 if (loader() && m_imageElement->cachedImage()) | 233 if (loader() && m_imageElement->cachedImage()) |
| 234 m_imageElement->cachedImage()->responseReceived(loader()->response(), nu
llptr); | 234 m_imageElement->cachedImage()->responseReceived(loader()->response(), nu
llptr); |
| 235 | 235 |
| 236 if (shouldShrinkToFit()) { | 236 if (shouldShrinkToFit()) { |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 } | 443 } |
| 444 | 444 |
| 445 bool ImageEventListener::operator==(const EventListener& listener) const | 445 bool ImageEventListener::operator==(const EventListener& listener) const |
| 446 { | 446 { |
| 447 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) | 447 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) |
| 448 return m_doc == imageEventListener->m_doc; | 448 return m_doc == imageEventListener->m_doc; |
| 449 return false; | 449 return false; |
| 450 } | 450 } |
| 451 | 451 |
| 452 } // namespace blink | 452 } // namespace blink |
| OLD | NEW |