| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 DEFINE_NODE_FACTORY(HTMLTitleElement) | 45 DEFINE_NODE_FACTORY(HTMLTitleElement) |
| 46 | 46 |
| 47 Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode*
insertionPoint) | 47 Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode*
insertionPoint) |
| 48 { | 48 { |
| 49 HTMLElement::insertedInto(insertionPoint); | 49 HTMLElement::insertedInto(insertionPoint); |
| 50 if (inDocument() && !isInShadowTree()) | 50 if (inDocument() && !isInShadowTree()) |
| 51 document().setTitleElement(this); | 51 document().setTitleElement(this); |
| 52 return InsertionDone; | 52 return InsertionDone; |
| 53 } | 53 } |
| 54 | 54 |
| 55 void HTMLTitleElement::removedFrom(ContainerNode* insertionPoint, Node* next) | 55 void HTMLTitleElement::removedFrom(ContainerNode* insertionPoint) |
| 56 { | 56 { |
| 57 HTMLElement::removedFrom(insertionPoint, next); | 57 HTMLElement::removedFrom(insertionPoint); |
| 58 if (insertionPoint->inDocument() && !insertionPoint->isInShadowTree()) | 58 if (insertionPoint->inDocument() && !insertionPoint->isInShadowTree()) |
| 59 document().removeTitle(this); | 59 document().removeTitle(this); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void HTMLTitleElement::childrenChanged(const ChildrenChange& change) | 62 void HTMLTitleElement::childrenChanged(const ChildrenChange& change) |
| 63 { | 63 { |
| 64 HTMLElement::childrenChanged(change); | 64 HTMLElement::childrenChanged(change); |
| 65 if (inDocument() && !isInShadowTree() && !m_ignoreTitleUpdatesWhenChildrenCh
ange) | 65 if (inDocument() && !isInShadowTree() && !m_ignoreTitleUpdatesWhenChildrenCh
ange) |
| 66 document().setTitleElement(this); | 66 document().setTitleElement(this); |
| 67 } | 67 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 86 // Avoid calling Document::setTitleElement() during intermediate steps. | 86 // Avoid calling Document::setTitleElement() during intermediate steps. |
| 87 m_ignoreTitleUpdatesWhenChildrenChange = !value.isEmpty(); | 87 m_ignoreTitleUpdatesWhenChildrenChange = !value.isEmpty(); |
| 88 removeChildren(OmitSubtreeModifiedEvent); | 88 removeChildren(OmitSubtreeModifiedEvent); |
| 89 m_ignoreTitleUpdatesWhenChildrenChange = false; | 89 m_ignoreTitleUpdatesWhenChildrenChange = false; |
| 90 | 90 |
| 91 if (!value.isEmpty()) | 91 if (!value.isEmpty()) |
| 92 appendChild(document().createTextNode(value.impl()), IGNORE_EXCEPTION); | 92 appendChild(document().createTextNode(value.impl()), IGNORE_EXCEPTION); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } | 95 } |
| OLD | NEW |