| 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 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "core/rendering/style/RenderStyle.h" | 31 #include "core/rendering/style/RenderStyle.h" |
| 32 #include "core/rendering/style/StyleInheritedData.h" | 32 #include "core/rendering/style/StyleInheritedData.h" |
| 33 #include "wtf/text/StringBuilder.h" | 33 #include "wtf/text/StringBuilder.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 inline HTMLTitleElement::HTMLTitleElement(Document& document) | 37 inline HTMLTitleElement::HTMLTitleElement(Document& document) |
| 38 : HTMLElement(HTMLNames::titleTag, document) | 38 : HTMLElement(HTMLNames::titleTag, document) |
| 39 , m_ignoreTitleUpdatesWhenChildrenChange(false) | 39 , m_ignoreTitleUpdatesWhenChildrenChange(false) |
| 40 { | 40 { |
| 41 ScriptWrappable::init(this); | |
| 42 } | 41 } |
| 43 | 42 |
| 44 DEFINE_NODE_FACTORY(HTMLTitleElement) | 43 DEFINE_NODE_FACTORY(HTMLTitleElement) |
| 45 | 44 |
| 46 Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode*
insertionPoint) | 45 Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode*
insertionPoint) |
| 47 { | 46 { |
| 48 HTMLElement::insertedInto(insertionPoint); | 47 HTMLElement::insertedInto(insertionPoint); |
| 49 if (inDocument() && !isInShadowTree()) | 48 if (inDocument() && !isInShadowTree()) |
| 50 document().setTitleElement(this); | 49 document().setTitleElement(this); |
| 51 return InsertionDone; | 50 return InsertionDone; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Avoid calling Document::setTitleElement() during intermediate steps. | 84 // Avoid calling Document::setTitleElement() during intermediate steps. |
| 86 m_ignoreTitleUpdatesWhenChildrenChange = !value.isEmpty(); | 85 m_ignoreTitleUpdatesWhenChildrenChange = !value.isEmpty(); |
| 87 removeChildren(); | 86 removeChildren(); |
| 88 m_ignoreTitleUpdatesWhenChildrenChange = false; | 87 m_ignoreTitleUpdatesWhenChildrenChange = false; |
| 89 | 88 |
| 90 if (!value.isEmpty()) | 89 if (!value.isEmpty()) |
| 91 appendChild(document().createTextNode(value.impl()), IGNORE_EXCEPTION); | 90 appendChild(document().createTextNode(value.impl()), IGNORE_EXCEPTION); |
| 92 } | 91 } |
| 93 | 92 |
| 94 } | 93 } |
| OLD | NEW |