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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 | 755 |
756 // Default on the root element is translate=yes. | 756 // Default on the root element is translate=yes. |
757 return true; | 757 return true; |
758 } | 758 } |
759 | 759 |
760 void HTMLElement::setTranslate(bool enable) | 760 void HTMLElement::setTranslate(bool enable) |
761 { | 761 { |
762 setAttribute(translateAttr, enable ? "yes" : "no"); | 762 setAttribute(translateAttr, enable ? "yes" : "no"); |
763 } | 763 } |
764 | 764 |
765 bool HTMLElement::rendererIsNeeded(const NodeRenderingContext& context) | 765 bool HTMLElement::rendererIsNeeded(const RenderStyle& style) |
766 { | 766 { |
767 if (hasLocalName(noscriptTag)) { | 767 if (hasLocalName(noscriptTag)) { |
768 Frame* frame = document().frame(); | 768 Frame* frame = document().frame(); |
769 if (frame && frame->script()->canExecuteScripts(NotAboutToExecuteScript)
) | 769 if (frame && frame->script()->canExecuteScripts(NotAboutToExecuteScript)
) |
770 return false; | 770 return false; |
771 } else if (hasLocalName(noembedTag)) { | 771 } else if (hasLocalName(noembedTag)) { |
772 Frame* frame = document().frame(); | 772 Frame* frame = document().frame(); |
773 if (frame && frame->loader()->allowPlugins(NotAboutToInstantiatePlugin)) | 773 if (frame && frame->loader()->allowPlugins(NotAboutToInstantiatePlugin)) |
774 return false; | 774 return false; |
775 } | 775 } |
776 return Element::rendererIsNeeded(context); | 776 return Element::rendererIsNeeded(style); |
777 } | 777 } |
778 | 778 |
779 RenderObject* HTMLElement::createRenderer(RenderStyle* style) | 779 RenderObject* HTMLElement::createRenderer(RenderStyle* style) |
780 { | 780 { |
781 if (hasLocalName(wbrTag)) | 781 if (hasLocalName(wbrTag)) |
782 return new RenderWordBreak(this); | 782 return new RenderWordBreak(this); |
783 return RenderObject::createObject(this, style); | 783 return RenderObject::createObject(this, style); |
784 } | 784 } |
785 | 785 |
786 HTMLFormElement* HTMLElement::findFormAncestor() const | 786 HTMLFormElement* HTMLElement::findFormAncestor() const |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 #ifndef NDEBUG | 1102 #ifndef NDEBUG |
1103 | 1103 |
1104 // For use in the debugger | 1104 // For use in the debugger |
1105 void dumpInnerHTML(WebCore::HTMLElement*); | 1105 void dumpInnerHTML(WebCore::HTMLElement*); |
1106 | 1106 |
1107 void dumpInnerHTML(WebCore::HTMLElement* element) | 1107 void dumpInnerHTML(WebCore::HTMLElement* element) |
1108 { | 1108 { |
1109 printf("%s\n", element->innerHTML().ascii().data()); | 1109 printf("%s\n", element->innerHTML().ascii().data()); |
1110 } | 1110 } |
1111 #endif | 1111 #endif |
OLD | NEW |