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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master Created 5 years, 9 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 | Annotate | Revision Log
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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 void Editor::writeSelectionToPasteboard(Pasteboard* pasteboard, Range* selectedR ange, const String& plainText) 412 void Editor::writeSelectionToPasteboard(Pasteboard* pasteboard, Range* selectedR ange, const String& plainText)
413 { 413 {
414 String html = createMarkup(selectedRange, AnnotateForInterchange, false, Res olveNonLocalURLs); 414 String html = createMarkup(selectedRange, AnnotateForInterchange, false, Res olveNonLocalURLs);
415 KURL url = selectedRange->startContainer()->document().url(); 415 KURL url = selectedRange->startContainer()->document().url();
416 pasteboard->writeHTML(html, url, plainText, canSmartCopyOrDelete()); 416 pasteboard->writeHTML(html, url, plainText, canSmartCopyOrDelete());
417 } 417 }
418 418
419 static PassRefPtr<Image> imageFromNode(const Node& node) 419 static PassRefPtr<Image> imageFromNode(const Node& node)
420 { 420 {
421 node.document().updateLayoutIgnorePendingStylesheets(); 421 node.document().updateLayoutIgnorePendingStylesheets();
422 LayoutObject* renderer = node.renderer(); 422 LayoutObject* renderer = node.layoutObject();
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 LayoutImage* layoutImage = toLayoutImage(renderer); 430 LayoutImage* layoutImage = toLayoutImage(renderer);
431 if (!layoutImage) 431 if (!layoutImage)
432 return nullptr; 432 return nullptr;
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 frame().selection().revealSelection(); 1161 frame().selection().revealSelection();
1162 return true; 1162 return true;
1163 } 1163 }
1164 1164
1165 PassRefPtrWillBeRawPtr<Range> Editor::findStringAndScrollToVisible(const String& target, Range* previousMatch, FindOptions options) 1165 PassRefPtrWillBeRawPtr<Range> Editor::findStringAndScrollToVisible(const String& target, Range* previousMatch, FindOptions options)
1166 { 1166 {
1167 RefPtrWillBeRawPtr<Range> nextMatch = rangeOfString(target, previousMatch, o ptions); 1167 RefPtrWillBeRawPtr<Range> nextMatch = rangeOfString(target, previousMatch, o ptions);
1168 if (!nextMatch) 1168 if (!nextMatch)
1169 return nullptr; 1169 return nullptr;
1170 1170
1171 nextMatch->firstNode()->renderer()->scrollRectToVisible(LayoutRect(nextMatch ->boundingBox()), 1171 nextMatch->firstNode()->layoutObject()->scrollRectToVisible(LayoutRect(nextM atch->boundingBox()),
1172 ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeed ed); 1172 ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeed ed);
1173 1173
1174 return nextMatch.release(); 1174 return nextMatch.release();
1175 } 1175 }
1176 1176
1177 static PassRefPtrWillBeRawPtr<Range> findStringBetweenPositions(const String& ta rget, const Position& start, const Position& end, FindOptions options) 1177 static PassRefPtrWillBeRawPtr<Range> findStringBetweenPositions(const String& ta rget, const Position& start, const Position& end, FindOptions options)
1178 { 1178 {
1179 Position searchStart(start); 1179 Position searchStart(start);
1180 Position searchEnd(end); 1180 Position searchEnd(end);
1181 1181
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 } 1274 }
1275 1275
1276 DEFINE_TRACE(Editor) 1276 DEFINE_TRACE(Editor)
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698