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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 if (equalIgnoringCase(value, "no")) | 735 if (equalIgnoringCase(value, "no")) |
736 return TranslateAttributeNo; | 736 return TranslateAttributeNo; |
737 | 737 |
738 return TranslateAttributeInherit; | 738 return TranslateAttributeInherit; |
739 } | 739 } |
740 | 740 |
741 bool HTMLElement::translate() const | 741 bool HTMLElement::translate() const |
742 { | 742 { |
743 for (const Node* n = this; n; n = n->parentNode()) { | 743 for (const Node* n = this; n; n = n->parentNode()) { |
744 if (n->isHTMLElement()) { | 744 if (n->isHTMLElement()) { |
745 TranslateAttributeMode mode = static_cast<const HTMLElement*>(n)->tr
anslateAttributeMode(); | 745 TranslateAttributeMode mode = toHTMLElement(n)->translateAttributeMo
de(); |
746 if (mode != TranslateAttributeInherit) { | 746 if (mode != TranslateAttributeInherit) { |
747 ASSERT(mode == TranslateAttributeYes || mode == TranslateAttribu
teNo); | 747 ASSERT(mode == TranslateAttributeYes || mode == TranslateAttribu
teNo); |
748 return mode == TranslateAttributeYes; | 748 return mode == TranslateAttributeYes; |
749 } | 749 } |
750 } | 750 } |
751 } | 751 } |
752 | 752 |
753 // Default on the root element is translate=yes. | 753 // Default on the root element is translate=yes. |
754 return true; | 754 return true; |
755 } | 755 } |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 #ifndef NDEBUG | 1099 #ifndef NDEBUG |
1100 | 1100 |
1101 // For use in the debugger | 1101 // For use in the debugger |
1102 void dumpInnerHTML(WebCore::HTMLElement*); | 1102 void dumpInnerHTML(WebCore::HTMLElement*); |
1103 | 1103 |
1104 void dumpInnerHTML(WebCore::HTMLElement* element) | 1104 void dumpInnerHTML(WebCore::HTMLElement* element) |
1105 { | 1105 { |
1106 printf("%s\n", element->innerHTML().ascii().data()); | 1106 printf("%s\n", element->innerHTML().ascii().data()); |
1107 } | 1107 } |
1108 #endif | 1108 #endif |
OLD | NEW |