[GTK] Do not hardcode font family in served remote inspector HTML snippets
authoraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 22:00:58 +0000 (22:00 +0000)
committeraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 22:00:58 +0000 (22:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177742

Reviewed by Carlos Garcia Campos.

Instead of hardcoding Cantarell as the font used for the HTML snippets served
by the remote inspector handler, use "font: menu" to obtain the system UI
font, plus a "font-size" rule for adjusting the size.

* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
(WebKit::RemoteInspectorProtocolHandler::handleRequest): Change the
CSS rules in the served snippet.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222749 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp

index 734776d..f266213 100644 (file)
@@ -1,3 +1,18 @@
+2017-10-02  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [GTK] Do not hardcode font family in served remote inspector HTML snippets
+        https://bugs.webkit.org/show_bug.cgi?id=177742
+
+        Reviewed by Carlos Garcia Campos.
+
+        Instead of hardcoding Cantarell as the font used for the HTML snippets served
+        by the remote inspector handler, use "font: menu" to obtain the system UI
+        font, plus a "font-size" rule for adjusting the size.
+
+        * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
+        (WebKit::RemoteInspectorProtocolHandler::handleRequest): Change the
+        CSS rules in the served snippet.
+
 2017-10-02  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Include Beacon and Ping requests in Network tab
index 00b4f6f..0d9e9e1 100644 (file)
@@ -119,7 +119,7 @@ void RemoteInspectorProtocolHandler::handleRequest(WebKitURISchemeRequest* reque
         "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"
         "<style>"
         "  h1 { color: #babdb6; text-shadow: 0 1px 0 white; margin-bottom: 0; }"
-        "  html { font-family: Cantarell, sans-serif; font: 11pt cantarell; color: #2e3436; padding: 20px 20px 0 20px; background-color: #f6f6f4; "
+        "  html { font-family: menu; font-size: 11pt; color: #2e3436; padding: 20px 20px 0 20px; background-color: #f6f6f4; "
         "         background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #eeeeec), color-stop(1, #f6f6f4));"
         "         background-size: 100% 5em; background-repeat: no-repeat; }"
         "  table { width: 100%; border-collapse: collapse; }"