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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 385
386 bool TypingCommand::makeEditableRootEmpty() 386 bool TypingCommand::makeEditableRootEmpty()
387 { 387 {
388 Element* root = endingSelection().rootEditableElement(); 388 Element* root = endingSelection().rootEditableElement();
389 if (!root || !root->hasChildren()) 389 if (!root || !root->hasChildren())
390 return false; 390 return false;
391 391
392 if (root->firstChild() == root->lastChild()) { 392 if (root->firstChild() == root->lastChild()) {
393 if (isHTMLBRElement(root->firstChild())) { 393 if (isHTMLBRElement(root->firstChild())) {
394 // If there is a single child and it could be a placeholder, leave i t alone. 394 // If there is a single child and it could be a placeholder, leave i t alone.
395 if (root->renderer() && root->renderer()->isLayoutBlockFlow()) 395 if (root->layoutObject() && root->layoutObject()->isLayoutBlockFlow( ))
396 return false; 396 return false;
397 } 397 }
398 } 398 }
399 399
400 while (Node* child = root->firstChild()) 400 while (Node* child = root->firstChild())
401 removeNode(child); 401 removeNode(child);
402 402
403 addBlockPlaceholderIfNeeded(root); 403 addBlockPlaceholderIfNeeded(root);
404 setEndingSelection(VisibleSelection(firstPositionInNode(root), DOWNSTREAM, e ndingSelection().isDirectional())); 404 setEndingSelection(VisibleSelection(firstPositionInNode(root), DOWNSTREAM, e ndingSelection().isDirectional()));
405 405
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 ASSERT_NOT_REACHED(); 624 ASSERT_NOT_REACHED();
625 m_preservesTypingStyle = false; 625 m_preservesTypingStyle = false;
626 } 626 }
627 627
628 bool TypingCommand::isTypingCommand() const 628 bool TypingCommand::isTypingCommand() const
629 { 629 {
630 return true; 630 return true;
631 } 631 }
632 632
633 } // namespace blink 633 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/SplitTextNodeContainingElementCommand.cpp ('k') | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698