[webkit-changes] [239543] trunk

2018-12-22 Thread wenson_hsieh
Title: [239543] trunk








Revision 239543
Author wenson_hs...@apple.com
Date 2018-12-22 22:38:24 -0800 (Sat, 22 Dec 2018)


Log Message
[iOS] Suppress native selection behaviors when focusing a very small editable element
https://bugs.webkit.org/show_bug.cgi?id=193005


Reviewed by Tim Horton.

Source/WebKit:

In r238146, I added a mechanism to detect when the selection is hidden within transparent editable elements, and
used this to suppress native selection on iOS (such as selection handles, highlight, callout bar, etc.) to avoid
conflicts between the page's editing UI and the platform.

However, one additional technique observed on some websites involves hiding the selection by moving it into a
tiny (1x1) editable element. Here, we currently still present a callout bar with editing actions, as well as
show a selection caret or handles on iOS. To fix this, we extend the mechanism added in r238146 by also
suppressing the selection assistant in the case where the editable element's area is beneath a tiny minimum
threshold.

Test: editing/selection/ios/hide-selection-in-tiny-contenteditable.html

* Shared/EditorState.cpp:
(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):
(WebKit::operator<<):
* Shared/EditorState.h:

Rename selectionClipRect to focusedElementRect. We currently propagate the bounds of the focused element to the
UI process through EditorState updates, but only for the purpose of returning it in the computed selection clip
rect; instead, rename this member to something more general-purpose, so we can also use it when determining
whether to suppress the selection assistant.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _candidateRect]):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::handleRequestedCandidates):
* UIProcess/ios/WKContentViewInteraction.h:

Add a new SuppressSelectionAssistantReason that corresponds to focusing tiny editable elements.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _zoomToRevealFocusedElement]):
(-[WKContentView _selectionClipRect]):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _updateChangedSelection:]):

Check the size of the focused element, and begin or stop suppressing the selection assistant accordingly.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState const):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformEditorState const):

LayoutTests:

Add a new layout test to verify that native selection UI is suppressed when focusing a tiny (1px by 1px)
editable element.

* editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt: Added.
* editing/selection/ios/hide-selection-in-tiny-contenteditable.html: Added.
* resources/ui-helper.js:
(window.UIHelper.zoomToScale):

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/resources/ui-helper.js
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/EditorState.cpp
trunk/Source/WebKit/Shared/EditorState.h
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm


Added Paths

trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt
trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable.html




Diff

Modified: trunk/LayoutTests/ChangeLog (239542 => 239543)

--- trunk/LayoutTests/ChangeLog	2018-12-23 01:09:21 UTC (rev 239542)
+++ trunk/LayoutTests/ChangeLog	2018-12-23 06:38:24 UTC (rev 239543)
@@ -1,3 +1,19 @@
+2018-12-22  Wenson Hsieh  
+
+[iOS] Suppress native selection behaviors when focusing a very small editable element
+https://bugs.webkit.org/show_bug.cgi?id=193005
+
+
+Reviewed by Tim Horton.
+
+Add a new layout test to verify that native selection UI is suppressed when focusing a tiny (1px by 1px)
+editable element.
+
+* editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt: Added.
+* editing/selection/ios/hide-selection-in-tiny-contenteditable.html: Added.
+* resources/ui-helper.js:
+(window.UIHelper.zoomToScale):
+
 2018-12-20  Yusuke Suzuki  
 
 [JSC] Implement "well-formed JSON.stringify" proposal


Added: trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt (0 => 239543)

--- trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt	2018-12-23 06:38:24 UTC (rev 239543)
@@ -0,0 +1,18 @@
+Focus the editor
+abcdefg
+Verifies that 

[webkit-changes] [239542] releases/WebKitGTK/webkit-2.22

2018-12-22 Thread mcatanzaro
Title: [239542] releases/WebKitGTK/webkit-2.22








Revision 239542
Author mcatanz...@igalia.com
Date 2018-12-22 17:09:21 -0800 (Sat, 22 Dec 2018)


Log Message
Merge r219121 - Synchronous media query evaluation could destroy current Frame/FrameView.
https://bugs.webkit.org/show_bug.cgi?id=192781


Reviewed by Chris Dumez.

Source/WebCore:

Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.

Test: printing/print-with-media-query-destory.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading):
* page/Frame.cpp:
(WebCore::Frame::setPrinting):
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):
* page/PrintContext.cpp:
(WebCore::PrintContext::PrintContext):
(WebCore::PrintContext::computePageRects):
(WebCore::PrintContext::computePageRectsWithPageSizeInternal):
(WebCore::PrintContext::begin):
(WebCore::PrintContext::computeAutomaticScaleFactor):
(WebCore::PrintContext::spoolPage):
(WebCore::PrintContext::spoolRect):
(WebCore::PrintContext::end):
* page/PrintContext.h:
(WebCore::PrintContext::frame const): Deleted.

LayoutTests:

* printing/print-with-media-query-destory-expected.txt: Added.
* printing/print-with-media-query-destory.html: Added.

Modified Paths

releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog
releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog
releases/WebKitGTK/webkit-2.22/Source/WebCore/loader/DocumentLoader.cpp
releases/WebKitGTK/webkit-2.22/Source/WebCore/page/Frame.cpp
releases/WebKitGTK/webkit-2.22/Source/WebCore/page/FrameView.cpp
releases/WebKitGTK/webkit-2.22/Source/WebCore/page/PrintContext.cpp
releases/WebKitGTK/webkit-2.22/Source/WebCore/page/PrintContext.h


Added Paths

releases/WebKitGTK/webkit-2.22/LayoutTests/printing/print-with-media-query-destory-expected.txt
releases/WebKitGTK/webkit-2.22/LayoutTests/printing/print-with-media-query-destory.html




Diff

Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog (239541 => 239542)

--- releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog	2018-12-22 22:54:38 UTC (rev 239541)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog	2018-12-23 01:09:21 UTC (rev 239542)
@@ -1,3 +1,14 @@
+2018-12-21  Zalan Bujtas  
+
+Synchronous media query evaluation could destroy current Frame/FrameView.
+https://bugs.webkit.org/show_bug.cgi?id=192781
+
+
+Reviewed by Chris Dumez.
+
+* printing/print-with-media-query-destory-expected.txt: Added.
+* printing/print-with-media-query-destory.html: Added.
+
 2018-12-10  Brent Fulgham  
 
 SVGViewSpec objects should mark relevant SVG elements


Added: releases/WebKitGTK/webkit-2.22/LayoutTests/printing/print-with-media-query-destory-expected.txt (0 => 239542)

--- releases/WebKitGTK/webkit-2.22/LayoutTests/printing/print-with-media-query-destory-expected.txt	(rev 0)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/printing/print-with-media-query-destory-expected.txt	2018-12-23 01:09:21 UTC (rev 239542)
@@ -0,0 +1,2 @@
+Pass if no crash or assert
+


Added: releases/WebKitGTK/webkit-2.22/LayoutTests/printing/print-with-media-query-destory.html (0 => 239542)

--- releases/WebKitGTK/webkit-2.22/LayoutTests/printing/print-with-media-query-destory.html	(rev 0)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/printing/print-with-media-query-destory.html	2018-12-23 01:09:21 UTC (rev 239542)
@@ -0,0 +1,28 @@
+Pass if no crash or assert
+
+if (window.testRunner)
+testRunner.dumpAsText();
+
+function wait() {
+if (window.testRunner)
+testRunner.waitUntilDone();
+}
+
+function done() {
+if (window.testRunner)
+testRunner.notifyDone();
+}
+
+


Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (239541 => 239542)

--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-12-22 22:54:38 UTC (rev 239541)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-12-23 01:09:21 UTC (rev 239542)
@@ -1,3 +1,33 @@
+2018-12-21  Zalan Bujtas  
+
+Synchronous media query evaluation could destroy current Frame/FrameView.
+https://bugs.webkit.org/show_bug.cgi?id=192781
+
+
+Reviewed by Chris Dumez.
+
+Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
+
+Test: printing/print-with-media-query-destory.html
+
+* loader/DocumentLoader.cpp:
+(WebCore::DocumentLoader::finishedLoading):
+* page/Frame.cpp:
+(WebCore::Frame::setPrinting):
+* page/FrameView.cpp:
+(WebCore::FrameView::forceLayoutForPagination):
+* page/PrintContext.cpp:
+(WebCore::PrintContext::PrintContext):
+(WebCore::PrintContext::computePageRects):
+(WebCore::PrintContext::computePageRectsWithPageSizeInternal):
+(WebCore::PrintContext::begin):
+

[webkit-changes] [239541] trunk/Source/ThirdParty/libwebrtc

2018-12-22 Thread mitz
Title: [239541] trunk/Source/ThirdParty/libwebrtc








Revision 239541
Author m...@apple.com
Date 2018-12-22 14:54:38 -0800 (Sat, 22 Dec 2018)


Log Message
Fixed Apple production builds.

* Configurations/Base.xcconfig: Exclude the Source/third_party/boringssl/src/util
  subdirectory, which contains binaries, from installsrc. Its contents are not used for
  building any of the targets in the project.

Modified Paths

trunk/Source/ThirdParty/libwebrtc/ChangeLog
trunk/Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig




Diff

Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (239540 => 239541)

--- trunk/Source/ThirdParty/libwebrtc/ChangeLog	2018-12-22 12:37:15 UTC (rev 239540)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog	2018-12-22 22:54:38 UTC (rev 239541)
@@ -1,3 +1,11 @@
+2018-12-22  Dan Bernstein  
+
+Fixed Apple production builds.
+
+* Configurations/Base.xcconfig: Exclude the Source/third_party/boringssl/src/util
+  subdirectory, which contains binaries, from installsrc. Its contents are not used for
+  building any of the targets in the project.
+
 2018-12-21  Youenn Fablet   and Alejandro G. Castro  
 
 Resync BoringSSL to M72


Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig (239540 => 239541)

--- trunk/Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig	2018-12-22 12:37:15 UTC (rev 239540)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig	2018-12-22 22:54:38 UTC (rev 239541)
@@ -94,7 +94,7 @@
 
 GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(inherited) ABSL_ALLOCATOR_NOTHROW;
 
-EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS = $(inherited) "$(PROJECT_DIR)/Source/webrtc/examples";
+EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS = $(inherited) "$(PROJECT_DIR)/Source/webrtc/examples" "$(PROJECT_DIR)/Source/third_party/boringssl/src/util";
 
 NORMAL_WEBCORE_FRAMEWORKS_DIR = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
 NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=macosx*] = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;






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


[webkit-changes] [239540] trunk/Tools

2018-12-22 Thread carlosgc
Title: [239540] trunk/Tools








Revision 239540
Author carlo...@webkit.org
Date 2018-12-22 04:37:15 -0800 (Sat, 22 Dec 2018)


Log Message
WebDriver: warn about non existing tests when parsing expectations
https://bugs.webkit.org/show_bug.cgi?id=192979

Reviewed by Michael Catanzaro.

It's common to update web driver tests and forget updating the test expectations in case of tests removed or
renamed.

* Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
(WebDriverTestRunner.__init__):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py




Diff

Modified: trunk/Tools/ChangeLog (239539 => 239540)

--- trunk/Tools/ChangeLog	2018-12-22 12:33:52 UTC (rev 239539)
+++ trunk/Tools/ChangeLog	2018-12-22 12:37:15 UTC (rev 239540)
@@ -1,3 +1,16 @@
+2018-12-22  Carlos Garcia Campos  
+
+WebDriver: warn about non existing tests when parsing expectations
+https://bugs.webkit.org/show_bug.cgi?id=192979
+
+Reviewed by Michael Catanzaro.
+
+It's common to update web driver tests and forget updating the test expectations in case of tests removed or
+renamed.
+
+* Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
+(WebDriverTestRunner.__init__):
+
 2018-12-21  Chris Dumez  
 
 navigator.userAgent in service workers does not reflect customUserAgent set by client


Modified: trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py (239539 => 239540)

--- trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py	2018-12-22 12:33:52 UTC (rev 239539)
+++ trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py	2018-12-22 12:37:15 UTC (rev 239540)
@@ -56,6 +56,9 @@
 expectations_file = os.path.join(self._tests_dir, 'TestExpectations.json')
 build_type = 'Debug' if self._port.get_option('debug') else 'Release'
 self._expectations = TestExpectations(self._port.name(), expectations_file, build_type)
+for test in self._expectations._expectations.keys():
+if not os.path.isfile(os.path.join(self._tests_dir, test)):
+_log.warning('Test %s does not exist' % test)
 
 env = self._display_driver._setup_environ_for_test()
 self._runners = [runner_cls(self._port, driver, env, self._expectations) for runner_cls in self.RUNNER_CLASSES]






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


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

2018-12-22 Thread carlosgc
Title: [239539] trunk/Source/WebCore








Revision 239539
Author carlo...@webkit.org
Date 2018-12-22 04:33:52 -0800 (Sat, 22 Dec 2018)


Log Message
[HarfBuzz] Width not correctly reported as 0 for zero font size
https://bugs.webkit.org/show_bug.cgi?id=192986

Reviewed by Michael Catanzaro.

Fixes test fast/text/font-size-zero.html

* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
size is zero.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (239538 => 239539)

--- trunk/Source/WebCore/ChangeLog	2018-12-22 07:53:26 UTC (rev 239538)
+++ trunk/Source/WebCore/ChangeLog	2018-12-22 12:33:52 UTC (rev 239539)
@@ -1,3 +1,16 @@
+2018-12-22  Carlos Garcia Campos  
+
+[HarfBuzz] Width not correctly reported as 0 for zero font size
+https://bugs.webkit.org/show_bug.cgi?id=192986
+
+Reviewed by Michael Catanzaro.
+
+Fixes test fast/text/font-size-zero.html
+
+* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
+(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
+size is zero.
+
 2018-12-20  Yusuke Suzuki  
 
 Use Ref<> as much as possible


Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp (239538 => 239539)

--- trunk/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp	2018-12-22 07:53:26 UTC (rev 239538)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp	2018-12-22 12:33:52 UTC (rev 239539)
@@ -156,7 +156,7 @@
 m_coreTextIndices[i] = glyphInfos[i].cluster;
 
 uint16_t glyph = glyphInfos[i].codepoint;
-if (m_font.isZeroWidthSpaceGlyph(glyph)) {
+if (m_font.isZeroWidthSpaceGlyph(glyph) || !m_font.platformData().size()) {
 m_glyphs[i] = glyph;
 m_baseAdvances[i] = { };
 m_glyphOrigins[i] = { };






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