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

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

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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
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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 exceptionState.throwDOMException(InvalidAccessError, "The element is not an insertion point."); 420 exceptionState.throwDOMException(InvalidAccessError, "The element is not an insertion point.");
421 return false; 421 return false;
422 } 422 }
423 423
424 return isHTMLContentElement(*insertionPoint) && toHTMLContentElement(*insert ionPoint).isSelectValid(); 424 return isHTMLContentElement(*insertionPoint) && toHTMLContentElement(*insert ionPoint).isSelectValid();
425 } 425 }
426 426
427 Node* Internals::treeScopeRootNode(Node* node) 427 Node* Internals::treeScopeRootNode(Node* node)
428 { 428 {
429 ASSERT(node); 429 ASSERT(node);
430 return &node->treeScope().rootNode(); 430 return &node->treeScopeOrDocument().rootNode();
431 } 431 }
432 432
433 Node* Internals::parentTreeScope(Node* node) 433 Node* Internals::parentTreeScope(Node* node)
434 { 434 {
435 ASSERT(node); 435 ASSERT(node);
436 const TreeScope* parentTreeScope = node->treeScope().parentTreeScope(); 436 const TreeScope* parentTreeScope = node->treeScopeOrDocument().parentTreeSco pe();
437 return parentTreeScope ? &parentTreeScope->rootNode() : 0; 437 return parentTreeScope ? &parentTreeScope->rootNode() : 0;
438 } 438 }
439 439
440 bool Internals::hasSelectorForIdInShadow(Element* host, const AtomicString& idVa lue, ExceptionState& exceptionState) 440 bool Internals::hasSelectorForIdInShadow(Element* host, const AtomicString& idVa lue, ExceptionState& exceptionState)
441 { 441 {
442 ASSERT(host); 442 ASSERT(host);
443 if (!host->shadow()) { 443 if (!host->shadow()) {
444 exceptionState.throwDOMException(InvalidAccessError, "The host element d oes not have a shadow."); 444 exceptionState.throwDOMException(InvalidAccessError, "The host element d oes not have a shadow.");
445 return false; 445 return false;
446 } 446 }
(...skipping 2134 matching lines...) Expand 10 before | Expand all | Expand 10 after
2581 } 2581 }
2582 2582
2583 String Internals::getProgrammaticScrollAnimationState(Node* node) const 2583 String Internals::getProgrammaticScrollAnimationState(Node* node) const
2584 { 2584 {
2585 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) 2585 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node))
2586 return scrollableArea->programmaticScrollAnimator().runStateAsText(); 2586 return scrollableArea->programmaticScrollAnimator().runStateAsText();
2587 return String(); 2587 return String();
2588 } 2588 }
2589 2589
2590 } // namespace blink 2590 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp ('k') | third_party/WebKit/Source/core/xml/XPathFunctions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698