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

Side by Side Diff: Source/WebCore/inspector/InspectorOverlay.cpp

Issue 10967070: Merge 129350 - Web Inspector:EXC_BAD_ACCESS upon closing page with node highlighted (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | no next file » | 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 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
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
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)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698