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

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

Issue 214693002: Remove most of scoped styles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Really remove it Created 6 years, 9 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 586
587 String representation = externalRepresentation(element); 587 String representation = externalRepresentation(element);
588 if (representation.isEmpty()) { 588 if (representation.isEmpty()) {
589 exceptionState.throwDOMException(InvalidAccessError, "The element provid ed has no external representation."); 589 exceptionState.throwDOMException(InvalidAccessError, "The element provid ed has no external representation.");
590 return String(); 590 return String();
591 } 591 }
592 592
593 return representation; 593 return representation;
594 } 594 }
595 595
596 size_t Internals::numberOfScopedHTMLStyleChildren(const Node* scope, ExceptionSt ate& exceptionState) const
597 {
598 if (scope && (scope->isElementNode() || scope->isShadowRoot()))
599 return scope->numberOfScopedHTMLStyleChildren();
600
601 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::argu mentNullOrIncorrectType(1, "Node"));
602 return 0;
603 }
604
605 PassRefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisited Info(Node* node, ExceptionState& exceptionState) const 596 PassRefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisited Info(Node* node, ExceptionState& exceptionState) const
606 { 597 {
607 if (!node) { 598 if (!node) {
608 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages:: argumentNullOrIncorrectType(1, "Node")); 599 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages:: argumentNullOrIncorrectType(1, "Node"));
609 return nullptr; 600 return nullptr;
610 } 601 }
611 602
612 bool allowVisitedStyle = true; 603 bool allowVisitedStyle = true;
613 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); 604 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle);
614 } 605 }
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength) 2443 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength)
2453 { 2444 {
2454 if (!node) 2445 if (!node)
2455 return String(); 2446 return String();
2456 blink::WebPoint point(x, y); 2447 blink::WebPoint point(x, y);
2457 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength); 2448 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength);
2458 return surroundingText.content(); 2449 return surroundingText.content();
2459 } 2450 }
2460 2451
2461 } 2452 }
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