WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
91592
[EFL] Highlight the element under mouse on web inspector
https://bugs.webkit.org/show_bug.cgi?id=91592
Summary
[EFL] Highlight the element under mouse on web inspector
Seokju Kwon
Reported
2012-07-18 00:06:16 PDT
Implement highlighting the nodes when using the inspector
Attachments
Patch
(2.98 KB, patch)
2012-07-18 00:13 PDT
,
Seokju Kwon
no flags
Details
Formatted Diff
Diff
Patch
(4.19 KB, patch)
2012-07-24 19:55 PDT
,
Seokju Kwon
no flags
Details
Formatted Diff
Diff
Patch
(3.60 KB, patch)
2012-07-25 16:31 PDT
,
Seokju Kwon
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Seokju Kwon
Comment 1
2012-07-18 00:13:23 PDT
Created
attachment 152947
[details]
Patch
Chris Dumez
Comment 2
2012-07-24 04:38:28 PDT
Comment on
attachment 152947
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=152947&action=review
> Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp:110 > + hideHighlight();
This looks a bit odd this way. Maybe we should move the code in hideHighlight() to a new invalidateView(inspectedView) method and call this new function is both highlight() and hideHighlight()? This would be more understandable for me.
> Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp:118 > + WebCore::IntRect rect(0, 0, width, height);
I would create this as late as possible, that is to say: after the NULL page check.
> Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp:122 > + page->mainFrame()->view()->invalidateRect(rect);
page->mainFrame()->view()->invalidateRect(WebCore::IntRect(0, 0, width, height)); ?
> Source/WebKit/efl/ewk/ewk_paint_context.cpp:181 > + if (controller && controller->highlightedNode())
page->inspectorController() cannot return NULL so the first check is not needed. Use an ASSERT() instead if you want to be safe.
Seokju Kwon
Comment 3
2012-07-24 19:52:43 PDT
(In reply to
comment #2
)
> (From update of
attachment 152947
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=152947&action=review
> > > Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp:110 > > + hideHighlight(); > > This looks a bit odd this way. Maybe we should move the code in hideHighlight() to a new invalidateView(inspectedView) method and call this new function is both highlight() and hideHighlight()? This would be more understandable for me. > > > Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp:118 > > + WebCore::IntRect rect(0, 0, width, height); > > I would create this as late as possible, that is to say: after the NULL page check. > > > Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp:122 > > + page->mainFrame()->view()->invalidateRect(rect); > > page->mainFrame()->view()->invalidateRect(WebCore::IntRect(0, 0, width, height)); ? > > > Source/WebKit/efl/ewk/ewk_paint_context.cpp:181 > > + if (controller && controller->highlightedNode()) > > page->inspectorController() cannot return NULL so the first check is not needed. Use an ASSERT() instead if you want to be safe.
I will fix all things you mentioned. Thanks for reviewing.
Seokju Kwon
Comment 4
2012-07-24 19:55:14 PDT
Created
attachment 154224
[details]
Patch
Chris Dumez
Comment 5
2012-07-24 22:39:48 PDT
Comment on
attachment 154224
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154224&action=review
> Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.h:65 > + void invalidateView(Evas_Object*);
I don't think invalidateView() needs to be public. I would have just used a static function in the cpp file.
Gyuyoung Kim
Comment 6
2012-07-24 22:59:42 PDT
Comment on
attachment 154224
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154224&action=review
> Source/WebKit/efl/ewk/ewk_paint_context.cpp:23 > +#if ENABLE(INSPECTOR)
EFL port has used ENABLE(...) below regular include list. Please see ewk_view.cpp.
http://trac.webkit.org/browser/trunk/Source/WebKit/efl/ewk/ewk_view.cpp#L81
Seokju Kwon
Comment 7
2012-07-25 16:30:13 PDT
(In reply to
comment #6
)
> (From update of
attachment 154224
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=154224&action=review
> > > Source/WebKit/efl/ewk/ewk_paint_context.cpp:23 > > +#if ENABLE(INSPECTOR) > > EFL port has used ENABLE(...) below regular include list. > > Please see ewk_view.cpp. >
http://trac.webkit.org/browser/trunk/Source/WebKit/efl/ewk/ewk_view.cpp#L81
you're right. I will move it.
Seokju Kwon
Comment 8
2012-07-25 16:31:31 PDT
(In reply to
comment #5
)
> (From update of
attachment 154224
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=154224&action=review
> > > Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.h:65 > > + void invalidateView(Evas_Object*); > > I don't think invalidateView() needs to be public. I would have just used a static function in the cpp file.
It makes sense.
Seokju Kwon
Comment 9
2012-07-25 16:31:44 PDT
Created
attachment 154473
[details]
Patch
Gyuyoung Kim
Comment 10
2012-07-25 18:10:50 PDT
Comment on
attachment 154473
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154473&action=review
The rest looks good.
> Source/WebKit/efl/ewk/ewk_paint_context.cpp:181 > + WebCore::InspectorController* controller = page->inspectorController();
I wonder if page always has inspector controller. If not, I think below condition is good to avoid crash. if (WebCore::InspectorController* controller = page->inspectorController()) if (controller->highlightedNode()) controller->drawHighlight(*context->graphicContext);
Seokju Kwon
Comment 11
2012-07-25 19:11:19 PDT
(In reply to
comment #10
)
> (From update of
attachment 154473
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=154473&action=review
> > The rest looks good. > > > Source/WebKit/efl/ewk/ewk_paint_context.cpp:181 > > + WebCore::InspectorController* controller = page->inspectorController(); > > I wonder if page always has inspector controller. If not, I think below condition is good to avoid crash. > > if (WebCore::InspectorController* controller = page->inspectorController()) > if (controller->highlightedNode()) > controller->drawHighlight(*context->graphicContext);
It seems to me that page always has inspectorController.
Gyuyoung Kim
Comment 12
2012-07-25 19:18:14 PDT
Comment on
attachment 154473
[details]
Patch LGTM now.
Chris Dumez
Comment 13
2012-07-25 22:31:12 PDT
Comment on
attachment 154473
[details]
Patch LGTM.
Kentaro Hara
Comment 14
2012-07-26 18:21:12 PDT
Comment on
attachment 154473
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154473&action=review
Looks OK. rs=me
>>> Source/WebKit/efl/ewk/ewk_paint_context.cpp:181 >>> + WebCore::InspectorController* controller = page->inspectorController(); >> >> I wonder if page always has inspector controller. If not, I think below condition is good to avoid crash. >> >> if (WebCore::InspectorController* controller = page->inspectorController()) >> if (controller->highlightedNode()) >> controller->drawHighlight(*context->graphicContext); > > It seems to me that page always has inspectorController.
Looks so to me too.
WebKit Review Bot
Comment 15
2012-07-26 19:41:53 PDT
Comment on
attachment 154473
[details]
Patch Clearing flags on attachment: 154473 Committed
r123831
: <
http://trac.webkit.org/changeset/123831
>
WebKit Review Bot
Comment 16
2012-07-26 19:41:59 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug