Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2125853002: Replace RefPtrs with raw pointers (imageFromNode in Editor.cpp) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebase) Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 } 466 }
467 467
468 void Editor::writeSelectionToPasteboard() 468 void Editor::writeSelectionToPasteboard()
469 { 469 {
470 KURL url = frame().document()->url(); 470 KURL url = frame().document()->url();
471 String html = frame().selection().selectedHTMLForClipboard(); 471 String html = frame().selection().selectedHTMLForClipboard();
472 String plainText = frame().selectedTextForClipboard(); 472 String plainText = frame().selectedTextForClipboard();
473 Pasteboard::generalPasteboard()->writeHTML(html, url, plainText, canSmartCop yOrDelete()); 473 Pasteboard::generalPasteboard()->writeHTML(html, url, plainText, canSmartCop yOrDelete());
474 } 474 }
475 475
476 static PassRefPtr<Image> imageFromNode(const Node& node) 476 static Image* imageFromNode(const Node& node)
477 { 477 {
478 node.document().updateStyleAndLayoutIgnorePendingStylesheets(); 478 node.document().updateStyleAndLayoutIgnorePendingStylesheets();
479 LayoutObject* layoutObject = node.layoutObject(); 479 LayoutObject* layoutObject = node.layoutObject();
480 if (!layoutObject) 480 if (!layoutObject)
481 return nullptr; 481 return nullptr;
482 482
483 if (layoutObject->isCanvas()) 483 if (layoutObject->isCanvas())
484 return toHTMLCanvasElement(node).copiedImage(FrontBuffer, PreferNoAccele ration); 484 return toHTMLCanvasElement(node).copiedImage(FrontBuffer, PreferNoAccele ration);
485 485
486 if (layoutObject->isImage()) { 486 if (layoutObject->isImage()) {
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 1424
1425 DEFINE_TRACE(Editor) 1425 DEFINE_TRACE(Editor)
1426 { 1426 {
1427 visitor->trace(m_frame); 1427 visitor->trace(m_frame);
1428 visitor->trace(m_lastEditCommand); 1428 visitor->trace(m_lastEditCommand);
1429 visitor->trace(m_undoStack); 1429 visitor->trace(m_undoStack);
1430 visitor->trace(m_mark); 1430 visitor->trace(m_mark);
1431 } 1431 }
1432 1432
1433 } // namespace blink 1433 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698