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

Unified Diff: Source/core/editing/ApplyStyleCommand.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/shadow/ElementShadow.cpp ('k') | Source/core/editing/BreakBlockquoteCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ApplyStyleCommand.cpp
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp
index 454c6cb52ece80515b1db115abbabece46b7a7a9..ecd219bbfadd598ed0d8c0c1bac076ceca9ed5a6 100644
--- a/Source/core/editing/ApplyStyleCommand.cpp
+++ b/Source/core/editing/ApplyStyleCommand.cpp
@@ -395,7 +395,7 @@ void ApplyStyleCommand::applyRelativeFontStyleChange(EditingStyle* style)
if (!elementFullySelected(toHTMLElement(*node), start, end))
continue;
element = toHTMLElement(node);
- } else if (node->isTextNode() && node->renderer() && node->parentNode() != lastStyledNode) {
+ } else if (node->isTextNode() && node->layoutObject() && node->parentNode() != lastStyledNode) {
// Last styled node was not parent node of this text node, but we wish to style this
// text node. To make this possible, add a style span to surround this text node.
RefPtrWillBeRawPtr<HTMLSpanElement> span = createStyleSpanElement(document());
@@ -785,7 +785,7 @@ void ApplyStyleCommand::applyInlineStyleToNodeRange(EditingStyle* style, PassRef
for (RefPtrWillBeRawPtr<Node> next; node && node != pastEndNode; node = next) {
next = NodeTraversal::next(*node);
- if (!node->renderer() || !node->hasEditableStyle())
+ if (!node->layoutObject() || !node->hasEditableStyle())
continue;
if (!node->layoutObjectIsRichlyEditable() && node->isHTMLElement()) {
@@ -1024,7 +1024,7 @@ void ApplyStyleCommand::applyInlineStyleToPushDown(Node* node, EditingStyle* sty
node->document().updateRenderTreeIfNeeded();
- if (!style || style->isEmpty() || !node->renderer() || isHTMLIFrameElement(*node))
+ if (!style || style->isEmpty() || !node->layoutObject() || isHTMLIFrameElement(*node))
return;
RefPtrWillBeRawPtr<EditingStyle> newInlineStyle = style;
@@ -1035,12 +1035,12 @@ void ApplyStyleCommand::applyInlineStyleToPushDown(Node* node, EditingStyle* sty
// Since addInlineStyleIfNeeded can't add styles to block-flow render objects, add style attribute instead.
// FIXME: applyInlineStyleToRange should be used here instead.
- if ((node->renderer()->isLayoutBlockFlow() || node->hasChildren()) && node->isHTMLElement()) {
+ if ((node->layoutObject()->isLayoutBlockFlow() || node->hasChildren()) && node->isHTMLElement()) {
setNodeAttribute(toHTMLElement(node), styleAttr, AtomicString(newInlineStyle->style()->asText()));
return;
}
- if (node->renderer()->isText() && toLayoutText(node->renderer())->isAllCollapsibleWhitespace())
+ if (node->layoutObject()->isText() && toLayoutText(node->layoutObject())->isAllCollapsibleWhitespace())
return;
// We can't wrap node with the styled element here because new styled element will never be removed if we did.
« no previous file with comments | « Source/core/dom/shadow/ElementShadow.cpp ('k') | Source/core/editing/BreakBlockquoteCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698