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, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 | 673 |
674 HTMLFormElement* HTMLElement::findFormAncestor() const | 674 HTMLFormElement* HTMLElement::findFormAncestor() const |
675 { | 675 { |
676 for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor->
parentNode()) { | 676 for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor->
parentNode()) { |
677 if (ancestor->hasTagName(formTag)) | 677 if (ancestor->hasTagName(formTag)) |
678 return toHTMLFormElement(ancestor); | 678 return toHTMLFormElement(ancestor); |
679 } | 679 } |
680 return 0; | 680 return 0; |
681 } | 681 } |
682 | 682 |
683 HTMLFormElement* HTMLElement::virtualForm() const | |
684 { | |
685 return findFormAncestor(); | |
686 } | |
687 | |
688 static inline bool elementAffectsDirectionality(const Node* node) | 683 static inline bool elementAffectsDirectionality(const Node* node) |
689 { | 684 { |
690 return node->isHTMLElement() && (node->hasTagName(bdiTag) || toHTMLElement(n
ode)->hasAttribute(dirAttr)); | 685 return node->isHTMLElement() && (node->hasTagName(bdiTag) || toHTMLElement(n
ode)->hasAttribute(dirAttr)); |
691 } | 686 } |
692 | 687 |
693 static void setHasDirAutoFlagRecursively(Node* firstNode, bool flag, Node* lastN
ode = 0) | 688 static void setHasDirAutoFlagRecursively(Node* firstNode, bool flag, Node* lastN
ode = 0) |
694 { | 689 { |
695 firstNode->setSelfOrAncestorHasDirAutoAttribute(flag); | 690 firstNode->setSelfOrAncestorHasDirAutoAttribute(flag); |
696 | 691 |
697 Node* node = firstNode->firstChild(); | 692 Node* node = firstNode->firstChild(); |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 #ifndef NDEBUG | 999 #ifndef NDEBUG |
1005 | 1000 |
1006 // For use in the debugger | 1001 // For use in the debugger |
1007 void dumpInnerHTML(WebCore::HTMLElement*); | 1002 void dumpInnerHTML(WebCore::HTMLElement*); |
1008 | 1003 |
1009 void dumpInnerHTML(WebCore::HTMLElement* element) | 1004 void dumpInnerHTML(WebCore::HTMLElement* element) |
1010 { | 1005 { |
1011 printf("%s\n", element->innerHTML().ascii().data()); | 1006 printf("%s\n", element->innerHTML().ascii().data()); |
1012 } | 1007 } |
1013 #endif | 1008 #endif |
OLD | NEW |