Provide a way for a port to get the node highlighting information without doing the drawing.
Created attachment 121017 [details] [PATCH] Proposed Fix I'm open to ideas on making this cleaner.
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 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.
(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.
Landed in r103992 <http://trac.webkit.org/changeset/103992>.
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.
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.