Bug 43429 - [GTK] Does not paint the node highlight used by the inspector
Summary: [GTK] Does not paint the node highlight used by the inspector
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2010-08-03 09:37 PDT by Gustavo Noronha (kov)
Modified: 2010-08-03 11:10 PDT (History)
0 users

See Also:


Attachments
proposed patch (2.67 KB, patch)
2010-08-03 09:42 PDT, Gustavo Noronha (kov)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Noronha (kov) 2010-08-03 09:37:41 PDT
When using the "inspect" tool of the inspector, or when hovering the mouse over elements in the inspector, the nodes are not highlighted.
Comment 1 Gustavo Noronha (kov) 2010-08-03 09:42:38 PDT
Created attachment 63341 [details]
proposed patch
Comment 2 Xan Lopez 2010-08-03 10:02:38 PDT
Comment on attachment 63341 [details]
proposed patch

>-void InspectorClient::highlight(Node* node)
>+void InspectorClient::highlight(Node*)
> {
>-    notImplemented();
>+    hideHighlight();
> }
> 
> void InspectorClient::hideHighlight()
> {
>-    notImplemented();
>+    // FIXME: we should be able to only invalidate the actual rects of
>+    // the new and old nodes. We need to track the nodes, and take the
>+    // actual highlight size into account when calculating the damage
>+    // rect.
>+    gtk_widget_queue_draw(GTK_WIDGET(m_inspectedWebView));
> }

There's some huge epic fail in naming going on here ;)


>+        ctx.save();
>+        ctx.clip(static_cast<IntRect>(event->area));
>+        frame->page()->inspectorController()->drawNodeHighlight(ctx);
>+        ctx.restore();
>     }

As discussed on jabber, the save/restore stuff is probably not needed.

> 
>     return FALSE;
>-- 
>1.7.1
>
Comment 3 Gustavo Noronha (kov) 2010-08-03 11:10:47 PDT
Comment on attachment 63341 [details]
proposed patch

Landed as r64567.