Bug 90880 - Web Inspector: adding pause icon for JavaScript debugging
Summary: Web Inspector: adding pause icon for JavaScript debugging
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 93124
  Show dependency treegraph
 
Reported: 2012-07-10 06:34 PDT by Sergey Rogulenko
Modified: 2012-08-03 07:54 PDT (History)
18 users (show)

See Also:


Attachments
Patch (10.13 KB, patch)
2012-07-10 06:39 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (18.46 KB, patch)
2012-07-10 10:46 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
The screen on the left is the original page, the screen on the right is how it looks, when you are standing paused on a break point. (57.29 KB, image/png)
2012-07-11 01:44 PDT, Sergey Rogulenko
no flags Details
Patch (23.32 KB, patch)
2012-07-11 05:00 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (24.06 KB, patch)
2012-07-11 07:40 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (24.93 KB, patch)
2012-07-12 02:38 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (25.31 KB, patch)
2012-07-12 05:29 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (19.25 KB, patch)
2012-07-13 09:48 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (25.42 KB, patch)
2012-07-16 03:12 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (28.55 KB, patch)
2012-07-16 03:47 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (84.41 KB, patch)
2012-07-16 06:49 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (85.85 KB, patch)
2012-07-16 07:11 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (89.36 KB, patch)
2012-07-16 07:48 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (101.45 KB, patch)
2012-07-16 08:55 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (98.36 KB, patch)
2012-07-16 09:52 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (31.70 KB, patch)
2012-07-16 10:25 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (31.05 KB, patch)
2012-07-16 11:16 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (28.54 KB, patch)
2012-07-17 05:29 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (40.42 KB, patch)
2012-07-17 10:47 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (40.61 KB, patch)
2012-07-17 10:56 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (38.04 KB, patch)
2012-07-18 03:11 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (38.01 KB, patch)
2012-07-18 05:24 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff
Patch (38.12 KB, patch)
2012-07-18 06:31 PDT, Sergey Rogulenko
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Rogulenko 2012-07-10 06:34:45 PDT
Adding pause icon for JavaScript debugging
Comment 1 Sergey Rogulenko 2012-07-10 06:39:23 PDT
Created attachment 151453 [details]
Patch
Comment 2 Alexander Pavlov (apavlov) 2012-07-10 08:37:56 PDT
Comment on attachment 151453 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=151453&action=review

> Source/WebKit/chromium/ChangeLog:16
> +        (DashBoard):

Is this going to be implemented for ports other than Chromium?

> Source/WebCore/inspector/InspectorDebuggerAgent.cpp:649
> +        pageAgent->showPauseWarning();

My guess is that exposing InspectorClient in InspectorPageAgent would be a more flexible approach than adding a one-off method to the cross-agents API (as opposed to the other similar methods).

Also, having such calls AFTER the internal state change seems a bit cleaner.

> Source/WebCore/inspector/InspectorDebuggerAgent.cpp:674
> +        pageAgent->hidePauseWarning();

Ditto

> Source/WebCore/inspector/InspectorPageAgent.cpp:970
> +void InspectorPageAgent::showPauseWarning()

Order of methods in a CPP file must correspond to that in the respective header file.

> Source/WebCore/inspector/InspectorPageAgent.h:131
> +    void showPauseWarning();

These can be replaced by a single
InspectorClient* client();
as discussed above.

> Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp:81
> +static const int pauseWarning = 100;

The name is not intuitive enough. Something like "jsPausedSign" (or even "dashBoard" if it is going to be used for something else) would be a bit more clear.

> Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp:387
> +        FrameView* frameView = this->frameView();

Seems like no methods are called on the frameView?

> Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp:394
> +        FloatSize fs = FloatSize(m_webView->size());

Acronyms are not used as names in WebKit. You might as well static_cast m_webView->size()'s components to float rather than create a new FloatSize instance.

> Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp:399
> +    WebCore::FrameView* frameView()

This can be removed with its only call site.
Comment 3 Andrey Kosyakov 2012-07-10 09:04:28 PDT
Comment on attachment 151453 [details]
Patch

As discussed, approach generally looks good, but it needs a bit more polish on both UI and implementation. Removing r? for the time being.
Comment 4 Sergey Rogulenko 2012-07-10 10:46:36 PDT
Created attachment 151484 [details]
Patch
Comment 5 Timothy Hatcher 2012-07-10 11:08:25 PDT
It is not clear what this is about. Please add a description and/or mock up.
Comment 6 Sergey Rogulenko 2012-07-11 01:44:14 PDT
Created attachment 151645 [details]
The screen on the left is the original page, the screen on the right is how it looks, when you are standing paused on a break point.
Comment 7 Sergey Rogulenko 2012-07-11 05:00:03 PDT
Created attachment 151685 [details]
Patch
Comment 8 Sergey Rogulenko 2012-07-11 07:40:33 PDT
Created attachment 151706 [details]
Patch
Comment 9 Sergey Rogulenko 2012-07-12 02:38:18 PDT
Created attachment 151894 [details]
Patch
Comment 10 Sergey Rogulenko 2012-07-12 05:29:21 PDT
Created attachment 151920 [details]
Patch
Comment 11 Andrey Kosyakov 2012-07-12 05:44:22 PDT
Comment on attachment 151920 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=151920&action=review

Can we disable dashboard when "inspect element" mode is on?

> Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp:372
> +class DevToolsDashBoard : public WebPageOverlay {

Can you please move it to a file of its own?

> Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp:443
> +            DEFINE_STATIC_LOCAL(RefPtr<Image>, buttonImageDefault, (Image::loadPlatformResource("mediaplayerPlayDisabled")));
> +            DEFINE_STATIC_LOCAL(RefPtr<Image>, buttonImage, (Image::loadPlatformResource("mediaplayerPlay")));
> +            DEFINE_STATIC_LOCAL(RefPtr<Image>, buttonImageDown, (Image::loadPlatformResource("mediaplayerPlayDown")));
> +            DEFINE_STATIC_LOCAL(RefPtr<Image>, buttonImageHover, (Image::loadPlatformResource("mediaplayerPlayHover")));

I think we could pass resource ids from the outside, so we can reuse the class for other buttons. I think you can just pass the root name (e.g. "mediaplayerPlay") and derive the rest by adding specific states (Disabled/Play/Down/etc)

> Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp:459
> +        void getState(bool& isFocused, bool& isPressed)

does this have to be public?

> Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp:465
> +        void updateState(bool isFocused, bool isPressed)

ditto
Comment 12 Pavel Feldman 2012-07-12 06:24:06 PDT
Comment on attachment 151920 [details]
Patch

r- as per our discussion offline - lets reuse existing DOM highlight plumbing.
Comment 13 Sergey Rogulenko 2012-07-13 09:48:20 PDT
Created attachment 152280 [details]
Patch
Comment 14 Timothy Hatcher 2012-07-13 09:52:18 PDT
Comment on attachment 152280 [details]
Patch

I preferred the approach where the client was repsosible for showing/drawing this. Can you make this be PLATFORM(CHROMUM) or !PLATFORM(MAC)?
Comment 15 Timothy Hatcher 2012-07-13 09:54:47 PDT
Comment on attachment 152280 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152280&action=review

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:490
> +InspectorDashBoard::InspectorDashBoard(InstrumentingAgents* instrumentingAgents, InspectorClient* client, InspectorPageAgent* pageAgent)

DashBoard is one word. So this should be InspectorDashboard. Though, I'm not sure this should even be a separate class. Also classes in WebCore get their own file.
Comment 16 Timothy Hatcher 2012-07-13 09:55:48 PDT
Ugh, sorry for all the typos earlier.
Comment 17 Pavel Feldman 2012-07-13 10:00:19 PDT
Comment on attachment 152280 [details]
Patch

r- as per Timothy's comments.
Comment 18 Pavel Feldman 2012-07-13 10:21:06 PDT
Comment on attachment 152280 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152280&action=review

As we agreed offline, lets do the following:
1) Convert DOMNodeHighlighter into the InspectorOverlay class
2) Put its instance into the InspectorPageAgent and configure it from within InspectorDOMAgent and PageDebuggerAgent
3) Make sure that getHighlight is still available on this new overlay so that Timothy could access it and paint highlight on the embedder level.

Timothy, this should not change the way things work for you.

>> Source/WebCore/inspector/DOMNodeHighlighter.cpp:490
>> +InspectorDashBoard::InspectorDashBoard(InstrumentingAgents* instrumentingAgents, InspectorClient* client, InspectorPageAgent* pageAgent)
> 
> DashBoard is one word. So this should be InspectorDashboard. Though, I'm not sure this should even be a separate class. Also classes in WebCore get their own file.

You don't need instrumentingAgents here.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:206
> +    , m_dashBoard(InspectorDashBoard::create(instrumentingAgents, client, pageAgent))

Dashboard should not belong to DOMAgent.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1091
> +    if (InspectorInstrumentation::isDebuggerPaused(m_instrumentingAgents))

DOM agent should not be debugger-aware.

> Source/WebCore/inspector/InspectorInstrumentation.h:101
> +    static bool isDebuggerPaused(InstrumentingAgents*);

Why do you need this?
Comment 19 Sergey Rogulenko 2012-07-16 03:12:07 PDT
Created attachment 152504 [details]
Patch
Comment 20 Sergey Rogulenko 2012-07-16 03:47:27 PDT
Created attachment 152506 [details]
Patch
Comment 21 Andrey Kosyakov 2012-07-16 05:08:23 PDT
Comment on attachment 152506 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152506&action=review

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:495
> +    , m_highlightData(0) { }

style: { } each on its own line.

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:502
> +    else
> +    if (m_shouldShowPauseWarning)

style: merge to "else if"

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:549
> +    if (m_client) {

nit:
if (!m_client)
    return;

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:576
> +    Frame* frame = m_pageAgent->mainFrame();

This seems to be the only place we use page agent. Please consider storing page instead, so we avoid circular dependencies.

> Source/WebCore/inspector/DOMNodeHighlighter.h:83
> +class InspectorOverlay {

You'll need to rename the file.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1601
>  void InspectorDOMAgent::getHighlight(Highlight* highlight) const

Does DOM agent need this still?

> Source/WebCore/inspector/InspectorDebuggerAgent.h:138
> +    virtual bool isPageDebuggerAgent() = 0;

Having BaseClass::isSomeDerivedClass() is very unfortunate. Making it pure virtual -- doubly so. Can we avoid this by just checking for a non-null InspectorOverlay?

> Source/WebCore/inspector/InspectorPageAgent.cpp:319
> +    , m_overlay(InspectorOverlay::create(this, client))

I'd put overlay ownership to InspectorController, so that it's life-time is explicit and we avoid another reasons for agents to depend on each other. Pavel, WDYT?
Comment 22 Sergey Rogulenko 2012-07-16 06:49:36 PDT
Created attachment 152523 [details]
Patch
Comment 23 Early Warning System Bot 2012-07-16 07:01:40 PDT
Comment on attachment 152523 [details]
Patch

Attachment 152523 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/13239949
Comment 24 Build Bot 2012-07-16 07:02:57 PDT
Comment on attachment 152523 [details]
Patch

Attachment 152523 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13243967
Comment 25 Early Warning System Bot 2012-07-16 07:03:08 PDT
Comment on attachment 152523 [details]
Patch

Attachment 152523 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/13254249
Comment 26 Sergey Rogulenko 2012-07-16 07:11:14 PDT
Created attachment 152526 [details]
Patch
Comment 27 Gyuyoung Kim 2012-07-16 07:23:04 PDT
Comment on attachment 152526 [details]
Patch

Attachment 152526 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/13239956
Comment 28 Early Warning System Bot 2012-07-16 07:27:13 PDT
Comment on attachment 152526 [details]
Patch

Attachment 152526 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/13254253
Comment 29 Build Bot 2012-07-16 07:28:43 PDT
Comment on attachment 152526 [details]
Patch

Attachment 152526 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13248544
Comment 30 Build Bot 2012-07-16 07:29:22 PDT
Comment on attachment 152526 [details]
Patch

Attachment 152526 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/13239957
Comment 31 WebKit Review Bot 2012-07-16 07:37:12 PDT
Comment on attachment 152526 [details]
Patch

Attachment 152526 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13245901
Comment 32 Early Warning System Bot 2012-07-16 07:42:58 PDT
Comment on attachment 152526 [details]
Patch

Attachment 152526 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/13238941
Comment 33 Sergey Rogulenko 2012-07-16 07:48:54 PDT
Created attachment 152534 [details]
Patch
Comment 34 Sergey Rogulenko 2012-07-16 08:55:46 PDT
Created attachment 152545 [details]
Patch
Comment 35 Build Bot 2012-07-16 09:02:59 PDT
Comment on attachment 152545 [details]
Patch

Attachment 152545 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13233984
Comment 36 Sergey Rogulenko 2012-07-16 09:52:52 PDT
Created attachment 152553 [details]
Patch
Comment 37 Sergey Rogulenko 2012-07-16 10:25:55 PDT
Created attachment 152558 [details]
Patch
Comment 38 Andrey Kosyakov 2012-07-16 10:44:06 PDT
Comment on attachment 152558 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152558&action=review

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:547
> +void InspectorOverlay::update()

InspectorOverlay should be in a file of its own.

> Source/WebCore/inspector/InspectorPageAgent.cpp:851
> +void InspectorPageAgent::drawInspectorOverlay(GraphicsContext& context)
> +{
> +    m_overlay->draw(context);
> +}

Why do we need this method on InspectorPageAgent?
Comment 39 Sergey Rogulenko 2012-07-16 11:16:09 PDT
Created attachment 152567 [details]
Patch
Comment 40 Pavel Feldman 2012-07-16 11:43:42 PDT
Comment on attachment 152567 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152567&action=review

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:492
> +    , m_shouldShowPauseWarning(false)

This is not a warning, simply "m_pausedInDebugger"

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:502
> +    else if (m_shouldShowPauseWarning)

I would not make these mutually exclusive - nuke the "else"!

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:503
> +        drawPauseWarning(context);

drawIsPausedInDebugger.

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:569
> +void InspectorOverlay::drawPauseWarning(GraphicsContext& context)

drawIsPausedInDebugger

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:589
> +    String text = "Paused in debugger.";

Ok, we need to figure out how we localize it now.

> Source/WebCore/inspector/DOMNodeHighlighter.h:95
> +    void setShouldShowPauseWarning(bool);

setIsPausedInDebugger

> Source/WebCore/inspector/InspectorController.cpp:299
> +    m_overlay->draw(context);

Nit: We need to rename "draw" to "paint" everywhere in overlay at some point.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1036
>      // This method requires m_highlightData to have been filled in by its client.

Now that highlightData lives in the InspectorOverlay, there is no need to mirror it here.

> Source/WebCore/inspector/InspectorDebuggerAgent.cpp:109
> +        m_overlay->setShouldShowPauseWarning(false);

You should sniff for these from within PageDebuggerAgent.

> Source/WebCore/inspector/InspectorDebuggerAgent.h:128
> +    InspectorDebuggerAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManager*, InspectorOverlay*);

InspectorDebuggerAgent should not be affected. Only PageDebuggerAgent should be.

> Source/WebCore/inspector/InspectorPageAgent.h:51
> +class GraphicsContext;

Remove this?
Comment 41 Sergey Rogulenko 2012-07-17 05:29:29 PDT
Created attachment 152744 [details]
Patch
Comment 42 Andrey Kosyakov 2012-07-17 05:49:09 PDT
Comment on attachment 152744 [details]
Patch

LGTM, though I liked the previous approach where highlight was mutually exclusive with pause screen.
Comment 43 Pavel Feldman 2012-07-17 06:57:20 PDT
Comment on attachment 152744 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152744&action=review

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:492
> +    , m_isPausedInDebugger(false)

Nit: we rarely use "is" prefix.

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:501
> +        drawHighlight(context);

Nit: You could simply call drawHighlight here and bail out from there in case of no highlightData.

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:541
> +void InspectorOverlay::setIsPausedInDebugger(bool flag)

setPausedInDebugger, sorry about that.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1038
> +    m_overlay->setHighlight(m_document.get(), m_highlightData.get());

m_document will expire upon reset.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1606
> +    m_overlay->getHighlight(m_highlightData->node ? m_highlightData->node->document() : m_document.get(), m_highlightData.get(), highlight);

I was hoping m_highlightData could go away from the DOMAgent.
Comment 44 Sergey Rogulenko 2012-07-17 10:47:04 PDT
Created attachment 152783 [details]
Patch
Comment 45 Early Warning System Bot 2012-07-17 10:53:33 PDT
Comment on attachment 152783 [details]
Patch

Attachment 152783 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/13281215
Comment 46 Early Warning System Bot 2012-07-17 10:53:56 PDT
Comment on attachment 152783 [details]
Patch

Attachment 152783 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/13274185
Comment 47 Gyuyoung Kim 2012-07-17 10:55:16 PDT
Comment on attachment 152783 [details]
Patch

Attachment 152783 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/13274186
Comment 48 Build Bot 2012-07-17 10:55:39 PDT
Comment on attachment 152783 [details]
Patch

Attachment 152783 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13272192
Comment 49 Sergey Rogulenko 2012-07-17 10:56:32 PDT
Created attachment 152787 [details]
Patch
Comment 50 Pavel Feldman 2012-07-17 11:16:51 PDT
Comment on attachment 152787 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152787&action=review

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:73
> +static Color parseColor(const RefPtr<InspectorObject>* colorObject)

Overlay is a utility class, it should not depend on the inspector transport objects.

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:585
> +    m_highlightData = adoptPtr(new HighlightData());

I think this method should receive PassRefPtr<HighlightData> instead.

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:594
> +    m_highlightData = adoptPtr(new HighlightData());

ditto

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:611
> +    highlightConfig->getBoolean("showInfo", &showInfo);

ditto
Comment 51 Sergey Rogulenko 2012-07-18 03:11:21 PDT
Created attachment 152976 [details]
Patch
Comment 52 Andrey Kosyakov 2012-07-18 05:15:09 PDT
Comment on attachment 152976 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152976&action=review

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:567
> +    if (!m_client)
> +        return;

Do we need this check?
Comment 53 Sergey Rogulenko 2012-07-18 05:24:01 PDT
Created attachment 152994 [details]
Patch
Comment 54 Pavel Feldman 2012-07-18 06:18:01 PDT
Comment on attachment 152994 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152994&action=review

Please fix OwnPtr nits prior to landing.

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:533
> +    if (m_highlightData) {

// FIXME: Clear entire highlight data here, store config upon setInspectModeEnabled

> Source/WebCore/inspector/DOMNodeHighlighter.h:96
> +    void setHighlightData(PassOwnPtr<HighlightData>);

I.e. highlightNode will merge with the setHighlightData.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:985
> +        m_overlay->highlightNode(node);

You should pass m_inspectModeHighlightData here (in the subsequent change).

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1009
> +    HighlightData* highlightData = new HighlightData();

You should always adoptPtr upon creation.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1029
> +    HighlightData* highlightData = new HighlightData();

ditto

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1054
> +        HighlightData* highlightData = new HighlightData();

ditto
Comment 55 Sergey Rogulenko 2012-07-18 06:31:22 PDT
Created attachment 153003 [details]
Patch
Comment 56 Andrey Kosyakov 2012-07-18 07:05:22 PDT
Committed r122966: <http://trac.webkit.org/changeset/122966>
Comment 57 Vsevolod Vlasov 2012-07-18 09:26:48 PDT
Comment on attachment 153003 [details]
Patch

Clearing r?