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

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

Issue 662603002: [DevTools] Adjust svg elements highlight to the root FrameView origin. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments Created 6 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 | 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 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 void Internals::setInspectorResourcesDataSizeLimits(int maximumResourcesContentS ize, int maximumSingleResourceContentSize, ExceptionState& exceptionState) 1480 void Internals::setInspectorResourcesDataSizeLimits(int maximumResourcesContentS ize, int maximumSingleResourceContentSize, ExceptionState& exceptionState)
1481 { 1481 {
1482 Page* page = contextDocument()->frame()->page(); 1482 Page* page = contextDocument()->frame()->page();
1483 if (!page) { 1483 if (!page) {
1484 exceptionState.throwDOMException(InvalidAccessError, "No page can be obt ained from the current context document."); 1484 exceptionState.throwDOMException(InvalidAccessError, "No page can be obt ained from the current context document.");
1485 return; 1485 return;
1486 } 1486 }
1487 page->inspectorController().setResourcesDataSizeLimitsFromInternals(maximumR esourcesContentSize, maximumSingleResourceContentSize); 1487 page->inspectorController().setResourcesDataSizeLimitsFromInternals(maximumR esourcesContentSize, maximumSingleResourceContentSize);
1488 } 1488 }
1489 1489
1490 String Internals::inspectorHighlightJSON(Node* node, ExceptionState& exceptionSt ate)
1491 {
1492 Page* page = contextDocument()->frame()->page();
1493 if (!page) {
1494 exceptionState.throwDOMException(InvalidAccessError, "No page can be obt ained from the current context document.");
1495 return String();
1496 }
1497 RefPtr<JSONObject> json(page->inspectorController().highlightJSONForNode(nod e));
1498 return json->toPrettyJSONString();
1499 }
1500
1490 bool Internals::hasGrammarMarker(Document* document, int from, int length) 1501 bool Internals::hasGrammarMarker(Document* document, int from, int length)
1491 { 1502 {
1492 ASSERT(document); 1503 ASSERT(document);
1493 if (!document->frame()) 1504 if (!document->frame())
1494 return 0; 1505 return 0;
1495 1506
1496 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document Marker::Grammar, from, length); 1507 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document Marker::Grammar, from, length);
1497 } 1508 }
1498 1509
1499 unsigned Internals::numberOfScrollableAreas(Document* document) 1510 unsigned Internals::numberOfScrollableAreas(Document* document)
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
2299 } 2310 }
2300 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options)); 2311 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options));
2301 } 2312 }
2302 2313
2303 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio nState) 2314 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio nState)
2304 { 2315 {
2305 return new InternalsIterator; 2316 return new InternalsIterator;
2306 } 2317 }
2307 2318
2308 } // namespace blink 2319 } // namespace blink
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