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

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

Issue 24278008: [oilpan] Handlify Nodes in htmlediting (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 3 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/EditingStyle.cpp
diff --git a/Source/core/editing/EditingStyle.cpp b/Source/core/editing/EditingStyle.cpp
index 59158ec6fd6e3c661ec9c10e5cb69dfc678ff82d..1b8a9b0cb0b1b0f76abc0cb7af946f2e5875fffb 100644
--- a/Source/core/editing/EditingStyle.cpp
+++ b/Source/core/editing/EditingStyle.cpp
@@ -447,9 +447,9 @@ static int textAlignResolvingStartAndEnd(const Handle<CSSStyleDeclaration>& styl
void EditingStyle::init(const Handle<Node>& node, PropertiesToInclude propertiesToInclude)
{
Handle<Node> target = node;
- if (isTabSpanTextNode(target.raw()))
- target = tabSpanNode(target.raw())->parentNode();
- else if (isTabSpanNode(target.raw()))
+ if (isTabSpanTextNode(target))
+ target = tabSpanNode(target)->parentNode();
+ else if (isTabSpanNode(target))
target = target->parentNode();
Handle<CSSComputedStyleDeclaration> computedStyleAtPosition = CSSComputedStyleDeclaration::create(target);
@@ -749,7 +749,7 @@ bool EditingStyle::conflictsWithInlineStyleOfElement(const Handle<StyledElement>
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.raw()))
+ if (propertyID == CSSPropertyWhiteSpace && isTabSpanNode(element))
continue;
if (propertyID == CSSPropertyWebkitTextDecorationsInEffect && inlineStyle->getPropertyCSSValue(CSSPropertyTextDecoration)) {
@@ -1051,7 +1051,7 @@ PassRefPtr<EditingStyle> EditingStyle::wrappingStyleForSerialization(const Handl
// Styles that Mail blockquotes contribute should only be placed on the Mail blockquote,
// to help us differentiate those styles from ones that the user has applied.
// This helps us get the color of content pasted into blockquotes right.
- wrappingStyle->removeStyleAddedByNode(adoptRawResult(enclosingNodeOfType(firstPositionInOrBeforeNode(context.raw()), isMailBlockquote, CanCrossEditingBoundary)));
+ wrappingStyle->removeStyleAddedByNode(enclosingNodeOfType(firstPositionInOrBeforeNode(context), isMailBlockquote, CanCrossEditingBoundary));
// Call collapseTextDecorationProperties first or otherwise it'll copy the value over from in-effect to text-decorations.
wrappingStyle->collapseTextDecorationProperties();
@@ -1064,7 +1064,7 @@ PassRefPtr<EditingStyle> EditingStyle::wrappingStyleForSerialization(const Handl
// When not annotating for interchange, we only preserve inline style declarations.
for (Handle<Node> node = context; node && !node->isDocumentNode(); node = node->parentNode()) {
HandleScope scope;
- if (node->isStyledElement() && !isMailBlockquote(node.raw())) {
+ if (node->isStyledElement() && !isMailBlockquote(node)) {
wrappingStyle->mergeInlineAndImplicitStyleOfElement(Handle<StyledElement>::cast(node),
EditingStyle::DoNotOverrideValues,
EditingStyle::EditingPropertiesInEffect);
@@ -1316,7 +1316,7 @@ WritingDirection EditingStyle::textDirectionForSelection(const VisibleSelection&
// The selection is either a caret with no typing attributes or a range in which no embedding is added, so just use the start position
// to decide.
- Handle<Node> block = enclosingBlock(node.raw());
+ Handle<Node> block = enclosingBlock(node);
WritingDirection foundDirection = NaturalWritingDirection;
for (; node != block; node = node->parentNode()) {
@@ -1396,7 +1396,7 @@ StyleChange::StyleChange(EditingStyle* style, const Position& position)
extractTextStyles(document, mutableStyle, computedStyle->useFixedFontDefaultSize());
// Changing the whitespace style in a tab span would collapse the tab into a space.
- if (isTabSpanTextNode(position.deprecatedNode().handle().raw()) || isTabSpanNode((position.deprecatedNode().handle().raw())))
+ if (isTabSpanTextNode(position.deprecatedNode()) || isTabSpanNode((position.deprecatedNode())))
mutableStyle->removeProperty(CSSPropertyWhiteSpace);
// If unicode-bidi is present in mutableStyle and direction is not, then add direction to mutableStyle.

Powered by Google App Engine
This is Rietveld 408576698