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

Side by Side Diff: Source/core/html/HTMLDocument.cpp

Issue 23437003: Implement cloneNode for Document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 { 209 {
210 if (HTMLBodyElement* bodyElement = bodyAsHTMLBodyElement()) { 210 if (HTMLBodyElement* bodyElement = bodyAsHTMLBodyElement()) {
211 // This check is a bit silly, but some benchmarks like to set the 211 // This check is a bit silly, but some benchmarks like to set the
212 // document's link colors over and over to the same value and we 212 // document's link colors over and over to the same value and we
213 // don't want to incur a style update each time. 213 // don't want to incur a style update each time.
214 if (bodyElement->vLink() != value) 214 if (bodyElement->vLink() != value)
215 bodyElement->setVLink(value); 215 bodyElement->setVLink(value);
216 } 216 }
217 } 217 }
218 218
219 PassRefPtr<Document> HTMLDocument::cloneDocumentWithoutChildren()
220 {
221 return create(DocumentInit(url()).withRegistrationContext(registrationContex t()));
222 }
223
219 // -------------------------------------------------------------------------- 224 // --------------------------------------------------------------------------
220 // not part of the DOM 225 // not part of the DOM
221 // -------------------------------------------------------------------------- 226 // --------------------------------------------------------------------------
222 227
223 void HTMLDocument::addItemToMap(HashCountedSet<StringImpl*>& map, const AtomicSt ring& name) 228 void HTMLDocument::addItemToMap(HashCountedSet<StringImpl*>& map, const AtomicSt ring& name)
224 { 229 {
225 if (name.isEmpty()) 230 if (name.isEmpty())
226 return; 231 return;
227 map.add(name.impl()); 232 map.add(name.impl());
228 if (Frame* f = frame()) 233 if (Frame* f = frame())
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 } 331 }
327 332
328 void HTMLDocument::clear() 333 void HTMLDocument::clear()
329 { 334 {
330 // FIXME: This does nothing, and that seems unlikely to be correct. 335 // FIXME: This does nothing, and that seems unlikely to be correct.
331 // We've long had a comment saying that IE doesn't support this. 336 // We've long had a comment saying that IE doesn't support this.
332 // But I do see it in the documentation for Mozilla. 337 // But I do see it in the documentation for Mozilla.
333 } 338 }
334 339
335 } 340 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698