OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 #include "core/frame/FrameView.h" | 67 #include "core/frame/FrameView.h" |
68 #include "core/frame/LocalFrame.h" | 68 #include "core/frame/LocalFrame.h" |
69 #include "core/frame/Settings.h" | 69 #include "core/frame/Settings.h" |
70 #include "core/frame/UseCounter.h" | 70 #include "core/frame/UseCounter.h" |
71 #include "core/html/HTMLCanvasElement.h" | 71 #include "core/html/HTMLCanvasElement.h" |
72 #include "core/html/HTMLImageElement.h" | 72 #include "core/html/HTMLImageElement.h" |
73 #include "core/html/HTMLInputElement.h" | 73 #include "core/html/HTMLInputElement.h" |
74 #include "core/html/HTMLTextAreaElement.h" | 74 #include "core/html/HTMLTextAreaElement.h" |
75 #include "core/html/parser/HTMLParserIdioms.h" | 75 #include "core/html/parser/HTMLParserIdioms.h" |
76 #include "core/layout/HitTestResult.h" | 76 #include "core/layout/HitTestResult.h" |
| 77 #include "core/layout/LayoutImage.h" |
77 #include "core/loader/EmptyClients.h" | 78 #include "core/loader/EmptyClients.h" |
78 #include "core/page/EditorClient.h" | 79 #include "core/page/EditorClient.h" |
79 #include "core/page/EventHandler.h" | 80 #include "core/page/EventHandler.h" |
80 #include "core/page/FocusController.h" | 81 #include "core/page/FocusController.h" |
81 #include "core/page/Page.h" | 82 #include "core/page/Page.h" |
82 #include "core/rendering/RenderImage.h" | |
83 #include "core/svg/SVGImageElement.h" | 83 #include "core/svg/SVGImageElement.h" |
84 #include "platform/KillRing.h" | 84 #include "platform/KillRing.h" |
85 #include "platform/weborigin/KURL.h" | 85 #include "platform/weborigin/KURL.h" |
86 #include "wtf/unicode/CharacterNames.h" | 86 #include "wtf/unicode/CharacterNames.h" |
87 | 87 |
88 namespace blink { | 88 namespace blink { |
89 | 89 |
90 using namespace HTMLNames; | 90 using namespace HTMLNames; |
91 using namespace WTF; | 91 using namespace WTF; |
92 using namespace Unicode; | 92 using namespace Unicode; |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 { | 420 { |
421 node.document().updateLayoutIgnorePendingStylesheets(); | 421 node.document().updateLayoutIgnorePendingStylesheets(); |
422 LayoutObject* renderer = node.renderer(); | 422 LayoutObject* renderer = node.renderer(); |
423 if (!renderer) | 423 if (!renderer) |
424 return nullptr; | 424 return nullptr; |
425 | 425 |
426 if (renderer->isCanvas()) | 426 if (renderer->isCanvas()) |
427 return toHTMLCanvasElement(node).copiedImage(FrontBuffer); | 427 return toHTMLCanvasElement(node).copiedImage(FrontBuffer); |
428 | 428 |
429 if (renderer->isImage()) { | 429 if (renderer->isImage()) { |
430 RenderImage* renderImage = toRenderImage(renderer); | 430 LayoutImage* layoutImage = toLayoutImage(renderer); |
431 if (!renderImage) | 431 if (!layoutImage) |
432 return nullptr; | 432 return nullptr; |
433 | 433 |
434 ImageResource* cachedImage = renderImage->cachedImage(); | 434 ImageResource* cachedImage = layoutImage->cachedImage(); |
435 if (!cachedImage || cachedImage->errorOccurred()) | 435 if (!cachedImage || cachedImage->errorOccurred()) |
436 return nullptr; | 436 return nullptr; |
437 return cachedImage->imageForRenderer(renderImage); | 437 return cachedImage->imageForRenderer(layoutImage); |
438 } | 438 } |
439 | 439 |
440 return nullptr; | 440 return nullptr; |
441 } | 441 } |
442 | 442 |
443 static void writeImageNodeToPasteboard(Pasteboard* pasteboard, Node* node, const
String& title) | 443 static void writeImageNodeToPasteboard(Pasteboard* pasteboard, Node* node, const
String& title) |
444 { | 444 { |
445 ASSERT(pasteboard); | 445 ASSERT(pasteboard); |
446 ASSERT(node); | 446 ASSERT(node); |
447 | 447 |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 } | 1274 } |
1275 | 1275 |
1276 void Editor::trace(Visitor* visitor) | 1276 void Editor::trace(Visitor* visitor) |
1277 { | 1277 { |
1278 visitor->trace(m_frame); | 1278 visitor->trace(m_frame); |
1279 visitor->trace(m_lastEditCommand); | 1279 visitor->trace(m_lastEditCommand); |
1280 visitor->trace(m_mark); | 1280 visitor->trace(m_mark); |
1281 } | 1281 } |
1282 | 1282 |
1283 } // namespace blink | 1283 } // namespace blink |
OLD | NEW |