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

Unified Diff: Source/core/editing/commands/ReplaceSelectionCommand.cpp

Issue 1320573003: Rename isBlock() to isEnclosingBlock() in EditingUtilities (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-26T21:48:03 Rebase Created 5 years, 4 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
Index: Source/core/editing/commands/ReplaceSelectionCommand.cpp
diff --git a/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/Source/core/editing/commands/ReplaceSelectionCommand.cpp
index d26e4d1d8e5281f57af7dc08540cbb1ffc8e678d..0fd57537f70d29c1ede62fc49c5a01a6325c610b 100644
--- a/Source/core/editing/commands/ReplaceSelectionCommand.cpp
+++ b/Source/core/editing/commands/ReplaceSelectionCommand.cpp
@@ -478,7 +478,7 @@ bool ReplaceSelectionCommand::shouldMerge(const VisiblePosition& source, const V
&& (!isHTMLHeaderElement(sourceBlock) || haveSameTagName(sourceBlock, destinationBlock))
// Don't merge to or from a position before or after a block because it would
// be a no-op and cause infinite recursion.
- && !isBlock(sourceNode) && !isBlock(destinationNode);
+ && !isEnclosingBlock(sourceNode) && !isEnclosingBlock(destinationNode);
}
// Style rules that match just inserted elements could change their appearance, like
@@ -569,7 +569,7 @@ void ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline(Insert
// in quirks mode (which Mail.app is always in). We should look for an alternative.
// Mutate using the CSSOM wrapper so we get the same event behavior as a script.
- if (isBlock(element))
+ if (isEnclosingBlock(element))
element->style()->setPropertyInternal(CSSPropertyDisplay, "inline", false, IGNORE_EXCEPTION);
if (element->layoutObject() && element->layoutObject()->style()->isFloating())
element->style()->setPropertyInternal(CSSPropertyFloat, "none", false, IGNORE_EXCEPTION);
@@ -885,7 +885,7 @@ static Node* enclosingInline(Node* node)
static bool isInlineHTMLElementWithStyle(const Node* node)
{
// We don't want to skip over any block elements.
- if (isBlock(node))
+ if (isEnclosingBlock(node))
return false;
if (!node->isHTMLElement())
« no previous file with comments | « Source/core/editing/commands/InsertListCommand.cpp ('k') | Source/core/editing/serializers/StyledMarkupSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698