Diff
Modified: trunk/LayoutTests/ChangeLog (208778 => 208779)
--- trunk/LayoutTests/ChangeLog 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/LayoutTests/ChangeLog 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,3 +1,19 @@
+2016-11-15 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Preview other CSS @media in browser window (print)
+ https://bugs.webkit.org/show_bug.cgi?id=13530
+ <rdar://problem/5712928>
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/page/media-query-list-listener-exception-expected.txt: Copied from LayoutTests/inspector/page/setEmulatedMedia-expected.txt.
+ * inspector/page/media-query-list-listener-exception.html: Copied from LayoutTests/inspector/page/setEmulatedMedia.html.
+ Rename this test which is about swallowing exceptions and happened to use inspector code.
+
+ * inspector/page/setEmulatedMedia-expected.txt:
+ * inspector/page/setEmulatedMedia.html:
+ Test for Page.setEmulatedMedia command.
+
2016-11-15 Jon Lee <[email protected]>
Report active video and audio capture devices separately
Copied: trunk/LayoutTests/inspector/page/media-query-list-listener-exception-expected.txt (from rev 208778, trunk/LayoutTests/inspector/page/setEmulatedMedia-expected.txt) (0 => 208779)
--- trunk/LayoutTests/inspector/page/media-query-list-listener-exception-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector/page/media-query-list-listener-exception-expected.txt 2016-11-16 03:10:04 UTC (rev 208779)
@@ -0,0 +1,5 @@
+CONSOLE MESSAGE: line 8: ReferenceError: Can't find variable: objectThatDoesNotExist
+CONSOLE MESSAGE: line 8: ReferenceError: Can't find variable: objectThatDoesNotExist
+Test that uncaught exception in MediaQueryListListener will be reported to the console. On success you should see two exceptions in the listener logged to the console (first time when the media type is overridden and second - when they are restored). Bug 105162.
+
+
Copied: trunk/LayoutTests/inspector/page/media-query-list-listener-exception.html (from rev 208778, trunk/LayoutTests/inspector/page/setEmulatedMedia.html) (0 => 208779)
--- trunk/LayoutTests/inspector/page/media-query-list-listener-exception.html (rev 0)
+++ trunk/LayoutTests/inspector/page/media-query-list-listener-exception.html 2016-11-16 03:10:04 UTC (rev 208779)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script>
+let theMediaQueryList = window.matchMedia("print");
+theMediaQueryList.addListener(function(aMediaQueryList) {
+ objectThatDoesNotExist.produceError();
+});
+
+function test()
+{
+ InspectorProtocol.sendCommand("Page.enable", {});
+ InspectorProtocol.sendCommand("Page.setEmulatedMedia", {"media": "print"}, function(messageObject) {
+ if (messageObject.error)
+ ProtocolTest.log("FAILED: " + messageObject.error.message);
+ InspectorProtocol.sendCommand("Page.disable", {});
+ ProtocolTest.completeTest();
+ });
+}
+</script>
+</head>
+<body _onload_="runTest()">
+<p>Test that uncaught exception in MediaQueryListListener will be reported to the console. On success you should see two exceptions in the listener logged to the console (first time when the media type is overridden and second - when they are restored). <a href="" 105162.</p>
+</body>
+</html>
Modified: trunk/LayoutTests/inspector/page/setEmulatedMedia-expected.txt (208778 => 208779)
--- trunk/LayoutTests/inspector/page/setEmulatedMedia-expected.txt 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/LayoutTests/inspector/page/setEmulatedMedia-expected.txt 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,5 +1,18 @@
-CONSOLE MESSAGE: line 7: ReferenceError: Can't find variable: objectThatDoesNotExist
-CONSOLE MESSAGE: line 7: ReferenceError: Can't find variable: objectThatDoesNotExist
-Test that uncaught exception in MediaQueryListListener will be reported to the console. On success you should see two exceptions in the listener logged to the console (first time when the media type is overridden and second - when they are restored). Bug 105162.
+Tests for the Page.setEmulatedMedia command.
+== Running test suite: Page.setEmulatedMedia
+-- Running test case: Page.setEmulatedMedia.initial
+PASS: Page should not match print media.
+PASS: Body color should be blue.
+
+-- Running test case: Page.setEmulatedMedia.print
+PASS: MediaQueryList listesner fired.
+PASS: Page should now match print media.
+PASS: Body color should be green.
+
+-- Running test case: Page.setEmulatedMedia.reset
+PASS: MediaQueryList listesner fired.
+PASS: Page should now not match print media.
+PASS: Page should now match print media.
+
Modified: trunk/LayoutTests/inspector/page/setEmulatedMedia.html (208778 => 208779)
--- trunk/LayoutTests/inspector/page/setEmulatedMedia.html 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/LayoutTests/inspector/page/setEmulatedMedia.html 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,25 +1,74 @@
+<!DOCTYPE html>
<html>
<head>
-<script type="text/_javascript_" src=""
+<script src=""
+<style>
+body { color: blue; }
+@media print {
+ body { color: green; }
+}
+</style>
<script>
-var theMediaQueryList = window.matchMedia("print");
-theMediaQueryList.addListener(function(aMediaQueryList) {
- objectThatDoesNotExist.produceError();
+let mediaQueryList = window.matchMedia("print");
+mediaQueryList.addListener(function(aMediaQueryList) {
+ TestPage.addResult("PASS: MediaQueryList listesner fired.");
});
function test()
{
- InspectorProtocol.sendCommand("Page.enable", {});
- InspectorProtocol.sendCommand("Page.setEmulatedMedia", {"media": "print"}, function(messageObject) {
- if (messageObject.error)
- ProtocolTest.log("FAILED: " + messageObject.error.message);
- InspectorProtocol.sendCommand("Page.disable", {});
- ProtocolTest.completeTest();
+ let suite = InspectorTest.createAsyncSuite("Page.setEmulatedMedia");
+
+ suite.addTestCase({
+ name: "Page.setEmulatedMedia.initial",
+ description: "Initial media type should match screen.",
+ test(resolve, reject) {
+ InspectorTest.evaluateInPage("mediaQueryList.matches", (error, result) => {
+ InspectorTest.expectEqual(result.value, false, "Page should not match print media.");
+ });
+ InspectorTest.evaluateInPage("getComputedStyle(document.body).color", (error, result) => {
+ InspectorTest.expectEqual(result.value, "rgb(0, 0, 255)", "Body color should be blue.");
+ resolve();
+ });
+ }
});
+
+ suite.addTestCase({
+ name: "Page.setEmulatedMedia.print",
+ description: "Should be able to set print media type.",
+ test(resolve, reject) {
+ PageAgent.setEmulatedMedia("print", (error) => {
+ InspectorTest.evaluateInPage("mediaQueryList.matches", (error, result) => {
+ InspectorTest.expectEqual(result.value, true, "Page should now match print media.");
+ });
+ InspectorTest.evaluateInPage("getComputedStyle(document.body).color", (error, result) => {
+ InspectorTest.expectEqual(result.value, "rgb(0, 128, 0)", "Body color should be green.");
+ resolve();
+ });
+ });
+ }
+ });
+
+ suite.addTestCase({
+ name: "Page.setEmulatedMedia.reset",
+ description: "Should be able to reset media type to screen.",
+ test(resolve, reject) {
+ PageAgent.setEmulatedMedia("", (error) => {
+ InspectorTest.evaluateInPage("mediaQueryList.matches", (error, result) => {
+ InspectorTest.expectEqual(result.value, false, "Page should now not match print media.");
+ });
+ InspectorTest.evaluateInPage("getComputedStyle(document.body).color", (error, result) => {
+ InspectorTest.expectEqual(result.value, "rgb(0, 0, 255)", "Page should now match print media.");
+ resolve();
+ });
+ });
+ }
+ });
+
+ suite.runTestCasesAndFinish();
}
</script>
</head>
<body _onload_="runTest()">
-<p>Test that uncaught exception in MediaQueryListListener will be reported to the console. On success you should see two exceptions in the listener logged to the console (first time when the media type is overridden and second - when they are restored). <a href="" 105162.</p>
+<p>Tests for the Page.setEmulatedMedia command.</p>
</body>
</html>
Modified: trunk/Source/_javascript_Core/ChangeLog (208778 => 208779)
--- trunk/Source/_javascript_Core/ChangeLog 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,3 +1,14 @@
+2016-11-15 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Preview other CSS @media in browser window (print)
+ https://bugs.webkit.org/show_bug.cgi?id=13530
+ <rdar://problem/5712928>
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/protocol/Page.json:
+ Update to preferred JSON style.
+
2016-11-15 Filip Pizlo <[email protected]>
Unreviewed, revert renaming useConcurrentJIT to useConcurrentJS.
Modified: trunk/Source/_javascript_Core/inspector/protocol/Page.json (208778 => 208779)
--- trunk/Source/_javascript_Core/inspector/protocol/Page.json 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/_javascript_Core/inspector/protocol/Page.json 2016-11-16 03:10:04 UTC (rev 208779)
@@ -216,10 +216,10 @@
},
{
"name": "setEmulatedMedia",
+ "description": "Emulates the given media for CSS media queries.",
"parameters": [
{ "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." }
- ],
- "description": "Emulates the given media for CSS media queries."
+ ]
},
{
"name": "getCompositingBordersVisible",
Modified: trunk/Source/WebInspectorUI/ChangeLog (208778 => 208779)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,3 +1,44 @@
+2016-11-15 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command
+ https://bugs.webkit.org/show_bug.cgi?id=164793
+
+ Reviewed by Timothy Hatcher.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ Tooltips for new button.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.loaded):
+ New global setting.
+
+ * UserInterface/Views/DOMTreeContentView.js:
+ (WebInspector.DOMTreeContentView):
+ (WebInspector.DOMTreeContentView.prototype.get navigationItems):
+ (WebInspector.DOMTreeContentView.prototype._showPrintStylesSettingChanged):
+ (WebInspector.DOMTreeContentView.prototype._togglePrintStylesSetting):
+ New navigation bar button to toggle print styles.
+
+ * UserInterface/Controllers/CSSStyleManager.js:
+ (WebInspector.CSSStyleManager.prototype.mediaTypeChanged):
+ After toggling styles we will need to refresh styles, so provide
+ a meaningful way to trigger refreshing styles from the frontend.
+
+ * UserInterface/Images/Printer.svg: Added.
+ * UserInterface/Images/gtk/Printer.svg: Added.
+ New Printer icon for enabling / disabling print styles.
+
+ * UserInterface/Images/gtk/Crosshair.svg:
+ * UserInterface/Images/gtk/LayerBorders.svg:
+ * UserInterface/Images/gtk/NavigationItemCurleyBraces.svg:
+ * UserInterface/Images/gtk/NavigationItemTypes.svg:
+ * UserInterface/Images/gtk/PaintFlashing.svg:
+ * UserInterface/Images/gtk/ShadowDOM.svg:
+ * UserInterface/Images/gtk/ToggleLeftSidebar.svg:
+ * UserInterface/Images/gtk/ToggleRightSidebar.svg:
+ * UserInterface/Images/gtk/UpDownArrows.svg:
+ Fix a number of existing GTK images to have activated styles.
+
2016-11-15 Nikita Vasilyev <[email protected]>
REGRESSION (r208248): Web Inspector: Pressing Left Arrow breaks autocomplete
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (208778 => 208779)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2016-11-16 03:10:04 UTC (rev 208779)
@@ -253,6 +253,7 @@
localizedStrings["Disable Breakpoints"] = "Disable Breakpoints";
localizedStrings["Disable all breakpoints (%s)"] = "Disable all breakpoints (%s)";
localizedStrings["Disable paint flashing"] = "Disable paint flashing";
+localizedStrings["Disable print styles"] = "Disable print styles";
localizedStrings["Disabled"] = "Disabled";
localizedStrings["Display"] = "Display";
localizedStrings["Do not fade unexecuted code"] = "Do not fade unexecuted code";
@@ -313,6 +314,7 @@
localizedStrings["Enable all breakpoints (%s)"] = "Enable all breakpoints (%s)";
localizedStrings["Enable breakpoints."] = "Enable breakpoints.";
localizedStrings["Enable paint flashing"] = "Enable paint flashing";
+localizedStrings["Enable print styles"] = "Enable print styles";
localizedStrings["Encoded"] = "Encoded";
localizedStrings["Encoding"] = "Encoding";
localizedStrings["Enter Class Name"] = "Enter Class Name";
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2016-11-16 03:10:04 UTC (rev 208779)
@@ -179,6 +179,10 @@
if (this.showPaintRectsSetting.value && window.PageAgent && PageAgent.setShowPaintRects)
PageAgent.setShowPaintRects(true);
+ this.showPrintStylesSetting = new WebInspector.Setting("show-print-styles", false);
+ if (this.showPrintStylesSetting.value && window.PageAgent)
+ PageAgent.setEmulatedMedia("print");
+
this._zoomFactorSetting = new WebInspector.Setting("zoom-factor", 1);
this._setZoomFactor(this._zoomFactorSetting.value);
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSStyleManager.js (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSStyleManager.js 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSStyleManager.js 2016-11-16 03:10:04 UTC (rev 208779)
@@ -253,6 +253,12 @@
}
}
+ mediaTypeChanged()
+ {
+ // Act the same as if media queries changed.
+ this.mediaQueryResultChanged();
+ }
+
// Protected
mediaQueryResultChanged()
Added: trunk/Source/WebInspectorUI/UserInterface/Images/Printer.svg (0 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/Printer.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Printer.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2016 Apple Inc. All rights reserved. -->
+<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
+ <path fill="currentColor" d="M 2 5 C 1.51875 5 1 5.45 1 6 L 1 12 L 3 12 C 3.240625 12 3.5 11.775 3.5 11.5 C 3.5 11.225 3.240625 11 3 11 L 2.5 11 L 2.5 9 L 13.5 9 L 13.5 11 L 13 11 C 12.759375 11 12.5 11.225 12.5 11.5 C 12.5 11.775 12.759375 12 13 12 L 15 12 L 15 6 C 15 5.45 14.48125 5 14 5 L 2 5 Z M 5 4 L 5 2 L 11 2 L 11 4 C 11 4.275 11.28 4.5 11.5 4.5 C 11.72 4.5 12 4.275 12 4 L 12 1 L 4 1 L 4 4 C 4 4.275 4.28 4.5 4.5 4.5 C 4.72 4.5 5 4.275 5 4 Z M 11.5 9.5 C 11.28 9.5 11 9.725 11 10 L 11 14 L 5 14 L 5 10 C 5 9.725 4.72 9.5 4.5 9.5 C 4.28 9.5 4 9.725 4 10 L 4 15 L 12 15 L 12 10 C 12 9.725 11.72 9.5 11.5 9.5 L 11.5 9.5 Z"/>
+</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/Crosshair.svg (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/Crosshair.svg 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/Crosshair.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
- <path d="m7.9012 0.008034c-0.2434 0.046493-0.4366 0.28375-0.4322 0.53196v0.6317c-3.3628 0.2615-6.0392 2.9292-6.317 6.2837h-0.53196c-0.033035-0.00319-0.066707-0.00319-0.099742 0-0.27869 0.025321-0.52481 0.31938-0.49871 0.59845 0.02613 0.27908 0.31992 0.49246 0.59845 0.46546h0.53196c0.24742 3.3854 2.932 6.1202 6.317 6.3835v0.53196c-0.0043 0.281 0.2514 0.565 0.532 0.565s0.5359-0.284 0.5319-0.565v-0.53196c3.4071-0.253 6.1181-3.008 6.3501-6.4169h0.5652c0.28058 0.00426 0.53196-0.25089 0.53196-0.53196 0-0.28106-0.25138-0.53594-0.53196-0.53196h-0.5652c-0.293-3.3472-2.987-6.0009-6.3501-6.2505v-0.6317c0.0053-0.31511-0.3226-0.59107-0.6317-0.53197zm-0.46546 3.3247v0.53196c-0.00426 0.28058 0.25089 0.53196 0.53196 0.53196 0.28106 0 0.53594-0.25138 0.53196-0.53196v-0.53196c2.2324 0.2309 3.9734 1.9338 4.2224 4.156h-0.5652c-0.28058-0.00398-0.53196 0.25089-0.53196 0.53196 0 0.28106 0.25138 0.53621 0.53196 0.53196h0.5652c-0.24169 2.2348-1.9832 3.9881-4.2224 4.2224v-0.5652c
0.00398-0.28058-0.25089-0.53196-0.53196-0.53196-0.28106 0-0.53621 0.25138-0.53196 0.53196v0.53196c-2.2127-0.262-3.9286-1.999-4.1559-4.2226h0.53196c0.28058 0.00426 0.53196-0.25089 0.53196-0.53196 0-0.28106-0.25138-0.53594-0.53196-0.53196h-0.49871c0.2686-2.1715 1.9445-3.8688 4.1226-4.1227z"/>
- <path d="m9.0449 7.9748a1.0639 1.0639 0 0 1 -2.1278 0 1.0639 1.0639 0 1 1 2.1278 0z"/>
+ <path fill="currentColor" d="m7.9012 0.008034c-0.2434 0.046493-0.4366 0.28375-0.4322 0.53196v0.6317c-3.3628 0.2615-6.0392 2.9292-6.317 6.2837h-0.53196c-0.033035-0.00319-0.066707-0.00319-0.099742 0-0.27869 0.025321-0.52481 0.31938-0.49871 0.59845 0.02613 0.27908 0.31992 0.49246 0.59845 0.46546h0.53196c0.24742 3.3854 2.932 6.1202 6.317 6.3835v0.53196c-0.0043 0.281 0.2514 0.565 0.532 0.565s0.5359-0.284 0.5319-0.565v-0.53196c3.4071-0.253 6.1181-3.008 6.3501-6.4169h0.5652c0.28058 0.00426 0.53196-0.25089 0.53196-0.53196 0-0.28106-0.25138-0.53594-0.53196-0.53196h-0.5652c-0.293-3.3472-2.987-6.0009-6.3501-6.2505v-0.6317c0.0053-0.31511-0.3226-0.59107-0.6317-0.53197zm-0.46546 3.3247v0.53196c-0.00426 0.28058 0.25089 0.53196 0.53196 0.53196 0.28106 0 0.53594-0.25138 0.53196-0.53196v-0.53196c2.2324 0.2309 3.9734 1.9338 4.2224 4.156h-0.5652c-0.28058-0.00398-0.53196 0.25089-0.53196 0.53196 0 0.28106 0.25138 0.53621 0.53196 0.53196h0.5652c-0.24169 2.2348-1.9832
3.9881-4.2224 4.2224v-0.5652c0.00398-0.28058-0.25089-0.53196-0.53196-0.53196-0.28106 0-0.53621 0.25138-0.53196 0.53196v0.53196c-2.2127-0.262-3.9286-1.999-4.1559-4.2226h0.53196c0.28058 0.00426 0.53196-0.25089 0.53196-0.53196 0-0.28106-0.25138-0.53594-0.53196-0.53196h-0.49871c0.2686-2.1715 1.9445-3.8688 4.1226-4.1227z"/>
+ <path fill="currentColor" d="m9.0449 7.9748a1.0639 1.0639 0 0 1 -2.1278 0 1.0639 1.0639 0 1 1 2.1278 0z"/>
</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/LayerBorders.svg (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/LayerBorders.svg 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/LayerBorders.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
- <path d="m1 14.5 3-3h11l-3 3z"/>
- <path d="m1 9.5 3-3h11l-3 3z"/>
- <path d="m1 4.5 3-3h11l-3 3z"/>
+ <path fill="currentColor" d="m1 14.5 3-3h11l-3 3z"/>
+ <path fill="currentColor" d="m1 9.5 3-3h11l-3 3z"/>
+ <path fill="currentColor" d="m1 4.5 3-3h11l-3 3z"/>
<path fill="#bebebe" d="m4.5569 2.0969-1.8062 1.8062h8.6925l1.8062-1.8062h-8.6925z"/>
</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/NavigationItemCurleyBraces.svg (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/NavigationItemCurleyBraces.svg 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/NavigationItemCurleyBraces.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
- <path d="m3.4301 5.4599c-0.1536 1.1724-0.7677 1.6887-1.4236 1.8004l-0.23726 0.027913v1.4236l0.23726 0.027913c0.23726 0.04187 0.46057 0.13957 0.65596 0.27913 0.86531 0.62805 0.75366 1.7585 0.85135 2.7076 0.26518 2.6099 2.1074 3.0565 2.7495 3.0984l0.23726 0.02791 0.33496-1.4236-0.30705-0.04187c-0.4606-0.056-0.8514-0.349-1.0747-0.684-0.7537-1.158 0.0558-3.3911-1.4934-4.703 1.5352-1.3119 0.7257-3.531 1.4934-4.7034 0.2233-0.3349 0.6141-0.642 1.0746-0.6978l0.3071-0.0419-0.335-1.4096-0.2373 0.014c-0.7397 0.0558-2.4982 0.5443-2.7494 3.196-0.0279 0.3769-0.0419 0.7537-0.0837 1.1026"/>
- <path d="m12.486 4.3573c-0.251-2.6378-1.996-3.1402-2.7492-3.196l-0.2373-0.014-0.321 1.4096 0.307 0.0419c0.46057 0.055826 0.8374 0.36287 1.0607 0.69783 0.76761 1.1724-0.04187 3.3915 1.4934 4.7034-1.5492 1.3119-0.7397 3.545-1.4934 4.7034-0.2233 0.33496-0.60013 0.62805-1.0607 0.68387l-0.30705 0.04187 0.321 1.4236 0.23726-0.02791c0.642-0.04187 2.4843-0.48848 2.7495-3.0984 0.0977-0.94905-0.01396-2.0795 0.85135-2.7076 0.19539-0.13957 0.43266-0.23726 0.66992-0.27913l0.2233-0.027913v-1.4236l-0.2233-0.027913c-0.655-0.1129-1.27-0.6292-1.423-1.8016-0.042-0.3489-0.07-0.7257-0.098-1.1026"/>
+ <path stroke="currentColor" d="m3.4301 5.4599c-0.1536 1.1724-0.7677 1.6887-1.4236 1.8004l-0.23726 0.027913v1.4236l0.23726 0.027913c0.23726 0.04187 0.46057 0.13957 0.65596 0.27913 0.86531 0.62805 0.75366 1.7585 0.85135 2.7076 0.26518 2.6099 2.1074 3.0565 2.7495 3.0984l0.23726 0.02791 0.33496-1.4236-0.30705-0.04187c-0.4606-0.056-0.8514-0.349-1.0747-0.684-0.7537-1.158 0.0558-3.3911-1.4934-4.703 1.5352-1.3119 0.7257-3.531 1.4934-4.7034 0.2233-0.3349 0.6141-0.642 1.0746-0.6978l0.3071-0.0419-0.335-1.4096-0.2373 0.014c-0.7397 0.0558-2.4982 0.5443-2.7494 3.196-0.0279 0.3769-0.0419 0.7537-0.0837 1.1026"/>
+ <path stroke="currentColor" d="m12.486 4.3573c-0.251-2.6378-1.996-3.1402-2.7492-3.196l-0.2373-0.014-0.321 1.4096 0.307 0.0419c0.46057 0.055826 0.8374 0.36287 1.0607 0.69783 0.76761 1.1724-0.04187 3.3915 1.4934 4.7034-1.5492 1.3119-0.7397 3.545-1.4934 4.7034-0.2233 0.33496-0.60013 0.62805-1.0607 0.68387l-0.30705 0.04187 0.321 1.4236 0.23726-0.02791c0.642-0.04187 2.4843-0.48848 2.7495-3.0984 0.0977-0.94905-0.01396-2.0795 0.85135-2.7076 0.19539-0.13957 0.43266-0.23726 0.66992-0.27913l0.2233-0.027913v-1.4236l-0.2233-0.027913c-0.655-0.1129-1.27-0.6292-1.423-1.8016-0.042-0.3489-0.07-0.7257-0.098-1.1026"/>
</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/NavigationItemTypes.svg (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/NavigationItemTypes.svg 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/NavigationItemTypes.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 13 14">
- <rect width="12" height="12" x=".49998" y="1.0001" fill="none" stroke="#000" stroke-width=".99996" stroke-miterlimit="10" stroke-linejoin="bevel" rx="1.2112" ry="1.2111"/>
- <path d="m3.0938 2.75c-0.02216 0.00743-0.04326 0.017981-0.0625 0.03125-0.03888 0.02211-0.07164 0.054868-0.09375 0.09375-0.01327 0.019236-0.02385 0.040343-0.03125 0.0625-0.0026 0.020724-0.0026 0.041776 0 0.0625v1.2813a0.25002 0.25002 0 0 0 0 0.0625 0.25002 0.25002 0 0 0 0.09375 0.125 0.25002 0.25002 0 0 0 0.03125 0.03125 0.25002 0.25002 0 0 0 0.09375 0.03125 0.25002 0.25002 0 0 0 0.03125 0h2.375v6.4687a0.25002 0.25002 0 0 0 0.03125 0.09375 0.25002 0.25002 0 0 0 0.0625 0.09375 0.25002 0.25002 0 0 0 0.0625 0.03125 0.25002 0.25002 0 0 0 0.09375 0.03125h1.4062a0.25002 0.25002 0 0 0 0.0625 0 0.25002 0.25002 0 0 0 0.0625 -0.03125 0.25002 0.25002 0 0 0 0.09375 -0.09375 0.25002 0.25002 0 0 0 0.03125 -0.0625 0.25002 0.25002 0 0 0 0 -0.0625v-6.4687h2.4063a0.25002 0.25002 0 0 0 0.0625 0 0.25002 0.25002 0 0 0 0.09375 -0.0625 0.25002 0.25002 0 0 0 0.03125 -0.03125 0.25002 0.25002 0 0 0 0.03125 -0.09375 0.25002 0.25002 0 0 0 0.03125 -0.0625v-1.2813a0.25002 0.25002 0 0 0 0 -0.0625
0.25002 0.25002 0 0 0 -0.032 -0.0625 0.25002 0.25002 0 0 0 -0.0933 -0.0938 0.25002 0.25002 0 0 0 -0.0625 -0.0312 0.25002 0.25002 0 0 0 -0.0625 0h-6.6875c-0.02072-0.00261-0.04178-0.00261-0.0625 0z" display="block"/>
+ <rect stroke="currentColor" width="12" height="12" x=".49998" y="1.0001" fill="none" stroke-width=".99996" stroke-miterlimit="10" stroke-linejoin="bevel" rx="1.2112" ry="1.2111"/>
+ <path stroke="currentColor" d="m3.0938 2.75c-0.02216 0.00743-0.04326 0.017981-0.0625 0.03125-0.03888 0.02211-0.07164 0.054868-0.09375 0.09375-0.01327 0.019236-0.02385 0.040343-0.03125 0.0625-0.0026 0.020724-0.0026 0.041776 0 0.0625v1.2813a0.25002 0.25002 0 0 0 0 0.0625 0.25002 0.25002 0 0 0 0.09375 0.125 0.25002 0.25002 0 0 0 0.03125 0.03125 0.25002 0.25002 0 0 0 0.09375 0.03125 0.25002 0.25002 0 0 0 0.03125 0h2.375v6.4687a0.25002 0.25002 0 0 0 0.03125 0.09375 0.25002 0.25002 0 0 0 0.0625 0.09375 0.25002 0.25002 0 0 0 0.0625 0.03125 0.25002 0.25002 0 0 0 0.09375 0.03125h1.4062a0.25002 0.25002 0 0 0 0.0625 0 0.25002 0.25002 0 0 0 0.0625 -0.03125 0.25002 0.25002 0 0 0 0.09375 -0.09375 0.25002 0.25002 0 0 0 0.03125 -0.0625 0.25002 0.25002 0 0 0 0 -0.0625v-6.4687h2.4063a0.25002 0.25002 0 0 0 0.0625 0 0.25002 0.25002 0 0 0 0.09375 -0.0625 0.25002 0.25002 0 0 0 0.03125 -0.03125 0.25002 0.25002 0 0 0 0.03125 -0.09375 0.25002 0.25002 0 0 0 0.03125 -0.0625v-1.2813a
0.25002 0.25002 0 0 0 0 -0.0625 0.25002 0.25002 0 0 0 -0.032 -0.0625 0.25002 0.25002 0 0 0 -0.0933 -0.0938 0.25002 0.25002 0 0 0 -0.0625 -0.0312 0.25002 0.25002 0 0 0 -0.0625 0h-6.6875c-0.02072-0.00261-0.04178-0.00261-0.0625 0z" display="block"/>
</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/PaintFlashing.svg (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/PaintFlashing.svg 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/PaintFlashing.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
- <path d="m13.93 1.5c-0.12717 0.00228-0.29604 0.085471-0.47681 0.26489-3.3896 3.3642-3.9819 3.3962-7.1521 7.7614 0.85067 0.03196 1.5809 0.58374 1.9602 1.3774 3.7537-4.0456 4.1767-6.2083 5.8017-8.8212 0.163-0.3527 0.079-0.5866-0.133-0.5828zm-7.9464 8.768c-0.29267 0.0069-0.62917 0.08868-0.95362 0.29138-1.1199 0.7-0.8722 3.206-3.1787 3.206 0.2183 0.845 3.5316 1.044 4.9005 0.159 0.7136-0.462 1.2401-1.315 0.9536-2.358-0.1703-0.62-0.8438-1.319-1.7218-1.298z"/>
+ <path fill="currentColor" d="m13.93 1.5c-0.12717 0.00228-0.29604 0.085471-0.47681 0.26489-3.3896 3.3642-3.9819 3.3962-7.1521 7.7614 0.85067 0.03196 1.5809 0.58374 1.9602 1.3774 3.7537-4.0456 4.1767-6.2083 5.8017-8.8212 0.163-0.3527 0.079-0.5866-0.133-0.5828zm-7.9464 8.768c-0.29267 0.0069-0.62917 0.08868-0.95362 0.29138-1.1199 0.7-0.8722 3.206-3.1787 3.206 0.2183 0.845 3.5316 1.044 4.9005 0.159 0.7136-0.462 1.2401-1.315 0.9536-2.358-0.1703-0.62-0.8438-1.319-1.7218-1.298z"/>
</svg>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/Printer.svg (0 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/Printer.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/Printer.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
+<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
+ <path fill="currentColor" d="M 4 5 L 4 1 L 12 1 L 12 5 L 11 5 L 11 2 L 5 2 L 5 5 Z"/>
+ <path fill="currentColor" d="M 4 10 L 4 14 L 12 14 L 12 10 L 11 10 L 11 13 L 5 13 L 5 10 Z"/>
+ <path fill="currentColor" d="M 3 9 L 3 12 L 0.5 12 L 0.5 5.5 L 15.5 5.5 L 15.5 12 L 13 12 L 13 9 Z"/>
+</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/ShadowDOM.svg (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/ShadowDOM.svg 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/ShadowDOM.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
- <path d="m7.7147 5.2557-5.8503 2.8749v1.3307l5.8503 2.7745v-1.5693l-3.9671-1.9082 3.9671-1.9961v-1.5065"/>
- <path d="m8.9972 5.2557v1.5065l3.9671 1.9961-3.9671 1.9082v1.5693l5.8503-2.7745v-1.3307l-5.8503-2.8749"/>
- <path d="m7.0028 3.7642-5.8503 2.8749v1.3307l5.8503 2.7745v-1.5693l-3.9671-1.9082 3.9671-1.9961v-1.5065"/>
- <path d="m8.2853 3.7642v1.5065l3.9671 1.9961-3.9671 1.9082v1.5693l5.8503-2.7745v-1.3307l-5.8503-2.8749"/>
+ <path fill="currentColor" d="m7.7147 5.2557-5.8503 2.8749v1.3307l5.8503 2.7745v-1.5693l-3.9671-1.9082 3.9671-1.9961v-1.5065"/>
+ <path fill="currentColor" d="m8.9972 5.2557v1.5065l3.9671 1.9961-3.9671 1.9082v1.5693l5.8503-2.7745v-1.3307l-5.8503-2.8749"/>
+ <path fill="currentColor" d="m7.0028 3.7642-5.8503 2.8749v1.3307l5.8503 2.7745v-1.5693l-3.9671-1.9082 3.9671-1.9961v-1.5065"/>
+ <path fill="currentColor" d="m8.2853 3.7642v1.5065l3.9671 1.9961-3.9671 1.9082v1.5693l5.8503-2.7745v-1.3307l-5.8503-2.8749"/>
</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/ToggleLeftSidebar.svg (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/ToggleLeftSidebar.svg 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/ToggleLeftSidebar.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
- <path d="m13.5 1.5c1.0524 0 2 0.84508 2 1.9375v9.125c0 1.0924-0.94763 1.9375-2 1.9375h-11c-1.0524 0-2-0.84508-2-1.9375v-9.125c0-1.0919 0.9476-1.937 2-1.937zm-11 11h3v-8h-3"/>
+ <path fill="currentColor" d="m13.5 1.5c1.0524 0 2 0.84508 2 1.9375v9.125c0 1.0924-0.94763 1.9375-2 1.9375h-11c-1.0524 0-2-0.84508-2-1.9375v-9.125c0-1.0919 0.9476-1.937 2-1.937zm-11 11h3v-8h-3"/>
</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/ToggleRightSidebar.svg (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/ToggleRightSidebar.svg 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/ToggleRightSidebar.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
- <path d="m2.5 1.5c-1.0524 0-2 0.8451-2 1.9375v9.125c0 1.0924 0.94763 1.9375 2 1.9375h11c1.0524 0 2-0.84508 2-1.9375v-9.125c0-1.0919-0.948-1.937-2-1.937zm11 11h-3v-8h3"/>
+ <path fill="currentColor" d="m2.5 1.5c-1.0524 0-2 0.8451-2 1.9375v9.125c0 1.0924 0.94763 1.9375 2 1.9375h11c1.0524 0 2-0.84508 2-1.9375v-9.125c0-1.0919-0.948-1.937-2-1.937zm11 11h-3v-8h3"/>
</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/UpDownArrows.svg (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/UpDownArrows.svg 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/UpDownArrows.svg 2016-11-16 03:10:04 UTC (rev 208779)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 5 12">
- <path d="m4.75 4.4276c-0.017-0.0714-0.0556-0.1375-0.1094-0.1875l-1.875-1.875-0.26562-0.25-0.26562 0.25-1.875 1.875c-0.06894 0.07-0.10908 0.1675-0.1094 0.2657v0.015625 0.03125 0.32812h0.28125 0.046875c0.11834 0.017935 0.24422-0.024025 0.32812-0.10938l1.5938-1.5938 1.6094 1.5938c0.069545 0.069441 0.16735 0.10971 0.26562 0.10938h0.078125 0.29688v-0.29688-0.046875-0.03125-0.046875z"/>
- <path d="m4.75 7.5724c-0.017 0.0714-0.0556 0.1375-0.1094 0.1875l-1.875 1.875-0.26562 0.25-0.26562-0.25-1.875-1.875c-0.06894-0.07-0.10908-0.1675-0.1094-0.2657v-0.015625-0.03125-0.32812h0.28125 0.04687c0.11834-0.0179 0.24422 0.0241 0.32812 0.1094l1.5938 1.5938 1.6094-1.5938c0.0695-0.0694 0.1673-0.1097 0.2656-0.1094h0.07813 0.29688v0.29688 0.046875 0.03125 0.046875z"/>
+ <path stroke="currentColor" d="m4.75 4.4276c-0.017-0.0714-0.0556-0.1375-0.1094-0.1875l-1.875-1.875-0.26562-0.25-0.26562 0.25-1.875 1.875c-0.06894 0.07-0.10908 0.1675-0.1094 0.2657v0.015625 0.03125 0.32812h0.28125 0.046875c0.11834 0.017935 0.24422-0.024025 0.32812-0.10938l1.5938-1.5938 1.6094 1.5938c0.069545 0.069441 0.16735 0.10971 0.26562 0.10938h0.078125 0.29688v-0.29688-0.046875-0.03125-0.046875z"/>
+ <path stroke="currentColor" d="m4.75 7.5724c-0.017 0.0714-0.0556 0.1375-0.1094 0.1875l-1.875 1.875-0.26562 0.25-0.26562-0.25-1.875-1.875c-0.06894-0.07-0.10908-0.1675-0.1094-0.2657v-0.015625-0.03125-0.32812h0.28125 0.04687c0.11834-0.0179 0.24422 0.0241 0.32812 0.1094l1.5938 1.5938 1.6094-1.5938c0.0695-0.0694 0.1673-0.1097 0.2656-0.1094h0.07813 0.29688v0.29688 0.046875 0.03125 0.046875z"/>
</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js (208778 => 208779)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2016-11-16 02:55:22 UTC (rev 208778)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2016-11-16 03:10:04 UTC (rev 208779)
@@ -46,6 +46,11 @@
this._showsShadowDOMButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._toggleShowsShadowDOMSetting, this);
this._showShadowDOMSettingChanged();
+ WebInspector.showPrintStylesSetting.addEventListener(WebInspector.Setting.Event.Changed, this._showPrintStylesSettingChanged, this);
+ this._showPrintStylesButtonNavigationItem = new WebInspector.ActivateButtonNavigationItem("print-styles", WebInspector.UIString("Enable print styles"), WebInspector.UIString("Disable print styles"), "Images/Printer.svg", 16, 16);
+ this._showPrintStylesButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._togglePrintStylesSetting, this);
+ this._showPrintStylesSettingChanged();
+
this.element.classList.add("dom-tree");
this.element.addEventListener("click", this._mouseWasClicked.bind(this), false);
@@ -68,7 +73,7 @@
get navigationItems()
{
- return [this._showsShadowDOMButtonNavigationItem, this._compositingBordersButtonNavigationItem, this._paintFlashingButtonNavigationItem];
+ return [this._showPrintStylesButtonNavigationItem, this._showsShadowDOMButtonNavigationItem, this._compositingBordersButtonNavigationItem, this._paintFlashingButtonNavigationItem];
}
get domTreeOutline()
@@ -480,6 +485,21 @@
WebInspector.showShadowDOMSetting.value = !WebInspector.showShadowDOMSetting.value;
}
+ _showPrintStylesSettingChanged(event)
+ {
+ this._showPrintStylesButtonNavigationItem.activated = WebInspector.showPrintStylesSetting.value;
+ }
+
+ _togglePrintStylesSetting(event)
+ {
+ WebInspector.showPrintStylesSetting.value = !WebInspector.showPrintStylesSetting.value;
+
+ let mediaType = WebInspector.showPrintStylesSetting.value ? "print" : "";
+ PageAgent.setEmulatedMedia(mediaType);
+
+ WebInspector.cssStyleManager.mediaTypeChanged();
+ }
+
_showSearchHighlights()
{
console.assert(this._searchIdentifier);