[webkit-changes] [251962] trunk/Source/WebInspectorUI

2019-11-01 Thread drousso
Title: [251962] trunk/Source/WebInspectorUI








Revision 251962
Author drou...@apple.com
Date 2019-11-01 18:27:14 -0700 (Fri, 01 Nov 2019)


Log Message
Web Inspector: switching tabs should re-focus the previously focused element
https://bugs.webkit.org/show_bug.cgi?id=203744

Reviewed by Brian Burg.

* UserInterface/Views/TabBrowser.js:
(WI.TabBrowser.prototype._tabBarItemSelected):
(WI.TabBrowser.prototype._saveFocusedNodeForTabContentView): Added.
(WI.TabBrowser.prototype._restoreFocusedNodeForTabContentView): Added.
Store the `document.activeElement` on the `WI.TabContentView` and `.focus()` it after we're
done showing the newly selected tab, but only if there isn't already something focused.

* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype.set selectedTabBarItem):
* UserInterface/Views/LegacyTabBar.js:
(WI.LegacyTabBar.prototype.set selectedTabBarItem):
Include the previously selected tab bar item when dispatching selection change events.

* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
Don't omit focus when revealing represented objects.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js
trunk/Source/WebInspectorUI/UserInterface/Views/LegacyTabBar.js
trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js
trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (251961 => 251962)

--- trunk/Source/WebInspectorUI/ChangeLog	2019-11-02 01:17:10 UTC (rev 251961)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-11-02 01:27:14 UTC (rev 251962)
@@ -1,5 +1,29 @@
 2019-11-01  Devin Rousso  
 
+Web Inspector: switching tabs should re-focus the previously focused element
+https://bugs.webkit.org/show_bug.cgi?id=203744
+
+Reviewed by Brian Burg.
+
+* UserInterface/Views/TabBrowser.js:
+(WI.TabBrowser.prototype._tabBarItemSelected):
+(WI.TabBrowser.prototype._saveFocusedNodeForTabContentView): Added.
+(WI.TabBrowser.prototype._restoreFocusedNodeForTabContentView): Added.
+Store the `document.activeElement` on the `WI.TabContentView` and `.focus()` it after we're
+done showing the newly selected tab, but only if there isn't already something focused.
+
+* UserInterface/Views/TabBar.js:
+(WI.TabBar.prototype.set selectedTabBarItem):
+* UserInterface/Views/LegacyTabBar.js:
+(WI.LegacyTabBar.prototype.set selectedTabBarItem):
+Include the previously selected tab bar item when dispatching selection change events.
+
+* UserInterface/Views/ContentBrowserTabContentView.js:
+(WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
+Don't omit focus when revealing represented objects.
+
+2019-11-01  Devin Rousso  
+
 Web Inspector: Timelines: add a timeline that shows information about any recorded CSS animation/transition
 https://bugs.webkit.org/show_bug.cgi?id=203651
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js (251961 => 251962)

--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js	2019-11-02 01:17:10 UTC (rev 251961)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js	2019-11-02 01:27:14 UTC (rev 251962)
@@ -314,12 +314,9 @@
 
 let treeElement = this.treeElementForRepresentedObject(representedObject);
 
-if (treeElement) {
-const omitFocus = true;
-const selectedByUser = false;
-const suppressNotification = false;
-treeElement.revealAndSelect(omitFocus, selectedByUser, suppressNotification);
-} else if (this.navigationSidebarPanel && this.navigationSidebarPanel.contentTreeOutline.selectedTreeElement)
+if (treeElement)
+treeElement.revealAndSelect();
+else if (this.navigationSidebarPanel && this.navigationSidebarPanel.contentTreeOutline.selectedTreeElement)
 this.navigationSidebarPanel.contentTreeOutline.selectedTreeElement.deselect(true);
 }
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LegacyTabBar.js (251961 => 251962)

--- trunk/Source/WebInspectorUI/UserInterface/Views/LegacyTabBar.js	2019-11-02 01:17:10 UTC (rev 251961)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LegacyTabBar.js	2019-11-02 01:27:14 UTC (rev 251962)
@@ -371,6 +371,8 @@
 if (this._selectedTabBarItem === tabBarItem)
 return;
 
+let previousTabBarItem = this._selectedTabBarItem;
+
 if (this._selectedTabBarItem)
 this._selectedTabBarItem.selected = false;
 
@@ -382,7 +384,7 @@
 this.needsLayout();
 }
 
-this.dispatchEventToListeners(WI.TabBar.Event.TabBarItemSelected);
+

[webkit-changes] [251961] trunk/Tools

2019-11-01 Thread jbedard
Title: [251961] trunk/Tools








Revision 251961
Author jbed...@apple.com
Date 2019-11-01 18:17:10 -0700 (Fri, 01 Nov 2019)


Log Message
Python 3: Add support in webkitpy.layout_tests.model
https://bugs.webkit.org/show_bug.cgi?id=203702

Reviewed by Stephanie Lewis.

* Scripts/test-webkitpy-python3: Add webkitpy.layout_tests.model.
* Scripts/webkitpy/layout_tests/models/test_configuration.py:
(SpecifierSorter.sort_specifiers): Convert iterator to list.
(TestConfigurationConverter.to_config_set): Use reduce from functors.
(TestConfigurationConverter.intersect_combination): Ditto.
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationsModel.get_test_set_for_keyword): Use iterators in both Python 2
and Python 3.
(TestExpectationsModel._remove_from_sets): Ditto.
(TestExpectations.parse_generic_expectations): Covert iterators to lists for indexing.
(TestExpectations.parse_default_port_expectations): Ditto.
(TestExpectations.parse_override_expectations): Ditto.
(TestExpectations.remove_configuration_from_test): Use any instead of just checking the
first element in the set.
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(summarize_results): Use items instead of iteritems.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/test-webkitpy-python3
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py


Added Paths

trunk/Tools/Scripts/webkitpy/common/iteration_compatibility.py




Diff

Modified: trunk/Tools/ChangeLog (251960 => 251961)

--- trunk/Tools/ChangeLog	2019-11-02 00:54:04 UTC (rev 251960)
+++ trunk/Tools/ChangeLog	2019-11-02 01:17:10 UTC (rev 251961)
@@ -1,3 +1,27 @@
+2019-11-01  Jonathan Bedard  
+
+Python 3: Add support in webkitpy.layout_tests.model
+https://bugs.webkit.org/show_bug.cgi?id=203702
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/test-webkitpy-python3: Add webkitpy.layout_tests.model.
+* Scripts/webkitpy/layout_tests/models/test_configuration.py:
+(SpecifierSorter.sort_specifiers): Convert iterator to list.
+(TestConfigurationConverter.to_config_set): Use reduce from functors.
+(TestConfigurationConverter.intersect_combination): Ditto.
+* Scripts/webkitpy/layout_tests/models/test_expectations.py:
+(TestExpectationsModel.get_test_set_for_keyword): Use iterators in both Python 2
+and Python 3.
+(TestExpectationsModel._remove_from_sets): Ditto.
+(TestExpectations.parse_generic_expectations): Covert iterators to lists for indexing.
+(TestExpectations.parse_default_port_expectations): Ditto.
+(TestExpectations.parse_override_expectations): Ditto.
+(TestExpectations.remove_configuration_from_test): Use any instead of just checking the
+first element in the set.
+* Scripts/webkitpy/layout_tests/models/test_run_results.py:
+(summarize_results): Use items instead of iteritems.
+
 2019-11-01  Devin Rousso  
 
 Web Inspector: Timelines: add a timeline that shows information about any recorded CSS animation/transition


Modified: trunk/Tools/Scripts/test-webkitpy-python3 (251960 => 251961)

--- trunk/Tools/Scripts/test-webkitpy-python3	2019-11-02 00:54:04 UTC (rev 251960)
+++ trunk/Tools/Scripts/test-webkitpy-python3	2019-11-02 01:17:10 UTC (rev 251961)
@@ -35,6 +35,7 @@
 
 PYTHON3_COMPATIBLE_DIRECTORIES = [
   'webkitpy.common',
+  'webkitpy.layout_tests.models',
   'webkitpy.port',
   'webkitpy.results',
   'webkitpy.xcode',


Added: trunk/Tools/Scripts/webkitpy/common/iteration_compatibility.py (0 => 251961)

--- trunk/Tools/Scripts/webkitpy/common/iteration_compatibility.py	(rev 0)
+++ trunk/Tools/Scripts/webkitpy/common/iteration_compatibility.py	2019-11-02 01:17:10 UTC (rev 251961)
@@ -0,0 +1,44 @@
+# Copyright (C) 2019 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

[webkit-changes] [251960] trunk/Source/WebCore

2019-11-01 Thread cfleizach
Title: [251960] trunk/Source/WebCore








Revision 251960
Author cfleiz...@apple.com
Date 2019-11-01 17:54:04 -0700 (Fri, 01 Nov 2019)


Log Message
AX: Restrict WebSpeech voices to built-in voices only
https://bugs.webkit.org/show_bug.cgi?id=203689

Reviewed by Per Arne Vollan.

Only show built-in voices when requesting through WebKit to reduce fingerprinting surface area.

* platform/ios/PlatformSpeechSynthesizerIOS.mm:
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (251959 => 251960)

--- trunk/Source/WebCore/ChangeLog	2019-11-02 00:45:35 UTC (rev 251959)
+++ trunk/Source/WebCore/ChangeLog	2019-11-02 00:54:04 UTC (rev 251960)
@@ -1,3 +1,15 @@
+2019-11-01  Chris Fleizach  
+
+AX: Restrict WebSpeech voices to built-in voices only
+https://bugs.webkit.org/show_bug.cgi?id=203689
+
+Reviewed by Per Arne Vollan.
+
+Only show built-in voices when requesting through WebKit to reduce fingerprinting surface area. 
+
+* platform/ios/PlatformSpeechSynthesizerIOS.mm:
+(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
+
 2019-11-01  Devin Rousso  
 
 Web Inspector: Timelines: add a timeline that shows information about any recorded CSS animation/transition


Modified: trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm (251959 => 251960)

--- trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm	2019-11-02 00:45:35 UTC (rev 251959)
+++ trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm	2019-11-02 00:54:04 UTC (rev 251960)
@@ -263,7 +263,10 @@
 bool isDefault = true;
 NSString *voiceURI = [voice identifier];
 NSString *name = [voice name];
-m_voiceList.append(PlatformSpeechSynthesisVoice::create(voiceURI, name, language, true, isDefault));
+
+// Only show built-in voices when requesting through WebKit to reduce fingerprinting surface area.
+if (voice.quality == AVSpeechSynthesisVoiceQualityDefault)
+m_voiceList.append(PlatformSpeechSynthesisVoice::create(voiceURI, name, language, true, isDefault));
 }
 END_BLOCK_OBJC_EXCEPTIONS
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [251958] trunk/Source/WebInspectorUI

2019-11-01 Thread drousso
Title: [251958] trunk/Source/WebInspectorUI








Revision 251958
Author drou...@apple.com
Date 2019-11-01 17:19:13 -0700 (Fri, 01 Nov 2019)


Log Message
Web Inspector: default to focusing the console prompt if no other content is focused after opening Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=203743

Reviewed by Eric Carlson and Brian Burg.

* UserInterface/Base/Main.js:
(WI.isContentAreaFocused): Added.
(WI.isConsoleFocused):
(WI._focusChanged):
(WI._restoreCookieForOpenTabs):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (251957 => 251958)

--- trunk/Source/WebInspectorUI/ChangeLog	2019-11-02 00:14:40 UTC (rev 251957)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-11-02 00:19:13 UTC (rev 251958)
@@ -1,3 +1,16 @@
+2019-11-01  Devin Rousso  
+
+Web Inspector: default to focusing the console prompt if no other content is focused after opening Web Inspector
+https://bugs.webkit.org/show_bug.cgi?id=203743
+
+Reviewed by Eric Carlson and Brian Burg.
+
+* UserInterface/Base/Main.js:
+(WI.isContentAreaFocused): Added.
+(WI.isConsoleFocused):
+(WI._focusChanged):
+(WI._restoreCookieForOpenTabs):
+
 2019-11-01  Nikita Vasilyev  
 
 Web Inspector: Display color swatches for p3 colors


Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (251957 => 251958)

--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2019-11-02 00:14:40 UTC (rev 251957)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2019-11-02 00:19:13 UTC (rev 251958)
@@ -933,9 +933,14 @@
 InspectorFrontendHost.closeWindow();
 };
 
+WI.isContentAreaFocused = function()
+{
+return WI._contentElement.contains(document.activeElement);
+}
+
 WI.isConsoleFocused = function()
 {
-return WI.quickConsole.prompt.focused;
+return !WI._didAutofocusConsolePrompt && WI.quickConsole.prompt.focused;
 };
 
 WI.isShowingSplitConsole = function()
@@ -1374,6 +1379,8 @@
 
 WI._focusChanged = function(event)
 {
+WI._didAutofocusConsolePrompt = false;
+
 // Make a caret selection inside the focused element if there isn't a range selection and there isn't already
 // a caret selection inside. This is needed (at least) to remove caret from console when focus is moved.
 // The selection change should not apply to text fields and text areas either.
@@ -1548,6 +1555,14 @@
 continue;
 tabContentView.restoreStateFromCookie(restorationType);
 }
+
+window.requestAnimationFrame(() => {
+if (WI.isContentAreaFocused())
+return;
+
+WI.quickConsole.prompt.focus();
+WI._didAutofocusConsolePrompt = true;
+});
 };
 
 WI._saveCookieForOpenTabs = function()






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [251957] trunk

2019-11-01 Thread said
Title: [251957] trunk








Revision 251957
Author s...@apple.com
Date 2019-11-01 17:14:40 -0700 (Fri, 01 Nov 2019)


Log Message
SVG pair properties must be detached from their owner before it's deleted
https://bugs.webkit.org/show_bug.cgi?id=203545

Reviewed by Simon Fraser.

Source/WebCore:

SVGAnimatedPropertyPairAccessor needs to override its detach() method so
each of its pair properties detaches itself from the owner.
SVGPointerMemberAccessor does the same thing but for a single property
which covers all the list properties as well.

Test: svg/custom/pair-properties-detach.html

* svg/properties/SVGAnimatedPropertyPairAccessor.h:

LayoutTests:

* svg/custom/pair-properties-detach-expected.txt: Added.
* svg/custom/pair-properties-detach.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessor.h


Added Paths

trunk/LayoutTests/svg/custom/pair-properties-detach-expected.txt
trunk/LayoutTests/svg/custom/pair-properties-detach.html




Diff

Modified: trunk/LayoutTests/ChangeLog (251956 => 251957)

--- trunk/LayoutTests/ChangeLog	2019-11-02 00:13:04 UTC (rev 251956)
+++ trunk/LayoutTests/ChangeLog	2019-11-02 00:14:40 UTC (rev 251957)
@@ -1,3 +1,13 @@
+2019-11-01  Said Abou-Hallawa  
+
+SVG pair properties must be detached from their owner before it's deleted
+https://bugs.webkit.org/show_bug.cgi?id=203545
+
+Reviewed by Simon Fraser.
+
+* svg/custom/pair-properties-detach-expected.txt: Added.
+* svg/custom/pair-properties-detach.html: Added.
+
 2019-11-01  Eric Carlson  
 
 Add experimental TextTrackCue API


Added: trunk/LayoutTests/svg/custom/pair-properties-detach-expected.txt (0 => 251957)

--- trunk/LayoutTests/svg/custom/pair-properties-detach-expected.txt	(rev 0)
+++ trunk/LayoutTests/svg/custom/pair-properties-detach-expected.txt	2019-11-02 00:14:40 UTC (rev 251957)
@@ -0,0 +1,13 @@
+This test checks detaching the SVG pair properties from the owner element.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS angle.baseVal.value = 100 is 100
+PASS type.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_AUTO is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO
+PASS radiusX.baseVal = 100 is 100
+PASS orderX.baseVal = 100 is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/svg/custom/pair-properties-detach.html (0 => 251957)

--- trunk/LayoutTests/svg/custom/pair-properties-detach.html	(rev 0)
+++ trunk/LayoutTests/svg/custom/pair-properties-detach.html	2019-11-02 00:14:40 UTC (rev 251957)
@@ -0,0 +1,33 @@
+
+
+
+
+
+

+
+