Index: Source/core/dom/Position.cpp |
diff --git a/Source/core/dom/Position.cpp b/Source/core/dom/Position.cpp |
index 2bdca345bcd35b71212f7de66cb6dc3262769838..361b402e7a5f8460ac6388a6c1c9104a6c2d8d23 100644 |
--- a/Source/core/dom/Position.cpp |
+++ b/Source/core/dom/Position.cpp |
@@ -1063,7 +1063,7 @@ Position Position::leadingWhitespacePosition(EAffinity affinity, bool considerNo |
if (prev != *this && prev.deprecatedNode()->inSameContainingBlockFlowElement(deprecatedNode()) && prev.deprecatedNode()->isTextNode()) { |
String string = toText(prev.deprecatedNode())->data(); |
UChar c = string[prev.deprecatedEditingOffset()]; |
- if (considerNonCollapsibleWhitespace ? (isSpaceOrNewline(c) || c == noBreakSpace) : isCollapsibleWhitespace(c)) |
+ if (considerNonCollapsibleWhitespace ? (isSpaceOrNewline(c) || c == noBreakSpace) : prev.deprecatedNode()->renderer()->style()->isCollapsibleWhiteSpace(c)) |
esprehn
2014/04/01 00:25:55
How do you know the renderer() is available here?
|
if (isEditablePosition(prev)) |
return prev; |
} |
@@ -1082,7 +1082,7 @@ Position Position::trailingWhitespacePosition(EAffinity, bool considerNonCollaps |
UChar c = v.characterAfter(); |
// The space must not be in another paragraph and it must be editable. |
if (!isEndOfParagraph(v) && v.next(CannotCrossEditingBoundary).isNotNull()) |
- if (considerNonCollapsibleWhitespace ? (isSpaceOrNewline(c) || c == noBreakSpace) : isCollapsibleWhitespace(c)) |
+ if (considerNonCollapsibleWhitespace ? (isSpaceOrNewline(c) || c == noBreakSpace) : deprecatedNode()->renderer()->style()->isCollapsibleWhiteSpace(c)) |
esprehn
2014/04/01 00:25:55
ditto
|
return *this; |
return Position(); |