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

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: impl 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
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 473 }
474 474
475 void Editor::writeSelectionToPasteboard() 475 void Editor::writeSelectionToPasteboard()
476 { 476 {
477 KURL url = frame().document()->url(); 477 KURL url = frame().document()->url();
478 String html = frame().selection().selectedHTMLForClipboard(); 478 String html = frame().selection().selectedHTMLForClipboard();
479 String plainText = frame().selectedTextForClipboard(); 479 String plainText = frame().selectedTextForClipboard();
480 Pasteboard::generalPasteboard()->writeHTML(html, url, plainText, canSmartCop yOrDelete()); 480 Pasteboard::generalPasteboard()->writeHTML(html, url, plainText, canSmartCop yOrDelete());
481 } 481 }
482 482
483 static PassRefPtr<Image> imageFromNode(const Node& node) 483 static Image* imageFromNode(const Node& node)
484 { 484 {
485 node.document().updateStyleAndLayoutIgnorePendingStylesheets(); 485 node.document().updateStyleAndLayoutIgnorePendingStylesheets();
486 LayoutObject* layoutObject = node.layoutObject(); 486 LayoutObject* layoutObject = node.layoutObject();
487 if (!layoutObject) 487 if (!layoutObject)
488 return nullptr; 488 return nullptr;
489 489
490 if (layoutObject->isCanvas()) 490 if (layoutObject->isCanvas())
491 return toHTMLCanvasElement(node).copiedImage(FrontBuffer, PreferNoAccele ration); 491 return toHTMLCanvasElement(node).copiedImage(FrontBuffer, PreferNoAccele ration);
492 492
493 if (layoutObject->isImage()) { 493 if (layoutObject->isImage()) {
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 } 1437 }
1438 1438
1439 DEFINE_TRACE(Editor) 1439 DEFINE_TRACE(Editor)
1440 { 1440 {
1441 visitor->trace(m_frame); 1441 visitor->trace(m_frame);
1442 visitor->trace(m_lastEditCommand); 1442 visitor->trace(m_lastEditCommand);
1443 visitor->trace(m_mark); 1443 visitor->trace(m_mark);
1444 } 1444 }
1445 1445
1446 } // namespace blink 1446 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698