| OLD | NEW |
| 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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 TextDirection textDirection = determineDirectionality(inputElement->valu
e(), &hasStrongDirectionality); | 729 TextDirection textDirection = determineDirectionality(inputElement->valu
e(), &hasStrongDirectionality); |
| 730 if (strongDirectionalityTextNode) | 730 if (strongDirectionalityTextNode) |
| 731 *strongDirectionalityTextNode = hasStrongDirectionality ? inputEleme
nt : 0; | 731 *strongDirectionalityTextNode = hasStrongDirectionality ? inputEleme
nt : 0; |
| 732 return textDirection; | 732 return textDirection; |
| 733 } | 733 } |
| 734 | 734 |
| 735 Node* node = FlatTreeTraversal::firstChild(*this); | 735 Node* node = FlatTreeTraversal::firstChild(*this); |
| 736 while (node) { | 736 while (node) { |
| 737 // Skip bdi, script, style and text form controls. | 737 // Skip bdi, script, style and text form controls. |
| 738 if (equalIgnoringCase(node->nodeName(), "bdi") || isHTMLScriptElement(*n
ode) || isHTMLStyleElement(*node) | 738 if (equalIgnoringCase(node->nodeName(), "bdi") || isHTMLScriptElement(*n
ode) || isHTMLStyleElement(*node) |
| 739 || (node->isElementNode() && toElement(node)->isTextFormControl()))
{ | 739 || (node->isElementNode() && toElement(node)->isTextFormControl()) |
| 740 || (node->isElementNode() && toElement(node)->shadowPseudoId() == "-
webkit-input-placeholder")) { |
| 740 node = FlatTreeTraversal::nextSkippingChildren(*node, this); | 741 node = FlatTreeTraversal::nextSkippingChildren(*node, this); |
| 741 continue; | 742 continue; |
| 742 } | 743 } |
| 743 | 744 |
| 744 // Skip elements with valid dir attribute | 745 // Skip elements with valid dir attribute |
| 745 if (node->isElementNode()) { | 746 if (node->isElementNode()) { |
| 746 AtomicString dirAttributeValue = toElement(node)->fastGetAttribute(d
irAttr); | 747 AtomicString dirAttributeValue = toElement(node)->fastGetAttribute(d
irAttr); |
| 747 if (isValidDirAttribute(dirAttributeValue)) { | 748 if (isValidDirAttribute(dirAttributeValue)) { |
| 748 node = FlatTreeTraversal::nextSkippingChildren(*node, this); | 749 node = FlatTreeTraversal::nextSkippingChildren(*node, this); |
| 749 continue; | 750 continue; |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 #ifndef NDEBUG | 1048 #ifndef NDEBUG |
| 1048 | 1049 |
| 1049 // For use in the debugger | 1050 // For use in the debugger |
| 1050 void dumpInnerHTML(blink::HTMLElement*); | 1051 void dumpInnerHTML(blink::HTMLElement*); |
| 1051 | 1052 |
| 1052 void dumpInnerHTML(blink::HTMLElement* element) | 1053 void dumpInnerHTML(blink::HTMLElement* element) |
| 1053 { | 1054 { |
| 1054 printf("%s\n", element->innerHTML().ascii().data()); | 1055 printf("%s\n", element->innerHTML().ascii().data()); |
| 1055 } | 1056 } |
| 1056 #endif | 1057 #endif |
| OLD | NEW |