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

Side by Side Diff: sky/engine/core/html/parser/HTMLConstructionSite.cpp

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 HTMLConstructionSite::~HTMLConstructionSite() 255 HTMLConstructionSite::~HTMLConstructionSite()
256 { 256 {
257 // Depending on why we're being destroyed it might be OK 257 // Depending on why we're being destroyed it might be OK
258 // to forget queued tasks, but currently we don't expect to. 258 // to forget queued tasks, but currently we don't expect to.
259 ASSERT(m_taskQueue.isEmpty()); 259 ASSERT(m_taskQueue.isEmpty());
260 // Currently we assume that text will never be the last token in the 260 // Currently we assume that text will never be the last token in the
261 // document and that we'll always queue some additional task to cause it to flush. 261 // document and that we'll always queue some additional task to cause it to flush.
262 ASSERT(m_pendingText.isEmpty()); 262 ASSERT(m_pendingText.isEmpty());
263 } 263 }
264 264
265 void HTMLConstructionSite::trace(Visitor* visitor)
266 {
267 visitor->trace(m_document);
268 visitor->trace(m_attachmentRoot);
269 visitor->trace(m_taskQueue);
270 visitor->trace(m_pendingText);
271 }
272
273 void HTMLConstructionSite::detach() 265 void HTMLConstructionSite::detach()
274 { 266 {
275 // FIXME: We'd like to ASSERT here that we're canceling and not just discard ing 267 // FIXME: We'd like to ASSERT here that we're canceling and not just discard ing
276 // text that really should have made it into the DOM earlier, but there 268 // text that really should have made it into the DOM earlier, but there
277 // doesn't seem to be a nice way to do that. 269 // doesn't seem to be a nice way to do that.
278 m_pendingText.discard(); 270 m_pendingText.discard();
279 m_document = nullptr; 271 m_document = nullptr;
280 m_attachmentRoot = nullptr; 272 m_attachmentRoot = nullptr;
281 } 273 }
282 274
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 } 345 }
354 346
355 PassRefPtr<HTMLElement> HTMLConstructionSite::createHTMLElement(AtomicHTMLToken* token) 347 PassRefPtr<HTMLElement> HTMLConstructionSite::createHTMLElement(AtomicHTMLToken* token)
356 { 348 {
357 Document& document = ownerDocumentForCurrentNode(); 349 Document& document = ownerDocumentForCurrentNode();
358 RefPtr<HTMLElement> element = HTMLElementFactory::createHTMLElement(token->n ame(), document, true); 350 RefPtr<HTMLElement> element = HTMLElementFactory::createHTMLElement(token->n ame(), document, true);
359 setAttributes(element.get(), token); 351 setAttributes(element.get(), token);
360 return element.release(); 352 return element.release();
361 } 353 }
362 354
363 void HTMLConstructionSite::PendingText::trace(Visitor* visitor)
364 {
365 visitor->trace(parent);
366 visitor->trace(nextChild);
367 } 355 }
368
369 }
OLDNEW
« no previous file with comments | « sky/engine/core/html/parser/HTMLConstructionSite.h ('k') | sky/engine/core/html/parser/HTMLTreeBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698