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: Source/core/testing/Internals.cpp

Issue 325663003: Remove scoped styles (retry) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix layout test (and expectation) Created 6 years, 6 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
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 566
567 String representation = externalRepresentation(element); 567 String representation = externalRepresentation(element);
568 if (representation.isEmpty()) { 568 if (representation.isEmpty()) {
569 exceptionState.throwDOMException(InvalidAccessError, "The element provid ed has no external representation."); 569 exceptionState.throwDOMException(InvalidAccessError, "The element provid ed has no external representation.");
570 return String(); 570 return String();
571 } 571 }
572 572
573 return representation; 573 return representation;
574 } 574 }
575 575
576 size_t Internals::numberOfScopedHTMLStyleChildren(const Node* scope, ExceptionSt ate& exceptionState) const
577 {
578 if (scope && (scope->isElementNode() || scope->isShadowRoot()))
579 return scope->numberOfScopedHTMLStyleChildren();
580
581 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::argu mentNullOrIncorrectType(1, "Node"));
582 return 0;
583 }
584
585 PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncl udingVisitedInfo(Node* node, ExceptionState& exceptionState) const 576 PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncl udingVisitedInfo(Node* node, ExceptionState& exceptionState) const
586 { 577 {
587 if (!node) { 578 if (!node) {
588 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages:: argumentNullOrIncorrectType(1, "Node")); 579 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages:: argumentNullOrIncorrectType(1, "Node"));
589 return nullptr; 580 return nullptr;
590 } 581 }
591 582
592 bool allowVisitedStyle = true; 583 bool allowVisitedStyle = true;
593 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); 584 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle);
594 } 585 }
(...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 } else if (type == "none") { 2359 } else if (type == "none") {
2369 webtype = blink::ConnectionTypeNone; 2360 webtype = blink::ConnectionTypeNone;
2370 } else { 2361 } else {
2371 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile dToEnumerate("connection type", type)); 2362 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile dToEnumerate("connection type", type));
2372 return; 2363 return;
2373 } 2364 }
2374 networkStateNotifier().setWebConnectionTypeForTest(webtype); 2365 networkStateNotifier().setWebConnectionTypeForTest(webtype);
2375 } 2366 }
2376 2367
2377 } // namespace WebCore 2368 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698