Index: Source/core/editing/Editor.cpp |
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp |
index 72277832ce0f946523b772e2330574818256859f..940eb4cadeb80df0d1e3c33f88c41a60886bf485 100644 |
--- a/Source/core/editing/Editor.cpp |
+++ b/Source/core/editing/Editor.cpp |
@@ -954,11 +954,11 @@ void Editor::redo() |
void Editor::setBaseWritingDirection(WritingDirection direction) |
{ |
- Node* focusedElement = frame().document()->focusedElement(); |
- if (focusedElement && isHTMLTextFormControlElement(*focusedElement)) { |
+ Element* focusedElement = frame().document()->focusedElement(); |
+ if (isHTMLTextFormControlElement(focusedElement)) { |
if (direction == NaturalWritingDirection) |
return; |
- toHTMLElement(focusedElement)->setAttribute(dirAttr, direction == LeftToRightWritingDirection ? "ltr" : "rtl"); |
+ focusedElement->setAttribute(dirAttr, direction == LeftToRightWritingDirection ? "ltr" : "rtl"); |
focusedElement->dispatchInputEvent(); |
frame().document()->updateStyleIfNeeded(); |
return; |