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

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

Issue 420603002: Use tighter typing in editing/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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/DeleteSelectionCommand.cpp ('k') | Source/core/editing/EditorCommand.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 51b849f6f2086e53a9f6ef5129a60a727b2fcc66..5c45b7a9aebca45930aa9adf4c5f530e4a59c1b9 100644
--- a/Source/core/editing/EditingStyle.cpp
+++ b/Source/core/editing/EditingStyle.cpp
@@ -53,6 +53,7 @@
#include "core/editing/htmlediting.h"
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLFontElement.h"
+#include "core/html/HTMLSpanElement.h"
#include "core/rendering/RenderBox.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/style/RenderStyle.h"
@@ -455,8 +456,8 @@ static int textAlignResolvingStartAndEnd(T* style)
void EditingStyle::init(Node* node, PropertiesToInclude propertiesToInclude)
{
if (isTabSpanTextNode(node))
- node = tabSpanNode(node)->parentNode();
- else if (isTabSpanNode(node))
+ node = tabSpanElement(node)->parentNode();
+ else if (isTabSpanElement(node))
node = node->parentNode();
RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> computedStyleAtPosition = CSSComputedStyleDeclaration::create(node);
@@ -745,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 && isTabSpanNode(element))
+ if (propertyID == CSSPropertyWhiteSpace && isTabSpanElement(element))
continue;
if (propertyID == CSSPropertyWebkitTextDecorationsInEffect && inlineStyle->getPropertyCSSValue(textDecorationPropertyForEditing())) {
@@ -1433,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()) || isTabSpanNode((position.deprecatedNode())))
+ if (isTabSpanTextNode(position.deprecatedNode()) || isTabSpanElement((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/DeleteSelectionCommand.cpp ('k') | Source/core/editing/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698