[webkit-changes] [239025] trunk/Tools

2018-12-09 Thread wenson_hsieh
Title: [239025] trunk/Tools








Revision 239025
Author wenson_hs...@apple.com
Date 2018-12-09 23:54:16 -0800 (Sun, 09 Dec 2018)


Log Message
[iOS] DragAndDropTests.RespectsExternalSourceFidelityRankings is flaky
https://bugs.webkit.org/show_bug.cgi?id=192524

Reviewed by Ryosuke Niwa.

This test started failing on certain builds of iOS where UIKit now attempts to reveal the selection by scrolling
(see ). This API test simulates two drops from external sources, both from the point
(300, 400) to (100, 300) in window coordinates. On these aforementioned builds of iOS, what happens is that the
first drop inserts text that overflows the editable region by an enormous amount, which creates an extremely
wide selection rect and increases the width of the document; revealing this selection causes the web view to
scroll horizontally, such that the second attempt to simulate a drag from (300, 400) to (100, 300) fails, since
these window coordinates no longer correspond to the drop destination element in the document.

To fix this test, we simply mark the drop destination as `overflow: hidden` to ensure that we don't try and
scroll horizontally after the first drop.

* TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html




Diff

Modified: trunk/Tools/ChangeLog (239024 => 239025)

--- trunk/Tools/ChangeLog	2018-12-10 05:30:23 UTC (rev 239024)
+++ trunk/Tools/ChangeLog	2018-12-10 07:54:16 UTC (rev 239025)
@@ -1,3 +1,23 @@
+2018-12-09  Wenson Hsieh  
+
+[iOS] DragAndDropTests.RespectsExternalSourceFidelityRankings is flaky
+https://bugs.webkit.org/show_bug.cgi?id=192524
+
+Reviewed by Ryosuke Niwa.
+
+This test started failing on certain builds of iOS where UIKit now attempts to reveal the selection by scrolling
+(see ). This API test simulates two drops from external sources, both from the point
+(300, 400) to (100, 300) in window coordinates. On these aforementioned builds of iOS, what happens is that the
+first drop inserts text that overflows the editable region by an enormous amount, which creates an extremely
+wide selection rect and increases the width of the document; revealing this selection causes the web view to
+scroll horizontally, such that the second attempt to simulate a drag from (300, 400) to (100, 300) fails, since
+these window coordinates no longer correspond to the drop destination element in the document.
+
+To fix this test, we simply mark the drop destination as `overflow: hidden` to ensure that we don't try and
+scroll horizontally after the first drop.
+
+* TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html:
+
 2018-12-08  Daniel Bates  
 
 Fix lldb_webkit.py following r238771


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html (239024 => 239025)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html	2018-12-10 05:30:23 UTC (rev 239024)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html	2018-12-10 07:54:16 UTC (rev 239025)
@@ -14,7 +14,7 @@
 white-space: nowrap;
 }
 
-#source {
+#source, #editor {
 overflow: hidden;
 }
 






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


[webkit-changes] [239024] trunk/Source

2018-12-09 Thread youenn
Title: [239024] trunk/Source








Revision 239024
Author you...@apple.com
Date 2018-12-09 21:30:23 -0800 (Sun, 09 Dec 2018)


Log Message
Move capture manager from RealtimeMediaSourceCenter to capture factory
https://bugs.webkit.org/show_bug.cgi?id=192542

Reviewed by Eric Carlson.

Source/WebCore:

We should be able to run mock captures in wither UIProcess or WebProcess.
Currently, mock capture is only done in WebProcess.
This patch is a first step towards that goal.

It also simplifies RealtimeMediaSourceCenter implementation by starting to remove virtual methods.
Further refactoring will remove the need to subclass RealtimeMediaSourceCenter.
Instead, remaining virtual methods will become non virtual and their
implementation will become port specific.

Removed a JS internal method that is not longer used to further simplify RealtimeMediaSourceCenter.

No visible change of behavior.
Covered by existing tests.

* platform/mediastream/CaptureDeviceManager.h:
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::singleton):
(WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenter::getDisplayMediaDevices):
(WebCore::RealtimeMediaSourceCenter::getUserMediaDevices):
(WebCore::RealtimeMediaSourceCenter::captureDeviceWithPersistentID):
(WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
(WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):
(WebCore::RealtimeMediaSourceCenter::unsetDisplayCaptureFactory):
* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mediastream/RealtimeMediaSourceFactory.h:
* platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
* platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
* platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
* platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h:
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSourceFactory::audioCaptureDeviceManager):
* platform/mediastream/mac/CoreAudioCaptureSource.h:
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
(WebCore::MockRealtimeMediaSourceCenter::audioFactory):
(WebCore::MockRealtimeMediaSourceCenter::videoFactory):
(WebCore::MockRealtimeMediaSourceCenter::displayCaptureFactory):
* platform/mock/MockRealtimeMediaSourceCenter.h:
(WebCore::MockRealtimeMediaSourceCenter::audioCaptureDeviceManager):
(WebCore::MockRealtimeMediaSourceCenter::videoCaptureDeviceManager):
(WebCore::MockRealtimeMediaSourceCenter::displayCaptureDeviceManager):
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Make sure to unregister for video capture as done for other capture types.
Implement manager which should be doing nothing as the manager is used for enumeration of devices
which should only happen in UIProcess.

Given that mock capture is interfering with UserMediaCaptureManager,
switching on/off mock capture will require creating a new process.
This shortcoming should be fixed once mock capture will be fully happening in
the same process as regular capture.

* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
* WebProcess/cocoa/UserMediaCaptureManager.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mediastream/CaptureDeviceManager.h
trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp
trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h
trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceFactory.h
trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp
trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp
trunk/Source/WebCore/platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp
trunk/Source/WebCore/platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h
trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp
trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h
trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp
trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.h
trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp
trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.h
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp
trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (239023 => 239024)

--- trunk/Source/WebCore/ChangeLog	2018-12-10 01:56:16 UTC (rev 

[webkit-changes] [239023] trunk/Source

2018-12-09 Thread sbarati
Title: [239023] trunk/Source








Revision 239023
Author sbar...@apple.com
Date 2018-12-09 17:56:16 -0800 (Sun, 09 Dec 2018)


Log Message
Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
https://bugs.webkit.org/show_bug.cgi?id=192374


Reviewed by Alex Christensen.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:
Remove the now-unused SPI declaration.

Source/WebKit:

This patch makes it so that we can use HTTP/HTTPS proxies on iOS as well.
To enable on iOS, you can do something like:
$ defaults write -g WebKit2HTTPProxy -string "http://localhost:8080"
$ defaults write -g WebKit2HTTPSProxy -string "http://localhost:8080"

This patch also changes the Proxy to be enabled on a per NSURLSession
basis instead of a per process basis.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::proxyDictionary):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
(WebKit::overrideSystemProxies): Deleted.
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _initWithConfiguration:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
(-[_WKWebsiteDataStoreConfiguration httpProxy]):
(-[_WKWebsiteDataStoreConfiguration setHTTPProxy:]):
(-[_WKWebsiteDataStoreConfiguration httpsProxy]):
(-[_WKWebsiteDataStoreConfiguration setHTTPSProxy:]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
(WebKit::WebsiteDataStoreConfiguration::copy):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
(WebKit::WebsiteDataStoreConfiguration::httpProxy const):
(WebKit::WebsiteDataStoreConfiguration::setHTTPProxy):
(WebKit::WebsiteDataStoreConfiguration::httpsProxy const):
(WebKit::WebsiteDataStoreConfiguration::setHTTPSProxy):

Modified Paths

trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp
trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
trunk/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h




Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (239022 => 239023)

--- trunk/Source/WebCore/PAL/ChangeLog	2018-12-09 20:17:18 UTC (rev 239022)
+++ trunk/Source/WebCore/PAL/ChangeLog	2018-12-10 01:56:16 UTC (rev 239023)
@@ -1,3 +1,14 @@
+2018-12-09  Saam barati  
+
+Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
+https://bugs.webkit.org/show_bug.cgi?id=192374
+
+
+Reviewed by Alex Christensen.
+
+* pal/spi/cf/CFNetworkSPI.h:
+Remove the now-unused SPI declaration.
+
 2018-12-05  Don Olmstead  
 
 [PlayStation] Enable WebCore


Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (239022 => 239023)

--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2018-12-09 20:17:18 UTC (rev 239022)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2018-12-10 01:56:16 UTC (rev 239023)
@@ -33,6 +33,7 @@
 #if PLATFORM(WIN) || USE(APPLE_INTERNAL_SDK)
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -265,7 +266,6 @@
 void CFHTTPCookieStorageAddObserver(CFHTTPCookieStorageRef, CFRunLoopRef, CFStringRef, CFHTTPCookieStorageChangedProcPtr, void*);
 void CFHTTPCookieStorageRemoveObserver(CFHTTPCookieStorageRef, CFRunLoopRef, CFStringRef, CFHTTPCookieStorageChangedProcPtr, void*);
 
-void _CFNetworkSetOverrideSystemProxySettings(CFDictionaryRef);
 CFURLCredentialStorageRef CFURLCredentialStorageCreate(CFAllocatorRef);
 CFURLCredentialRef CFURLCredentialStorageCopyDefaultCredentialForProtectionSpace(CFURLCredentialStorageRef, CFURLProtectionSpaceRef);
 CFURLRequestPriority 

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

2018-12-09 Thread aperez
Title: [239022] trunk/Source/WebKit








Revision 239022
Author ape...@igalia.com
Date 2018-12-09 12:17:18 -0800 (Sun, 09 Dec 2018)


Log Message
Build failure due to missing include of APIWebsiteDataStore.h
https://bugs.webkit.org/show_bug.cgi?id=192541

Reviewed by Youenn Fablet.

* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Add missing
include of APIWebsiteDataStore.h

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (239021 => 239022)

--- trunk/Source/WebKit/ChangeLog	2018-12-09 16:43:02 UTC (rev 239021)
+++ trunk/Source/WebKit/ChangeLog	2018-12-09 20:17:18 UTC (rev 239022)
@@ -1,3 +1,13 @@
+2018-12-09  Adrian Perez de Castro  
+
+Build failure due to missing include of APIWebsiteDataStore.h
+https://bugs.webkit.org/show_bug.cgi?id=192541
+
+Reviewed by Youenn Fablet.
+
+* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Add missing
+include of APIWebsiteDataStore.h
+
 2018-12-09  Wenson Hsieh  
 
 [iOS device] Crash when attempting to call -[_WKAttachment info] for an editable image


Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp (239021 => 239022)

--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp	2018-12-09 16:43:02 UTC (rev 239021)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp	2018-12-09 20:17:18 UTC (rev 239022)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "WebsiteDataStoreConfiguration.h"
 
+#include "APIWebsiteDataStore.h"
+
 namespace WebKit {
 
 WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration()






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


[webkit-changes] [239021] trunk/Source/WTF

2018-12-09 Thread yusukesuzuki
Title: [239021] trunk/Source/WTF








Revision 239021
Author yusukesuz...@slowstart.org
Date 2018-12-09 08:43:02 -0800 (Sun, 09 Dec 2018)


Log Message
Unreviewed, fix build failure on GCC 8.2, part 2

Add RefCountedArray::assign, and use it instead of operator= internally.
We should have operator=(const RefCountedArray&) since it will be automatically generated
if we do not have correct implementation here.

* wtf/RefCountedArray.h:
(WTF::RefCountedArray::operator=):
(WTF::RefCountedArray::assign):

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/RefCountedArray.h




Diff

Modified: trunk/Source/WTF/ChangeLog (239020 => 239021)

--- trunk/Source/WTF/ChangeLog	2018-12-09 16:09:07 UTC (rev 239020)
+++ trunk/Source/WTF/ChangeLog	2018-12-09 16:43:02 UTC (rev 239021)
@@ -1,5 +1,17 @@
 2018-12-09  Yusuke Suzuki  
 
+Unreviewed, fix build failure on GCC 8.2, part 2
+
+Add RefCountedArray::assign, and use it instead of operator= internally.
+We should have operator=(const RefCountedArray&) since it will be automatically generated
+if we do not have correct implementation here.
+
+* wtf/RefCountedArray.h:
+(WTF::RefCountedArray::operator=):
+(WTF::RefCountedArray::assign):
+
+2018-12-09  Yusuke Suzuki  
+
 Unreviewed, fix build failure on GCC 8.2
 
 We remove operator= call since it is not necessary.


Modified: trunk/Source/WTF/wtf/RefCountedArray.h (239020 => 239021)

--- trunk/Source/WTF/wtf/RefCountedArray.h	2018-12-09 16:09:07 UTC (rev 239020)
+++ trunk/Source/WTF/wtf/RefCountedArray.h	2018-12-09 16:43:02 UTC (rev 239021)
@@ -105,19 +105,12 @@
 template
 RefCountedArray& operator=(const RefCountedArray& other)
 {
-T* oldData = data();
-T* otherData = const_cast(other.data());
-if (otherData)
-Header::fromPayload(otherData)->refCount++;
-m_data = otherData;
+return assign(other);
+}
 
-if (!oldData)
-return *this;
-if (--Header::fromPayload(oldData)->refCount)
-return *this;
-VectorTypeOperations::destruct(oldData, oldData + Header::fromPayload(oldData)->length);
-fastFree(Header::fromPayload(oldData));
-return *this;
+RefCountedArray& operator=(const RefCountedArray& other)
+{
+return assign(other);
 }
 
 ~RefCountedArray()
@@ -198,6 +191,24 @@
 bool operator==(const RefCountedArray& other) const { return this->operator==(other); }
 
 private:
+template
+RefCountedArray& assign(const RefCountedArray& other)
+{
+T* oldData = data();
+T* otherData = const_cast(other.data());
+if (otherData)
+Header::fromPayload(otherData)->refCount++;
+m_data = otherData;
+
+if (!oldData)
+return *this;
+if (--Header::fromPayload(oldData)->refCount)
+return *this;
+VectorTypeOperations::destruct(oldData, oldData + Header::fromPayload(oldData)->length);
+fastFree(Header::fromPayload(oldData));
+return *this;
+}
+
 struct Header {
 unsigned refCount;
 unsigned length;






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


[webkit-changes] [239020] trunk/Source/WTF

2018-12-09 Thread yusukesuzuki
Title: [239020] trunk/Source/WTF








Revision 239020
Author yusukesuz...@slowstart.org
Date 2018-12-09 08:09:07 -0800 (Sun, 09 Dec 2018)


Log Message
Unreviewed, fix build failure on GCC 8.2

We remove operator= call since it is not necessary.
This is a workaround. It seems that GCC 8.2 fails to parse this specialization.

* wtf/RefCountedArray.h:

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/RefCountedArray.h




Diff

Modified: trunk/Source/WTF/ChangeLog (239019 => 239020)

--- trunk/Source/WTF/ChangeLog	2018-12-09 09:05:45 UTC (rev 239019)
+++ trunk/Source/WTF/ChangeLog	2018-12-09 16:09:07 UTC (rev 239020)
@@ -1,3 +1,12 @@
+2018-12-09  Yusuke Suzuki  
+
+Unreviewed, fix build failure on GCC 8.2
+
+We remove operator= call since it is not necessary.
+This is a workaround. It seems that GCC 8.2 fails to parse this specialization.
+
+* wtf/RefCountedArray.h:
+
 2018-12-08  Darin Adler  
 
 Fix stray-semicolon warning seen with a new version of clang in Xcode


Modified: trunk/Source/WTF/wtf/RefCountedArray.h (239019 => 239020)

--- trunk/Source/WTF/wtf/RefCountedArray.h	2018-12-09 09:05:45 UTC (rev 239019)
+++ trunk/Source/WTF/wtf/RefCountedArray.h	2018-12-09 16:09:07 UTC (rev 239020)
@@ -120,8 +120,6 @@
 return *this;
 }
 
-RefCountedArray& operator=(const RefCountedArray& other) { return this->operator=(other); }
-
 ~RefCountedArray()
 {
 if (!m_data)






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


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

2018-12-09 Thread wenson_hsieh
Title: [239019] trunk/Source/WebKit








Revision 239019
Author wenson_hs...@apple.com
Date 2018-12-09 01:05:45 -0800 (Sun, 09 Dec 2018)


Log Message
[iOS device] Crash when attempting to call -[_WKAttachment info] for an editable image
https://bugs.webkit.org/show_bug.cgi?id=192538

Reviewed by Tim Horton.

Fix the crash by ensuring that the result of `-renderedDrawing` survives long enough to be wrapped by a
`RetainPtr` in `-PNGRepresentation`. This isn't currently testable, since this codepath isn't supported on the
iOS simulator; instead, I manually verified using MobileAttachments.app.

* UIProcess/ios/WKDrawingView.mm:
(-[WKDrawingView renderedDrawing]):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (239018 => 239019)

--- trunk/Source/WebKit/ChangeLog	2018-12-09 08:00:32 UTC (rev 239018)
+++ trunk/Source/WebKit/ChangeLog	2018-12-09 09:05:45 UTC (rev 239019)
@@ -1,3 +1,17 @@
+2018-12-09  Wenson Hsieh  
+
+[iOS device] Crash when attempting to call -[_WKAttachment info] for an editable image
+https://bugs.webkit.org/show_bug.cgi?id=192538
+
+Reviewed by Tim Horton.
+
+Fix the crash by ensuring that the result of `-renderedDrawing` survives long enough to be wrapped by a
+`RetainPtr` in `-PNGRepresentation`. This isn't currently testable, since this codepath isn't supported on the
+iOS simulator; instead, I manually verified using MobileAttachments.app.
+
+* UIProcess/ios/WKDrawingView.mm:
+(-[WKDrawingView renderedDrawing]):
+
 2018-12-09  Commit Queue  
 
 Unreviewed, rolling out r239010.


Modified: trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm (239018 => 239019)

--- trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm	2018-12-09 08:00:32 UTC (rev 239018)
+++ trunk/Source/WebKit/UIProcess/ios/WKDrawingView.mm	2018-12-09 09:05:45 UTC (rev 239019)
@@ -120,7 +120,7 @@
 // an NSFileWrapper to be available synchronously.
 dispatch_sync(_renderQueue.get(), ^{ });
 
-return resultImage.get();
+return resultImage.autorelease();
 #endif
 }
 






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


[webkit-changes] [239018] trunk

2018-12-09 Thread commit-queue
Title: [239018] trunk








Revision 239018
Author commit-qu...@webkit.org
Date 2018-12-09 00:00:32 -0800 (Sun, 09 Dec 2018)


Log Message
Unreviewed, rolling out r239010.
https://bugs.webkit.org/show_bug.cgi?id=192537

Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
scrolling-layers-state.html again (Requested by ap on
#webkit).

Reverted changeset:

"Allow control over child order when adding nodes to the
scrolling tree"
https://bugs.webkit.org/show_bug.cgi?id=176914
https://trac.webkit.org/changeset/239010

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (239017 => 239018)

--- trunk/LayoutTests/ChangeLog	2018-12-09 07:09:09 UTC (rev 239017)
+++ trunk/LayoutTests/ChangeLog	2018-12-09 08:00:32 UTC (rev 239018)
@@ -1,3 +1,19 @@
+2018-12-09  Commit Queue  
+
+Unreviewed, rolling out r239010.
+https://bugs.webkit.org/show_bug.cgi?id=192537
+
+Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
+scrolling-layers-state.html again (Requested by ap on
+#webkit).
+
+Reverted changeset:
+
+"Allow control over child order when adding nodes to the
+scrolling tree"
+https://bugs.webkit.org/show_bug.cgi?id=176914
+https://trac.webkit.org/changeset/239010
+
 2018-12-08  Eric Carlson  
 
 [MediaStream] Scaled video frames should be resized in letterbox mode


Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (239017 => 239018)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-12-09 07:09:09 UTC (rev 239017)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-12-09 08:00:32 UTC (rev 239018)
@@ -321,8 +321,6 @@
 
 webkit.org/b/148408 tiled-drawing/scrolling/root-overflow-with-mousewheel.html [ Pass Failure Timeout ]
 
-webkit.org/b/192529 fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state.html [ Pass Failure ]
-
 webkit.org/b/139820 fast/frames/lots-of-objects.html [ Pass Timeout ]
 webkit.org/b/139820 fast/frames/lots-of-iframes.html [ Pass Timeout ]
 


Modified: trunk/Source/WebCore/ChangeLog (239017 => 239018)

--- trunk/Source/WebCore/ChangeLog	2018-12-09 07:09:09 UTC (rev 239017)
+++ trunk/Source/WebCore/ChangeLog	2018-12-09 08:00:32 UTC (rev 239018)
@@ -1,3 +1,19 @@
+2018-12-09  Commit Queue  
+
+Unreviewed, rolling out r239010.
+https://bugs.webkit.org/show_bug.cgi?id=192537
+
+Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
+scrolling-layers-state.html again (Requested by ap on
+#webkit).
+
+Reverted changeset:
+
+"Allow control over child order when adding nodes to the
+scrolling tree"
+https://bugs.webkit.org/show_bug.cgi?id=176914
+https://trac.webkit.org/changeset/239010
+
 2018-12-08  Eric Carlson  
 
 [MediaStream] Scaled video frames should be resized in letterbox mode


Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (239017 => 239018)

--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp	2018-12-09 07:09:09 UTC (rev 239017)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp	2018-12-09 08:00:32 UTC (rev 239018)
@@ -474,10 +474,9 @@
 scrollableArea.horizontalScrollbarLayerDidChange();
 }
 
-ScrollingNodeID AsyncScrollingCoordinator::attachToStateTree(ScrollingNodeType nodeType, ScrollingNodeID newNodeID, ScrollingNodeID parentID, size_t childIndex)
+ScrollingNodeID AsyncScrollingCoordinator::attachToStateTree(ScrollingNodeType nodeType, ScrollingNodeID newNodeID, ScrollingNodeID parentID)
 {
-LOG_WITH_STREAM(Scrolling, stream << "AsyncScrollingCoordinator::attachToStateTree " << nodeType << " node " << newNodeID << " parent " << parentID << " index " << childIndex);
-return m_scrollingStateTree->attachNode(nodeType, newNodeID, parentID, childIndex);
+return m_scrollingStateTree->attachNode(nodeType, newNodeID, parentID);
 }
 
 void AsyncScrollingCoordinator::detachFromStateTree(ScrollingNodeID nodeID)
@@ -510,7 +509,7 @@
 // For non-main frames, it is only possible to arrive in this function from
 // RenderLayerCompositor::updateBacking where the node has already been created.
 ASSERT(frameView.frame().isMainFrame());
-attachToStateTree(MainFrameScrollingNode, frameView.scrollLayerID(), 0, 0);
+