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 return Element::rendererIsNeeded(style); | 735 return Element::rendererIsNeeded(style); |
736 } | 736 } |
737 | 737 |
738 RenderObject* HTMLElement::createRenderer(RenderStyle* style) | 738 RenderObject* HTMLElement::createRenderer(RenderStyle* style) |
739 { | 739 { |
740 if (hasLocalName(wbrTag)) | 740 if (hasLocalName(wbrTag)) |
741 return new RenderWordBreak(this); | 741 return new RenderWordBreak(this); |
742 return RenderObject::createObject(this, style); | 742 return RenderObject::createObject(this, style); |
743 } | 743 } |
744 | 744 |
745 HTMLFormElement* HTMLElement::formOwner() const | |
tkent
2013/12/10 23:19:28
This function always calls a virtual function isFo
sof
2013/12/11 07:55:03
Agreed, too much indirection here.
As suggested,
| |
746 { | |
747 if (!isFormAssociatedElement()) | |
748 return 0; | |
749 | |
750 return virtualForm(); | |
751 } | |
752 | |
745 HTMLFormElement* HTMLElement::findFormAncestor() const | 753 HTMLFormElement* HTMLElement::findFormAncestor() const |
746 { | 754 { |
747 for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor-> parentNode()) { | 755 for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor-> parentNode()) { |
748 if (ancestor->hasTagName(formTag)) | 756 if (ancestor->hasTagName(formTag)) |
749 return toHTMLFormElement(ancestor); | 757 return toHTMLFormElement(ancestor); |
750 } | 758 } |
751 return 0; | 759 return 0; |
752 } | 760 } |
753 | 761 |
754 HTMLFormElement* HTMLElement::virtualForm() const | 762 HTMLFormElement* HTMLElement::virtualForm() const |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1075 #ifndef NDEBUG | 1083 #ifndef NDEBUG |
1076 | 1084 |
1077 // For use in the debugger | 1085 // For use in the debugger |
1078 void dumpInnerHTML(WebCore::HTMLElement*); | 1086 void dumpInnerHTML(WebCore::HTMLElement*); |
1079 | 1087 |
1080 void dumpInnerHTML(WebCore::HTMLElement* element) | 1088 void dumpInnerHTML(WebCore::HTMLElement* element) |
1081 { | 1089 { |
1082 printf("%s\n", element->innerHTML().ascii().data()); | 1090 printf("%s\n", element->innerHTML().ascii().data()); |
1083 } | 1091 } |
1084 #endif | 1092 #endif |
OLD | NEW |