Title: [123831] trunk/Source/WebKit/efl
- Revision
- 123831
- Author
- commit-qu...@webkit.org
- Date
- 2012-07-26 19:41:31 -0700 (Thu, 26 Jul 2012)
Log Message
[EFL] Highlight the element under mouse on web inspector
https://bugs.webkit.org/show_bug.cgi?id=91592
Patch by Seokju Kwon <seokju.k...@samsung.com> on 2012-07-26
Reviewed by Kentaro Hara.
Implement highlighting the nodes when using the web inspector.
* WebCoreSupport/InspectorClientEfl.cpp:
(WebCore::InspectorClientEfl::highlight):
(WebCore::InspectorClientEfl::hideHighlight):
(WebCore::InspectorClientEfl::invalidateView):
(WebCore):
* WebCoreSupport/InspectorClientEfl.h:
(InspectorClientEfl):
* ewk/ewk_paint_context.cpp:
(ewk_paint_context_paint_contents):
Modified Paths
Diff
Modified: trunk/Source/WebKit/efl/ChangeLog (123830 => 123831)
--- trunk/Source/WebKit/efl/ChangeLog 2012-07-27 02:30:31 UTC (rev 123830)
+++ trunk/Source/WebKit/efl/ChangeLog 2012-07-27 02:41:31 UTC (rev 123831)
@@ -1,3 +1,22 @@
+2012-07-26 Seokju Kwon <seokju.k...@samsung.com>
+
+ [EFL] Highlight the element under mouse on web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=91592
+
+ Reviewed by Kentaro Hara.
+
+ Implement highlighting the nodes when using the web inspector.
+
+ * WebCoreSupport/InspectorClientEfl.cpp:
+ (WebCore::InspectorClientEfl::highlight):
+ (WebCore::InspectorClientEfl::hideHighlight):
+ (WebCore::InspectorClientEfl::invalidateView):
+ (WebCore):
+ * WebCoreSupport/InspectorClientEfl.h:
+ (InspectorClientEfl):
+ * ewk/ewk_paint_context.cpp:
+ (ewk_paint_context_paint_contents):
+
2012-07-26 Christophe Dumez <christophe.du...@intel.com>
[EFL][WK2] Implement Network Information provider
Modified: trunk/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp (123830 => 123831)
--- trunk/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp 2012-07-27 02:30:31 UTC (rev 123830)
+++ trunk/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp 2012-07-27 02:41:31 UTC (rev 123831)
@@ -37,6 +37,17 @@
inspectorFrontendClient->destroyInspectorWindow(true);
}
+static void invalidateView(Evas_Object* webView)
+{
+ Evas_Coord width, height;
+ Evas_Object* mainFrame = ewk_view_frame_main_get(webView);
+ if (mainFrame && ewk_frame_contents_size_get(mainFrame, &width, &height)) {
+ WebCore::Page* page = EWKPrivate::corePage(webView);
+ if (page)
+ page->mainFrame()->view()->invalidateRect(WebCore::IntRect(0, 0, width, height));
+ }
+}
+
class InspectorFrontendSettingsEfl : public InspectorFrontendClientLocal::Settings {
public:
virtual String getProperty(const String& name)
@@ -107,12 +118,12 @@
void InspectorClientEfl::highlight()
{
- notImplemented();
+ invalidateView(m_inspectedView);
}
void InspectorClientEfl::hideHighlight()
{
- notImplemented();
+ invalidateView(m_inspectedView);
}
bool InspectorClientEfl::sendMessageToFrontend(const String& message)
Modified: trunk/Source/WebKit/efl/ewk/ewk_paint_context.cpp (123830 => 123831)
--- trunk/Source/WebKit/efl/ewk/ewk_paint_context.cpp 2012-07-27 02:30:31 UTC (rev 123830)
+++ trunk/Source/WebKit/efl/ewk/ewk_paint_context.cpp 2012-07-27 02:41:31 UTC (rev 123831)
@@ -23,6 +23,11 @@
#include "ewk_paint_context_private.h"
#include "ewk_private.h"
+#if ENABLE(INSPECTOR)
+#include "InspectorController.h"
+#include "Page.h"
+#endif
+
Ewk_Paint_Context* ewk_paint_context_new(cairo_t* cairo)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(cairo, 0);
@@ -169,4 +174,13 @@
if (view->isTransparent())
context->graphicContext->clearRect(paintArea);
view->paintContents(context->graphicContext.get(), paintArea);
+
+#if ENABLE(INSPECTOR)
+ WebCore::Page* page = view->frame()->page();
+ if (page) {
+ WebCore::InspectorController* controller = page->inspectorController();
+ if (controller->highlightedNode())
+ controller->drawHighlight(*context->graphicContext);
+ }
+#endif
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes