| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 static PassRefPtr<Image> ImageFromNode(const Node& node) { | 563 static PassRefPtr<Image> ImageFromNode(const Node& node) { |
| 564 DCHECK(!node.GetDocument().NeedsLayoutTreeUpdate()); | 564 DCHECK(!node.GetDocument().NeedsLayoutTreeUpdate()); |
| 565 DocumentLifecycle::DisallowTransitionScope disallow_transition( | 565 DocumentLifecycle::DisallowTransitionScope disallow_transition( |
| 566 node.GetDocument().Lifecycle()); | 566 node.GetDocument().Lifecycle()); |
| 567 | 567 |
| 568 LayoutObject* layout_object = node.GetLayoutObject(); | 568 LayoutObject* layout_object = node.GetLayoutObject(); |
| 569 if (!layout_object) | 569 if (!layout_object) |
| 570 return nullptr; | 570 return nullptr; |
| 571 | 571 |
| 572 if (layout_object->IsCanvas()) { | 572 if (layout_object->IsCanvas()) { |
| 573 return toHTMLCanvasElement(node).CopiedImage( | 573 return toHTMLCanvasElement(const_cast<Node&>(node)) |
| 574 kFrontBuffer, kPreferNoAcceleration, kSnapshotReasonCopyToClipboard); | 574 .CopiedImage(kFrontBuffer, kPreferNoAcceleration, |
| 575 kSnapshotReasonCopyToClipboard); |
| 575 } | 576 } |
| 576 | 577 |
| 577 if (layout_object->IsImage()) { | 578 if (layout_object->IsImage()) { |
| 578 LayoutImage* layout_image = ToLayoutImage(layout_object); | 579 LayoutImage* layout_image = ToLayoutImage(layout_object); |
| 579 if (!layout_image) | 580 if (!layout_image) |
| 580 return nullptr; | 581 return nullptr; |
| 581 | 582 |
| 582 ImageResourceContent* cached_image = layout_image->CachedImage(); | 583 ImageResourceContent* cached_image = layout_image->CachedImage(); |
| 583 if (!cached_image || cached_image->ErrorOccurred()) | 584 if (!cached_image || cached_image->ErrorOccurred()) |
| 584 return nullptr; | 585 return nullptr; |
| (...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1818 | 1819 |
| 1819 DEFINE_TRACE(Editor) { | 1820 DEFINE_TRACE(Editor) { |
| 1820 visitor->Trace(frame_); | 1821 visitor->Trace(frame_); |
| 1821 visitor->Trace(last_edit_command_); | 1822 visitor->Trace(last_edit_command_); |
| 1822 visitor->Trace(undo_stack_); | 1823 visitor->Trace(undo_stack_); |
| 1823 visitor->Trace(mark_); | 1824 visitor->Trace(mark_); |
| 1824 visitor->Trace(typing_style_); | 1825 visitor->Trace(typing_style_); |
| 1825 } | 1826 } |
| 1826 | 1827 |
| 1827 } // namespace blink | 1828 } // namespace blink |
| OLD | NEW |