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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 } | 264 } |
265 | 265 |
266 void InspectorOverlay::update() | 266 void InspectorOverlay::update() |
267 { | 267 { |
268 if (!m_highlightNode && !m_highlightRect && m_pausedInDebuggerMessage.isNull
()) { | 268 if (!m_highlightNode && !m_highlightRect && m_pausedInDebuggerMessage.isNull
()) { |
269 m_client->hideHighlight(); | 269 m_client->hideHighlight(); |
270 return; | 270 return; |
271 } | 271 } |
272 | 272 |
273 FrameView* view = m_page->mainFrame()->view(); | 273 FrameView* view = m_page->mainFrame()->view(); |
| 274 if (!view) |
| 275 return; |
| 276 |
274 FrameView* overlayView = overlayPage()->mainFrame()->view(); | 277 FrameView* overlayView = overlayPage()->mainFrame()->view(); |
275 IntRect visibleRect = enclosingIntRect(view->visibleContentRect()); | 278 IntRect visibleRect = enclosingIntRect(view->visibleContentRect()); |
276 overlayView->resize(visibleRect.width(), visibleRect.height()); | 279 overlayView->resize(visibleRect.width(), visibleRect.height()); |
277 | 280 |
278 // Clear canvas and paint things. | 281 // Clear canvas and paint things. |
279 reset(); | 282 reset(); |
280 | 283 |
281 drawNodeHighlight(); | 284 drawNodeHighlight(); |
282 drawRectHighlight(); | 285 drawRectHighlight(); |
283 drawPausedInDebuggerMessage(); | 286 drawPausedInDebuggerMessage(); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 { | 462 { |
460 RefPtr<InspectorArray> command = InspectorArray::create(); | 463 RefPtr<InspectorArray> command = InspectorArray::create(); |
461 command->pushString(method); | 464 command->pushString(method); |
462 command->pushValue(argument); | 465 command->pushValue(argument); |
463 overlayPage()->mainFrame()->script()->evaluate(ScriptSourceCode(makeString("
dispatch(", command->toJSONString(), ")"))); | 466 overlayPage()->mainFrame()->script()->evaluate(ScriptSourceCode(makeString("
dispatch(", command->toJSONString(), ")"))); |
464 } | 467 } |
465 | 468 |
466 } // namespace WebCore | 469 } // namespace WebCore |
467 | 470 |
468 #endif // ENABLE(INSPECTOR) | 471 #endif // ENABLE(INSPECTOR) |
OLD | NEW |