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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 m_titleSetExplicitly = true; | 1292 m_titleSetExplicitly = true; |
1293 if (!isHTMLDocument() && !isXHTMLDocument()) | 1293 if (!isHTMLDocument() && !isXHTMLDocument()) |
1294 m_titleElement = 0; | 1294 m_titleElement = 0; |
1295 else if (!m_titleElement) { | 1295 else if (!m_titleElement) { |
1296 if (HTMLElement* headElement = head()) { | 1296 if (HTMLElement* headElement = head()) { |
1297 m_titleElement = createElement(titleTag, false); | 1297 m_titleElement = createElement(titleTag, false); |
1298 headElement->appendChild(m_titleElement); | 1298 headElement->appendChild(m_titleElement); |
1299 } | 1299 } |
1300 } | 1300 } |
1301 | 1301 |
| 1302 updateTitle(title); |
| 1303 |
1302 if (m_titleElement && m_titleElement->hasTagName(titleTag)) | 1304 if (m_titleElement && m_titleElement->hasTagName(titleTag)) |
1303 toHTMLTitleElement(m_titleElement)->setText(title); | 1305 toHTMLTitleElement(m_titleElement)->setText(title); |
1304 else | |
1305 updateTitle(title); | |
1306 } | 1306 } |
1307 | 1307 |
1308 void Document::setTitleElement(const String& title, Element* titleElement) | 1308 void Document::setTitleElement(const String& title, Element* titleElement) |
1309 { | 1309 { |
1310 if (titleElement != m_titleElement) { | 1310 if (titleElement != m_titleElement) { |
1311 if (m_titleElement || m_titleSetExplicitly) | 1311 if (m_titleElement || m_titleSetExplicitly) |
1312 // Only allow the first title element to change the title -- others
have no effect. | 1312 // Only allow the first title element to change the title -- others
have no effect. |
1313 return; | 1313 return; |
1314 m_titleElement = titleElement; | 1314 m_titleElement = titleElement; |
1315 } | 1315 } |
(...skipping 3932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5248 } | 5248 } |
5249 | 5249 |
5250 FastTextAutosizer* Document::fastTextAutosizer() | 5250 FastTextAutosizer* Document::fastTextAutosizer() |
5251 { | 5251 { |
5252 if (!m_fastTextAutosizer && RuntimeEnabledFeatures::fastTextAutosizingEnable
d()) | 5252 if (!m_fastTextAutosizer && RuntimeEnabledFeatures::fastTextAutosizingEnable
d()) |
5253 m_fastTextAutosizer = FastTextAutosizer::create(this); | 5253 m_fastTextAutosizer = FastTextAutosizer::create(this); |
5254 return m_fastTextAutosizer.get(); | 5254 return m_fastTextAutosizer.get(); |
5255 } | 5255 } |
5256 | 5256 |
5257 } // namespace WebCore | 5257 } // namespace WebCore |
OLD | NEW |