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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 320 |
321 return overlayPage()->mainFrame()->eventHandler().keyEvent(event); | 321 return overlayPage()->mainFrame()->eventHandler().keyEvent(event); |
322 } | 322 } |
323 | 323 |
324 void InspectorOverlay::drawOutline(GraphicsContext* context, const LayoutRect& r
ect, const Color& color) | 324 void InspectorOverlay::drawOutline(GraphicsContext* context, const LayoutRect& r
ect, const Color& color) |
325 { | 325 { |
326 FloatRect outlineRect = rect; | 326 FloatRect outlineRect = rect; |
327 drawOutlinedQuad(context, outlineRect, Color(), color); | 327 drawOutlinedQuad(context, outlineRect, Color(), color); |
328 } | 328 } |
329 | 329 |
330 void InspectorOverlay::getHighlight(Highlight* highlight) const | |
331 { | |
332 if (!m_highlightNode && !m_highlightQuad) | |
333 return; | |
334 | |
335 highlight->type = HighlightTypeRects; | |
336 if (m_highlightNode) | |
337 buildNodeHighlight(m_highlightNode.get(), m_nodeHighlightConfig, highlig
ht); | |
338 else | |
339 buildQuadHighlight(m_page, *m_highlightQuad, m_quadHighlightConfig, high
light); | |
340 } | |
341 | |
342 void InspectorOverlay::resize(const IntSize& size) | 330 void InspectorOverlay::resize(const IntSize& size) |
343 { | 331 { |
344 m_size = size; | 332 m_size = size; |
345 update(); | 333 update(); |
346 } | 334 } |
347 | 335 |
348 void InspectorOverlay::setPausedInDebuggerMessage(const String* message) | 336 void InspectorOverlay::setPausedInDebuggerMessage(const String* message) |
349 { | 337 { |
350 m_pausedInDebuggerMessage = message ? *message : String(); | 338 m_pausedInDebuggerMessage = message ? *message : String(); |
351 update(); | 339 update(); |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 { | 671 { |
684 if (m_overlayPage) { | 672 if (m_overlayPage) { |
685 // FIXME: This logic is duplicated in SVGImage and WebViewImpl. Perhaps
it can be combined | 673 // FIXME: This logic is duplicated in SVGImage and WebViewImpl. Perhaps
it can be combined |
686 // into Page's destructor. | 674 // into Page's destructor. |
687 m_overlayPage->mainFrame()->loader().frameDetached(); | 675 m_overlayPage->mainFrame()->loader().frameDetached(); |
688 m_overlayPage->willBeDestroyed(); | 676 m_overlayPage->willBeDestroyed(); |
689 m_overlayPage.clear(); | 677 m_overlayPage.clear(); |
690 } | 678 } |
691 m_overlayChromeClient.clear(); | 679 m_overlayChromeClient.clear(); |
692 m_timer.stop(); | 680 m_timer.stop(); |
| 681 |
| 682 // This will clear internal structures and issue update to the client. Safe
to call last. |
| 683 hideHighlight(); |
693 } | 684 } |
694 | 685 |
695 void InspectorOverlay::startedRecordingProfile() | 686 void InspectorOverlay::startedRecordingProfile() |
696 { | 687 { |
697 if (!m_activeProfilerCount++) | 688 if (!m_activeProfilerCount++) |
698 freePage(); | 689 freePage(); |
699 } | 690 } |
700 | 691 |
701 } // namespace WebCore | 692 } // namespace WebCore |
OLD | NEW |