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 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2427 // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-cl
ose | 2427 // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-cl
ose |
2428 | 2428 |
2429 if (!scriptableDocumentParser() || !scriptableDocumentParser()->wasCreatedBy
Script() || !scriptableDocumentParser()->isParsing()) | 2429 if (!scriptableDocumentParser() || !scriptableDocumentParser()->wasCreatedBy
Script() || !scriptableDocumentParser()->isParsing()) |
2430 return; | 2430 return; |
2431 | 2431 |
2432 explicitClose(); | 2432 explicitClose(); |
2433 } | 2433 } |
2434 | 2434 |
2435 void Document::explicitClose() | 2435 void Document::explicitClose() |
2436 { | 2436 { |
2437 if (m_parser) | 2437 if (RefPtr<DocumentParser> parser = m_parser) |
2438 m_parser->finish(); | 2438 parser->finish(); |
2439 | 2439 |
2440 if (!m_frame) { | 2440 if (!m_frame) { |
2441 // Because we have no frame, we don't know if all loading has completed, | 2441 // Because we have no frame, we don't know if all loading has completed, |
2442 // so we just call implicitClose() immediately. FIXME: This might fire | 2442 // so we just call implicitClose() immediately. FIXME: This might fire |
2443 // the load event prematurely <http://bugs.webkit.org/show_bug.cgi?id=14
568>. | 2443 // the load event prematurely <http://bugs.webkit.org/show_bug.cgi?id=14
568>. |
2444 implicitClose(); | 2444 implicitClose(); |
2445 return; | 2445 return; |
2446 } | 2446 } |
2447 | 2447 |
2448 m_frame->loader()->checkCompleted(); | 2448 m_frame->loader()->checkCompleted(); |
(...skipping 3593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6042 AtomicString localeKey = locale; | 6042 AtomicString localeKey = locale; |
6043 if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormContr
olUIEnabled()) | 6043 if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormContr
olUIEnabled()) |
6044 localeKey = defaultLanguage(); | 6044 localeKey = defaultLanguage(); |
6045 LocaleIdentifierToLocaleMap::AddResult result = m_localeCache.add(localeKey,
nullptr); | 6045 LocaleIdentifierToLocaleMap::AddResult result = m_localeCache.add(localeKey,
nullptr); |
6046 if (result.isNewEntry) | 6046 if (result.isNewEntry) |
6047 result.iterator->value = Locale::create(localeKey); | 6047 result.iterator->value = Locale::create(localeKey); |
6048 return *(result.iterator->value); | 6048 return *(result.iterator->value); |
6049 } | 6049 } |
6050 | 6050 |
6051 } // namespace WebCore | 6051 } // namespace WebCore |
OLD | NEW |