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

Unified Diff: Source/core/html/HTMLElement.cpp

Issue 23112019: If an element has unicode-bidi: plaintext and no strong directional characters. By default it shoul… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Proposed patch v3 Created 7 years, 4 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/css/html.css ('k') | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index 7dec05b9fa663bd1599ed26862f5c046feff249c..1200546e88092bbaeeee22b4d2782a101157a719 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -45,6 +45,7 @@
#include "core/editing/markup.h"
#include "core/html/HTMLBRElement.h"
#include "core/html/HTMLFormElement.h"
+#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLTemplateElement.h"
#include "core/html/HTMLTextFormControlElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
@@ -846,12 +847,12 @@ TextDirection HTMLElement::directionalityIfhasDirAutoAttribute(bool& isAuto) con
TextDirection HTMLElement::directionality(Node** strongDirectionalityTextNode) const
{
- if (isHTMLTextFormControlElement(this)) {
- HTMLTextFormControlElement* textElement = toHTMLTextFormControlElement(const_cast<HTMLElement*>(this));
+ if (hasTagName(inputTag)) {
+ HTMLInputElement* inputElement = toHTMLInputElement(const_cast<HTMLElement*>(this));
eseidel 2013/08/23 18:57:48 Seems we should just have a const-aware version of
bool hasStrongDirectionality;
- Unicode::Direction textDirection = textElement->value().defaultWritingDirection(&hasStrongDirectionality);
+ Unicode::Direction textDirection = inputElement->value().defaultWritingDirection(&hasStrongDirectionality);
if (strongDirectionalityTextNode)
- *strongDirectionalityTextNode = hasStrongDirectionality ? textElement : 0;
+ *strongDirectionalityTextNode = hasStrongDirectionality ? inputElement : 0;
return (textDirection == Unicode::LeftToRight) ? LTR : RTL;
}
« no previous file with comments | « Source/core/css/html.css ('k') | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698