| 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 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011 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 5908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5919 | 5919 |
| 5920 if (m_frame->document() != this) | 5920 if (m_frame->document() != this) |
| 5921 return 0; | 5921 return 0; |
| 5922 | 5922 |
| 5923 return loader; | 5923 return loader; |
| 5924 } | 5924 } |
| 5925 | 5925 |
| 5926 #if ENABLE(MICRODATA) | 5926 #if ENABLE(MICRODATA) |
| 5927 PassRefPtr<NodeList> Document::getItems(const String& typeNames) | 5927 PassRefPtr<NodeList> Document::getItems(const String& typeNames) |
| 5928 { | 5928 { |
| 5929 NodeListsNodeData* nodeLists = ensureRareData()->ensureNodeLists(this); | |
| 5930 | |
| 5931 // Since documet.getItem() is allowed for microdata, typeNames will be null
string. | 5929 // Since documet.getItem() is allowed for microdata, typeNames will be null
string. |
| 5932 // In this case we need to create an unique string identifier to map such re
quest in the cache. | 5930 // In this case we need to create an unique string identifier to map such re
quest in the cache. |
| 5933 String localTypeNames = typeNames.isNull() ? String("http://webkit.org/micro
data/undefinedItemType") : typeNames; | 5931 String localTypeNames = typeNames.isNull() ? String("http://webkit.org/micro
data/undefinedItemType") : typeNames; |
| 5934 | 5932 |
| 5935 NodeListsNodeData::MicroDataItemListCache::AddResult result = nodeLists->m_m
icroDataItemListCache.add(localTypeNames, 0); | 5933 return ensureRareData()->ensureNodeLists(this)->addCacheWithName<MicroDataIt
emList>(this, DynamicNodeList::MicroDataItemListType, localTypeNames); |
| 5936 if (!result.isNewEntry) | |
| 5937 return PassRefPtr<NodeList>(result.iterator->second); | |
| 5938 | |
| 5939 RefPtr<MicroDataItemList> list = MicroDataItemList::create(this, typeNames); | |
| 5940 result.iterator->second = list.get(); | |
| 5941 return list.release(); | |
| 5942 } | |
| 5943 | |
| 5944 void Document::removeCachedMicroDataItemList(MicroDataItemList* list, const Stri
ng& typeNames) | |
| 5945 { | |
| 5946 ASSERT(rareData()); | |
| 5947 ASSERT(rareData()->nodeLists()); | |
| 5948 | |
| 5949 NodeListsNodeData* data = rareData()->nodeLists(); | |
| 5950 | |
| 5951 String localTypeNames = typeNames.isNull() ? String("http://webkit.org/micro
data/undefinedItemType") : typeNames; | |
| 5952 ASSERT_UNUSED(list, list == data->m_microDataItemListCache.get(localTypeName
s)); | |
| 5953 data->m_microDataItemListCache.remove(localTypeNames); | |
| 5954 } | 5934 } |
| 5955 #endif | 5935 #endif |
| 5956 | 5936 |
| 5957 IntSize Document::viewportSize() const | 5937 IntSize Document::viewportSize() const |
| 5958 { | 5938 { |
| 5959 if (!view()) | 5939 if (!view()) |
| 5960 return IntSize(); | 5940 return IntSize(); |
| 5961 return view()->visibleContentRect(/* includeScrollbars */ true).size(); | 5941 return view()->visibleContentRect(/* includeScrollbars */ true).size(); |
| 5962 } | 5942 } |
| 5963 | 5943 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6019 #if ENABLE(UNDO_MANAGER) | 5999 #if ENABLE(UNDO_MANAGER) |
| 6020 PassRefPtr<UndoManager> Document::undoManager() | 6000 PassRefPtr<UndoManager> Document::undoManager() |
| 6021 { | 6001 { |
| 6022 if (!m_undoManager) | 6002 if (!m_undoManager) |
| 6023 m_undoManager = UndoManager::create(this); | 6003 m_undoManager = UndoManager::create(this); |
| 6024 return m_undoManager; | 6004 return m_undoManager; |
| 6025 } | 6005 } |
| 6026 #endif | 6006 #endif |
| 6027 | 6007 |
| 6028 } // namespace WebCore | 6008 } // namespace WebCore |
| OLD | NEW |