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

Unified Diff: Source/core/editing/EditingStyle.cpp

Issue 428823002: Use tighter typing in editing: markup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/FormatBlockCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditingStyle.cpp
diff --git a/Source/core/editing/EditingStyle.cpp b/Source/core/editing/EditingStyle.cpp
index 03bedd5da57aa78ac06a2e134130d1a26b961e6b..22b28f05ebaec7ac2f66364e462f3fdeffdc2aa4 100644
--- a/Source/core/editing/EditingStyle.cpp
+++ b/Source/core/editing/EditingStyle.cpp
@@ -455,9 +455,9 @@ static int textAlignResolvingStartAndEnd(T* style)
void EditingStyle::init(Node* node, PropertiesToInclude propertiesToInclude)
{
- if (isTabSpanTextNode(node))
+ if (isTabHTMLSpanElementTextNode(node))
node = tabSpanElement(node)->parentNode();
- else if (isTabSpanElement(node))
+ else if (isTabHTMLSpanElement(node))
node = node->parentNode();
RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> computedStyleAtPosition = CSSComputedStyleDeclaration::create(node);
@@ -746,7 +746,7 @@ bool EditingStyle::conflictsWithInlineStyleOfElement(Element* element, EditingSt
CSSPropertyID propertyID = m_mutableStyle->propertyAt(i).id();
// We don't override whitespace property of a tab span because that would collapse the tab into a space.
- if (propertyID == CSSPropertyWhiteSpace && isTabSpanElement(element))
+ if (propertyID == CSSPropertyWhiteSpace && isTabHTMLSpanElement(element))
continue;
if (propertyID == CSSPropertyWebkitTextDecorationsInEffect && inlineStyle->getPropertyCSSValue(textDecorationPropertyForEditing())) {
@@ -1434,7 +1434,7 @@ StyleChange::StyleChange(EditingStyle* style, const Position& position)
extractTextStyles(document, mutableStyle.get(), computedStyle->fixedPitchFontType());
// Changing the whitespace style in a tab span would collapse the tab into a space.
- if (isTabSpanTextNode(position.deprecatedNode()) || isTabSpanElement((position.deprecatedNode())))
+ if (isTabHTMLSpanElementTextNode(position.deprecatedNode()) || isTabHTMLSpanElement((position.deprecatedNode())))
mutableStyle->removeProperty(CSSPropertyWhiteSpace);
// If unicode-bidi is present in mutableStyle and direction is not, then add direction to mutableStyle.
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/FormatBlockCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698