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

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

Issue 1413583002: Make ElementShadow::youngestShadowRoot() return a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more tail -> head Created 5 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 | « third_party/WebKit/Source/core/page/FocusController.cpp ('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) 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 { 650 {
651 // FIXME: Internals::shadowRoot() in tests should be converted to youngestSh adowRoot() or oldestShadowRoot(). 651 // FIXME: Internals::shadowRoot() in tests should be converted to youngestSh adowRoot() or oldestShadowRoot().
652 // https://bugs.webkit.org/show_bug.cgi?id=78465 652 // https://bugs.webkit.org/show_bug.cgi?id=78465
653 return youngestShadowRoot(host); 653 return youngestShadowRoot(host);
654 } 654 }
655 655
656 ShadowRoot* Internals::youngestShadowRoot(Element* host) 656 ShadowRoot* Internals::youngestShadowRoot(Element* host)
657 { 657 {
658 ASSERT(host); 658 ASSERT(host);
659 if (ElementShadow* shadow = host->shadow()) 659 if (ElementShadow* shadow = host->shadow())
660 return shadow->youngestShadowRoot(); 660 return &shadow->youngestShadowRoot();
661 return 0; 661 return 0;
662 } 662 }
663 663
664 ShadowRoot* Internals::oldestShadowRoot(Element* host) 664 ShadowRoot* Internals::oldestShadowRoot(Element* host)
665 { 665 {
666 ASSERT(host); 666 ASSERT(host);
667 if (ElementShadow* shadow = host->shadow()) 667 if (ElementShadow* shadow = host->shadow())
668 return shadow->oldestShadowRoot(); 668 return shadow->oldestShadowRoot();
669 return 0; 669 return 0;
670 } 670 }
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 Document* document = contextDocument(); 2535 Document* document = contextDocument();
2536 if (!document) { 2536 if (!document) {
2537 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available."); 2537 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available.");
2538 return 0; 2538 return 0;
2539 } 2539 }
2540 2540
2541 return document->loader()->timing().monotonicTimeToZeroBasedDocumentTime(pla tformTime); 2541 return document->loader()->timing().monotonicTimeToZeroBasedDocumentTime(pla tformTime);
2542 } 2542 }
2543 2543
2544 } // namespace blink 2544 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/FocusController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698