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 3736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3747 return; | 3747 return; |
3748 } | 3748 } |
3749 | 3749 |
3750 KURL cookieURL = this->cookieURL(); | 3750 KURL cookieURL = this->cookieURL(); |
3751 if (cookieURL.isEmpty()) | 3751 if (cookieURL.isEmpty()) |
3752 return; | 3752 return; |
3753 | 3753 |
3754 setCookies(this, cookieURL, value); | 3754 setCookies(this, cookieURL, value); |
3755 } | 3755 } |
3756 | 3756 |
3757 AtomicString Document::referrer() const | 3757 const AtomicString& Document::referrer() const |
3758 { | 3758 { |
3759 if (loader()) | 3759 if (loader()) |
3760 return loader()->request().httpReferrer(); | 3760 return loader()->request().httpReferrer(); |
3761 return nullAtom; | 3761 return nullAtom; |
3762 } | 3762 } |
3763 | 3763 |
3764 String Document::domain() const | 3764 String Document::domain() const |
3765 { | 3765 { |
3766 return securityOrigin()->domain(); | 3766 return securityOrigin()->domain(); |
3767 } | 3767 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3803 if (m_frame) | 3803 if (m_frame) |
3804 m_frame->script().updateSecurityOrigin(); | 3804 m_frame->script().updateSecurityOrigin(); |
3805 } | 3805 } |
3806 | 3806 |
3807 // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-lastmodified | 3807 // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-lastmodified |
3808 String Document::lastModified() const | 3808 String Document::lastModified() const |
3809 { | 3809 { |
3810 DateComponents date; | 3810 DateComponents date; |
3811 bool foundDate = false; | 3811 bool foundDate = false; |
3812 if (m_frame) { | 3812 if (m_frame) { |
3813 String httpLastModified; | 3813 if (DocumentLoader* documentLoader = loader()) { |
3814 if (DocumentLoader* documentLoader = loader()) | 3814 const AtomicString& httpLastModified = documentLoader->response().ht
tpHeaderField("Last-Modified"); |
3815 httpLastModified = documentLoader->response().httpHeaderField("Last-
Modified"); | 3815 if (!httpLastModified.isEmpty()) { |
3816 if (!httpLastModified.isEmpty()) { | 3816 date.setMillisecondsSinceEpochForDateTime(parseDate(httpLastModi
fied)); |
3817 date.setMillisecondsSinceEpochForDateTime(parseDate(httpLastModified
)); | 3817 foundDate = true; |
3818 foundDate = true; | 3818 } |
3819 } | 3819 } |
3820 } | 3820 } |
3821 // FIXME: If this document came from the file system, the HTML5 | 3821 // FIXME: If this document came from the file system, the HTML5 |
3822 // specificiation tells us to read the last modification date from the file | 3822 // specificiation tells us to read the last modification date from the file |
3823 // system. | 3823 // system. |
3824 if (!foundDate) | 3824 if (!foundDate) |
3825 date.setMillisecondsSinceEpochForDateTime(currentTimeMS()); | 3825 date.setMillisecondsSinceEpochForDateTime(currentTimeMS()); |
3826 return String::format("%02d/%02d/%04d %02d:%02d:%02d", date.month() + 1, dat
e.monthDay(), date.fullYear(), date.hour(), date.minute(), date.second()); | 3826 return String::format("%02d/%02d/%04d %02d:%02d:%02d", date.month() + 1, dat
e.monthDay(), date.fullYear(), date.hour(), date.minute(), date.second()); |
3827 } | 3827 } |
3828 | 3828 |
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5234 } | 5234 } |
5235 | 5235 |
5236 FastTextAutosizer* Document::fastTextAutosizer() | 5236 FastTextAutosizer* Document::fastTextAutosizer() |
5237 { | 5237 { |
5238 if (!m_fastTextAutosizer && RuntimeEnabledFeatures::fastTextAutosizingEnable
d()) | 5238 if (!m_fastTextAutosizer && RuntimeEnabledFeatures::fastTextAutosizingEnable
d()) |
5239 m_fastTextAutosizer = FastTextAutosizer::create(this); | 5239 m_fastTextAutosizer = FastTextAutosizer::create(this); |
5240 return m_fastTextAutosizer.get(); | 5240 return m_fastTextAutosizer.get(); |
5241 } | 5241 } |
5242 | 5242 |
5243 } // namespace WebCore | 5243 } // namespace WebCore |
OLD | NEW |