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

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

Issue 202813005: Add DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION() macro (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Slight clean up Created 6 years, 9 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 | « no previous file | Source/core/html/HTMLElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | Source/core/html/HTMLElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698