Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Side by Side Diff: Source/WebCore/dom/Document.cpp

Issue 10989043: Merge 129469 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/dom/adopt-node-prevented-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 } 1061 }
1062 1062
1063 // FIXME: What about <frame> and <object>? 1063 // FIXME: What about <frame> and <object>?
1064 if (source->hasTagName(iframeTag)) { 1064 if (source->hasTagName(iframeTag)) {
1065 HTMLIFrameElement* iframe = static_cast<HTMLIFrameElement*>(source.g et()); 1065 HTMLIFrameElement* iframe = static_cast<HTMLIFrameElement*>(source.g et());
1066 if (frame() && frame()->tree()->isDescendantOf(iframe->contentFrame( ))) { 1066 if (frame() && frame()->tree()->isDescendantOf(iframe->contentFrame( ))) {
1067 ec = HIERARCHY_REQUEST_ERR; 1067 ec = HIERARCHY_REQUEST_ERR;
1068 return 0; 1068 return 0;
1069 } 1069 }
1070 } 1070 }
1071 if (source->parentNode()) 1071 if (source->parentNode()) {
1072 source->parentNode()->removeChild(source.get(), ec); 1072 source->parentNode()->removeChild(source.get(), ec);
1073 if (ec)
1074 return 0;
1075 }
1073 } 1076 }
1074 1077
1075 this->adoptIfNeeded(source.get()); 1078 this->adoptIfNeeded(source.get());
1076 1079
1077 return source; 1080 return source;
1078 } 1081 }
1079 1082
1080 bool Document::hasValidNamespaceForElements(const QualifiedName& qName) 1083 bool Document::hasValidNamespaceForElements(const QualifiedName& qName)
1081 { 1084 {
1082 // These checks are from DOM Core Level 2, createElementNS 1085 // These checks are from DOM Core Level 2, createElementNS
(...skipping 5309 matching lines...) Expand 10 before | Expand all | Expand 10 after
6392 AtomicString localeKey = locale; 6395 AtomicString localeKey = locale;
6393 if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormContr olUIEnabled()) 6396 if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormContr olUIEnabled())
6394 localeKey = defaultLanguage(); 6397 localeKey = defaultLanguage();
6395 LocaleToLocalizerMap::AddResult result = m_localizerCache.add(localeKey, nul lptr); 6398 LocaleToLocalizerMap::AddResult result = m_localizerCache.add(localeKey, nul lptr);
6396 if (result.isNewEntry) 6399 if (result.isNewEntry)
6397 result.iterator->second = Localizer::create(localeKey); 6400 result.iterator->second = Localizer::create(localeKey);
6398 return *(result.iterator->second); 6401 return *(result.iterator->second);
6399 } 6402 }
6400 6403
6401 } // namespace WebCore 6404 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/adopt-node-prevented-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698