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

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

Issue 2322223002: Make ElementShadow::oldestShadowRoot() return a reference (Closed)
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ElementShadow.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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 ASSERT(host); 685 ASSERT(host);
686 if (ElementShadow* shadow = host->shadow()) 686 if (ElementShadow* shadow = host->shadow())
687 return &shadow->youngestShadowRoot(); 687 return &shadow->youngestShadowRoot();
688 return 0; 688 return 0;
689 } 689 }
690 690
691 ShadowRoot* Internals::oldestShadowRoot(Element* host) 691 ShadowRoot* Internals::oldestShadowRoot(Element* host)
692 { 692 {
693 ASSERT(host); 693 ASSERT(host);
694 if (ElementShadow* shadow = host->shadow()) 694 if (ElementShadow* shadow = host->shadow())
695 return shadow->oldestShadowRoot(); 695 return &shadow->oldestShadowRoot();
696 return 0; 696 return 0;
697 } 697 }
698 698
699 ShadowRoot* Internals::youngerShadowRoot(Node* shadow, ExceptionState& exception State) 699 ShadowRoot* Internals::youngerShadowRoot(Node* shadow, ExceptionState& exception State)
700 { 700 {
701 ASSERT(shadow); 701 ASSERT(shadow);
702 if (!shadow->isShadowRoot()) { 702 if (!shadow->isShadowRoot()) {
703 exceptionState.throwDOMException(InvalidAccessError, "The node provided is not a shadow root."); 703 exceptionState.throwDOMException(InvalidAccessError, "The node provided is not a shadow root.");
704 return 0; 704 return 0;
705 } 705 }
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
2627 2627
2628 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); 2628 return ClientRect::create(FloatRect(node->layoutObject()->visualRect()));
2629 } 2629 }
2630 2630
2631 void Internals::crash() 2631 void Internals::crash()
2632 { 2632 {
2633 CHECK(false) << "Intentional crash"; 2633 CHECK(false) << "Intentional crash";
2634 } 2634 }
2635 2635
2636 } // namespace blink 2636 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698