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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLElement.cpp

Issue 2145823003: Placeholder content direction should not affect INPUT/TEXTAREA direction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-dir-auto-with-placeholder.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved. 4 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 TextDirection textDirection = determineDirectionality(inputElement->valu e(), &hasStrongDirectionality); 730 TextDirection textDirection = determineDirectionality(inputElement->valu e(), &hasStrongDirectionality);
731 if (strongDirectionalityTextNode) 731 if (strongDirectionalityTextNode)
732 *strongDirectionalityTextNode = hasStrongDirectionality ? inputEleme nt : 0; 732 *strongDirectionalityTextNode = hasStrongDirectionality ? inputEleme nt : 0;
733 return textDirection; 733 return textDirection;
734 } 734 }
735 735
736 Node* node = FlatTreeTraversal::firstChild(*this); 736 Node* node = FlatTreeTraversal::firstChild(*this);
737 while (node) { 737 while (node) {
738 // Skip bdi, script, style and text form controls. 738 // Skip bdi, script, style and text form controls.
739 if (equalIgnoringCase(node->nodeName(), "bdi") || isHTMLScriptElement(*n ode) || isHTMLStyleElement(*node) 739 if (equalIgnoringCase(node->nodeName(), "bdi") || isHTMLScriptElement(*n ode) || isHTMLStyleElement(*node)
740 || (node->isElementNode() && toElement(node)->isTextFormControl())) { 740 || (node->isElementNode() && toElement(node)->isTextFormControl())
741 || (node->isElementNode() && toElement(node)->shadowPseudoId() == "- webkit-input-placeholder")) {
741 node = FlatTreeTraversal::nextSkippingChildren(*node, this); 742 node = FlatTreeTraversal::nextSkippingChildren(*node, this);
742 continue; 743 continue;
743 } 744 }
744 745
745 // Skip elements with valid dir attribute 746 // Skip elements with valid dir attribute
746 if (node->isElementNode()) { 747 if (node->isElementNode()) {
747 AtomicString dirAttributeValue = toElement(node)->fastGetAttribute(d irAttr); 748 AtomicString dirAttributeValue = toElement(node)->fastGetAttribute(d irAttr);
748 if (isValidDirAttribute(dirAttributeValue)) { 749 if (isValidDirAttribute(dirAttributeValue)) {
749 node = FlatTreeTraversal::nextSkippingChildren(*node, this); 750 node = FlatTreeTraversal::nextSkippingChildren(*node, this);
750 continue; 751 continue;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 #ifndef NDEBUG 1101 #ifndef NDEBUG
1101 1102
1102 // For use in the debugger 1103 // For use in the debugger
1103 void dumpInnerHTML(blink::HTMLElement*); 1104 void dumpInnerHTML(blink::HTMLElement*);
1104 1105
1105 void dumpInnerHTML(blink::HTMLElement* element) 1106 void dumpInnerHTML(blink::HTMLElement* element)
1106 { 1107 {
1107 printf("%s\n", element->innerHTML().ascii().data()); 1108 printf("%s\n", element->innerHTML().ascii().data());
1108 } 1109 }
1109 #endif 1110 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-dir-auto-with-placeholder.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698