OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |