Bug 100303 - [EFL] Fix failure to highlight nodes on web inspector
Summary: [EFL] Fix failure to highlight nodes on web inspector
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 91592
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-24 16:13 PDT by Seokju Kwon
Modified: 2012-10-30 23:00 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.78 KB, patch)
2012-10-24 17:40 PDT, Seokju Kwon
no flags Details | Formatted Diff | Diff
Patch (2.03 KB, patch)
2012-10-26 00:11 PDT, Seokju Kwon
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seokju Kwon 2012-10-24 16:13:44 PDT
It is not working to highlight nodes on web inspector when webview has SBS(Single Backing Store).
Comment 1 Seokju Kwon 2012-10-24 17:40:42 PDT
Created attachment 170522 [details]
Patch
Comment 2 Ryuan Choi 2012-10-25 23:14:26 PDT
Comment on attachment 170522 [details]
Patch

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

> Source/WebKit/efl/ewk/ewk_paint_context.cpp:172
> +#if ENABLE(INSPECTOR)
> +    WebCore::Page* page = view->frame()->page();
> +    if (page) {
> +        WebCore::InspectorController* controller = page->inspectorController();
> +        if (controller->highlightedNode())
> +            controller->drawHighlight(*context->graphicContext);
> +    }
> +#endif

SBS calls ewk_paint_context many times for every dirty rect.

How about moving this into ewk_view_single to call only one time.
Comment 3 Seokju Kwon 2012-10-26 00:09:37 PDT
(In reply to comment #2)
> (From update of attachment 170522 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=170522&action=review
> 
> > Source/WebKit/efl/ewk/ewk_paint_context.cpp:172
> > +#if ENABLE(INSPECTOR)
> > +    WebCore::Page* page = view->frame()->page();
> > +    if (page) {
> > +        WebCore::InspectorController* controller = page->inspectorController();
> > +        if (controller->highlightedNode())
> > +            controller->drawHighlight(*context->graphicContext);
> > +    }
> > +#endif
> 
> SBS calls ewk_paint_context many times for every dirty rect.
> 
> How about moving this into ewk_view_single to call only one time.

Ok. I will move it.
Comment 4 Seokju Kwon 2012-10-26 00:11:53 PDT
Created attachment 170836 [details]
Patch
Comment 5 Ryuan Choi 2012-10-30 21:15:36 PDT
(In reply to comment #4)
> Created an attachment (id=170836) [details]
> Patch

LGTM.
Comment 6 Gyuyoung Kim 2012-10-30 22:11:32 PDT
Comment on attachment 170836 [details]
Patch

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

> Source/WebKit/efl/ewk/ewk_view_single.cpp:276
> +    if (page) {

WebKit prefers to use early return.
Comment 7 Gyuyoung Kim 2012-10-30 22:53:44 PDT
Comment on attachment 170836 [details]
Patch

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

>> Source/WebKit/efl/ewk/ewk_view_single.cpp:276
>> +    if (page) {
> 
> WebKit prefers to use early return.

As we talk in private, we can't return early in this case. If we do early return, remaining functions won't be called.
Comment 8 WebKit Review Bot 2012-10-30 23:00:03 PDT
Comment on attachment 170836 [details]
Patch

Clearing flags on attachment: 170836

Committed r132987: <http://trac.webkit.org/changeset/132987>
Comment 9 WebKit Review Bot 2012-10-30 23:00:08 PDT
All reviewed patches have been landed.  Closing bug.