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

Side by Side Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 23453033: Have DOMPatchSupport and DocumentFragment deal with Document references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/platform/DragData.cpp » ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 { 648 {
649 Frame* frame = assertFrame(errorString, frameId); 649 Frame* frame = assertFrame(errorString, frameId);
650 if (!frame) 650 if (!frame)
651 return; 651 return;
652 652
653 Document* document = frame->document(); 653 Document* document = frame->document();
654 if (!document) { 654 if (!document) {
655 *errorString = "No Document instance to set HTML for"; 655 *errorString = "No Document instance to set HTML for";
656 return; 656 return;
657 } 657 }
658 DOMPatchSupport::patchDocument(document, html); 658 DOMPatchSupport::patchDocument(*document, html);
659 } 659 }
660 660
661 void InspectorPageAgent::setDeviceMetricsOverride(ErrorString* errorString, int width, int height, double fontScaleFactor, bool fitWindow) 661 void InspectorPageAgent::setDeviceMetricsOverride(ErrorString* errorString, int width, int height, double fontScaleFactor, bool fitWindow)
662 { 662 {
663 const static long maxDimension = 10000000; 663 const static long maxDimension = 10000000;
664 664
665 if (width < 0 || height < 0 || width > maxDimension || height > maxDimension ) { 665 if (width < 0 || height < 0 || width > maxDimension || height > maxDimension ) {
666 *errorString = "Width and height values must be positive, not greater th an " + String::number(maxDimension); 666 *errorString = "Width and height values must be positive, not greater th an " + String::number(maxDimension);
667 return; 667 return;
668 } 668 }
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 } 1290 }
1291 1291
1292 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid) 1292 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid)
1293 { 1293 {
1294 m_state->setBoolean(PageAgentState::showSizeOnResize, show); 1294 m_state->setBoolean(PageAgentState::showSizeOnResize, show);
1295 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ; 1295 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ;
1296 } 1296 }
1297 1297
1298 } // namespace WebCore 1298 } // namespace WebCore
1299 1299
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/platform/DragData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698