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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 292 }
293 293
294 PassRefPtr<Element> Internals::createContentElement(ExceptionState& es) 294 PassRefPtr<Element> Internals::createContentElement(ExceptionState& es)
295 { 295 {
296 Document* document = contextDocument(); 296 Document* document = contextDocument();
297 if (!document) { 297 if (!document) {
298 es.throwDOMException(InvalidAccessError); 298 es.throwDOMException(InvalidAccessError);
299 return 0; 299 return 0;
300 } 300 }
301 301
302 return HTMLContentElement::create(document); 302 return HTMLContentElement::create(*document);
303 } 303 }
304 304
305 bool Internals::isValidContentSelect(Element* insertionPoint, ExceptionState& es ) 305 bool Internals::isValidContentSelect(Element* insertionPoint, ExceptionState& es )
306 { 306 {
307 if (!insertionPoint || !insertionPoint->isInsertionPoint()) { 307 if (!insertionPoint || !insertionPoint->isInsertionPoint()) {
308 es.throwDOMException(InvalidAccessError); 308 es.throwDOMException(InvalidAccessError);
309 return false; 309 return false;
310 } 310 }
311 311
312 return isHTMLContentElement(insertionPoint) && toHTMLContentElement(insertio nPoint)->isSelectValid(); 312 return isHTMLContentElement(insertionPoint) && toHTMLContentElement(insertio nPoint)->isSelectValid();
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 return false; 2211 return false;
2212 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); 2212 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB);
2213 // To prevent tests that call loseSharedGraphicsContext3D from being 2213 // To prevent tests that call loseSharedGraphicsContext3D from being
2214 // flaky, we call finish so that the context is guaranteed to be lost 2214 // flaky, we call finish so that the context is guaranteed to be lost
2215 // synchronously (i.e. before returning). 2215 // synchronously (i.e. before returning).
2216 sharedContext->finish(); 2216 sharedContext->finish();
2217 return true; 2217 return true;
2218 } 2218 }
2219 2219
2220 } 2220 }
OLDNEW
« no previous file with comments | « Source/core/svg/animation/SVGSMILElement.cpp ('k') | Source/core/testing/MockPagePopupDriver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698