Bug 75504 - Web Inspector: Access to Node Highlighting info without drawing
Summary: Web Inspector: Access to Node Highlighting info without drawing
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: Joseph Pecoraro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-03 16:28 PST by Joseph Pecoraro
Modified: 2012-01-04 05:38 PST (History)
12 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (13.52 KB, patch)
2012-01-03 16:38 PST, Joseph Pecoraro
timothy: review+
timothy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2012-01-03 16:28:43 PST
Provide a way for a port to get the node highlighting information
without doing the drawing.
Comment 1 Joseph Pecoraro 2012-01-03 16:38:46 PST
Created attachment 121017 [details]
[PATCH] Proposed Fix

I'm open to ideas on making this cleaner.
Comment 2 WebKit Review Bot 2012-01-03 16:41:19 PST
Attachment 121017 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/inspector/DOMNodeHighlighter.cpp:512:  Use 0 instead of NULL.  [readability/null] [5]
Source/WebCore/inspector/DOMNodeHighlighter.cpp:514:  Use 0 instead of NULL.  [readability/null] [5]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Timothy Hatcher 2012-01-03 16:47:17 PST
Comment on attachment 121017 [details]
[PATCH] Proposed Fix

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

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:361
> +void getOrDrawNodeHighlight(GraphicsContext* context, HighlightData* highlightData, Highlight* highlight)

Should these be static?

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:463
> +void getOrDrawRectHighlight(GraphicsContext* context, Document* document, HighlightData* highlightData, Highlight *highlight)

Ditto.

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:512
> +        getOrDrawNodeHighlight(NULL, highlightData, highlight);

Use 0 or nullptr instead of NULL.

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:514
> +        getOrDrawRectHighlight(NULL, document, highlightData, highlight);

Ditto.
Comment 4 Joseph Pecoraro 2012-01-03 17:17:28 PST
(In reply to comment #3)
> (From update of attachment 121017 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=121017&action=review
> 
> > Source/WebCore/inspector/DOMNodeHighlighter.cpp:361
> > +void getOrDrawNodeHighlight(GraphicsContext* context, HighlightData* highlightData, Highlight* highlight)
> 
> Should these be static?

Yes, that makes sense to me. Done.


> > Source/WebCore/inspector/DOMNodeHighlighter.cpp:512
> > +        getOrDrawNodeHighlight(NULL, highlightData, highlight);
> 
> Use 0 or nullptr instead of NULL.

Done.
Comment 5 Joseph Pecoraro 2012-01-03 17:19:28 PST
Landed in r103992 <http://trac.webkit.org/changeset/103992>.
Comment 6 Pavel Feldman 2012-01-04 02:54:58 PST
Could you provide an example of the port's own node highlighting you refer to? We are trying to make dev functionality a part of WebCore so that all ports were able to leverage it.
Comment 7 Timothy Hatcher 2012-01-04 05:38:25 PST
Some platforms have more efficeient ways to handle the drawing of these simple shapes without creating the large backing store that is needed today. Unfortunatly it is platform specific and isn't something that would be available to be shared in WebCore. At least the non-drawing logic is still shared in WebCore.