| 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 { | 787 { |
| 788 if (!m_mediaQueryMatcher) | 788 if (!m_mediaQueryMatcher) |
| 789 m_mediaQueryMatcher = MediaQueryMatcher::create(this); | 789 m_mediaQueryMatcher = MediaQueryMatcher::create(this); |
| 790 return m_mediaQueryMatcher.get(); | 790 return m_mediaQueryMatcher.get(); |
| 791 } | 791 } |
| 792 | 792 |
| 793 void Document::setCompatibilityMode(CompatibilityMode mode) | 793 void Document::setCompatibilityMode(CompatibilityMode mode) |
| 794 { | 794 { |
| 795 if (m_compatibilityModeLocked || mode == m_compatibilityMode) | 795 if (m_compatibilityModeLocked || mode == m_compatibilityMode) |
| 796 return; | 796 return; |
| 797 ASSERT(m_styleSheetCollection->activeAuthorStyleSheets().isEmpty()); | |
| 798 bool wasInQuirksMode = inQuirksMode(); | 797 bool wasInQuirksMode = inQuirksMode(); |
| 799 m_compatibilityMode = mode; | 798 m_compatibilityMode = mode; |
| 800 selectorQueryCache()->invalidate(); | 799 selectorQueryCache()->invalidate(); |
| 801 if (inQuirksMode() != wasInQuirksMode) { | 800 if (inQuirksMode() != wasInQuirksMode) { |
| 802 // All user stylesheets have to reparse using the different mode. | 801 // All user stylesheets have to reparse using the different mode. |
| 803 m_styleSheetCollection->clearPageUserSheet(); | 802 m_styleSheetCollection->clearPageUserSheet(); |
| 804 m_styleSheetCollection->clearPageGroupUserSheets(); | 803 m_styleSheetCollection->invalidateInjectedStyleSheetCache(); |
| 805 } | 804 } |
| 806 } | 805 } |
| 807 | 806 |
| 808 String Document::compatMode() const | 807 String Document::compatMode() const |
| 809 { | 808 { |
| 810 return inQuirksMode() ? "BackCompat" : "CSS1Compat"; | 809 return inQuirksMode() ? "BackCompat" : "CSS1Compat"; |
| 811 } | 810 } |
| 812 | 811 |
| 813 void Document::resetLinkColor() | 812 void Document::resetLinkColor() |
| 814 { | 813 { |
| (...skipping 5225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6040 AtomicString localeKey = locale; | 6039 AtomicString localeKey = locale; |
| 6041 if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormContr
olUIEnabled()) | 6040 if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormContr
olUIEnabled()) |
| 6042 localeKey = defaultLanguage(); | 6041 localeKey = defaultLanguage(); |
| 6043 LocaleIdentifierToLocaleMap::AddResult result = m_localeCache.add(localeKey,
nullptr); | 6042 LocaleIdentifierToLocaleMap::AddResult result = m_localeCache.add(localeKey,
nullptr); |
| 6044 if (result.isNewEntry) | 6043 if (result.isNewEntry) |
| 6045 result.iterator->value = Locale::create(localeKey); | 6044 result.iterator->value = Locale::create(localeKey); |
| 6046 return *(result.iterator->value); | 6045 return *(result.iterator->value); |
| 6047 } | 6046 } |
| 6048 | 6047 |
| 6049 } // namespace WebCore | 6048 } // namespace WebCore |
| OLD | NEW |