| 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 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1384 // Update title based on first title element in the head, if one exists. | 1384 // Update title based on first title element in the head, if one exists. |
| 1385 if (HTMLElement* headElement = head()) { | 1385 if (HTMLElement* headElement = head()) { |
| 1386 if (HTMLTitleElement* title = Traversal<HTMLTitleElement>::firstChild(*h
eadElement)) | 1386 if (HTMLTitleElement* title = Traversal<HTMLTitleElement>::firstChild(*h
eadElement)) |
| 1387 setTitleElement(title->text(), title); | 1387 setTitleElement(title->text(), title); |
| 1388 } | 1388 } |
| 1389 | 1389 |
| 1390 if (!m_titleElement) | 1390 if (!m_titleElement) |
| 1391 updateTitle(String()); | 1391 updateTitle(String()); |
| 1392 } | 1392 } |
| 1393 | 1393 |
| 1394 const AtomicString& Document::dir() |
| 1395 { |
| 1396 // FIXME(crbug.com/363107): This should be the root html element, not the bo
dy. |
| 1397 if (HTMLElement* b = body()) |
| 1398 return b->getAttribute(dirAttr); |
| 1399 return nullAtom; |
| 1400 } |
| 1401 |
| 1402 void Document::setDir(const AtomicString& value) |
| 1403 { |
| 1404 // FIXME(crbug.com/363107): This should be the root html element, not the bo
dy. |
| 1405 if (HTMLElement* b = body()) |
| 1406 b->setAttribute(dirAttr, value); |
| 1407 } |
| 1408 |
| 1394 PageVisibilityState Document::pageVisibilityState() const | 1409 PageVisibilityState Document::pageVisibilityState() const |
| 1395 { | 1410 { |
| 1396 // The visibility of the document is inherited from the visibility of the | 1411 // The visibility of the document is inherited from the visibility of the |
| 1397 // page. If there is no page associated with the document, we will assume | 1412 // page. If there is no page associated with the document, we will assume |
| 1398 // that the page is hidden, as specified by the spec: | 1413 // that the page is hidden, as specified by the spec: |
| 1399 // http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.
html#dom-document-hidden | 1414 // http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.
html#dom-document-hidden |
| 1400 if (!m_frame || !m_frame->page()) | 1415 if (!m_frame || !m_frame->page()) |
| 1401 return PageVisibilityStateHidden; | 1416 return PageVisibilityStateHidden; |
| 1402 return m_frame->page()->visibilityState(); | 1417 return m_frame->page()->visibilityState(); |
| 1403 } | 1418 } |
| (...skipping 4119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5523 (*it)->invalidateCache(attrName); | 5538 (*it)->invalidateCache(attrName); |
| 5524 } | 5539 } |
| 5525 | 5540 |
| 5526 void Document::trace(Visitor* visitor) | 5541 void Document::trace(Visitor* visitor) |
| 5527 { | 5542 { |
| 5528 Supplementable<Document>::trace(visitor); | 5543 Supplementable<Document>::trace(visitor); |
| 5529 ContainerNode::trace(visitor); | 5544 ContainerNode::trace(visitor); |
| 5530 } | 5545 } |
| 5531 | 5546 |
| 5532 } // namespace WebCore | 5547 } // namespace WebCore |
| OLD | NEW |