| 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 24 matching lines...) Expand all Loading... |
| 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 } | 41 } |
| 42 | 42 |
| 43 DEFINE_NODE_FACTORY(HTMLTitleElement) | 43 DEFINE_NODE_FACTORY(HTMLTitleElement) |
| 44 | 44 |
| 45 Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode*
insertionPoint) | 45 void HTMLTitleElement::insertedInto(ContainerNode* insertionPoint) |
| 46 { | 46 { |
| 47 HTMLElement::insertedInto(insertionPoint); | 47 HTMLElement::insertedInto(insertionPoint); |
| 48 if (inDocument() && !isInShadowTree()) | 48 if (inDocument() && !isInShadowTree()) |
| 49 document().setTitleElement(this); | 49 document().setTitleElement(this); |
| 50 return InsertionDone; | |
| 51 } | 50 } |
| 52 | 51 |
| 53 void HTMLTitleElement::removedFrom(ContainerNode* insertionPoint) | 52 void HTMLTitleElement::removedFrom(ContainerNode* insertionPoint) |
| 54 { | 53 { |
| 55 HTMLElement::removedFrom(insertionPoint); | 54 HTMLElement::removedFrom(insertionPoint); |
| 56 if (insertionPoint->inDocument() && !insertionPoint->isInShadowTree()) | 55 if (insertionPoint->inDocument() && !insertionPoint->isInShadowTree()) |
| 57 document().removeTitle(this); | 56 document().removeTitle(this); |
| 58 } | 57 } |
| 59 | 58 |
| 60 void HTMLTitleElement::childrenChanged(const ChildrenChange& change) | 59 void HTMLTitleElement::childrenChanged(const ChildrenChange& change) |
| (...skipping 23 matching lines...) Expand all Loading... |
| 84 // Avoid calling Document::setTitleElement() during intermediate steps. | 83 // Avoid calling Document::setTitleElement() during intermediate steps. |
| 85 m_ignoreTitleUpdatesWhenChildrenChange = !value.isEmpty(); | 84 m_ignoreTitleUpdatesWhenChildrenChange = !value.isEmpty(); |
| 86 removeChildren(); | 85 removeChildren(); |
| 87 m_ignoreTitleUpdatesWhenChildrenChange = false; | 86 m_ignoreTitleUpdatesWhenChildrenChange = false; |
| 88 | 87 |
| 89 if (!value.isEmpty()) | 88 if (!value.isEmpty()) |
| 90 appendChild(document().createTextNode(value.impl()), IGNORE_EXCEPTION); | 89 appendChild(document().createTextNode(value.impl()), IGNORE_EXCEPTION); |
| 91 } | 90 } |
| 92 | 91 |
| 93 } | 92 } |
| OLD | NEW |