| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 } | 569 } |
| 570 | 570 |
| 571 String InspectorOverlay::evaluateInOverlayForTest(const String& script) | 571 String InspectorOverlay::evaluateInOverlayForTest(const String& script) |
| 572 { | 572 { |
| 573 ScriptForbiddenScope::AllowUserAgentScript allowScript; | 573 ScriptForbiddenScope::AllowUserAgentScript allowScript; |
| 574 v8::HandleScope handleScope(toIsolate(overlayMainFrame())); | 574 v8::HandleScope handleScope(toIsolate(overlayMainFrame())); |
| 575 v8::Local<v8::Value> string = toLocalFrame(overlayPage()->mainFrame())->scri
pt().executeScriptInMainWorldAndReturnValue(ScriptSourceCode(script), ScriptCont
roller::ExecuteScriptWhenScriptsDisabled); | 575 v8::Local<v8::Value> string = toLocalFrame(overlayPage()->mainFrame())->scri
pt().executeScriptInMainWorldAndReturnValue(ScriptSourceCode(script), ScriptCont
roller::ExecuteScriptWhenScriptsDisabled); |
| 576 return toCoreStringWithUndefinedOrNullCheck(string); | 576 return toCoreStringWithUndefinedOrNullCheck(string); |
| 577 } | 577 } |
| 578 | 578 |
| 579 void InspectorOverlay::onTimer(Timer<InspectorOverlay>*) | 579 void InspectorOverlay::onTimer(TimerBase*) |
| 580 { | 580 { |
| 581 m_resizeTimerActive = false; | 581 m_resizeTimerActive = false; |
| 582 scheduleUpdate(); | 582 scheduleUpdate(); |
| 583 } | 583 } |
| 584 | 584 |
| 585 void InspectorOverlay::clearInternal() | 585 void InspectorOverlay::clearInternal() |
| 586 { | 586 { |
| 587 if (m_layoutEditor) | 587 if (m_layoutEditor) |
| 588 m_layoutEditor.clear(); | 588 m_layoutEditor.clear(); |
| 589 | 589 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 | 788 |
| 789 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) | 789 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) |
| 790 { | 790 { |
| 791 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->
isElementNode() || !node->ownerDocument()->isActive() || !m_cssAgent || !m_domAg
ent) | 791 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->
isElementNode() || !node->ownerDocument()->isActive() || !m_cssAgent || !m_domAg
ent) |
| 792 return; | 792 return; |
| 793 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen
t, &overlayMainFrame()->script()); | 793 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen
t, &overlayMainFrame()->script()); |
| 794 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde
n(true); | 794 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde
n(true); |
| 795 } | 795 } |
| 796 | 796 |
| 797 } // namespace blink | 797 } // namespace blink |
| OLD | NEW |