[webkit-changes] [238360] trunk

2018-11-17 Thread wenson_hsieh
Title: [238360] trunk








Revision 238360
Author wenson_hs...@apple.com
Date 2018-11-17 22:17:44 -0800 (Sat, 17 Nov 2018)


Log Message
[iOS] Remove all usages of UIItemProvider, UIItemProviderReading, and related classes
https://bugs.webkit.org/show_bug.cgi?id=191819

Reviewed by Dan Bernstein.

Replace UIItemProvider (and related classes) with NSItemProvider.

Source/WebCore:

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::registerItemToPasteboard):
* platform/ios/WebItemProviderPasteboard.h:
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderDataRegistrar registerItemProvider:]):
(-[WebItemProviderWritableObjectRegistrar initWithObject:]):
(-[WebItemProviderWritableObjectRegistrar representingObject]):
(-[WebItemProviderWritableObjectRegistrar registerItemProvider:]):
(-[WebItemProviderRegistrationInfoList addRepresentingObject:]):
(-[WebItemProviderRegistrationInfoList itemProvider]):
(-[WebItemProviderPasteboard pasteboardTypes]):
(-[WebItemProviderPasteboard _preLoadedDataConformingToType:forItemProviderAtIndex:]):
(-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]):
(allLoadableClasses):
(classForTypeIdentifier):
(-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):
(-[WebItemProviderPasteboard numberOfFiles]):
(-[WebItemProviderPasteboard itemProviderAtIndex:]):
(-[WebItemProviderPasteboard enumerateItemProvidersWithBlock:]):
* platform/mac/DragDataMac.mm:
(WebCore::DragData::containsURL const):

Source/WebCore/PAL:

* pal/spi/ios/UIKitSPI.h:

Source/WebKit:

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
(-[WKContentView dropInteraction:performDrop:]):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(platformCopyPNG):
* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(-[NSItemProvider registerDataRepresentationForTypeIdentifier:withData:]):

Replace usages of this deprecated method with `-registerDataRepresentationForTypeIdentifier:visibility:loadHandler:`.

(checkEstimatedSize):
(checkSuggestedNameAndEstimatedSize):
(TestWebKitAPI::TEST):
(-[UIItemProvider registerDataRepresentationForTypeIdentifier:withData:]): Deleted.
* TestWebKitAPI/cocoa/DragAndDropSimulator.h:
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[MockDragDropSession canLoadObjectsOfClass:]):
(-[MockDragDropSession canLoadObjectsOfClasses:]):
(-[MockDropSession initWithProviders:location:window:allowMove:]):
(-[MockDropSession canCreateItemsOfClass:]):
(-[DragAndDropSimulator _advanceProgress]):
(-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):
(-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
* TestWebKitAPI/ios/UIKitSPI.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h
trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.h
trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm
trunk/Source/WebCore/platform/mac/DragDataMac.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm
trunk/Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm
trunk/Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.h
trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm
trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (238359 => 238360)

--- trunk/Source/WebCore/ChangeLog	2018-11-18 03:14:31 UTC (rev 238359)
+++ trunk/Source/WebCore/ChangeLog	2018-11-18 06:17:44 UTC (rev 238360)
@@ -1,3 +1,34 @@
+2018-11-17  Wenson Hsieh  
+
+[iOS] Remove all usages of UIItemProvider, UIItemProviderReading, and related classes
+https://bugs.webkit.org/show_bug.cgi?id=191819
+
+Reviewed by Dan Bernstein.
+
+Replace UIItemProvider (and related classes) with NSItemProvider.
+
+* platform/ios/PlatformPasteboardIOS.mm:
+(WebCore::registerItemToPasteboard):
+* platform/ios/WebItemProviderPasteboard.h:
+* platform/ios/WebItemProviderPasteboard.mm:
+(-[WebItemProviderDataRegistrar registerItemProvider:]):
+(-[WebItemProviderWritableObjectRegistrar initWithObject:]):
+(-[WebItemProviderWritableObjectRegistrar representingObject]):
+(-[WebItemProviderWritableObjectRegistrar registerItemProvider:]):
+(-[WebItemProviderRegistrationInfoList addRepresentingObject:]):
+(-[WebItemProviderRegistrationInfoList itemProvider]):
+(-[WebItemProviderPasteboard pasteboardTypes]):
+(-[WebItemProviderPasteboard _preLoadedDataConformingToType:forItemProviderAtIndex:]):
+

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

2018-11-17 Thread ross . kirsling
Title: [238359] trunk/Source/WebCore








Revision 238359
Author ross.kirsl...@sony.com
Date 2018-11-17 19:14:31 -0800 (Sat, 17 Nov 2018)


Log Message
Remove superfluous LayoutUnit initializations
https://bugs.webkit.org/show_bug.cgi?id=191791

Reviewed by Simon Fraser.

First step toward making LayoutUnit constructors explicit:
eliminate `= 0` when constructing LayoutUnit lvalues.

* editing/Editor.cpp:
(WebCore::Editor::firstRectForRange const):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::modify):
(WebCore::FrameSelection::lineDirectionPointForBlockDirectionNavigation):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderContainer::computeLogicalHeight const):
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):
* page/SpatialNavigation.cpp:
(WebCore::scrollInDirection):
(WebCore::distanceDataForNode):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::layout):
* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::marginIntrinsicLogicalWidthForChild):
(WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::paintFillLayer):
(WebCore::InlineFlowBox::paintBoxDecorations):
(WebCore::InlineFlowBox::paintMask):
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::marginIntrinsicLogicalWidthForChild const):
(WebCore::RenderBlock::layoutPositionedObject):
(WebCore::RenderBlock::selectionGapRectsForRepaint):
(WebCore::RenderBlock::paintSelection):
(WebCore::RenderBlock::textIndentOffset const):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChildren):
(WebCore::RenderBlockFlow::marginValuesForChild const):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::lowestFloatLogicalBottom const):
(WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom const):
(WebCore::RenderBlockFlow::addOverhangingFloats):
(WebCore::RenderBlockFlow::getClearDelta):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::determineStartPosition):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::fillAvailableMeasure const):
(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing const):
(WebCore::RenderBox::computeLogicalWidthInFragmentUsing const):
(WebCore::RenderBox::computePercentageLogicalHeight const):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing const):
(WebCore::RenderBox::computePositionedLogicalWidthUsing const):
(WebCore::RenderBox::computePositionedLogicalHeightUsing const):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced const):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced const):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computedCSSPadding const):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::marginWidthForChild):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderFragmentedFlow.cpp:
(WebCore::RenderFragmentedFlow::validateFragments):
(WebCore::RenderFragmentedFlow::adjustedPositionRelativeToOffsetParent const):
(WebCore::RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::paint):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::positionListMarker):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting const):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::layoutBlock):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::offsetWidthForColumn const):
(WebCore::RenderTable::offsetHeightForColumn const):
(WebCore::RenderTable::outerBorderBefore const):
(WebCore::RenderTable::outerBorderAfter const):

[webkit-changes] [238358] trunk/Source/WebKit

2018-11-17 Thread ross . kirsling
Title: [238358] trunk/Source/WebKit








Revision 238358
Author ross.kirsl...@sony.com
Date 2018-11-17 17:54:55 -0800 (Sat, 17 Nov 2018)


Log Message
Unreviewed WinCairo build fix for r238353.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (238357 => 238358)

--- trunk/Source/WebKit/ChangeLog	2018-11-18 00:51:42 UTC (rev 238357)
+++ trunk/Source/WebKit/ChangeLog	2018-11-18 01:54:55 UTC (rev 238358)
@@ -1,3 +1,10 @@
+2018-11-17  Ross Kirsling  
+
+Unreviewed WinCairo build fix for r238353.
+
+* UIProcess/WebPageProxy.cpp:
+(WebKit::WebPageProxy::continueNavigationInNewProcess):
+
 2018-11-17  Chris Dumez  
 
 ASSERTION FAILED: m_messageReceivers.contains(...) under ViewGestureController removeMessageReceiver


Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (238357 => 238358)

--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-11-18 00:51:42 UTC (rev 238357)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-11-18 01:54:55 UTC (rev 238358)
@@ -2697,7 +2697,7 @@
 loadRequestWithNavigation(navigation, ResourceRequest { navigation->currentRequest() }, WebCore::ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes, nullptr, ShouldTreatAsContinuingLoad::Yes);
 
 ASSERT(!m_mainFrame);
-m_mainFrameCreationHandler = [this, protectedThis = makeRef(*this), navigation = navigation.copyRef(), request =  navigation->currentRequest(), mainFrameURL, isServerRedirect = navigation->currentRequestIsRedirect()]() mutable {
+m_mainFrameCreationHandler = [this, protectedThis = WTFMove(protectedThis), navigation = navigation.copyRef(), request =  navigation->currentRequest(), mainFrameURL, isServerRedirect = navigation->currentRequestIsRedirect()]() mutable {
 ASSERT(m_mainFrame);
 // Restore the main frame's committed URL as some clients may rely on it until the next load is committed.
 m_mainFrame->frameLoadState().setURL(mainFrameURL);






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


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

2018-11-17 Thread simon . fraser
Title: [238357] trunk/Source/WebCore








Revision 238357
Author simon.fra...@apple.com
Date 2018-11-17 16:51:42 -0800 (Sat, 17 Nov 2018)


Log Message
Avoid triggering compositing updates when only the root layer is composited
https://bugs.webkit.org/show_bug.cgi?id=191813

Reviewed by Zalan Bujtas.

If we know that the only composited layer is the root, we can avoid triggering deep
compositing updates sometimes, for example when layout changes size or position,
or when z-order lists change.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::addChild):
(WebCore::RenderLayer::removeChild):
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::updateCompositingLayersAfterScroll):
(WebCore::outputPaintOrderTreeRecursive):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy): Consult the layer.hasCompositingDescendant()
flag to cut off descendants traversal when possible.
(WebCore::RenderLayerCompositor::layerStyleChanged):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderLayer.cpp
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (238356 => 238357)

--- trunk/Source/WebCore/ChangeLog	2018-11-18 00:25:20 UTC (rev 238356)
+++ trunk/Source/WebCore/ChangeLog	2018-11-18 00:51:42 UTC (rev 238357)
@@ -1,5 +1,28 @@
 2018-11-17  Simon Fraser  
 
+Avoid triggering compositing updates when only the root layer is composited
+https://bugs.webkit.org/show_bug.cgi?id=191813
+
+Reviewed by Zalan Bujtas.
+
+If we know that the only composited layer is the root, we can avoid triggering deep
+compositing updates sometimes, for example when layout changes size or position,
+or when z-order lists change.
+
+* rendering/RenderLayer.cpp:
+(WebCore::RenderLayer::addChild):
+(WebCore::RenderLayer::removeChild):
+(WebCore::RenderLayer::updateLayerPosition):
+(WebCore::RenderLayer::scrollTo):
+(WebCore::RenderLayer::updateCompositingLayersAfterScroll):
+(WebCore::outputPaintOrderTreeRecursive):
+* rendering/RenderLayerCompositor.cpp:
+(WebCore::RenderLayerCompositor::updateBackingAndHierarchy): Consult the layer.hasCompositingDescendant()
+flag to cut off descendants traversal when possible.
+(WebCore::RenderLayerCompositor::layerStyleChanged):
+
+2018-11-17  Simon Fraser  
+
 Fix an error in 238354 - !=, not ==.
 
 Fixes test failures.


Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (238356 => 238357)

--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2018-11-18 00:25:20 UTC (rev 238356)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2018-11-18 00:51:42 UTC (rev 238357)
@@ -405,7 +405,7 @@
 if (child.isSelfPaintingLayer() || child.hasSelfPaintingLayerDescendant())
 setAncestorChainHasSelfPaintingLayerDescendant();
 
-if (compositor().usesCompositing())
+if (compositor().hasContentCompositingLayers())
 setDescendantsNeedCompositingRequirementsTraversal();
 
 if (child.hasDescendantNeedingCompositingRequirementsTraversal() || child.needsCompositingRequirementsTraversal())
@@ -451,7 +451,7 @@
 if (oldChild.isSelfPaintingLayer() || oldChild.hasSelfPaintingLayerDescendant())
 dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
 
-if (compositor().usesCompositing())
+if (compositor().hasContentCompositingLayers())
 setDescendantsNeedCompositingRequirementsTraversal();
 
 #if ENABLE(CSS_COMPOSITING)
@@ -1577,7 +1577,7 @@
 positionOrOffsetChanged |= location() != localPoint;
 setLocation(localPoint);
 
-if (positionOrOffsetChanged && compositor().usesCompositing()) {
+if (positionOrOffsetChanged && compositor().hasContentCompositingLayers()) {
 if (isComposited())
 setNeedsCompositingGeometryUpdate();
 // This layer's position can affect the location of a composited descendant (which may be a sibling in z-order),
@@ -2430,7 +2430,7 @@
 frame.eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseMoveEvent);
 
 bool requiresRepaint = true;
-if (compositor().usesCompositing() && usesCompositedScrolling()) {
+if (usesCompositedScrolling()) {
 setNeedsCompositingGeometryUpdate();
 setDescendantsNeedUpdateBackingAndHierarchyTraversal();
 requiresRepaint = false;
@@ -2580,7 +2580,7 @@
 
 void RenderLayer::updateCompositingLayersAfterScroll()
 {
-if (compositor().usesCompositing()) {
+if (compositor().hasContentCompositingLayers()) {
 // Our stacking container is guaranteed to contain all of our descendants that may need
 // repositioning, so update compositing layers from there.
 if (RenderLayer* compositingAncestor = stackingContext()->enclosingCompositingLayer()) {
@@ -6643,7 +6643,7 @@
 

[webkit-changes] [238356] trunk

2018-11-17 Thread cdumez
Title: [238356] trunk








Revision 238356
Author cdu...@apple.com
Date 2018-11-17 16:25:20 -0800 (Sat, 17 Nov 2018)


Log Message
ASSERTION FAILED: m_messageReceivers.contains(...) under ViewGestureController removeMessageReceiver
https://bugs.webkit.org/show_bug.cgi?id=191734


Reviewed by Ryosuke Niwa.

Source/WebKit:

When a WebProcess crashes, we destroy the ViewGestureController and reconstruct it later
after we've relaunched a new WebProcess. The ViewGestureController controller takes care
of adding itself as an IPC message receiver to the WebProcessProxy, and the destructor
takes care of removing itself as an IPC message receiver.

However, when process-swapping on navigation, we do not destroy the ViewGestureController
because doing so would take down the swipe gesture snapshot on cross-site swipe navigation.
This led to hitting this assertion later on because the ViewGestureController is still
registered as an IPC message receiver with the old process after process swapping.

To address the issue, we now make sure the ViewGestureController unregisters itself from
the old process and registers itself with the new process on process-swap.

* UIProcess/Cocoa/ViewGestureController.cpp:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::~ViewGestureController):
(WebKit::ViewGestureController::disconnectFromProcess):
(WebKit::ViewGestureController::connectToProcess):
* UIProcess/Cocoa/ViewGestureController.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::processWillSwap):
(WebKit::WebViewImpl::didRelaunchProcess):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp
trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (238355 => 238356)

--- trunk/Source/WebKit/ChangeLog	2018-11-17 23:27:24 UTC (rev 238355)
+++ trunk/Source/WebKit/ChangeLog	2018-11-18 00:25:20 UTC (rev 238356)
@@ -1,5 +1,36 @@
 2018-11-17  Chris Dumez  
 
+ASSERTION FAILED: m_messageReceivers.contains(...) under ViewGestureController removeMessageReceiver
+https://bugs.webkit.org/show_bug.cgi?id=191734
+
+
+Reviewed by Ryosuke Niwa.
+
+When a WebProcess crashes, we destroy the ViewGestureController and reconstruct it later
+after we've relaunched a new WebProcess. The ViewGestureController controller takes care
+of adding itself as an IPC message receiver to the WebProcessProxy, and the destructor
+takes care of removing itself as an IPC message receiver.
+
+However, when process-swapping on navigation, we do not destroy the ViewGestureController
+because doing so would take down the swipe gesture snapshot on cross-site swipe navigation.
+This led to hitting this assertion later on because the ViewGestureController is still
+registered as an IPC message receiver with the old process after process swapping.
+
+To address the issue, we now make sure the ViewGestureController unregisters itself from
+the old process and registers itself with the new process on process-swap.
+
+* UIProcess/Cocoa/ViewGestureController.cpp:
+(WebKit::ViewGestureController::ViewGestureController):
+(WebKit::ViewGestureController::~ViewGestureController):
+(WebKit::ViewGestureController::disconnectFromProcess):
+(WebKit::ViewGestureController::connectToProcess):
+* UIProcess/Cocoa/ViewGestureController.h:
+* UIProcess/Cocoa/WebViewImpl.mm:
+(WebKit::WebViewImpl::processWillSwap):
+(WebKit::WebViewImpl::didRelaunchProcess):
+
+2018-11-17  Chris Dumez  
+
 [PSON] ASSERTION FAILED: m_uncommittedState.state == State::Committed
 https://bugs.webkit.org/show_bug.cgi?id=191781
 


Modified: trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp (238355 => 238356)

--- trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp	2018-11-17 23:27:24 UTC (rev 238355)
+++ trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp	2018-11-18 00:25:20 UTC (rev 238356)
@@ -63,7 +63,7 @@
 , m_pendingSwipeTracker(webPageProxy, *this)
 #endif
 {
-m_webPageProxy.process().addMessageReceiver(Messages::ViewGestureController::messageReceiverName(), m_webPageProxy.pageID(), *this);
+connectToProcess();
 
 viewGestureControllersForAllPages().add(webPageProxy.pageID(), this);
 }
@@ -74,9 +74,27 @@
 
 viewGestureControllersForAllPages().remove(m_webPageProxy.pageID());
 
+disconnectFromProcess();
+}
+
+void ViewGestureController::disconnectFromProcess()
+{
+if (!m_isConnectedToProcess)
+return;
+
 

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

2018-11-17 Thread simon . fraser
Title: [238355] trunk/Source/WebCore








Revision 238355
Author simon.fra...@apple.com
Date 2018-11-17 15:27:24 -0800 (Sat, 17 Nov 2018)


Log Message
Fix an error in 238354 - !=, not ==.

Fixes test failures.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerBecameNonComposited):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (238354 => 238355)

--- trunk/Source/WebCore/ChangeLog	2018-11-17 22:12:30 UTC (rev 238354)
+++ trunk/Source/WebCore/ChangeLog	2018-11-17 23:27:24 UTC (rev 238355)
@@ -1,5 +1,14 @@
 2018-11-17  Simon Fraser  
 
+Fix an error in 238354 - !=, not ==.
+
+Fixes test failures.
+
+* rendering/RenderLayerCompositor.cpp:
+(WebCore::RenderLayerCompositor::layerBecameNonComposited):
+
+2018-11-17  Simon Fraser  
+
 Clarify RenderLayerCompositor::hasAnyAdditionalCompositedLayers() and related code.
 https://bugs.webkit.org/show_bug.cgi?id=191810
 


Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (238354 => 238355)

--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-11-17 22:12:30 UTC (rev 238354)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-11-17 23:27:24 UTC (rev 238355)
@@ -1251,7 +1251,7 @@
 // FIXME: "destroyed" is a misnomer.
 InspectorInstrumentation::renderLayerDestroyed((), layer);
 
-if ( == m_renderView.layer()) {
+if ( != m_renderView.layer()) {
 ASSERT(m_contentLayersCount > 0);
 --m_contentLayersCount;
 }






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


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

2018-11-17 Thread simon . fraser
Title: [238354] trunk/Source/WebCore








Revision 238354
Author simon.fra...@apple.com
Date 2018-11-17 14:12:30 -0800 (Sat, 17 Nov 2018)


Log Message
Clarify RenderLayerCompositor::hasAnyAdditionalCompositedLayers() and related code.
https://bugs.webkit.org/show_bug.cgi?id=191810

Reviewed by Zalan Bujtas.

Rename m_compositedLayerCount to m_contentLayersCount and have it track layers other
than the RenderView's layer.

hasAnyAdditionalCompositedLayers() is really about whether we can drop out of compositing
because no content layer is composited, and overlays don't require compositing, so
rename it.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::needsCompositingForContentOrOverlays const):
(WebCore::RenderLayerCompositor::layerBecameComposited):
(WebCore::RenderLayerCompositor::layerBecameNonComposited):
(WebCore::RenderLayerCompositor::layerTreeAsText):
(WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers const): Deleted.
* rendering/RenderLayerCompositor.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
trunk/Source/WebCore/rendering/RenderLayerCompositor.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (238353 => 238354)

--- trunk/Source/WebCore/ChangeLog	2018-11-17 22:06:56 UTC (rev 238353)
+++ trunk/Source/WebCore/ChangeLog	2018-11-17 22:12:30 UTC (rev 238354)
@@ -1,5 +1,29 @@
 2018-11-17  Simon Fraser  
 
+Clarify RenderLayerCompositor::hasAnyAdditionalCompositedLayers() and related code.
+https://bugs.webkit.org/show_bug.cgi?id=191810
+
+Reviewed by Zalan Bujtas.
+
+Rename m_compositedLayerCount to m_contentLayersCount and have it track layers other
+than the RenderView's layer.
+
+hasAnyAdditionalCompositedLayers() is really about whether we can drop out of compositing
+because no content layer is composited, and overlays don't require compositing, so
+rename it.
+
+* rendering/RenderLayerCompositor.cpp:
+(WebCore::RenderLayerCompositor::updateCompositingLayers):
+(WebCore::RenderLayerCompositor::computeCompositingRequirements):
+(WebCore::RenderLayerCompositor::needsCompositingForContentOrOverlays const):
+(WebCore::RenderLayerCompositor::layerBecameComposited):
+(WebCore::RenderLayerCompositor::layerBecameNonComposited):
+(WebCore::RenderLayerCompositor::layerTreeAsText):
+(WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers const): Deleted.
+* rendering/RenderLayerCompositor.h:
+
+2018-11-17  Simon Fraser  
+
 Rename RenderLayerCompositor::inCompositingMode() to usesCompositing()
 https://bugs.webkit.org/show_bug.cgi?id=191808
 


Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (238353 => 238354)

--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-11-17 22:06:56 UTC (rev 238353)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-11-17 22:12:30 UTC (rev 238354)
@@ -632,12 +632,6 @@
 updateCompositingLayers(CompositingUpdateType::AfterLayout);
 }
 
-bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer& rootLayer) const
-{
-int layerCount = m_compositedLayerCount + page().pageOverlayController().overlayCount();
-return layerCount > (rootLayer.isComposited() ? 1 : 0);
-}
-
 void RenderLayerCompositor::cancelCompositingLayerUpdate()
 {
 m_updateCompositingLayersTimer.stop();
@@ -646,7 +640,7 @@
 // Returns true on a successful update.
 bool RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType updateType, RenderLayer* updateRoot)
 {
-LOG_WITH_STREAM(Compositing, stream << "RenderLayerCompositor " << this << " updateCompositingLayers " << updateType << " root " << updateRoot);
+LOG_WITH_STREAM(Compositing, stream << "RenderLayerCompositor " << this << " updateCompositingLayers " << updateType << " contentLayersCount " << m_contentLayersCount);
 
 #if ENABLE(TREE_DEBUGGING)
 if (compositingLogEnabled())
@@ -739,7 +733,7 @@
 appendDocumentOverlayLayers(childList);
 // Even when childList is empty, don't drop out of compositing mode if there are
 // composited layers that we didn't hit in our traversal (e.g. because of visibility:hidden).
-if (childList.isEmpty() && !hasAnyAdditionalCompositedLayers(*updateRoot))
+if (childList.isEmpty() && !needsCompositingForContentOrOverlays())
 destroyRootLayer();
 else if (m_rootContentLayer)
 m_rootContentLayer->setChildren(WTFMove(childList));
@@ -766,7 +760,7 @@
 if (compositingLogEnabled()) {
 LOG(Compositing, "RenderLayerCompositor::updateCompositingLayers - post");
 showPaintOrderTree(m_renderView.layer());
-

[webkit-changes] [238353] trunk/Source/WebKit

2018-11-17 Thread cdumez
Title: [238353] trunk/Source/WebKit








Revision 238353
Author cdu...@apple.com
Date 2018-11-17 14:06:56 -0800 (Sat, 17 Nov 2018)


Log Message
[PSON] ASSERTION FAILED: m_uncommittedState.state == State::Committed
https://bugs.webkit.org/show_bug.cgi?id=191781

Reviewed by Ryosuke Niwa.

The crash was happening when switching to a suspended page that is not yet done
suspending (e.g. in case of very fast back/forward navigation). The WebPageProxy
would reattach to the suspended process and get load notifications that it did
not expect since it did not schedule any load yet. Those notifications are for
the about:blank load we do for page suspension.

To address the issue, make swapToWebProcess() asynchronous and take a completion
handler. When we try to unsuspend a SuspendedPageProxy, we first make sure it
is actually done suspending. If it is not done suspending, we wait until it is
before telling in to unsuspend and proceeding with the new load.

* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::unsuspend):
(WebKit::SuspendedPageProxy::didFinishLoad):
* UIProcess/SuspendedPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::swapToWebProcess):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
* UIProcess/WebPageProxy.h:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/SuspendedPageProxy.cpp
trunk/Source/WebKit/UIProcess/SuspendedPageProxy.h
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
trunk/Source/WebKit/UIProcess/WebPageProxy.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (238352 => 238353)

--- trunk/Source/WebKit/ChangeLog	2018-11-17 22:01:15 UTC (rev 238352)
+++ trunk/Source/WebKit/ChangeLog	2018-11-17 22:06:56 UTC (rev 238353)
@@ -1,5 +1,32 @@
 2018-11-17  Chris Dumez  
 
+[PSON] ASSERTION FAILED: m_uncommittedState.state == State::Committed
+https://bugs.webkit.org/show_bug.cgi?id=191781
+
+Reviewed by Ryosuke Niwa.
+
+The crash was happening when switching to a suspended page that is not yet done
+suspending (e.g. in case of very fast back/forward navigation). The WebPageProxy
+would reattach to the suspended process and get load notifications that it did
+not expect since it did not schedule any load yet. Those notifications are for
+the about:blank load we do for page suspension.
+
+To address the issue, make swapToWebProcess() asynchronous and take a completion
+handler. When we try to unsuspend a SuspendedPageProxy, we first make sure it
+is actually done suspending. If it is not done suspending, we wait until it is
+before telling in to unsuspend and proceeding with the new load.
+
+* UIProcess/SuspendedPageProxy.cpp:
+(WebKit::SuspendedPageProxy::unsuspend):
+(WebKit::SuspendedPageProxy::didFinishLoad):
+* UIProcess/SuspendedPageProxy.h:
+* UIProcess/WebPageProxy.cpp:
+(WebKit::WebPageProxy::swapToWebProcess):
+(WebKit::WebPageProxy::continueNavigationInNewProcess):
+* UIProcess/WebPageProxy.h:
+
+2018-11-17  Chris Dumez  
+
 Unreviewed follow-up to r238343 to address debug assertions in 2 API tests.
 
 * UIProcess/Network/NetworkProcessProxy.cpp:


Modified: trunk/Source/WebKit/UIProcess/SuspendedPageProxy.cpp (238352 => 238353)

--- trunk/Source/WebKit/UIProcess/SuspendedPageProxy.cpp	2018-11-17 22:01:15 UTC (rev 238352)
+++ trunk/Source/WebKit/UIProcess/SuspendedPageProxy.cpp	2018-11-17 22:06:56 UTC (rev 238353)
@@ -103,13 +103,22 @@
 });
 }
 
-void SuspendedPageProxy::unsuspend()
+void SuspendedPageProxy::unsuspend(CompletionHandler&& completionHandler)
 {
 ASSERT(m_isSuspended);
 
-m_isSuspended = false;
-m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_page.pageID());
-m_process->send(Messages::WebPage::SetIsSuspended(false), m_page.pageID());
+auto doUnsuspend = [this, completionHandler = WTFMove(completionHandler)]() mutable {
+m_isSuspended = false;
+m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_page.pageID());
+m_process->send(Messages::WebPage::SetIsSuspended(false), m_page.pageID());
+completionHandler();
+};
+
+if (!m_finishedSuspending) {
+ASSERT(!m_finishedSuspendingHandler);
+m_finishedSuspendingHandler = WTFMove(doUnsuspend);
+} else
+doUnsuspend();
 }
 
 void SuspendedPageProxy::didFinishLoad()
@@ -116,11 +125,12 @@
 {
 LOG(ProcessSwapping, "SuspendedPageProxy %s from process %i finished transition to suspended", loggingString(), m_process->processIdentifier());
 
-#if !LOG_DISABLED
 m_finishedSuspending = true;
-#endif
 
 m_process->send(Messages::WebProcess::UpdateActivePages(), 0);
+
+if (auto finishedSuspendingHandler = WTFMove(m_finishedSuspendingHandler))
+finishedSuspendingHandler();
 }
 
 void 

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

2018-11-17 Thread simon . fraser
Title: [238352] trunk/Source/WebCore








Revision 238352
Author simon.fra...@apple.com
Date 2018-11-17 14:01:15 -0800 (Sat, 17 Nov 2018)


Log Message
Rename RenderLayerCompositor::inCompositingMode() to usesCompositing()
https://bugs.webkit.org/show_bug.cgi?id=191808

Reviewed by Zalan Bujtas.

Other code uses "usesCompositing" so standardize on that (future changes will make
"compositing mode" more ambiguous). Also remove a FrameView function that only
had one caller.

* page/FrameView.cpp:
(WebCore::FrameView::clearBackingStores):
(WebCore::FrameView::handleDeferredScrollbarsUpdateAfterDirectionChange):
(WebCore::FrameView::delegatesScrollingDidChange):
(WebCore::FrameView::hasCompositedContent const): Deleted.
* page/FrameView.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::addChild):
(WebCore::RenderLayer::removeChild):
(WebCore::RenderLayer::rebuildZOrderLists):
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::updateCompositingLayersAfterScroll):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingPolicy):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::layerStyleChanged):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::parentFrameContentLayers):
(WebCore::RenderLayerCompositor::setIsInWindow):
(WebCore::RenderLayerCompositor::needsToBeComposited const):
(WebCore::RenderLayerCompositor::reasonsForCompositing const):
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
(WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
(WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
* rendering/RenderLayerCompositor.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewAndCompositedLayers):
(WebCore::RenderView::usesCompositing const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/FrameView.cpp
trunk/Source/WebCore/page/FrameView.h
trunk/Source/WebCore/rendering/RenderLayer.cpp
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
trunk/Source/WebCore/rendering/RenderView.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (238351 => 238352)

--- trunk/Source/WebCore/ChangeLog	2018-11-17 20:04:40 UTC (rev 238351)
+++ trunk/Source/WebCore/ChangeLog	2018-11-17 22:01:15 UTC (rev 238352)
@@ -1,3 +1,44 @@
+2018-11-17  Simon Fraser  
+
+Rename RenderLayerCompositor::inCompositingMode() to usesCompositing()
+https://bugs.webkit.org/show_bug.cgi?id=191808
+
+Reviewed by Zalan Bujtas.
+
+Other code uses "usesCompositing" so standardize on that (future changes will make
+"compositing mode" more ambiguous). Also remove a FrameView function that only
+had one caller.
+
+* page/FrameView.cpp:
+(WebCore::FrameView::clearBackingStores):
+(WebCore::FrameView::handleDeferredScrollbarsUpdateAfterDirectionChange):
+(WebCore::FrameView::delegatesScrollingDidChange):
+(WebCore::FrameView::hasCompositedContent const): Deleted.
+* page/FrameView.h:
+* rendering/RenderLayer.cpp:
+(WebCore::RenderLayer::addChild):
+(WebCore::RenderLayer::removeChild):
+(WebCore::RenderLayer::rebuildZOrderLists):
+(WebCore::RenderLayer::updateLayerPosition):
+(WebCore::RenderLayer::scrollTo):
+(WebCore::RenderLayer::updateCompositingLayersAfterScroll):
+* rendering/RenderLayerCompositor.cpp:
+(WebCore::RenderLayerCompositor::updateCompositingPolicy):
+(WebCore::RenderLayerCompositor::computeCompositingRequirements):
+(WebCore::RenderLayerCompositor::layerStyleChanged):
+(WebCore::RenderLayerCompositor::updateBacking):
+(WebCore::RenderLayerCompositor::parentFrameContentLayers):
+(WebCore::RenderLayerCompositor::setIsInWindow):
+(WebCore::RenderLayerCompositor::needsToBeComposited const):
+(WebCore::RenderLayerCompositor::reasonsForCompositing const):
+(WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
+(WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
+(WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
+* rendering/RenderLayerCompositor.h:
+* rendering/RenderView.cpp:
+(WebCore::RenderView::repaintViewAndCompositedLayers):
+(WebCore::RenderView::usesCompositing const):
+
 2018-11-17  Devin Rousso  
 
 Web Inspector: Network: add button to show system certificate dialog


Modified: trunk/Source/WebCore/page/FrameView.cpp (238351 => 238352)

--- trunk/Source/WebCore/page/FrameView.cpp	2018-11-17 20:04:40 UTC (rev 238351)
+++ trunk/Source/WebCore/page/FrameView.cpp	2018-11-17 22:01:15 UTC (rev 238352)
@@ -850,18 +850,6 @@
 

[webkit-changes] [238351] trunk/Source/WebKit

2018-11-17 Thread cdumez
Title: [238351] trunk/Source/WebKit








Revision 238351
Author cdu...@apple.com
Date 2018-11-17 12:04:40 -0800 (Sat, 17 Nov 2018)


Log Message
Unreviewed follow-up to r238343 to address debug assertions in 2 API tests.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::networkProcessCrashed):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (238350 => 238351)

--- trunk/Source/WebKit/ChangeLog	2018-11-17 18:27:42 UTC (rev 238350)
+++ trunk/Source/WebKit/ChangeLog	2018-11-17 20:04:40 UTC (rev 238351)
@@ -1,3 +1,10 @@
+2018-11-17  Chris Dumez  
+
+Unreviewed follow-up to r238343 to address debug assertions in 2 API tests.
+
+* UIProcess/Network/NetworkProcessProxy.cpp:
+(WebKit::NetworkProcessProxy::networkProcessCrashed):
+
 2018-11-17  Devin Rousso  
 
 Web Inspector: Network: add button to show system certificate dialog


Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (238350 => 238351)

--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp	2018-11-17 18:27:42 UTC (rev 238350)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp	2018-11-17 20:04:40 UTC (rev 238351)
@@ -214,6 +214,7 @@
 else
 reply.second({ });
 }
+m_pendingConnectionReplies.clear();
 
 // Tell the network process manager to forget about this network process proxy. This will cause us to be deleted.
 m_processPool.networkProcessCrashed(*this, WTFMove(pendingReplies));






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


[webkit-changes] [238350] trunk

2018-11-17 Thread drousso
Title: [238350] trunk








Revision 238350
Author drou...@apple.com
Date 2018-11-17 10:27:42 -0800 (Sat, 17 Nov 2018)


Log Message
Web Inspector: Network: add button to show system certificate dialog
https://bugs.webkit.org/show_bug.cgi?id=191458


Reviewed by Joseph Pecoraro.

Source/_javascript_Core:

* inspector/protocol/Network.json:
Add `getSerializedCertificate` command.

Source/WebCore:

Test: http/tests/inspector/network/getSerializedCertificate.html

* inspector/agents/InspectorNetworkAgent.h:
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::getSerializedCertificate): Added.

* inspector/InspectorFrontendHost.idl:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::supportsShowCertificate): Added.
(WebCore::InspectorFrontendHost::showCertificate): Added.
* inspector/InspectorFrontendClient.h:
(InspectorFrontendClient::showCertificate): Added.
* testing/Internals.cpp:
(InspectorStubFrontend::showCertificate): Added.

* platform/network/cf/CertificateInfo.h:
(WTF::Persistence::encodeCFData): Added.
(WTF::Persistence::decodeCFData): Added.
(WTF::Persistence::encodeSecTrustRef): Added.
(WTF::Persistence::decodeSecTrustRef): Added.
(WTF::Persistence::encodeCertificateChain): Added.
(WTF::Persistence::decodeCertificateChain): Added.
(WTF::Persistence::Coder::encode): Added.
(WTF::Persistence::Coder::decode): Added.
* platform/network/cf/CertificateInfoCFNet.cpp:
* platform/network/cocoa/CertificateInfoCocoa.mm:

* platform/network/curl/CertificateInfo.h:
(WTF::Persistence::Coder::encode): Added.
(WTF::Persistence::Coder::decode): Added.

* platform/network/soup/CertificateInfo.h:
(WTF::Persistence::Coder>::encode): Added.
(WTF::Persistence::Coder>::decode): Added.
(WTF::Persistence::certificatesDataListFromCertificateInfo): Added.
(WTF::Persistence::certificateFromCertificatesDataList): Added.
(WTF::Persistence::Coder::encode): Added.
(WTF::Persistence::Coder::decode): Added.

Source/WebInspectorUI:

* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.supportsShowCertificate): Added.

* UserInterface/Models/Resource.js:
(WI.Resource.prototype.showCertificate): Added.

* UserInterface/Views/ResourceSecurityContentView.js:
(WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
* UserInterface/Views/ResourceSecurityContentView.css:
(.resource-security .details > .show-certificate > .key): Added.
(.resource-security .details > .show-certificate > .key > .error): Added.

* Localizations/en.lproj/localizedStrings.js:

Source/WebKit:

* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::showCertificate): Added.
(WebKit::WebInspectorProxy::platformShowCertificate): Added.
* UIProcess/mac/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformShowCertificate): Added.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformShowCertificate): Added.
* UIProcess/mac/WebInspectorProxyWPE.cpp:
(WebKit::WebInspectorProxy::platformShowCertificate): Added.
* UIProcess/mac/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformShowCertificate): Added.
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::showCertificate): Added.

* UIProcess/RemoteWebInspectorProxy.messages.in:
* UIProcess/RemoteWebInspectorProxy.h:
* UIProcess/RemoteWebInspectorProxy.cpp:
(WebKit::RemoteWebInspectorProxy::showCertificate): Added.
(WebKit::RemoteWebInspectorProxy::platformShowCertificate): Added.
* UIProcess/mac/RemoteWebInspectorProxyGtk.cpp:
(WebKit::RemoteWebInspectorProxy::platformShowCertificate): Added.
* UIProcess/mac/RemoteWebInspectorProxyMac.mm:
(WebKit::RemoteWebInspectorProxy::platformShowCertificate): Added.
* WebProcess/WebPage/RemoteWebInspectorUI.h:
* WebProcess/WebPage/RemoteWebInspectorUI.cpp:
(WebKit::RemoteWebInspectorUI::showCertificate): Added.

* NetworkProcess/cache/NetworkCacheCoders.h:
* NetworkProcess/cache/NetworkCacheCodersCocoa.cpp: Removed.
* NetworkProcess/cache/NetworkCacheCodersCurl.cpp: Removed.
* NetworkProcess/cache/NetworkCacheCodersSoup.cpp: Removed.
Moved `WebCore::CertificateInfo` code for `WTF::Encoder` and `WTF::Decoder` into their
respective platform's CertificateInfo.h file.

* UIProcess/Authentication/mac/WebCredentialMac.mm:

* Configurations/WebKit.xcconfig:
* PlatformMac.cmake:
* PlatformWin.cmake:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
* WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy:

* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorFrontendClient::showCertificate): Added.

Source/WebKitLegacy/mac:

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::showCertificate): Added.

* Configurations/WebKitLegacy.xcconfig:

Source/WebKitLegacy/win:

* WebCoreSupport/WebInspectorClient.h:
* 

[webkit-changes] [238349] trunk

2018-11-17 Thread zalan
Title: [238349] trunk








Revision 238349
Author za...@apple.com
Date 2018-11-17 08:11:24 -0800 (Sat, 17 Nov 2018)


Log Message
[LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules.
https://bugs.webkit.org/show_bug.cgi?id=191801

Reviewed by Antti Koivisto.

Source/WebCore:

beforepositionedafter
In the example above the  inline box has both the BreakAtStart and the BreakAtEnd rules.
While walking through the inline tree, we add BreakAtStart first and when we figure it's the last child too,
we add BreakAtEnd as well. BreakAtEnd should not clear the BreakAtStart rule.

Test: fast/inline/simple-inline-with-out-of-flow-descendant2.html

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
* layout/inlineformatting/InlineFormattingState.cpp:
(WebCore::Layout::InlineFormattingState::addDetachingRule):
* layout/inlineformatting/InlineFormattingState.h:
(WebCore::Layout::InlineFormattingState::addDetachingRule): Deleted.

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

* fast/inline/simple-inline-with-out-of-flow-descendant2-expected.txt: Added.
* fast/inline/simple-inline-with-out-of-flow-descendant2.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.h
trunk/Tools/ChangeLog
trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt


Added Paths

trunk/LayoutTests/fast/inline/simple-inline-with-out-of-flow-descendant2-expected.txt
trunk/LayoutTests/fast/inline/simple-inline-with-out-of-flow-descendant2.html




Diff

Modified: trunk/LayoutTests/ChangeLog (238348 => 238349)

--- trunk/LayoutTests/ChangeLog	2018-11-17 15:13:07 UTC (rev 238348)
+++ trunk/LayoutTests/ChangeLog	2018-11-17 16:11:24 UTC (rev 238349)
@@ -1,3 +1,13 @@
+2018-11-17  Zalan Bujtas  
+
+[LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules.
+https://bugs.webkit.org/show_bug.cgi?id=191801
+
+Reviewed by Antti Koivisto.
+
+* fast/inline/simple-inline-with-out-of-flow-descendant2-expected.txt: Added.
+* fast/inline/simple-inline-with-out-of-flow-descendant2.html: Added.
+
 2018-11-17  Jonathan Hammer  
 
 Caret stops blinking after context menu shown


Added: trunk/LayoutTests/fast/inline/simple-inline-with-out-of-flow-descendant2-expected.txt (0 => 238349)

--- trunk/LayoutTests/fast/inline/simple-inline-with-out-of-flow-descendant2-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/inline/simple-inline-with-out-of-flow-descendant2-expected.txt	2018-11-17 16:11:24 UTC (rev 238349)
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+RenderBody {BODY} at (8,8) size 784x584
+layer at (8,8) size 202x202 clip at (9,9) size 200x200
+  RenderBlock {DIV} at (0,0) size 202x202 [border: (1px solid #008000)]
+RenderText {#text} at (1,1) size 31x14
+  text run at (1,1) width 31: "before"
+RenderText {#text} at (62,1) size 23x14
+  text run at (62,1) width 23: "after"
+layer at (108,108) size 32x14
+  RenderInline (relative positioned) {SPAN} at (0,0) size 32x14
+RenderText {#text} at (31,1) size 32x14
+  text run at (31,1) width 32: "nested"


Added: trunk/LayoutTests/fast/inline/simple-inline-with-out-of-flow-descendant2.html (0 => 238349)

--- trunk/LayoutTests/fast/inline/simple-inline-with-out-of-flow-descendant2.html	(rev 0)
+++ trunk/LayoutTests/fast/inline/simple-inline-with-out-of-flow-descendant2.html	2018-11-17 16:11:24 UTC (rev 238349)
@@ -0,0 +1,17 @@
+
+.inlineRoot {
+	border: 1px solid green;
+	width: 200px;
+	height: 200px;
+	overflow: hidden;
+	font-size: 12px;
+}
+
+.blockRoot {
+	position: relative;
+	top: 100px;
+	left: 100px;
+}
+
+
+beforenestedafter


Modified: trunk/Source/WebCore/ChangeLog (238348 => 238349)

--- trunk/Source/WebCore/ChangeLog	2018-11-17 15:13:07 UTC (rev 238348)
+++ trunk/Source/WebCore/ChangeLog	2018-11-17 16:11:24 UTC (rev 238349)
@@ -1,3 +1,24 @@
+2018-11-17  Zalan Bujtas  
+
+[LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules.
+https://bugs.webkit.org/show_bug.cgi?id=191801
+
+Reviewed by Antti Koivisto.
+
+beforepositionedafter
+In the example above the  inline box has both the BreakAtStart and the BreakAtEnd rules.
+While walking through the inline tree, we add BreakAtStart first and when we figure it's the last child too,
+we add BreakAtEnd as well. BreakAtEnd should not clear the BreakAtStart rule.
+
+Test: fast/inline/simple-inline-with-out-of-flow-descendant2.html
+
+* 

[webkit-changes] [238348] trunk/Tools

2018-11-17 Thread jer . noble
Title: [238348] trunk/Tools








Revision 238348
Author jer.no...@apple.com
Date 2018-11-17 07:13:07 -0800 (Sat, 17 Nov 2018)


Log Message
Regression(r233865): Causes synchronous IPC in the middle of layout
https://bugs.webkit.org/show_bug.cgi?id=188307


Reviewed by Eric Carlson.

Follow-up test fix for r238322:

In ExitFullscreenOnEnterPiP.ElementFullScreen, explicitly make the video
element in element fullscreen the "main content" by playing the video during
a user gesture; only "main content" videos will cause fullscreen mode to exit
when that element is taken into PiP.

In FullscreenZoomInitialFrame.WebKit, the WebView is not visible, so the Page
is considered hidden, and fullscreen is not allowed when the WebView is hidden.
Make the WebView visible by ordering the test window on-screen.

* TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html:
* TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm:
(TestWebKitAPI::FullscreenZoomInitialFrame::runTest):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm
trunk/Tools/TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm




Diff

Modified: trunk/Tools/ChangeLog (238347 => 238348)

--- trunk/Tools/ChangeLog	2018-11-17 11:01:12 UTC (rev 238347)
+++ trunk/Tools/ChangeLog	2018-11-17 15:13:07 UTC (rev 238348)
@@ -1,3 +1,28 @@
+2018-11-17  Jer Noble  
+
+Regression(r233865): Causes synchronous IPC in the middle of layout
+https://bugs.webkit.org/show_bug.cgi?id=188307
+
+
+Reviewed by Eric Carlson.
+
+Follow-up test fix for r238322:
+
+In ExitFullscreenOnEnterPiP.ElementFullScreen, explicitly make the video
+element in element fullscreen the "main content" by playing the video during
+a user gesture; only "main content" videos will cause fullscreen mode to exit
+when that element is taken into PiP.
+
+In FullscreenZoomInitialFrame.WebKit, the WebView is not visible, so the Page
+is considered hidden, and fullscreen is not allowed when the WebView is hidden.
+Make the WebView visible by ordering the test window on-screen.
+
+* TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html:
+* TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm:
+(TestWebKitAPI::TEST):
+* TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm:
+(TestWebKitAPI::FullscreenZoomInitialFrame::runTest):
+
 2018-11-16  Alex Christensen  
 
 Tweak _showSafeBrowsingWarningWithTitle SPI


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html (238347 => 238348)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html	2018-11-17 11:01:12 UTC (rev 238347)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html	2018-11-17 15:13:07 UTC (rev 238348)
@@ -1,12 +1,23 @@
 
 
 
+
+window.addEventListener('load', event => {
+let video = document.querySelector('video');
+video.addEventListener('playing', event => {
+try {
+window.webkit.messageHandlers.testHandler.postMessage('playing');
+} catch (e) { }
+});
+}, {once: true});
+
 
 enter video fullscreen
 enter element fullscreen
 enter pip
 exit pip
-
+play video
+
 
 
 


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm (238347 => 238348)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm	2018-11-17 11:01:12 UTC (rev 238347)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm	2018-11-17 15:13:07 UTC (rev 238348)
@@ -114,6 +114,12 @@
 TestWebKitAPI::Util::run();
 ASSERT_TRUE(didEnterFullscreen);
 
+// Make the video the "main content" by playing with a user gesture.
+__block bool didBeginPlaying = false;
+[webView performAfterReceivingMessage:@"playing" action:^{ didBeginPlaying = true; }];
+[webView evaluateJavaScript:@"document.getElementById('play').click()" completionHandler:nil];
+TestWebKitAPI::Util::run();
+
 didEnterPiP = false;
 didExitFullscreen = false;
 [webView evaluateJavaScript:@"document.getElementById('enter-pip').click()" completionHandler: nil];


Modified: trunk/Tools/TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm (238347 => 238348)

--- trunk/Tools/TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm	2018-11-17 11:01:12 UTC (rev 238347)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm	2018-11-17 15:13:07 UTC (rev 238348)
@@ -156,6 +156,7 @@
 {
 RetainPtr window = adoptNS([[NSWindow alloc] initWithContentRect:view.frame styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO]);
 [window.get().contentView 

[webkit-changes] [238347] releases/WebKitGTK/webkit-2.22/Source/WebCore

2018-11-17 Thread aperez
Title: [238347] releases/WebKitGTK/webkit-2.22/Source/WebCore








Revision 238347
Author ape...@igalia.com
Date 2018-11-17 03:01:12 -0800 (Sat, 17 Nov 2018)


Log Message
Merged r237487 - Fix release build with -DLOG_DISABLED=0
https://bugs.webkit.org/show_bug.cgi?id=190866

Reviewed by Xabier Rodriguez-Calvar.

No new tests since no functionality changed.

* platform/graphics/Font.cpp:
* platform/graphics/Font.h:
* platform/graphics/FontPlatformData.h:
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
* platform/graphics/win/FontPlatformDataWin.cpp:

Modified Paths

releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog
releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/Font.cpp
releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/Font.h
releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/FontPlatformData.h
releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp
releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp




Diff

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (238346 => 238347)

--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-11-17 10:33:14 UTC (rev 238346)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-11-17 11:01:12 UTC (rev 238347)
@@ -1,3 +1,19 @@
+2018-10-27  Charlie Turner  
+
+Fix release build with -DLOG_DISABLED=0
+https://bugs.webkit.org/show_bug.cgi?id=190866
+
+Reviewed by Xabier Rodriguez-Calvar.
+
+No new tests since no functionality changed.
+
+* platform/graphics/Font.cpp:
+* platform/graphics/Font.h:
+* platform/graphics/FontPlatformData.h:
+* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
+* platform/graphics/win/FontPlatformDataWin.cpp:
+
 2018-11-16  Jer Noble  
 
 An early return from updateSchedulingInfo can leave some variables uninitialized.


Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/Font.cpp (238346 => 238347)

--- releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/Font.cpp	2018-11-17 10:33:14 UTC (rev 238346)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/Font.cpp	2018-11-17 11:01:12 UTC (rev 238347)
@@ -454,7 +454,7 @@
 return *derivedFontData.brokenIdeographFont;
 }
 
-#ifndef NDEBUG
+#if !LOG_DISABLED
 String Font::description() const
 {
 if (origin() == Origin::Remote)


Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/Font.h (238346 => 238347)

--- releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/Font.h	2018-11-17 10:33:14 UTC (rev 238346)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/Font.h	2018-11-17 11:01:12 UTC (rev 238347)
@@ -185,7 +185,7 @@
 bool isInterstitial() const { return m_isInterstitial; }
 Visibility visibility() const { return m_visibility; }
 
-#ifndef NDEBUG
+#if !LOG_DISABLED
 String description() const;
 #endif
 


Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/FontPlatformData.h (238346 => 238347)

--- releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/FontPlatformData.h	2018-11-17 10:33:14 UTC (rev 238346)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/FontPlatformData.h	2018-11-17 11:01:12 UTC (rev 238347)
@@ -199,7 +199,7 @@
 RefPtr openTypeTable(uint32_t table) const;
 #endif
 
-#ifndef NDEBUG
+#if !LOG_DISABLED
 String description() const;
 #endif
 


Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm (238346 => 238347)

--- releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm	2018-11-17 10:33:14 UTC (rev 238346)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm	2018-11-17 11:01:12 UTC (rev 238347)
@@ -196,7 +196,7 @@
 return nullptr;
 }
 
-#ifndef NDEBUG
+#if !LOG_DISABLED
 String FontPlatformData::description() const
 {
 auto fontDescription = adoptCF(CFCopyDescription(font()));


Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp (238346 => 238347)

--- releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp	2018-11-17 10:33:14 UTC (rev 238346)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp	2018-11-17 11:01:12 UTC (rev 238347)
@@ -265,7 +265,7 @@
 return m_scaledFont == other.m_scaledFont;
 }
 
-#ifndef NDEBUG
+#if !LOG_DISABLED
 String FontPlatformData::description() const
 {
 return String();


Modified: 

[webkit-changes] [238345] trunk

2018-11-17 Thread commit-queue
Title: [238345] trunk








Revision 238345
Author commit-qu...@webkit.org
Date 2018-11-17 02:04:51 -0800 (Sat, 17 Nov 2018)


Log Message
Caret stops blinking after context menu shown
https://bugs.webkit.org/show_bug.cgi?id=191715

Patch by Jonathan Hammer  on 2018-11-17
Reviewed by Ryosuke Niwa.

Source/WebCore:

Changed EventHandler::sendContextMenuEvent to un-suspend caret blinking so that
the caret continues to blink even after the context menu is dismissed. The normal
way of un-suspendeding caret blinking (in EventHandler::handleMouseReleaseEvent) does
not apply in the case of context menus because handleMouseReleaseEvent is not
called once the context menu is up.

Test: fast/events/contextmenu-dismiss-blink-caret.html

* page/EventHandler.cpp:
(WebCore::EventHandler::sendContextMenuEvent):
* testing/Internals.cpp:
(WebCore::Internals::isCaretBlinkingSuspended):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/events/contextmenu-dismiss-blink-caret-expected.txt: Added.
* fast/events/contextmenu-dismiss-blink-caret.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/EventHandler.cpp
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl


Added Paths

trunk/LayoutTests/fast/events/contextmenu-dismiss-blink-caret-expected.txt
trunk/LayoutTests/fast/events/contextmenu-dismiss-blink-caret.html




Diff

Modified: trunk/LayoutTests/ChangeLog (238344 => 238345)

--- trunk/LayoutTests/ChangeLog	2018-11-17 09:29:52 UTC (rev 238344)
+++ trunk/LayoutTests/ChangeLog	2018-11-17 10:04:51 UTC (rev 238345)
@@ -1,3 +1,13 @@
+2018-11-17  Jonathan Hammer  
+
+Caret stops blinking after context menu shown
+https://bugs.webkit.org/show_bug.cgi?id=191715
+
+Reviewed by Ryosuke Niwa.
+
+* fast/events/contextmenu-dismiss-blink-caret-expected.txt: Added.
+* fast/events/contextmenu-dismiss-blink-caret.html: Added.
+
 2018-11-16  Antoine Quint  
 
 [Pointer Events] event.isPrimary doesn't always represent the oldest active touch


Added: trunk/LayoutTests/fast/events/contextmenu-dismiss-blink-caret-expected.txt (0 => 238345)

--- trunk/LayoutTests/fast/events/contextmenu-dismiss-blink-caret-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/events/contextmenu-dismiss-blink-caret-expected.txt	2018-11-17 10:04:51 UTC (rev 238345)
@@ -0,0 +1 @@
+PASS


Added: trunk/LayoutTests/fast/events/contextmenu-dismiss-blink-caret.html (0 => 238345)

--- trunk/LayoutTests/fast/events/contextmenu-dismiss-blink-caret.html	(rev 0)
+++ trunk/LayoutTests/fast/events/contextmenu-dismiss-blink-caret.html	2018-11-17 10:04:51 UTC (rev 238345)
@@ -0,0 +1,26 @@
+
+
+This tests whether the caret continues to blink after the context menu is dismissed. To test manually, right-click anywhere in this contenteditable element to show a context menu and then dismiss the context menu (by pressing esc). After the context menu has been dismissed, use the keyboard to move the caret up/down/left/right. As you move the caret, it should continue to blink (instead of staying frozen on).
+
+
+
+if (window.testRunner) {
+var element = document.getElementById('contenteditable');
+var rect = element.getBoundingClientRect();
+eventSender.mouseMoveTo(rect.left + rect.width / 2, rect.top + rect.height / 2);
+// contextClick() implementations in WK1 and WK2 have a subtle, but important difference.
+// Under WK1, the mousedown is simulated but not the mouseup. Under WK2 both the mousedown
+// and mouseup are simulated. It turns out the WK1 simulation more closely matches what
+// happens in real life. This is relevant to this test (and the bug it covers) because,
+// under WK2, the test will always pass, with or without the bug fix. Under WK1, the test
+// fails without the bug fix and passes with the bug fix as expected.
+//
+// An alternative to using contextClick() would be mouseDown("ctrlKey"), but that is
+// a Mac-specific way to bring up the context menu instead of a platform-neutral way
+eventSender.contextClick();
+// esc key to kill the context menu.
+eventSender.keyDown(String.fromCharCode(0x001B), null);
+element.innerText = window.internals.isCaretBlinkingSuspended() ? "FAIL" : "PASS";
+testRunner.dumpAsText();
+}
+


Modified: trunk/Source/WebCore/ChangeLog (238344 => 238345)

--- trunk/Source/WebCore/ChangeLog	2018-11-17 09:29:52 UTC (rev 238344)
+++ trunk/Source/WebCore/ChangeLog	2018-11-17 10:04:51 UTC (rev 238345)
@@ -1,3 +1,25 @@
+2018-11-17  Jonathan Hammer  
+
+Caret stops blinking after context menu shown
+https://bugs.webkit.org/show_bug.cgi?id=191715
+
+Reviewed by Ryosuke Niwa.
+
+Changed EventHandler::sendContextMenuEvent to 

[webkit-changes] [238344] trunk

2018-11-17 Thread graouts
Title: [238344] trunk








Revision 238344
Author grao...@webkit.org
Date 2018-11-17 01:29:52 -0800 (Sat, 17 Nov 2018)


Log Message
[Pointer Events] event.isPrimary doesn't always represent the oldest active touch
https://bugs.webkit.org/show_bug.cgi?id=191752


Reviewed by Dean Jackson.

Source/WebCore:

Provide isPrimary to the constructor so its value can be determined at the call site.

Test: pointerevents/ios/pointer-events-is-primary.html

* dom/PointerEvent.h:
* dom/ios/PointerEventIOS.cpp:
(WebCore::PointerEvent::create):
(WebCore::PointerEvent::PointerEvent):
(WebCore::m_isPrimary):

LayoutTests:

Add a new test that checks that adding a touch after another existing touch does not make it be
the primary touch, but that removing the first touch makes the second touch become the primary touch.

To do this we add a new ui.sequence() method that allows a series of touch actions to be performed
in a linear sequence. The test author can create a finger and call various actions on it, currently
begin(), move() and end().

When these actions are processed, we compute all "stationary" actions for each part of the sequence
so that we can provide this to the uiController.sendEventStream() function.

Finally, we add a way to track events received by the target and assert that the events that were
received match those that were expected.

* pointerevents/ios/pointer-events-is-primary-expected.txt: Added.
* pointerevents/ios/pointer-events-is-primary.html: Added.
* pointerevents/utils.js:
(prototype.handleEvent):
(prototype.assertMatchesEvents):
(const.ui.new.UIController):
(const.ui.new.UIController.prototype.finger):
(const.ui.new.UIController.prototype.pinchOut):
(const.ui.new.UIController.prototype.sequence):
(const.ui.new.UIController.prototype._runEvents):
(prototype.begin):
(prototype.move):
(prototype.end):
(prototype.stationary):
(prototype._action):

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/pointerevents/utils.js
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/PointerEvent.h
trunk/Source/WebCore/dom/ios/PointerEventIOS.cpp


Added Paths

trunk/LayoutTests/pointerevents/ios/pointer-events-is-primary-expected.txt
trunk/LayoutTests/pointerevents/ios/pointer-events-is-primary.html




Diff

Modified: trunk/LayoutTests/ChangeLog (238343 => 238344)

--- trunk/LayoutTests/ChangeLog	2018-11-17 06:46:55 UTC (rev 238343)
+++ trunk/LayoutTests/ChangeLog	2018-11-17 09:29:52 UTC (rev 238344)
@@ -1,3 +1,40 @@
+2018-11-16  Antoine Quint  
+
+[Pointer Events] event.isPrimary doesn't always represent the oldest active touch
+https://bugs.webkit.org/show_bug.cgi?id=191752
+
+
+Reviewed by Dean Jackson.
+
+Add a new test that checks that adding a touch after another existing touch does not make it be
+the primary touch, but that removing the first touch makes the second touch become the primary touch.
+
+To do this we add a new ui.sequence() method that allows a series of touch actions to be performed
+in a linear sequence. The test author can create a finger and call various actions on it, currently
+begin(), move() and end().
+
+When these actions are processed, we compute all "stationary" actions for each part of the sequence
+so that we can provide this to the uiController.sendEventStream() function.
+
+Finally, we add a way to track events received by the target and assert that the events that were
+received match those that were expected.
+
+* pointerevents/ios/pointer-events-is-primary-expected.txt: Added.
+* pointerevents/ios/pointer-events-is-primary.html: Added.
+* pointerevents/utils.js:
+(prototype.handleEvent):
+(prototype.assertMatchesEvents):
+(const.ui.new.UIController):
+(const.ui.new.UIController.prototype.finger):
+(const.ui.new.UIController.prototype.pinchOut):
+(const.ui.new.UIController.prototype.sequence):
+(const.ui.new.UIController.prototype._runEvents):
+(prototype.begin):
+(prototype.move):
+(prototype.end):
+(prototype.stationary):
+(prototype._action):
+
 2018-11-16  Devin Rousso  
 
 Web Inspector: Audit: minor style improvements


Added: trunk/LayoutTests/pointerevents/ios/pointer-events-is-primary-expected.txt (0 => 238344)

--- trunk/LayoutTests/pointerevents/ios/pointer-events-is-primary-expected.txt	(rev 0)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-is-primary-expected.txt	2018-11-17 09:29:52 UTC (rev 238344)
@@ -0,0 +1,3 @@
+
+PASS Oldest active touch has isPrimary = true. 
+


Added: trunk/LayoutTests/pointerevents/ios/pointer-events-is-primary.html (0 => 238344)

--- trunk/LayoutTests/pointerevents/ios/pointer-events-is-primary.html	(rev 0)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-is-primary.html	2018-11-17 09:29:52 UTC (rev 238344)
@@ -0,0 +1,41 @@