WebKit-https.git
2 years agoRemove redundant RenderObject::selectionRoot and dependencies
zalan@apple.com [Sat, 30 Sep 2017 04:31:29 +0000 (04:31 +0000)]
Remove redundant RenderObject::selectionRoot and dependencies
https://bugs.webkit.org/show_bug.cgi?id=177696

Reviewed by Ryosuke Niwa.

There's only one selection root (RenderView).

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::selectionState):
(WebCore::InlineTextBox::selectionStartEnd const):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionRoot const): Deleted.
(WebCore::RenderObject::selectionStartEnd const): Deleted.
* rendering/RenderObject.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::isSelected const):
* rendering/RenderText.cpp:
(WebCore::RenderText::collectSelectionRectsForLineBoxes):
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::setSelectionState):
* rendering/RenderView.h:
* rendering/SelectionSubtreeRoot.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222677 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFollow-up to https://trac.webkit.org/r222239 to fix crashes.
ap@apple.com [Sat, 30 Sep 2017 02:11:20 +0000 (02:11 +0000)]
Follow-up to https://trac.webkit.org/r222239 to fix crashes.
rdar://problem/34705779

Addressing review comments that I somehow landed without.

* WebView/WebHTMLView.mm: Undo adding #if guards around -_web_uniqueWebDataURL

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222676 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[DFG] Support ArrayPush with multiple args
utatane.tea@gmail.com [Sat, 30 Sep 2017 01:16:52 +0000 (01:16 +0000)]
[DFG] Support ArrayPush with multiple args
https://bugs.webkit.org/show_bug.cgi?id=175823

Reviewed by Saam Barati.

JSTests:

* microbenchmarks/array-push-0.js: Added.
(arrayPush0):
* microbenchmarks/array-push-1.js: Added.
(arrayPush1):
* microbenchmarks/array-push-2.js: Added.
(arrayPush2):
* microbenchmarks/array-push-3.js: Added.
(arrayPush3):
* stress/array-push-multiple-contiguous.js: Added.
(shouldBe):
(test):
* stress/array-push-multiple-double-nan.js: Added.
(shouldBe):
(test):
* stress/array-push-multiple-double.js: Added.
(shouldBe):
(test):
* stress/array-push-multiple-int32.js: Added.
(shouldBe):
(test):
* stress/array-push-multiple-many-contiguous.js: Added.
(shouldBe):
(test):
* stress/array-push-multiple-many-double.js: Added.
(shouldBe):
(test):
* stress/array-push-multiple-many-int32.js: Added.
(shouldBe):
(test):
* stress/array-push-multiple-many-storage.js: Added.
(shouldBe):
(test):
* stress/array-push-multiple-storage.js: Added.
(shouldBe):
(test):
* stress/array-push-with-force-exit.js: Added.
(target.createBuiltin):

Source/JavaScriptCore:

Reviewed by Saam Barati.

This patch implements ArrayPush(with multiple arguments) in DFG and FTL. Previously, they are not handled
by ArrayPush. Then they go to generic direct call to Array#push and it does in slow path. This patch
extends ArrayPush to push multiple arguments in a bulk push manner.

The problem of ArrayPush is that we need to perform ArrayPush atomically: If OSR exit occurs in the middle
of ArrayPush, we incorrectly push pushed elements twice. Once we start pushing values, we should not exit.
But we do not want to iterate elements twice, once for type checks and once for actually pushing it. It
could move elements between registers and memory back and forth.

This patch achieves the above goal by separating type checks from ArrayPush. When starting ArrayPush, type
checks for elements are already done by separately emitted Check nodes.

We also add JSArray::pushInline for DFG operations just calling JSArray::push. And we also use it in
arrayProtoFuncPush's fast path.

This patch significantly improves performance of `push(multiple args)`.

                                    baseline                  patched
    Microbenchmarks:
        array-push-0            461.8455+-28.9995    ^    151.3438+-6.5653        ^ definitely 3.0516x faster
        array-push-1            133.8845+-7.0349     ?    136.1775+-5.8327        ? might be 1.0171x slower
        array-push-2            675.6555+-13.4645    ^    145.8747+-6.4621        ^ definitely 4.6318x faster
        array-push-3            849.5284+-15.2540    ^    253.4421+-9.1249        ^ definitely 3.3520x faster

                                    baseline                  patched
    SixSpeed:
        spread-literal.es5       90.3482+-6.6514     ^     24.8123+-2.3304        ^ definitely 3.6413x faster

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArrayPush):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileArrayPush):
* jit/JITOperations.h:
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncPush):
* runtime/JSArray.cpp:
(JSC::JSArray::push):
* runtime/JSArray.h:
* runtime/JSArrayInlines.h:
(JSC::JSArray::pushInline):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222675 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION: ASSERTION FAILED: m_provisionalURL.isEmpty() in WebKit::FrameLoadState...
commit-queue@webkit.org [Sat, 30 Sep 2017 00:54:22 +0000 (00:54 +0000)]
REGRESSION: ASSERTION FAILED: m_provisionalURL.isEmpty() in WebKit::FrameLoadState::didStartProvisionalLoad
https://bugs.webkit.org/show_bug.cgi?id=177491

Patch by Alex Christensen <achristensen@webkit.org> on 2017-09-29
Reviewed by Andy Estes.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::setUpWillSubmitFormListener):
(WebKit::WebFrame::continueWillSubmitForm):
(WebKit::WebFrame::invalidatePolicyListener):
Speculative fix for a flaky assertion.
Restore the clearing of the policy listeners we used to have when form submission was treated as a policy.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222674 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agohttp/tests/preconnect/link-rel-preconnect-https.html is flaky
cdumez@apple.com [Sat, 30 Sep 2017 00:35:24 +0000 (00:35 +0000)]
http/tests/preconnect/link-rel-preconnect-https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=177673

Reviewed by Alex Christensen.

Source/WebCore:

No new tests, unskipped test that is now passing consistently.

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLink):
* loader/LoaderStrategy.h:

Source/WebKit:

Update PreconnectTask to query the client when a certificate needs to be
validated. This allows WebKitTestRunner to ignore invalid certificates
and this causes http/tests/preconnect/link-rel-preconnect-https.html
to pass consistently.

To avoid duplicating code, PreconnectTask now uses NetworkLoad internally
instead of using a NetworkDataTask directly.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::preconnectTo):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::generateCanAuthenticateIdentifier):
(WebKit::NetworkProcess::canAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcess::preconnectTo):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/PreconnectTask.cpp:
(WebKit::PreconnectTask::PreconnectTask):
(WebKit::PreconnectTask::~PreconnectTask):
(WebKit::PreconnectTask::willSendRedirectedRequest):
(WebKit::PreconnectTask::didReceiveResponse):
(WebKit::PreconnectTask::didReceiveBuffer):
(WebKit::PreconnectTask::didFinishLoading):
(WebKit::PreconnectTask::didFailLoading):
(WebKit::PreconnectTask::didSendData):
(WebKit::PreconnectTask::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::PreconnectTask::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::PreconnectTask::frameID const):
(WebKit::PreconnectTask::pageID const):
* NetworkProcess/PreconnectTask.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::preconnectTo):
* WebProcess/Network/WebLoaderStrategy.h:

Source/WebKitLegacy:

* WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::preconnectTo):
* WebCoreSupport/WebResourceLoadScheduler.h:

LayoutTests:

* http/tests/preconnect/link-rel-preconnect-https-expected.txt:
Rebaseline test now that it is passing.

* platform/wk2/TestExpectations:
Uskip test as it should no longer be flaky.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222673 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoExpose WebPreferences::webGLEnabled through WKPreferences
achristensen@apple.com [Sat, 30 Sep 2017 00:29:19 +0000 (00:29 +0000)]
Expose WebPreferences::webGLEnabled through WKPreferences
https://bugs.webkit.org/show_bug.cgi?id=177692
<rdar://problem/24110556>

Reviewed by Andy Estes.

Source/WebKit:

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setWebGLEnabled:]):
(-[WKPreferences _webGLEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/Preferences.mm:
(-[AlertSaver alert]):
(-[AlertSaver webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222672 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoCustom GetterSetterAccessCase does not use the correct slotBase when making call
sbarati@apple.com [Fri, 29 Sep 2017 23:48:10 +0000 (23:48 +0000)]
Custom GetterSetterAccessCase does not use the correct slotBase when making call
https://bugs.webkit.org/show_bug.cgi?id=177639

Reviewed by Geoffrey Garen.

JSTests:

* stress/custom-get-set-inline-caching-one-level-up-proto-chain.js: Added.
(assert):
(Class):
(items.forEach):
(set get for):

Source/JavaScriptCore:

The bug occurred when you had a custom set value. Custom set/get
values are passed the property holder, not the base of the access.
If we had an object chain like this:
o = {__proto__: thingWithCustomSetValue}

We would end up not providing thingWithCustomSetValue as the argument
to the PutValueFunc. The reason is, we would use generateConditionsForPrototypePropertyHitCustom
for custom sets. This would return to us an empty ConditionSet, because
the property holder was only one level up the prototype chain. The reason
is, it didn't generate a condition for the slot holder, because the
protocol for custom set/get is that if an object responds to a custom
setter/getter, it will continue to respond to that getter/setter for
the lifetime of that object. Therefore, it's not strictly necessary to
generate an OPC for the slot base for custom accesses. However, AccessCase
uses !m_conditionSet.isEmtpy() to indicate that the IC is doing a prototype
access. With the above object "o", we were doing a prototype access, but we
had an empty condition set. This lead us to passing the base instead of
the property holder to the custom set value function, which is incorrect.

With custom getters, we never called to into the generateConditionsForPrototypePropertyHitCustom
API. Gets would always call into generateConditionsForPrototypePropertyHit, which
will generate an OPC on the slot base, even if it isn't strictly necessary for custom accessors.
This patch simply removes generateConditionsForPrototypePropertyHitCustom
and aligns the set case with the get case. It makes us properly detect
when we're doing a prototype access with the above object "o". If we find
that generateConditionsForPrototypePropertyHitCustom was a worthwhile
optimization to have, we can re-introduce it. We'll just need to pipe through
a new notion of when we're doing prototype accesses that doesn't rely solely
on !m_conditionSet.isEmpty().

* bytecode/ObjectPropertyConditionSet.cpp:
(JSC::generateConditionsForPrototypePropertyHitCustom): Deleted.
* bytecode/ObjectPropertyConditionSet.h:
* jit/Repatch.cpp:
(JSC::tryCachePutByID):
* jsc.cpp:
(JSTestCustomGetterSetter::JSTestCustomGetterSetter):
(JSTestCustomGetterSetter::create):
(JSTestCustomGetterSetter::createStructure):
(customGetAccessor):
(customGetValue):
(customSetAccessor):
(customSetValue):
(JSTestCustomGetterSetter::finishCreation):
(GlobalObject::finishCreation):
(functionLoadGetterFromGetterSetter):
(functionCreateCustomTestGetterSetter):
* runtime/PropertySlot.h:
(JSC::PropertySlot::setCustomGetterSetter):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222671 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoExtract logic to compute text to render into common function
dbates@webkit.org [Fri, 29 Sep 2017 23:42:03 +0000 (23:42 +0000)]
Extract logic to compute text to render into common function
https://bugs.webkit.org/show_bug.cgi?id=177607

Reviewed by Zalan Bujtas.

Currently we duplicate the logic to compute the text to render
throughout InlineTextBox. Instead we should move this common
code into a member function. This will allow us to audit the
the code paths that render text and ensure such code paths
account for hyphenation and combined text, if applicable.

Note that a TextRun does not own the text. The caller owns it.

No functionality changed. So, no new tests.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::localSelectionRect const): Modified to
use text() and createTextRun() to compute the text to render
and the text run for it.
(WebCore::InlineTextBox::paint): Ditto.
(WebCore::InlineTextBox::paintSelection): Ditto. Additionally query
lineStyle() for the style of the line instead of requiring it to be
passed as an argument.
(WebCore::InlineTextBox::paintTextSubrangeBackground): Modified
to use text() and createTextRun() to compute the text to render
and the text run for it.
(WebCore::InlineTextBox::paintDocumentMarker): Ditto.
(WebCore::InlineTextBox::offsetForPosition const): Ditto.
(WebCore::InlineTextBox::positionForOffset const): Ditto.
(WebCore::InlineTextBox::createTextRun const): Added; formerly named constructTextRun.
(WebCore::InlineTextBox::text const): Added.
(WebCore::InlineTextBox::substringToRender const): Deleted.
(WebCore::InlineTextBox::hyphenatedStringForTextRun const): Deleted.
(WebCore::InlineTextBox::constructTextRun const): Deleted.
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::substringToRender): Deleted.
(WebCore::InlineTextBox::hyphenatedStringForTextRun): Deleted.
(WebCore::InlineTextBox::constructTextRun): Deleted; renamed to createTextRun.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222670 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove SelectionSubtreeRoot::RenderSubtreesMap
zalan@apple.com [Fri, 29 Sep 2017 22:50:56 +0000 (22:50 +0000)]
Remove SelectionSubtreeRoot::RenderSubtreesMap
https://bugs.webkit.org/show_bug.cgi?id=177685

Reviewed by Andy Estes.

This is in preparation of removing redundant SelectionSubtreeRoot.
(Now that we removed regions, RenderView is the only selection root)

No change in functionality.

* rendering/RenderView.cpp:
(WebCore::RenderView::selectionBounds const):
(WebCore::RenderView::subtreeSelectionBounds const):
(WebCore::RenderView::repaintSelection const):
(WebCore::RenderView::repaintSubtreeSelection const):
(WebCore::RenderView::setSelection):
(WebCore::isValidObjectForNewSelection):
(WebCore::RenderView::clearSubtreeSelection const):
(WebCore::RenderView::applySubtreeSelection):
(WebCore::RenderView::updateSelectionForSubtrees): Deleted.
* rendering/RenderView.h:
* rendering/SelectionSubtreeRoot.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222669 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r222652.
jlewis3@apple.com [Fri, 29 Sep 2017 22:25:15 +0000 (22:25 +0000)]
Unreviewed, rolling out r222652.

This broke an internal build.

Reverted changeset:

"Build libwebrtc unit tests executables"
https://bugs.webkit.org/show_bug.cgi?id=177211
http://trac.webkit.org/changeset/222652

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222668 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WK2][NETWORK_SESSION] Move some authentication-related code to avoid duplication
cdumez@apple.com [Fri, 29 Sep 2017 22:08:33 +0000 (22:08 +0000)]
[WK2][NETWORK_SESSION] Move some authentication-related code to avoid duplication
https://bugs.webkit.org/show_bug.cgi?id=177667

Reviewed by Alex Christensen.

Move some authentication-related code to avoid duplication.
This is a preparation code supporting Download authentication
as Download uses a NSURLSessionDownloadTask and not a
NetworkDataTask.

* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTask::setSuggestedFilename):
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::allowsSpecificHTTPSCertificateForHost):
* NetworkProcess/NetworkSession.h:
* NetworkProcess/PreconnectTask.cpp:
(WebKit::PreconnectTask::didReceiveChallenge):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::didReceiveChallenge):
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(WebKit::certificatesMatch):
(WebKit::NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222667 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix WKWebViewConfigurationPrivate after r222663
achristensen@apple.com [Fri, 29 Sep 2017 21:35:59 +0000 (21:35 +0000)]
Fix WKWebViewConfigurationPrivate after r222663
https://bugs.webkit.org/show_bug.cgi?id=177644

Source/WebKit:

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/Configuration.mm: Added.
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222666 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Curl] Extract a features to manage HTTP communication from ResourceHandle
commit-queue@webkit.org [Fri, 29 Sep 2017 21:19:32 +0000 (21:19 +0000)]
[Curl] Extract a features to manage HTTP communication from ResourceHandle
https://bugs.webkit.org/show_bug.cgi?id=175148

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2017-09-29
Reviewed by Alex Christensen.

* platform/Curl.cmake:
* platform/network/curl/CurlRequest.cpp: Added.
(WebCore::CurlRequest::CurlRequest):
(WebCore::CurlRequest::setUserPass):
(WebCore::CurlRequest::start):
(WebCore::CurlRequest::startWithJobManager):
(WebCore::CurlRequest::cancel):
(WebCore::CurlRequest::suspend):
(WebCore::CurlRequest::resume):
(WebCore::CurlRequest::callDelegate):
(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::willSetupSslCtx):
(WebCore::CurlRequest::willSendData):
(WebCore::CurlRequest::didReceiveHeader):
(WebCore::CurlRequest::didReceiveData):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::didCancelTransfer):
(WebCore::CurlRequest::resolveBlobReferences):
(WebCore::CurlRequest::setupPUT):
(WebCore::CurlRequest::setupPOST):
(WebCore::CurlRequest::setupFormData):
(WebCore::CurlRequest::invokeDidReceiveResponseForFile):
(WebCore::CurlRequest::invokeDidReceiveResponse):
(WebCore::CurlRequest::setPaused):
(WebCore::CurlRequest::willSetupSslCtxCallback):
(WebCore::CurlRequest::willSendDataCallback):
(WebCore::CurlRequest::didReceiveHeaderCallback):
(WebCore::CurlRequest::didReceiveDataCallback):
* platform/network/curl/CurlRequest.h: Added.
(WebCore::CurlRequest::~CurlRequest):
(WebCore::CurlRequest::setDelegate):
(WebCore::CurlRequest::isSyncRequest):
(WebCore::CurlRequest::getNetworkLoadMetrics):
* platform/network/curl/CurlRequestDelegate.h: Added.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::cancel):
(WebCore::ResourceHandle::platformSetDefersLoading):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
(WebCore::ResourceHandle::receivedCancellation):
* platform/network/curl/ResourceHandleCurlDelegate.cpp:
(WebCore::ResourceHandleCurlDelegate::ResourceHandleCurlDelegate):
(WebCore::ResourceHandleCurlDelegate::~ResourceHandleCurlDelegate):
(WebCore::ResourceHandleCurlDelegate::start):
(WebCore::ResourceHandleCurlDelegate::cancel):
(WebCore::ResourceHandleCurlDelegate::setDefersLoading):
(WebCore::ResourceHandleCurlDelegate::setAuthentication):
(WebCore::ResourceHandleCurlDelegate::dispatchSynchronousJob):
(WebCore::ResourceHandleCurlDelegate::createCurlRequest):
(WebCore::ResourceHandleCurlDelegate::cancelledOrClientless):
(WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::curlDidReceiveBuffer):
(WebCore::ResourceHandleCurlDelegate::curlDidComplete):
(WebCore::ResourceHandleCurlDelegate::curlDidFailWithError):
(WebCore::ResourceHandleCurlDelegate::response):
(WebCore::ResourceHandleCurlDelegate::getCredential):
(WebCore::ResourceHandleCurlDelegate::retain): Deleted.
(WebCore::ResourceHandleCurlDelegate::release): Deleted.
(WebCore::ResourceHandleCurlDelegate::setupTransfer): Deleted.
(WebCore::ResourceHandleCurlDelegate::didCompleteTransfer): Deleted.
(WebCore::ResourceHandleCurlDelegate::didCancelTransfer): Deleted.
(WebCore::ResourceHandleCurlDelegate::setupAuthentication): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveAllHeaders): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveContentData): Deleted.
(WebCore::ResourceHandleCurlDelegate::handleLocalReceiveResponse): Deleted.
(WebCore::ResourceHandleCurlDelegate::prepareSendData): Deleted.
(WebCore::ResourceHandleCurlDelegate::didFinish): Deleted.
(WebCore::ResourceHandleCurlDelegate::didFail): Deleted.
(WebCore::ResourceHandleCurlDelegate::setupPOST): Deleted.
(WebCore::ResourceHandleCurlDelegate::setupPUT): Deleted.
(WebCore::ResourceHandleCurlDelegate::getFormElementsCount): Deleted.
(WebCore::ResourceHandleCurlDelegate::setupFormData): Deleted.
(WebCore::ResourceHandleCurlDelegate::applyAuthentication): Deleted.
(WebCore::ResourceHandleCurlDelegate::getNetworkLoadMetrics): Deleted.
(WebCore::ResourceHandleCurlDelegate::willSetupSslCtx): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveHeader): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveData): Deleted.
(WebCore::ResourceHandleCurlDelegate::willSendData): Deleted.
(WebCore::ResourceHandleCurlDelegate::willSetupSslCtxCallback): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveHeaderCallback): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveDataCallback): Deleted.
(WebCore::ResourceHandleCurlDelegate::willSendDataCallback): Deleted.
* platform/network/curl/ResourceHandleCurlDelegate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222665 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSplit some logic out of VisitedLinkStore and make it reusable
cdumez@apple.com [Fri, 29 Sep 2017 21:14:09 +0000 (21:14 +0000)]
Split some logic out of VisitedLinkStore and make it reusable
https://bugs.webkit.org/show_bug.cgi?id=177575

Reviewed by Alex Christensen.

Source/WebCore:

Rename LinkHash to SharedStringHash to make it more reusable.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/StyleResolver.cpp:
* dom/VisitedLinkState.cpp:
(WebCore::linkHashForElement):
(WebCore::VisitedLinkState::invalidateStyleForLink):
(WebCore::VisitedLinkState::determineLinkStateSlowCase):
* dom/VisitedLinkState.h:
* html/HTMLAnchorElement.h:
(WebCore::HTMLAnchorElement::visitedLinkHash const):
* loader/EmptyClients.cpp:
* loader/HistoryController.cpp:
(WebCore::addVisitedLink):
* page/Page.cpp:
(WebCore::Page::invalidateStylesForLink):
* page/Page.h:
* page/VisitedLinkStore.cpp:
(WebCore::VisitedLinkStore::invalidateStylesForLink):
* page/VisitedLinkStore.h:
* platform/SharedStringHash.cpp: Renamed from Source/WebCore/platform/LinkHash.cpp.
(WebCore::needsTrailingSlash):
(WebCore::computeSharedStringHashInline):
(WebCore::computeSharedStringHash):
* platform/SharedStringHash.h: Renamed from Source/WebCore/platform/LinkHash.h.
(WebCore::SharedStringHashHash::hash):
(WebCore::SharedStringHashHash::equal):
(WebCore::SharedStringHashHash::avoidDeletedValue):

Source/WebKit:

Split some logic out of VisitedLinkStore and make it reusable for other purposes than
visited links and from other processes than the UIProcess.

The plan is to reuse the new SharedStringHashStore for Service Worker registration
on StorageProcess side and querying on WebContent process side.

* CMakeLists.txt:
* Shared/SharedStringHashStore.cpp: Added.
(WebKit::nextPowerOf2):
(WebKit::tableSizeForKeyCount):
(WebKit::SharedStringHashStore::SharedStringHashStore):
(WebKit::SharedStringHashStore::createSharedMemoryHandle):
(WebKit::SharedStringHashStore::add):
(WebKit::SharedStringHashStore::clear):
(WebKit::SharedStringHashStore::resizeTable):
(WebKit::SharedStringHashStore::pendingSharedStringHashesTimerFired):
* Shared/SharedStringHashStore.h: Copied from Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.h.
(WebKit::SharedStringHashStore::Client::~Client):
(WebKit::SharedStringHashStore::isEmpty const):
* Shared/SharedStringHashTable.cpp: Renamed from Source/WebKit/Shared/VisitedLinkTable.cpp.
(WebKit::SharedStringHashTable::SharedStringHashTable):
(WebKit::SharedStringHashTable::~SharedStringHashTable):
(WebKit::SharedStringHashTable::setSharedMemory):
(WebKit::SharedStringHashTable::add):
(WebKit::SharedStringHashTable::contains const):
(WebKit::SharedStringHashTable::clear):
* Shared/SharedStringHashTable.h: Renamed from Source/WebKit/Shared/VisitedLinkTable.h.
* UIProcess/API/C/WKContext.cpp:
(WKContextAddVisitedLink):
* UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
(-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
* UIProcess/VisitedLinkStore.cpp:
(WebKit::VisitedLinkStore::VisitedLinkStore):
(WebKit::VisitedLinkStore::addProcess):
(WebKit::VisitedLinkStore::addVisitedLinkHash):
(WebKit::VisitedLinkStore::removeAll):
(WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
(WebKit::VisitedLinkStore::sendStoreHandleToProcess):
(WebKit::VisitedLinkStore::didInvalidateSharedMemory):
(WebKit::VisitedLinkStore::didAddSharedStringHashes):
* UIProcess/VisitedLinkStore.h:
* UIProcess/WebProcessPool.cpp:
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::isLinkVisited):
(WebKit::VisitedLinkTableController::addVisitedLink):
(WebKit::VisitedLinkTableController::visitedLinkStateChanged):
* WebProcess/WebPage/VisitedLinkTableController.h:
* WebProcess/WebPage/VisitedLinkTableController.messages.in:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebVisitedLinkStore.h:
* WebCoreSupport/WebVisitedLinkStore.mm:
(WebVisitedLinkStore::addVisitedLink):
(WebVisitedLinkStore::removeVisitedLink):
(WebVisitedLinkStore::isLinkVisited):
(WebVisitedLinkStore::addVisitedLinkHash):

Source/WebKitLegacy/win:

* WebCoreSupport/WebVisitedLinkStore.cpp:
(WebVisitedLinkStore::addVisitedLink):
(WebVisitedLinkStore::isLinkVisited):
(WebVisitedLinkStore::addVisitedLinkHash):
* WebCoreSupport/WebVisitedLinkStore.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222664 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd WKWebViewConfiguration SPI equivalent to WKPageConfigurationSetBackgroundCPULimit
achristensen@apple.com [Fri, 29 Sep 2017 20:50:13 +0000 (20:50 +0000)]
Add WKWebViewConfiguration SPI equivalent to WKPageConfigurationSetBackgroundCPULimit
https://bugs.webkit.org/show_bug.cgi?id=177644
<rdar://problem/34338698>

Reviewed by Geoffrey Garen.

WKPageConfigurationSetBackgroundCPULimit is a setter of a std::optional<double> with no accessor.
It's never set to 0 in practice, so I guess the ObjC equivalent is a double that is zero or nonzero.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _setCPULimit:]):
(-[WKWebViewConfiguration _cpuLimit]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222663 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Open Resource Dialog icons are blurry (24x24 instead of 32x32)
commit-queue@webkit.org [Fri, 29 Sep 2017 19:54:49 +0000 (19:54 +0000)]
Web Inspector: Open Resource Dialog icons are blurry (24x24 instead of 32x32)
https://bugs.webkit.org/show_bug.cgi?id=177631
<rdar://problem/34729636>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-29
Reviewed by Matt Baker.

* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog > .tree-outline.large .item):
(.open-resource-dialog > .tree-outline.large .item .icon):
(.open-resource-dialog .tree-outline.large .item .titles):
Make the rows large enough to fit the full 32x32 icon instead of a blurry 24x24.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222662 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Uncaught exception with populate find keyboard shortcut
commit-queue@webkit.org [Fri, 29 Sep 2017 19:47:28 +0000 (19:47 +0000)]
Web Inspector: Uncaught exception with populate find keyboard shortcut
https://bugs.webkit.org/show_bug.cgi?id=177672

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-29
Reviewed by Matt Baker.

* UserInterface/Base/Main.js:
The focusedContentView can be null so bail if that is the case.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222661 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WinCairo] Fix build after rev 222610
don.olmstead@sony.com [Fri, 29 Sep 2017 19:32:49 +0000 (19:32 +0000)]
[WinCairo] Fix build after rev 222610
https://bugs.webkit.org/show_bug.cgi?id=177674

Reviewed by Per Arne Vollan.

No new tests. No change in behavior.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222660 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[iOS] Remove unused pre-iOS 11 codepaths for writing to the pasteboard
wenson_hsieh@apple.com [Fri, 29 Sep 2017 18:53:23 +0000 (18:53 +0000)]
[iOS] Remove unused pre-iOS 11 codepaths for writing to the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=177669

Reviewed by Tim Horton.

Now that PlatformPasteboardIOS codepaths for writing data on drag and copy have been unified to both use
NSItemProviders, we can remove the legacy codepath that called -setItems on UIPasteboard, since nothing uses it
any more. No change in behavior.

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write):
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::allowReadingURLAtIndex const):
(WebCore::PlatformPasteboard::readURL):
(WebCore::richTextRepresentationsForPasteboardWebContent): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222659 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r222563, r222565, and r222581.
commit-queue@webkit.org [Fri, 29 Sep 2017 18:49:37 +0000 (18:49 +0000)]
Unreviewed, rolling out r222563, r222565, and r222581.
https://bugs.webkit.org/show_bug.cgi?id=177675

"It causes a crash when playing youtube videos" (Requested by
saamyjoon on #webkit).

Reverted changesets:

"[DFG] Support ArrayPush with multiple args"
https://bugs.webkit.org/show_bug.cgi?id=175823
http://trac.webkit.org/changeset/222563

"Unreviewed, build fix after r222563"
https://bugs.webkit.org/show_bug.cgi?id=175823
http://trac.webkit.org/changeset/222565

"Unreviewed, fix x86 breaking due to exhausted registers"
https://bugs.webkit.org/show_bug.cgi?id=175823
http://trac.webkit.org/changeset/222581

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222658 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, temporarily mark http/tests/preconnect/link-rel-preconnect-https.html...
cdumez@apple.com [Fri, 29 Sep 2017 18:48:30 +0000 (18:48 +0000)]
Unreviewed, temporarily mark http/tests/preconnect/link-rel-preconnect-https.html as flaky.

* platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222657 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoImage pasting is not working on tineye.com / gmail.com / GitHub.com due to lack of...
rniwa@webkit.org [Fri, 29 Sep 2017 18:46:51 +0000 (18:46 +0000)]
Image pasting is not working on tineye.com / gmail.com / GitHub.com due to lack of support for DataTransfer.items
https://bugs.webkit.org/show_bug.cgi?id=170449
<rdar://problem/31432525>

Reviewed by Wenson Hsieh.

Source/WebCore:

The bug was caused by image types in NSPasteboard or UIPasteboard not being treated as file items in dataTransfer.
Because there is no Web API to get binary data out of dataTransfer unlike text data, we need to treat any image
data as files even if they're entirely in the memory.

This patch introduces the notion of pasteboard types to be treated as files and expose them on dataTransfer.files
as well as dataTransfer.items of type "file". Because in-memory images are stored as TIFF in macOS and websites
don't typically support image/tiff, we convert all such in-memory TIFF images into PNG images ourselves for
a better web compatibility. This is done inside read(PasteboardFileReader&) in PasteboardCocoa.mm.

Note that PasteboardFileReader cannot directly have RefPtr<File> as a member variable as code in WebCore/platform
including Pasteboard code is not supposed to depend on WebCore types. WebCorePasteboardFileReader, a subclass of
PasteboardFileReader was introduced to resolve this reverse dependency.

In addition, this patch removes the restriction on dataTransfer.items that it only includes files of the supported
MIME types. This was unwarranted since 1. we don't have any restriction on what an user can drag & drop into a web
page via input element so there is no security benefit in this, and 2. the user should be able to copy & paste
whatever file he/she desires regardless of the MIME type on websites like Google Drive.

Tests: PasteImage

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* WebCore/PlatformMac.cmake:
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::types const): Now excludes image/gif, image/png, image/jpeg, and image/tiff.
(WebCore::DataTransfer::files const): Add fake files we create for in-memory images but only when there are no real
files in the pasteboard since it's expensive to copy image data across UI/Web processes to create a blob URL.
* dom/DataTransferItemList.cpp:
(WebCore::DataTransferItemList::ensureItems const): Just expose every file type. If the user had decided to paste
a file, it's okay for the page to access that file regardless of whether it's a zip file, JPEG image, etc...
* editing/WebCorePasteboardFileReader.cpp:
(WebCorePasteboardFileReader::~WebCorePasteboardFileReader):
(WebCorePasteboardFileReader::read):
* editing/WebCorePasteboardFileReader.h:
(WebCorePasteboardFileReader):
* platform/Pasteboard.cpp:
(WebCore::PasteboardImage::PasteboardImage): Moved from platform specific translation units.
(WebCore::PasteboardImage::~PasteboardImage): Ditto.
* platform/Pasteboard.h:
(PasteboardFileReader): Added.
(* platform/StaticPasteboard.h:
(StaticPasteboard::typesForBindings): Added.
(StaticPasteboard::typesTreatedAsFiles): Added. Returns an empty list we don't support the web content writing image
files into pasteboard at the moment.
* platform/cocoa/PasteboardCocoa.mm: Added.
(WebCore::PasteboardWebContent::PasteboardWebContent): Moved from PasteboardMac.mm and PasteboardIOS.mm.
(WebCore::PasteboardWebContent::~PasteboardWebContent):
(WebCore::cocoaTypeToImageType): Added.
(WebCore::imageTypeToMIMEType): Added. Pretends to have image/png when the Cocoa type is image/tiff since most of
websites don't support image/tiff.
(WebCore::imageTypeToFakeFilename): Added.
(WebCore::mimeTypeToImageType): Added.
(WebCore::Pasteboard::shouldTreatCocoaTypeAsFile): Added. Pasteboard::typesForBindings excludes the type for which
this function returns true.
(WebCore::Pasteboard::typesTreatedAsFiles): Returns the list of all in-memory image types in the pasteboard.
(WebCore::Pasteboard::read): Added. On macOS, we convert TIFF to PNG for web compatibility. We don't do this rather
memory intensive coercion on iOS where most of apps like Photos put PNG file into the pasteboard in the first place.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::PasteboardImage::PasteboardImage): Deleted.
(WebCore::PasteboardImage::~PasteboardImage): Deleted.
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::typesForBindings): Renamed from types.
(WebCore::Pasteboard::typesTreatedAsFiles):
* platform/ios/PasteboardIOS.mm:
(WebCore::addHTMLClipboardTypesForCocoaType):
(WebCore::Pasteboard::typesForBindings):
(WebCore::PasteboardWebContent::PasteboardWebContent): Deleted.
(WebCore::PasteboardWebContent::~PasteboardWebContent): Deleted.
(WebCore::PasteboardImage::PasteboardImage): Deleted.
(WebCore::PasteboardImage::~PasteboardImage): Deleted.
(WebCore::Pasteboard::types): Deleted.
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Add "Files" to dataTransfer.types when there is an in-memory
image type in the pasteboard.
* platform/mac/PasteboardMac.mm:
(WebCore::PasteboardWebContent::PasteboardWebContent): Deleted.
(WebCore::PasteboardWebContent::~PasteboardWebContent): Deleted.
(WebCore::PasteboardImage::PasteboardImage): Deleted.
(WebCore::PasteboardImage::~PasteboardImage): Deleted.
(WebCore::addHTMLClipboardTypesForCocoaType): Moved the check for the legacy NeXT plain text check here. Also add
"Files" to dataTransfer.types when there is an in-memory image type in the pasteboard.
(WebCore::Pasteboard::typesForBindings): Renamed from types.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Ditto to add "Files".
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::typesForBindings): Renamed from types.
(WebCore::Pasteboard::typesTreatedAsFiles):
(WebCore::Pasteboard::read):
* platform/wpe/PasteboardWPE.cpp:
(WebCore::Pasteboard::typesForBindings): Renamed from types.
(WebCore::Pasteboard::typesTreatedAsFiles):
(WebCore::Pasteboard::read):

Source/WebKit:

Add sandbox extensions for files in the pasteboard to make copying & pasting image files work.
This is what we do for drag & drop but we should consider adding a mechanism to rekoke the extension in the future.

* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::getPasteboardPathnamesForType): Add sandbox extensions to the pasted files.
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPathnamesForType): Consume the sandbox tokens sent by the UI process permanently
since WebCore will now create File objects for these pasted files.

Tools:

Added an API test to paste an image from pasteboard. The test is shared between iOS and macOS.

The tests to paste image files are only enabled on macOS since putting files into pasteboard isn't a thing on iOS.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm: Added.
(writeImageDataToPasteboard):
(writeBundleFileToPasteboard):
* TestWebKitAPI/Tests/WebKitCocoa/paste-image.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-100px.tiff: Added.
* TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-200px.png: Added.
* TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-400px.gif: Added.
* TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-600px.jpg: Added.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm: Rebaselined the test now that types contain "Files".

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222656 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRe-enable more pasteboard tests on iOS after r222595
rniwa@webkit.org [Fri, 29 Sep 2017 18:37:28 +0000 (18:37 +0000)]
Re-enable more pasteboard tests on iOS after r222595
https://bugs.webkit.org/show_bug.cgi?id=177637

Reviewed by Wenson Hsieh.

* platform/ios/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222655 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[iOS WK2] Implement -[WKContentView hasText] for compatibility with the UITextInput...
wenson_hsieh@apple.com [Fri, 29 Sep 2017 18:33:32 +0000 (18:33 +0000)]
[iOS WK2] Implement -[WKContentView hasText] for compatibility with the UITextInput protocol
https://bugs.webkit.org/show_bug.cgi?id=177662
<rdar://problem/33410373>

Reviewed by Tim Horton.

Source/WebCore:

Adds a new TextIterator helper function to determine whether a Range has any plain text.

Tests: EditorStateTests.ContentViewHasTextInContentEditableElement
       EditorStateTests.ContentViewHasTextInTextarea

* editing/TextIterator.cpp:
(WebCore::hasAnyPlainText):

Add a new helper to determine whether a Range contains any plain text. While inspired by and very similar to the
plainText() helper function, this variant does not create a new string buffer when invoked, and is therefore
more efficient for the purposes of determining whether there is any plain text at all.

* editing/TextIterator.h:

Source/WebKit:

Implements -[WKContentView hasText] by propagating a flag through post-layout editor state.

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

Add a new flag to EditorState indicating whether or not the current editable root containing the selection has
any plain text. Add IPC support for this new flag.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView hasText]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::computeEditableRootHasContentAndPlainText):

Add a new helper to compute whether or not the editable root has any content, and any plain text. This
is used as the last cached value for -hasText on WKContentView that we will deliver to UIKit. Some important
things to note here:
- If post layout data already indicates that we have selected some plain text, or that there is a plain text
  character near the selection, just set the flags to true and bail, since the editable root necessarily has
  content that is plain text.
- If hasContent is false, don't even bother computing hasPlainText, because it must also be false.
- Otherwise, use hasAnyPlainText to compute the value of hasPlainText, which is a faster variant of plainText.
These optimizations help us avoid doing extra work at all when running Speedometer, apart from checking the
values of a few PostLayoutData flags. This also fixes the value of hasContent, which was previously always false
if we had a range selection rather than a caret selection even when the editable root has content, because the
logic to compute the value of hasContent only existed in the branch where we have a caret selection.

(WebKit::WebPage::platformEditorState const):

Tools:

Add EditorState API tests to check that the value of -[WKContentView hasText] is correct when editing both plain
and rich text areas.

* TestWebKitAPI/EditingTestHarness.h:
* TestWebKitAPI/EditingTestHarness.mm:
(-[EditingTestHarness insertParagraph]):
(-[EditingTestHarness insertText:]):
(-[EditingTestHarness insertHTML:]):
(-[EditingTestHarness selectAll]):
(-[EditingTestHarness deleteBackwards]):
* TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:

Add versions of EditingTestHarness helpers that don't require us to expect any editor state after executing the
edit command.

(TestWebKitAPI::checkContentViewHasTextWithFailureDescription):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView textInputContentView]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222654 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd WeakPtr support to RenderObject.
zalan@apple.com [Fri, 29 Sep 2017 17:50:59 +0000 (17:50 +0000)]
Add WeakPtr support to RenderObject.
https://bugs.webkit.org/show_bug.cgi?id=177429
<rdar://problem/34625212>

Reviewed by Dean Jackson.

This is in preparation to start using weak pointers extensively in rendering.

No change in functionality.

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin):
* page/FrameView.cpp:
(WebCore::FrameView::updateEmbeddedObject):
* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
(WebCore::RenderObject::createWeakPtr):
* rendering/RenderView.cpp:
(WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator):
(WebCore::RenderView::RepaintRegionAccumulator::~RepaintRegionAccumulator):
* rendering/RenderView.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidgetGeometry):
(WebCore::RenderWidget::setWidget):
(WebCore::RenderWidget::updateWidgetPosition):
* rendering/RenderWidget.h:
(WebCore::RenderWidget::createWeakPtr): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222653 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoBuild libwebrtc unit tests executables
commit-queue@webkit.org [Fri, 29 Sep 2017 17:05:37 +0000 (17:05 +0000)]
Build libwebrtc unit tests executables
https://bugs.webkit.org/show_bug.cgi?id=177211

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-29
Reviewed by Alex Christensen.

.:

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

Source/ThirdParty/libwebrtc:

Adding support for a new target called unittests that will be several executables.
Each executable run unit tests dedicated to a part of libwebrtc.

Adding one target/executable per unit test suite.
Adding one composite target to build all unit test targets.
Adding a target to build a static libwebrtctest library.
The static libwebrtctest library is then linked to each unit test executable which is also linked to libwebrtc dylib.

Some unit tests require a default codec (VP8) that is disabled in libwebrtc.
This ends up making some tests crashing.
An additional work should follow to execute only the meaningful subset of tests.

* Configurations/libwebrtc-base.xcconfig: Added.
* Configurations/libwebrtc-test-static.xcconfig: Added.
* Configurations/rtc_pc_unittests.xcconfig: Added.
* Source/third_party/gflags/gen/posix/include/private/config.h:
* Source/webrtc/modules/audio_coding/neteq/tools/neteq_test.cc: Replacing FATAL by RTC_FATAL.
* Source/webrtc/sdk/objc/Framework/Classes/Common/helpers.mm: Removing UIKit dependency.
* Source/webrtc/test/gmock.h: Using googletest version instead of checking in testing folder.
* Source/webrtc/test/gtest.h: Ditto.
* Source/webrtc/test/rtp_file_reader.cc: Replacing FATAL by RTC_FATAL.
* libwebrtc.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222652 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r222625.
commit-queue@webkit.org [Fri, 29 Sep 2017 16:47:42 +0000 (16:47 +0000)]
Unreviewed, rolling out r222625.
https://bugs.webkit.org/show_bug.cgi?id=177664

causes crashes on iOS (Requested by pizlo-mbp on #webkit).

Reverted changeset:

"Enable gigacage on iOS"
https://bugs.webkit.org/show_bug.cgi?id=177586
http://trac.webkit.org/changeset/222625

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222651 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUpdate my status.
cturner@igalia.com [Fri, 29 Sep 2017 12:33:46 +0000 (12:33 +0000)]
Update my status.

Unreviewed.

* Scripts/webkitpy/common/config/contributors.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222650 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GStreamer] Refactor media player to use MediaTime consistently
eocanha@igalia.com [Fri, 29 Sep 2017 10:22:12 +0000 (10:22 +0000)]
[GStreamer] Refactor media player to use MediaTime consistently
https://bugs.webkit.org/show_bug.cgi?id=174817

Reviewed by Xabier Rodriguez-Calvar.

Make consistent use of the MediaTime class in the GStreamer media
player implementations.

This patch is authored by Charlie Turner <cturner@igalia.com> plus
some minor modifications by Enrique: migration of m_cachedPosition,
usage of m_seekTime as MediaTime in the MSE player and more logging
using toString().

Covered by existing tests.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::toGstUnsigned64Time): Scales MediaTime to the precision used
by GStreamer and returns a value compatible with GstClockTime.
(WebCore::toGstClockTime): Deleted.
* platform/graphics/gstreamer/GStreamerUtilities.h:
(WebCore::toGstClockTime): Inlined, now it takes MediaTime and converts
to GstClockTime.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
Several changes to use MediaTime instead of float and to log MediaTime
values converting them toString().
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
(WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
(WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):
(WebCore::MediaPlayerPrivateGStreamer::seek): Uses MediaTime.
(WebCore::MediaPlayerPrivateGStreamer::doSeek):
(WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
(WebCore::MediaPlayerPrivateGStreamer::buffered const):
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
(WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const):
(WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded const):
(WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):
(WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
(WebCore::MediaPlayerPrivateGStreamer::updateStates):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
(WebCore::MediaPlayerPrivateGStreamer::durationChanged):
(WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable const): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Changed
seek(), playBackposition(), m_cachedPosition, m_durationAtEOS,
m_seekTime and m_timeOfOverlappingSeek to be of MediaTime type.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
Prefer the methods based on MediaTime over those based on fload/double.
(WebCore::MediaPlayerPrivateGStreamerBase::maxTimeLoaded const):
* platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:
(WebCore::GStreamerMediaSample::offsetTimestampsBy): toGstClockTime()
now can handle MediaTime.
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
Several changes to use MediaTime instead of float and to log MediaTime
values converting them toString().
(WebCore::MediaPlayerPrivateGStreamerMSE::seek):
(WebCore::MediaPlayerPrivateGStreamerMSE::notifySeekNeedsDataForTime):
(WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
(WebCore::MediaPlayerPrivateGStreamerMSE::maybeFinishSeek):
(WebCore::MediaPlayerPrivateGStreamerMSE::isTimeBuffered const):
(WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):
(WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
(WebCore::MediaPlayerPrivateGStreamerMSE::maxTimeSeekable const):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
seek() now takes a MediaTime argument.
* platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
(WebCore::PlaybackPipeline::enqueueSample): Use MediaTime values in
MediaSample.
* platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcQueryWithParent): Use MediaTime values in
durationMediaTime().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222649 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUpdate syncing script to be able to build binary for commit set with owned commits.
dewei_zhu@apple.com [Fri, 29 Sep 2017 07:34:41 +0000 (07:34 +0000)]
Update syncing script to be able to build binary for commit set with owned commits.
https://bugs.webkit.org/show_bug.cgi?id=177225

Reviewed by Ryosuke Niwa.

Added support for syncing script to be able to schedule builds to build binary for owned commits.
Introduces 'ifRepositorySet' and 'ownedRevisions' in 'buildProperties'.
'ifRepositorySet' will conditionaly set a build property if at least one of the repositories it specified requires build.
'ownedRevisions' specifies owned commits revision informations.

* public/v3/models/commit-set.js:
(CommitSet): Added '_ownerRepositoryToOwnedRepositoriesMap'.
(CommitSet.prototype.updateSingleton): Reset '_ownerRepositoryToOwnedRepositoriesMap'.
(CommitSet.prototype._updateFromObject): Only update '_repositoryToCommitOwnerMap' and '_ownerRepositoryToOwnedRepositoriesMap' when 'commitOwner' exists.
(CommitSet.prototype.ownerCommitForRepository): Returns a sorted list of top level repositories.
(CommitSet.prototype.ownedRepositoriesForOwnerRepository): Returns owned repositories given a owner repository.
(CustomCommitSet.prototype.ownerCommitForRepository): Returns a sorted list of top level repositories.
* public/v3/models/triggerable.js:
(prototype.accepts): It should only check against top-level repositories. Removed a deprecated 'FIXME'.
* server-tests/tools-sync-buildbot-integration-tests.js: Added unit test for building owned commits binary.
(createTriggerable): Added conditional 'ifRepositorySet' and 'ownedRevisions' in the repository groups.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest):
    Added logic to conditionaly create build property for 'ifRepositorySet'.
    Added logic to create 'ownedRevisions' based on the owner repositories it specified.
(BuildbotSyncer._parseRepositoryGroup): Build property template should be able to handle 'ifRepositorySet' and 'ownedRevisions'.
* unit-tests/buildbot-syncer-tests.js: Added unit tests for 'ifRepositorySet' and 'ownedRevisions'.
* unit-tests/commit-set-tests.js: Added unit tests for 'topLevelRepositoriesSortedByNamePreferringOnesWithURL'.
* unit-tests/resources/mock-v3-models.js: Added a repository group contains 'ios', 'webkit' and 'ownerRepository'.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222648 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRe-write Settings generation in python for some reason
commit-queue@webkit.org [Fri, 29 Sep 2017 05:37:57 +0000 (05:37 +0000)]
Re-write Settings generation in python for some reason
https://bugs.webkit.org/show_bug.cgi?id=177621

Patch by Sam Weinig <sam@webkit.org> on 2017-09-28
Reviewed by Tim Horton.

Re-writes and splits up generation of InternalSettingsGenerated.{h|cpp|idl}
and SettingsMacros.h in python in preparation for larger changes.

* DerivedSources.make:
* Scripts/GenerateSettings: Added.
* Scripts/GenerateSettings.py: Added.
* Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py: Added.
* Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py: Added.
* Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py: Added.
* Scripts/GenerateSettings/GenerateSettings.py: Added.
* Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py: Added.
* Scripts/GenerateSettings/Settings.py: Added.
* Scripts/GenerateSettings/__init__.py: Added.
* WebCore.xcodeproj/project.pbxproj:
* page/make_settings.pl: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222647 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix the macOS CMake build
timothy_horton@apple.com [Fri, 29 Sep 2017 03:07:21 +0000 (03:07 +0000)]
Fix the macOS CMake build

* CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222646 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMerge the latest version of Speedometer 2.0 to browserbench.org against at r222534.
rniwa@webkit.org [Fri, 29 Sep 2017 02:42:46 +0000 (02:42 +0000)]
Merge the latest version of Speedometer 2.0 to browserbench.org against at r222534.

Rubber-stamped by Saam Barati (a while ago).

* Speedometer2.0: Replaced with PerformanceTests/Speedometer.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222645 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GTK] Test gardening
clopez@igalia.com [Fri, 29 Sep 2017 02:35:27 +0000 (02:35 +0000)]
[GTK] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=177635

Unreviewed test gardening.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222644 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoClean up Long Press Selection Tests
megan_gardner@apple.com [Fri, 29 Sep 2017 02:22:22 +0000 (02:22 +0000)]
Clean up Long Press Selection Tests
https://bugs.webkit.org/show_bug.cgi?id=177636

Reviewed by Tim Horton.

Clean up tests to use better methods of finding selection locations so that
tests are more robust and less likely to be affected by unrelated changes.

* fast/events/touch/ios/long-press-then-drag-down-to-change-selected-text.html:
* fast/events/touch/ios/long-press-then-drag-left-to-change-selected-text.html:
* fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html:
* fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html:
* fast/events/touch/ios/long-press-to-select-and-tap-to-clear-expected.txt:
* fast/events/touch/ios/long-press-to-select-and-tap-to-clear.html:
* fast/events/touch/ios/long-press-to-select-text-expected.txt:
* fast/events/touch/ios/long-press-to-select-text.html:
* fast/events/touch/ios/resources/basic-gestures.js:
(longPressAtPoint):
(tapAtPoint):
(touchAndDragFromPointToPoint):
(pressAtPoint): Deleted.
(dragFromPointToPoint): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222643 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSimplify PLATFORM ifdefs within Editor around writing selections
don.olmstead@sony.com [Fri, 29 Sep 2017 00:15:30 +0000 (00:15 +0000)]
Simplify PLATFORM ifdefs within Editor around writing selections
https://bugs.webkit.org/show_bug.cgi?id=177624

Reviewed by Alex Christensen.

No new tests. No change in behavior.

* editing/Editor.cpp:
(WebCore::Editor::performCutOrCopy):
(WebCore::Editor::copyImage):
* editing/Editor.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222642 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r222639.
commit-queue@webkit.org [Fri, 29 Sep 2017 00:15:19 +0000 (00:15 +0000)]
Unreviewed, rolling out r222639.
https://bugs.webkit.org/show_bug.cgi?id=177630

Breaks AppleWin build (Requested by dolmstead on #webkit).

Reverted changeset:

"[WinCairo][MiniBrowser] Add ca-bundle to display secure
pages."
https://bugs.webkit.org/show_bug.cgi?id=168486
http://trac.webkit.org/changeset/222639

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222641 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAX: [ATK] object:state-changed notifications missing for multiple ARIA attributes
jdiggs@igalia.com [Fri, 29 Sep 2017 00:13:13 +0000 (00:13 +0000)]
AX: [ATK] object:state-changed notifications missing for multiple ARIA attributes
https://bugs.webkit.org/show_bug.cgi?id=177542

Source/WebCore:

Add new notification types to AXObjectCache in order to support the notifications
needed, post the notifications to all platforms, emit the signals for ATK.

Reviewed by Chris Fleizach.

Tests: accessibility/gtk/aria-disabled-changed-notification.html
       accessibility/gtk/aria-expanded-changed-notification.html
       accessibility/gtk/aria-pressed-changed-notification.html
       accessibility/gtk/aria-readonly-changed-notification.html
       accessibility/gtk/aria-required-changed-notification.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChanged):
* accessibility/AXObjectCache.h:
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification):

Tools:

Add platform support for the notifications. Also add support for getting the
boolean argument indicating whether the state has been set or unset.

Reviewed by Chris Fleizach.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:

LayoutTests:

Reviewed by Chris Fleizach.

* accessibility/gtk/aria-disabled-changed-notification-expected.txt: Added.
* accessibility/gtk/aria-disabled-changed-notification.html: Added.
* accessibility/gtk/aria-expanded-changed-notification-expected.txt: Added.
* accessibility/gtk/aria-expanded-changed-notification.html: Added.
* accessibility/gtk/aria-pressed-changed-notification-expected.txt: Added.
* accessibility/gtk/aria-pressed-changed-notification.html: Added.
* accessibility/gtk/aria-readonly-changed-notification-expected.txt: Added.
* accessibility/gtk/aria-readonly-changed-notification.html: Added.
* accessibility/gtk/aria-required-changed-notification-expected.txt: Added.
* accessibility/gtk/aria-required-changed-notification.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222640 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WinCairo][MiniBrowser] Add ca-bundle to display secure pages.
commit-queue@webkit.org [Thu, 28 Sep 2017 23:52:57 +0000 (23:52 +0000)]
[WinCairo][MiniBrowser] Add ca-bundle to display secure pages.
Copy cacert.pem file into bundle directory.
https://bugs.webkit.org/show_bug.cgi?id=168486

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2017-09-28
Reviewed by Brent Fulgham.

* MiniBrowser/win/CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222639 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agotest262: Unexpected passes after r222617 and r222618.
mark.lam@apple.com [Thu, 28 Sep 2017 23:32:53 +0000 (23:32 +0000)]
test262: Unexpected passes after r222617 and r222618.
https://bugs.webkit.org/show_bug.cgi?id=177622
<rdar://problem/34725960>

Reviewed by Saam Barati.

JSTests:

Update test262.yaml for tests that are now passing.

* test262.yaml:

Source/JavaScriptCore:

Now that these tests are marked as "normal", we will run them and discover a few
missing exception checks.  This patch also adds those missing exception checks.

* runtime/DatePrototype.cpp:
(JSC::fillStructuresUsingDateArgs):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222638 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove TextRun::setCharactersLength() and TextRun::charactersLength()
dbates@webkit.org [Thu, 28 Sep 2017 23:08:27 +0000 (23:08 +0000)]
Remove TextRun::setCharactersLength() and TextRun::charactersLength()
https://bugs.webkit.org/show_bug.cgi?id=177620

Reviewed by Zalan Bujtas.

The purpose of TextRun::setCharactersLength() and TextRun::charactersLength() predate the
use of WidthIterator to safely iterate over characters in a TextRun that may contain
surrogate halves due to how it was created (without thought of surrogate pairs). Historically
TextRun::charactersLength() complemented TextRun::length() and represented the length of the
text to render ignoring and respecting truncation, respectively. We not longer need either
of these member functions with the advent of WidthIterator.

No functionality changed. So, no new tests.

* platform/graphics/ComplexTextController.cpp:
(WebCore::TextLayout::constructTextRun):
* platform/graphics/TextRun.cpp: Remove one unsigned field from ExpectedTextRunSize as we
reduced the size of TextRun with the removal of TextRun::m_charactersLength.
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
(WebCore::TextRun::charactersLength const): Deleted.
(WebCore::TextRun::setCharactersLength): Deleted.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::constructTextRun const):
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::constructTextRun): Deleted overload that took const RenderStyle& style
and StringView.
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache const):
(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::width const):
* rendering/line/BreakingContext.h:
(WebCore::textWidth):
(WebCore::tryHyphenating):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun const):
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::constructTextRun):
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair const): Use TextRun::length().
(WebCore::SVGTextMetricsBuilder::advance): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222637 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWebInspector: Uncaught Exception: TypeError: this._delegate.completionControllerCSSFu...
webkit@devinrousso.com [Thu, 28 Sep 2017 23:04:05 +0000 (23:04 +0000)]
WebInspector: Uncaught Exception: TypeError: this._delegate.completionControllerCSSFunctionValuesNeeded is not a function.
https://bugs.webkit.org/show_bug.cgi?id=177619

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WI.CodeMirrorCompletionController.prototype._generateCSSCompletions):
Remove accidental `typeof` keyword.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222636 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSkip failing preconnect tests on Windows.
pvollan@apple.com [Thu, 28 Sep 2017 22:22:47 +0000 (22:22 +0000)]
Skip failing preconnect tests on Windows.
https://bugs.webkit.org/show_bug.cgi?id=177626

Unreviewed test gardening.

* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222635 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agocheck in AWS Lambda code used for WebKitArchiveSupport
lforschler@apple.com [Thu, 28 Sep 2017 21:43:43 +0000 (21:43 +0000)]
check in AWS Lambda code used for WebKitArchiveSupport
https://bugs.webkit.org/show_bug.cgi?id=177614

Rubber-stamped by Alexey Proskuryakov.

* WebKitArchiveSupport/lambda: Added.
* WebKitArchiveSupport/lambda/delete-minified-s3-archive-from-dynamodb.py: Added.
(lambda_handler):
* WebKitArchiveSupport/lambda/delete-s3-archive-from-dynamodb.py: Added.
(lambda_handler):
* WebKitArchiveSupport/lambda/register-archive-in-dynamodb.py: Added.
(lambda_handler):
* WebKitArchiveSupport/lambda/register-minified-s3-archive-in-dynamodb.py: Added.
(lambda_handler):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222634 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeakPtrFactory should allow downcasting
jiewen_tan@apple.com [Thu, 28 Sep 2017 21:31:40 +0000 (21:31 +0000)]
WeakPtrFactory should allow downcasting
https://bugs.webkit.org/show_bug.cgi?id=177389
<rdar://problem/34604174>

Reviewed by Geoffrey Garen.

Source/WTF:

In this patch, WeakPtrFactory is enhanced with the ability to create WeakPtrs
of its owner's sub classes and have them point to the same WeakReference.

* wtf/WeakPtr.h:
(WTF::WeakPtr::WeakPtr):
We cannot determine the base class of type T, thus no friends. It is made public
such that WeakPtrFactory with a base class type U can create a derived type T
WeakPtr.
(WTF::WeakPtrFactory::createWeakPtr const):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
(TestWebKitAPI::Base::foo):
(TestWebKitAPI::Base::createWeakPtr):
(TestWebKitAPI::Derived::foo):
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222633 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark http/tests/storageAccess/request-storage-access-top-frame.html as flaky on iOS.
ryanhaddad@apple.com [Thu, 28 Sep 2017 21:13:13 +0000 (21:13 +0000)]
Mark http/tests/storageAccess/request-storage-access-top-frame.html as flaky on iOS.
https://bugs.webkit.org/show_bug.cgi?id=177617

Unreviewed test gardening.

* platform/ios/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222632 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd debug flag to WebKitTestRunner to show where touches are being generated
megan_gardner@apple.com [Thu, 28 Sep 2017 20:41:37 +0000 (20:41 +0000)]
Add debug flag to WebKitTestRunner to show where touches are being generated
https://bugs.webkit.org/show_bug.cgi?id=177583

Reviewed by Tim Horton and Wenson Hsieh.

Add a flag, and the ability to paint a dot where the HIDEventGenerator is creating fake touches to
send through UIKit. This will help in debugging touch tests, because it will be easier to see if
one is actually sending the touches at the locations that they expect. This will help differentiate between
problems in the locations of the touches, and other problems that can come up when writing tests.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/port/driver.py:
(Driver.cmd_line):
* WebKitTestRunner/Options.cpp:
(WTR::Options::Options):
(WTR::handleOptionShowTouches):
(WTR::OptionsHandler::OptionsHandler):
* WebKitTestRunner/Options.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
* WebKitTestRunner/TestController.h:
(WTR::TestController::shouldShowTouches const):
* WebKitTestRunner/TestOptions.h:
* WebKitTestRunner/ios/HIDEventGenerator.h:
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[DebugTouchView pointInside:withEvent:]):
(-[HIDEventGenerator setShouldShowTouches:]):
(-[HIDEventGenerator initDebugViews]):
(-[HIDEventGenerator updateDebugUI:withPoint:isTouching:]):
(-[HIDEventGenerator _createIOHIDEventWithInfo:]):
(-[HIDEventGenerator _createIOHIDEventType:]):
(-[HIDEventGenerator _updateTouchPoints:count:]):
(-[HIDEventGenerator touchDownAtPoints:touchCount:]):
(-[HIDEventGenerator liftUpAtPoints:touchCount:]):
(-[HIDEventGenerator moveToPoints:touchCount:duration:]):
(-[HIDEventGenerator markerEventReceived:]):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::updatePlatformSpecificTestOptionsForTest const):
* WebKitTestRunner/ios/mainIOS.mm:
(-[WebKitTestRunnerApp _runTestController]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222631 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Remove Error icon in error message for resources it looks poor
commit-queue@webkit.org [Thu, 28 Sep 2017 20:18:04 +0000 (20:18 +0000)]
Web Inspector: Remove Error icon in error message for resources it looks poor
https://bugs.webkit.org/show_bug.cgi?id=177613

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-28
Reviewed by Matt Baker.

* UserInterface/Views/Main.css:
(.message-text-view.error::before): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222630 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worke...
ryanhaddad@apple.com [Thu, 28 Sep 2017 20:12:45 +0000 (20:12 +0000)]
Mark imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=177615

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222629 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove constant() in favor of env()
timothy_horton@apple.com [Thu, 28 Sep 2017 20:03:07 +0000 (20:03 +0000)]
Remove constant() in favor of env()
https://bugs.webkit.org/show_bug.cgi?id=177581
<rdar://problem/34701321>

Reviewed by Dean Jackson.

Source/WebCore:

No new tests, removing a feature.

* css/CSSValueKeywords.in:
* css/CSSVariableData.cpp:
(WebCore::CSSVariableData::checkVariablesForCyclesWithRange const):
(WebCore::CSSVariableData::resolveTokenRange const):
* css/parser/CSSVariableParser.cpp:
(WebCore::classifyBlock):

Source/WebInspectorUI:

* UserInterface/Models/CSSCompletions.js:
* UserInterface/Models/CSSKeywordCompletions.js:
(WI.CSSKeywordCompletions.forProperty):
(WI.CSSKeywordCompletions.forFunction):

LayoutTests:

* fast/css/variables/constants/invalid-constant-name-fallback-expected.html: Removed.
* fast/css/variables/constants/invalid-constant-name-fallback.html: Removed.
* fast/css/variables/constants/ios/safe-area-inset-set-expected.html: Removed.
* fast/css/variables/constants/ios/safe-area-inset-set.html: Removed.
* fast/css/variables/constants/safe-area-inset-cannot-override-expected.html: Removed.
* fast/css/variables/constants/safe-area-inset-cannot-override.html: Removed.
* fast/css/variables/constants/safe-area-inset-zero-expected.html: Removed.
* fast/css/variables/constants/safe-area-inset-zero.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222627 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, fix a test name in TestExpectations.
ryanhaddad@apple.com [Thu, 28 Sep 2017 20:01:43 +0000 (20:01 +0000)]
Unreviewed, fix a test name in TestExpectations.

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222626 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoEnable gigacage on iOS
fpizlo@apple.com [Thu, 28 Sep 2017 19:50:05 +0000 (19:50 +0000)]
Enable gigacage on iOS
https://bugs.webkit.org/show_bug.cgi?id=177586

Reviewed by Michael Saboff.

Source/bmalloc:

This enables Gigacage on iOS using a much smaller cage size. It's not necessary for it to be so
small, but this is a good conservative starting point to start to exercise the code.

* bmalloc/Gigacage.h:

Source/JavaScriptCore:

The hardest part of enabling Gigacage on iOS is that it requires loading global variables whil
executing JS, so the LLInt needs to know how to load from global variables on all platforms that
have Gigacage. So, this teaches ARM64 how to load from global variables.

* offlineasm/arm64.rb:
* offlineasm/asm.rb:
* offlineasm/instructions.rb:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222625 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRevise deployment target macros from r222620
timothy_horton@apple.com [Thu, 28 Sep 2017 19:35:10 +0000 (19:35 +0000)]
Revise deployment target macros from r222620

Rubber-stamped by Wenson Hsieh.

* WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pdfDocumentDidLoad):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222624 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd ports 6679 and 6697 (IRC SSL) to port blacklist
bfulgham@apple.com [Thu, 28 Sep 2017 19:22:47 +0000 (19:22 +0000)]
Add ports 6679 and 6697 (IRC SSL) to port blacklist
https://bugs.webkit.org/show_bug.cgi?id=177544
<rdar://problem/34666525>

Reviewed by Alex Christensen.

Source/WebCore:

Test: security/block-test.html

* platform/URL.cpp:
(WebCore::portAllowed): Also block port 6679.

LayoutTests:

Update test and expectations for new port.

* security/block-test-expected.txt:
* security/block-test.html:
* platform/gtk/security/block-test-expected.txt:
* platform/mac/security/block-test-expected.txt:
* platform/wpe/security/block-test-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222623 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, speculative Windows build fix after r222613.
cdumez@apple.com [Thu, 28 Sep 2017 18:52:41 +0000 (18:52 +0000)]
Unreviewed, speculative Windows build fix after r222613.

* dom/StringCallback.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222622 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSmall cleanup in RenderMenuList::didUpdateActiveOption
zalan@apple.com [Thu, 28 Sep 2017 18:50:05 +0000 (18:50 +0000)]
Small cleanup in RenderMenuList::didUpdateActiveOption
https://bugs.webkit.org/show_bug.cgi?id=177610

Reviewed by Dean Jackson.

No change in functionality.

* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::RenderMenuList):
(RenderMenuList::didUpdateActiveOption):
* rendering/RenderMenuList.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222621 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRequest for PDF URL targets for specific pages, sections, etc.
commit-queue@webkit.org [Thu, 28 Sep 2017 18:40:41 +0000 (18:40 +0000)]
Request for PDF URL targets for specific pages, sections, etc.
https://bugs.webkit.org/show_bug.cgi?id=177582
<rdar://problem/5692679>

Patch by Aishwarya Nirmal <anirmal@apple.com> on 2017-09-28
Reviewed by Tim Horton.

This change sets the URL fragment for scroll anchoring in PDFs.

* WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pdfDocumentDidLoad):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222620 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[PAL] Move HysteresisActivity into PAL
commit-queue@webkit.org [Thu, 28 Sep 2017 18:37:22 +0000 (18:37 +0000)]
[PAL] Move HysteresisActivity into PAL
https://bugs.webkit.org/show_bug.cgi?id=177516

Patch by Ross Kirsling <ross.kirsling@sony.com> on 2017-09-28
Reviewed by Alex Christensen.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* platform/UserActivity.cpp:
(WebCore::UserActivity::UserActivity):
(WebCore::UserActivity::hysteresisUpdated):
* platform/UserActivity.h:
* platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:
(WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
* platform/graphics/cairo/BackingStoreBackendCairoImpl.h:
* platform/ios/WebSQLiteDatabaseTrackerClient.h:
* platform/ios/WebSQLiteDatabaseTrackerClient.mm:
(WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
(WebCore::WebSQLiteDatabaseTrackerClient::hysteresisUpdated):

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/HysteresisActivity.h: Renamed from Source/WebCore/platform/HysteresisActivity.h.

Source/WebKit:

* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
* Shared/WebSQLiteDatabaseTracker.cpp:
(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
(WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
* Shared/WebSQLiteDatabaseTracker.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_pageScrolledHysteresis):
(WebKit::m_userActivityHysteresis):
(WebKit::WebPage::updateUserActivity):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/WebProcess.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222619 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Re-landing] Turn on exception scope verification for JSC tests.
mark.lam@apple.com [Thu, 28 Sep 2017 18:25:28 +0000 (18:25 +0000)]
[Re-landing] Turn on exception scope verification for JSC tests.
https://bugs.webkit.org/show_bug.cgi?id=162351
<rdar://problem/29563911>

Reviewed by Saam Barati.

Update: I'm re-landing this patch now that test262 exception check validation
failures have been fixed in r222617.  testapi still has some validation failures,
but this patch does not affect testapi.

Added the option to --validateExceptionChecks=true option to BASE_OPTIONS in
run-jsc-stress-tests.  This turns on exception scope verification on JSC test
runs (which currently does not include testapi).

Some stats on time to run JSC stress and mozilla tests:
1. Release build w/o --validateExceptionChecks=true: real 16m22.544s, user 156m24.080s, sys 123m3.649s
2. Debug build w/o --validateExceptionChecks=true: real 78m34.206s, user 1661m57.008s, sys 73m21.177s
3. Debug build w/ --validateExceptionChecks=true: real 77m41.106s, user 1656m13.924s, sys 73m42.309s
4. Debug build w/ --validateExceptionChecks=true --dumpSimulatedThrows=true: real 92m56.918s, user 2012m56.441s, sys 75m14.174s

The stats shows that (2) and (3) has effectively no time difference.  Hence, the
cost of enabling --validateExceptionChecks=true is not significant.

It would be nice to enable --dumpSimulatedThrows=true as well, but (4) is about
21% slower than (3).  To avoid making debug test runs a lot slower, we'll leave
--dumpSimulatedThrows=true off.  We can manually add that when we see a regression
and need to debug the issue.  Otherwise, we wont pay the price for it.

* Scripts/run-jsc-stress-tests:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222618 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd missing exception checks and book-keeping for exception check validation.
mark.lam@apple.com [Thu, 28 Sep 2017 18:09:09 +0000 (18:09 +0000)]
Add missing exception checks and book-keeping for exception check validation.
https://bugs.webkit.org/show_bug.cgi?id=177609
<rdar://problem/34717972>

Reviewed by Keith Miller.

This resolves exception check validation failures when running test262 tests and
a few other tests.

* API/APIUtils.h:
(handleExceptionIfNeeded):
* API/JSObjectRef.cpp:
(JSObjectMakeFunction):
(JSObjectMakeArray):
(JSObjectMakeDate):
(JSObjectMakeError):
(JSObjectMakeRegExp):
(JSObjectSetPrototype):
(JSObjectGetProperty):
(JSObjectSetProperty):
(JSObjectGetPropertyAtIndex):
(JSObjectSetPropertyAtIndex):
(JSObjectDeleteProperty):
(JSObjectCallAsFunction):
(JSObjectCallAsConstructor):
* API/JSTypedArray.cpp:
(JSObjectMakeTypedArray):
(JSObjectMakeTypedArrayWithBytesNoCopy):
(JSObjectMakeTypedArrayWithArrayBuffer):
(JSObjectMakeTypedArrayWithArrayBufferAndOffset):
(JSObjectMakeArrayBufferWithBytesNoCopy):
* API/JSValueRef.cpp:
(JSValueIsEqual):
(JSValueIsInstanceOfConstructor):
(JSValueCreateJSONString):
(JSValueToNumber):
(JSValueToStringCopy):
(JSValueToObject):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeProgram):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/DatePrototype.cpp:
(JSC::fillStructuresUsingTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewWithArguments):
* runtime/JSModuleEnvironment.cpp:
(JSC::JSModuleEnvironment::put):
* runtime/ProgramExecutable.cpp:
(JSC::ProgramExecutable::initializeGlobalProperties):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::toStringName):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplitFast):
(JSC::stringProtoFuncSubstr):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222617 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[mac-wk1] Layout test webrtc/datachannel/bufferedAmountLowThreshold tests are flaky
commit-queue@webkit.org [Thu, 28 Sep 2017 17:56:16 +0000 (17:56 +0000)]
[mac-wk1] Layout test webrtc/datachannel/bufferedAmountLowThreshold tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=177462

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-28
Reviewed by Alex Christensen.

* webrtc/datachannel/bufferedAmountLowThreshold-default.html: Filling buffer until bufferedAmount is bug enough to trigger bufferedAmountLow event.
* webrtc/datachannel/bufferedAmountLowThreshold-expected.txt:
* webrtc/datachannel/bufferedAmountLowThreshold.html: Removing test that is inherently flaky on bots that are not fast enough
to continue filling the webrtc data channel buffer.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222616 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSync SYSTEM_MALLOC implementation of Gigacage
don.olmstead@sony.com [Thu, 28 Sep 2017 17:37:33 +0000 (17:37 +0000)]
Sync SYSTEM_MALLOC implementation of Gigacage
https://bugs.webkit.org/show_bug.cgi?id=177569

Reviewed by Mark Lam.

* wtf/Gigacage.h:
(Gigacage::basePtr):
(Gigacage::basePtrs):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222615 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoBuild fix for High Sierra 32 bit Mac
jbedard@apple.com [Thu, 28 Sep 2017 17:34:56 +0000 (17:34 +0000)]
Build fix for High Sierra 32 bit Mac
https://bugs.webkit.org/show_bug.cgi?id=177551
<rdar://problem/34690283>

Reviewed by Alexey Proskuryakov.

Some assertions have been removed from the SDK. Replace these assertions with equivalent
WTF assert code.  Since the files in this patch are using tabs, some style changes were
also made.

* Carbon/CarbonWindowAdapter.mm:
(+[CarbonWindowAdapter frameViewClassForStyleMask:]):
(-[CarbonWindowAdapter initWithContentRect:styleMask:backing:defer:]):
(-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
(-[CarbonWindowAdapter setViewsNeedDisplay:]):
(-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:]):
(-[CarbonWindowAdapter dealloc]):
(-[CarbonWindowAdapter windowRef]):
(-[CarbonWindowAdapter _hasWindowRef]):
(-[CarbonWindowAdapter _managesWindowRef]):
(-[CarbonWindowAdapter _removeWindowRef]):
(-[CarbonWindowAdapter _carbonWindowClass]):
(-[CarbonWindowAdapter reconcileToCarbonWindowBounds]):
(-[CarbonWindowAdapter sendSuperEvent:]):
(-[CarbonWindowAdapter relinquishFocus]):
(-[CarbonWindowAdapter _cancelKey:]):
(-[CarbonWindowAdapter _commonAwake]):
(-[CarbonWindowAdapter _destroyRealWindow:]):
(-[CarbonWindowAdapter _oldPlaceWindow:]):
(-[CarbonWindowAdapter _termWindowIfOwner]):
(-[CarbonWindowAdapter _windowMovedToRect:]):
(-[CarbonWindowAdapter constrainFrameRect:toScreen:]):
(-[CarbonWindowAdapter selectKeyViewFollowingView:]):
(-[CarbonWindowAdapter selectKeyViewPrecedingView:]):
(-[CarbonWindowAdapter canBecomeKeyWindow]):
(-[CarbonWindowAdapter canBecomeMainWindow]):
(-[CarbonWindowAdapter encodeWithCoder:]):
(-[CarbonWindowAdapter initWithCoder:]):
(-[CarbonWindowAdapter setContentView:]):
(-[CarbonWindowAdapter worksWhenModal]):
(-[CarbonWindowAdapter _setModalWindowLevel]):
(-[CarbonWindowAdapter _clearModalWindowLevel]):
(-[CarbonWindowAdapter carbonHICommandIDFromActionSelector:]):
(-[CarbonWindowAdapter sendCarbonProcessHICommandEvent:]):
(-[CarbonWindowAdapter sendCarbonUpdateHICommandStatusEvent:withMenuRef:andMenuItemIndex:]):
(-[CarbonWindowAdapter _handleRootBoundsChanged]):
(-[CarbonWindowAdapter _handleContentBoundsChanged]):
(-[CarbonWindowAdapter _handleCarbonEvent:callRef:]):
(NSCarbonWindowHandleEvent):
(-[CarbonWindowAdapter _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]):
(-[CarbonWindowAdapter _growBoxRect]):
* Carbon/HIWebView.mm:
(HIWebViewGetWebView):
(HIWebViewConstructor):
(HIWebViewDestructor):
(HIWebViewRegisterClass):
(GetBehaviors):
(Draw):
(HitTest):
(GetRegion):
(GetWindowRef):
(CreateNSEventAdoptingCGEvent):
(CopyEventCGEvent):
(CreateNSEventWithCarbonClickEvent):
(Click):
(CreateNSEventWithCarbonEvent):
(MouseUp):
(CreateNSEventWithCarbonMouseMoveEvent):
(MouseMoved):
(MouseDragged):
(MouseWheelMoved):
(ContextMenuClick):
(GetKind):
(BoundsChanged):
(OwningWindowChanged):
(WindowHandler):
(SyncFrame):
(SetFocusPart):
(AdvanceFocus):
(RelinquishFocus):
(ActiveStateChanged):
(ProcessCommand):
(UpdateCommandStatus):
(_NSSelectorForHICommand):
(HIWebViewEventHandler):
(StartUpdateObserver):
(StopUpdateObserver):
(UpdateObserver):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222614 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd support for <link rel=preconnect>
cdumez@apple.com [Thu, 28 Sep 2017 17:05:26 +0000 (17:05 +0000)]
Add support for <link rel=preconnect>
https://bugs.webkit.org/show_bug.cgi?id=177474
<rdar://problem/33141380>

Reviewed by Alex Christensen.

Source/WebCore:

Add support for <link rel=preconnect>:
- https://w3c.github.io/resource-hints/#preconnect

It is currently only enabled for WK2 on MacOS High Sierra+
and iOS 11+.

Tests: fast/dom/HTMLLinkElement/preconnect-support.html
       http/tests/preconnect/link-rel-preconnect-http.html
       http/tests/preconnect/link-rel-preconnect-https.html

* bindings/js/JSDOMExceptionHandling.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeaderContent):
* bindings/scripts/IDLAttributes.json:
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
(WebCore::Document::setConsoleMessageListener):
* dom/Document.h:
* dom/StringCallback.idl:
* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::DOMTokenList):
(WebCore::DOMTokenList::supports):
* html/DOMTokenList.h:
(WebCore::DOMTokenList::DOMTokenList):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::relList):
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::sandbox):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
(WebCore::HTMLLinkElement::relList):
* html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::LinkRelAttribute):
(WebCore::LinkRelAttribute::isSupported):
* html/LinkRelAttribute.h:
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader):
(WebCore::LinkLoader::loadLink):
* loader/LoaderStrategy.h:
* page/Settings.in:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::setConsoleMessageListener):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebCore/PAL:

Add new CFNetwork SPI for preconnecting.

* pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Add support for <link rel=preconnect>:
- https://w3c.github.io/resource-hints/#preconnect

Also add corresponding native private API.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::preconnectTo):
(WebKit::NetworkConnectionToWebProcess::didFinishPreconnection):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkDataTask.cpp:
(WebKit::NetworkDataTask::create):
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::preconnectTo):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/PreconnectTask.cpp: Added.
(WebKit::PreconnectTask::PreconnectTask):
(WebKit::PreconnectTask::~PreconnectTask):
(WebKit::PreconnectTask::willPerformHTTPRedirection):
(WebKit::PreconnectTask::didReceiveChallenge):
(WebKit::PreconnectTask::didReceiveResponseNetworkSession):
(WebKit::PreconnectTask::didReceiveData):
(WebKit::PreconnectTask::didCompleteWithError):
(WebKit::PreconnectTask::didSendData):
(WebKit::PreconnectTask::wasBlocked):
(WebKit::PreconnectTask::cannotShowURL):
(WebKit::PreconnectTask::didFinish):
* NetworkProcess/PreconnectTask.h: Copied from Source/WebKit/NetworkProcess/NetworkLoadParameters.h.
* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
* Shared/WebCoreArgumentCoders.h:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextPreconnectToServer):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _preconnectToServer:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::preconnectToServer):
* UIProcess/WebProcessPool.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didFinishPreconnection):
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::networkProcessCrashed):
(WebKit::generateLoadIdentifier):
(WebKit::WebLoaderStrategy::startPingLoad):
(WebKit::WebLoaderStrategy::preconnectTo):
(WebKit::WebLoaderStrategy::didFinishPreconnection):
* WebProcess/Network/WebLoaderStrategy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* config.h:

Source/WebKitLegacy:

* WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::preconnectTo):
* WebCoreSupport/WebResourceLoadScheduler.h:

LayoutTests:

* fast/dom/HTMLLinkElement/preconnect-support-expected.txt: Added.
* fast/dom/HTMLLinkElement/preconnect-support.html: Added.
* http/tests/preconnect/link-rel-preconnect-http-expected.txt: Added.
* http/tests/preconnect/link-rel-preconnect-http.html: Added.
* http/tests/preconnect/link-rel-preconnect-https-expected.txt: Added.
* http/tests/preconnect/link-rel-preconnect-https.html: Added.
Add layout test coverage.

* platform/mac-elcapitan-wk2/fast/dom/HTMLLinkElement/preconnect-support-expected.txt: Added.
* platform/mac-wk1/TestExpectations:
* platform/mac-wk1/fast/dom/HTMLLinkElement/preconnect-support-expected.txt: Added.
* platform/mac-wk2/TestExpectations:
Skip or land failure expectations for platforms where the feature is disabled.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222613 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAX: Defer RenderListBox selectionChanged event until after layout is done.
zalan@apple.com [Thu, 28 Sep 2017 16:31:56 +0000 (16:31 +0000)]
AX: Defer RenderListBox selectionChanged event until after layout is done.
https://bugs.webkit.org/show_bug.cgi?id=177589
<rdar://problem/34705785>

Reviewed by Chris Fleizach.

Defer AX update when the selection changed event is followed by a layout.

Covered by existing tests.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::selectionChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222612 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUpdate TestExpectations for two http/tests/xmlhttprequest/response-* tests.
ryanhaddad@apple.com [Thu, 28 Sep 2017 15:53:41 +0000 (15:53 +0000)]
Update TestExpectations for two http/tests/xmlhttprequest/response-* tests.

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222611 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Cairo] Remove the cairo_glyph_t complexity from GlyphBuffer
zandobersek@gmail.com [Thu, 28 Sep 2017 14:54:26 +0000 (14:54 +0000)]
[Cairo] Remove the cairo_glyph_t complexity from GlyphBuffer
https://bugs.webkit.org/show_bug.cgi?id=177598

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Remove the decade-old use of cairo_glyph_t as the underlying type for
Glyph. The former spans 24 bytes in size, while the latte is just 2
bytes. The x and y coordinate attributes of cairo_glyph_t were only
used in FontCascade::drawGlyphs() implementation, where they were
overridden even if the same GlyphBuffer object was used here repeatedly.

FontCascade::drawGlyphs() now creates a new Vector<cairo_glyph_t> object
and fills it only with the glyph index and coordinates data for glyphs
that will actually be drawn. This will likely in the future be leveraged
to pack the necessary data and perform the drawing operations in
parallelized tasks. GlyphBuffer usages that before required USE(CAIRO)
special-casing can now be simplified.

This also removes the need for <cairo.h> header inclusion in the
GlyphBuffer.h header. This further removes Cairo header inclusion in
roughly 600 build targets.

No new tests -- no change in behavior.

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::widthForSimpleText const):
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::glyphAt const):
(WebCore::GlyphBuffer::add):
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::drawGlyphsToContext):
(WebCore::drawGlyphsShadow):
(WebCore::FontCascade::drawGlyphs):
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawGlyphs::generateGlyphBuffer const):

Source/WebKit:

* Shared/API/c/cairo/WKImageCairo.cpp: Explicitly include the <cairo.h>
header here now that it's not included in GlyphBuffer.h.
* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222610 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r222606.
wenson_hsieh@apple.com [Thu, 28 Sep 2017 14:53:11 +0000 (14:53 +0000)]
Unreviewed, rolling out r222606.

The debug assertion hit in these API tests should be fixed by
r222608.

Reverted changeset:

"REGRESSION(r222595): Assertion failure in
_preLoadedDataConformingToType"
https://bugs.webkit.org/show_bug.cgi?id=177599
http://trac.webkit.org/changeset/222606

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222609 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[iOS WK2] DataTransfer DataInteractionTests debug assert under -_preLoadedDataConform...
wenson_hsieh@apple.com [Thu, 28 Sep 2017 14:47:59 +0000 (14:47 +0000)]
[iOS WK2] DataTransfer DataInteractionTests debug assert under -_preLoadedDataConformingToType:forItemProviderAtIndex:
https://bugs.webkit.org/show_bug.cgi?id=177594

Reviewed by Tim Horton.

Currently, some API tests added in r222595 currently hit debug assertions under -preloadedDataConformingToType:
forItemProviderAtIndex:. This is because the page may call DataTransfer.types, which now calls into
PlatformPasteboard::typesSafeForDOMToReadAndWrite(). This calls on the AbstractPasteboard (either the
UIPasteboard or WebItemProviderPasteboard, in the case of drag and drop) to fetch the custom WebKit pasteboard
data blob, if it exists. For WebItemProviderPasteboard, this ends up calling into -[WebItemProviderPasteboard
_preLoadedDataConformingToType:forItemProviderAtIndex:], which was previously only called after loading data off
of the item providers. There's an existing sanity check in this preloaded data helper to make sure that the
number of load results is equal to the number of item providers loaded from, but this sanity check only makes
sense *after* the drop has happened, not before, since we should only attempt to read dropped data after any
data at all has been dropped.

We need to check whether or not this custom data blob exists in PlatformPasteboard::typesSafeForDOMToReadAndWrite
to fetch the list of DOM-exposed types to propagate back to the page. So to fix this, we make the helper methods
for fetching dropped data (-dataForPasteboardType:inItemSet: and -valuesForPasteboardType:inItemSet:) fail
gracefully when invoked prior to drop, when PlatformPasteboard::typesSafeForDOMToReadAndWrite is invoked.

No new tests; fixes iOS drag and drop API tests that currently hit this debug assertion.

* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]):
(-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222608 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed fix of description in Changelog.
msaboff@apple.com [Thu, 28 Sep 2017 11:20:24 +0000 (11:20 +0000)]
Unreviewed fix of description in Changelog.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222607 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION(r222595): Assertion failure in _preLoadedDataConformingToType
rniwa@webkit.org [Thu, 28 Sep 2017 09:30:34 +0000 (09:30 +0000)]
REGRESSION(r222595): Assertion failure in _preLoadedDataConformingToType
https://bugs.webkit.org/show_bug.cgi?id=177599

Temporarily remove the debug assertion to make API tests not crash since the relevant API tests are passing.

* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard _preLoadedDataConformingToType:forItemProviderAtIndex:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222606 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[REGRESSION] word-spacing property is incorrectly applied
commit-queue@webkit.org [Thu, 28 Sep 2017 06:57:08 +0000 (06:57 +0000)]
[REGRESSION] word-spacing property is incorrectly applied
https://bugs.webkit.org/show_bug.cgi?id=142086
<rdar://problem/19985240>

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-09-27
Reviewed by Zalan Bujtas.

Source/WebCore:

word-spacing property isn't applied to text nodes with starting
with '\n' if the kerning enabled. In Bug 165796, only ' ' and '\t'
are treated for word-spacing, but '\n'. It should be treated as
well.

Test: fast/text/word-space-between-inlines.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun): Use
FontCascade::treatAsSpace() instead of checking explicitly by
comparing with ' ' and '\t'.

LayoutTests:

* platform/gtk/TestExpectations: Unmark
fast/text/word-space-between-inlines.html
* platform/mac/TestExpectations: Unmark
fast/css/word-spacing-between-blocks.html,
fast/css/word-spacing-between-inlines.html,
fast/css/word-spacing-characters.html and
fast/text/word-space-between-inlines.html.
* platform/gtk/fast/css/word-space-extra-expected.txt:
Rebaselined.
* platform/mac/fast/css/word-space-extra-expected.png: Ditto.
* platform/mac/fast/css/word-space-extra-expected.txt: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222605 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Cairo] Remove unnecessary cairo.h includes
zandobersek@gmail.com [Thu, 28 Sep 2017 06:18:21 +0000 (06:18 +0000)]
[Cairo] Remove unnecessary cairo.h includes
https://bugs.webkit.org/show_bug.cgi?id=177540

Reviewed by Carlos Garcia Campos.

Drop unnecessary includes of the cairo.h header from the Font.h,
FontPlatformData.h and Pattern.h headers. For the former two the
header isn't required, while in the last one we can use a forward
declaration for the cairo_pattern_t type instead of including
the whole Cairo headers to have that available.

* platform/graphics/Font.h:
* platform/graphics/FontPlatformData.h:
* platform/graphics/Pattern.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222604 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Cairo] Drop cairo_matrix_t conversion operators for AffineTransform, TransformationM...
zandobersek@gmail.com [Thu, 28 Sep 2017 06:16:52 +0000 (06:16 +0000)]
[Cairo] Drop cairo_matrix_t conversion operators for AffineTransform, TransformationMatrix
https://bugs.webkit.org/show_bug.cgi?id=177539

Reviewed by Carlos Garcia Campos.

Remove the cairo_matrix_t conversion operators from the AffineTransform
and TransformationMatrix classes. These are rarely used, but enforce
including the cairo.h header in both headers, which leads to the Cairo
headers being included in around 800 build targets.

Instead, the toCairoMatrix() function is added to CairoUtilities.h that
creates a cairo_matrix_t object for the given AffineTransform. No
toCairoMatrix() is needed for TransformationMatrix since objects of
that type aren't converted to cairo_matrix_t anywhere in the codebase.

This patch excludes unnecessary Cairo headers from about 550 build
targets (with those headers being included in the other affected 250
targets by some other header inclusion chain). CairoUtilities.h header
is now included where necessary to make toCairoMatrix() available, and
duplicated cairo.h inclusions are removed.

No new tests -- no change in behavior.

* editing/gtk/EditorGtk.cpp: Explicitly include <cairo.h> since it's
necessary for Cairo operations used there.
* platform/Cairo.cmake:
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::drawPatternToCairoContext):
(WebCore::toCairoMatrix):
* platform/graphics/cairo/CairoUtilities.h:
* platform/graphics/cairo/GradientCairo.cpp:
(WebCore::Gradient::platformGradient):
(WebCore::Gradient::setPlatformGradientSpaceTransform):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::concatCTM):
(WebCore::GraphicsContext::setCTM):
* platform/graphics/cairo/PathCairo.cpp: No need to include AffineTransform.h.
(WebCore::Path::addPath):
(WebCore::Path::transform):
* platform/graphics/cairo/PatternCairo.cpp: Ditto.
(WebCore::Pattern::createPlatformPattern const):
* platform/graphics/cairo/TransformationMatrixCairo.cpp: Removed.
* platform/graphics/transforms/AffineTransform.h:
* platform/graphics/transforms/TransformationMatrix.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222603 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd WKContentRuleList notify action type
achristensen@apple.com [Thu, 28 Sep 2017 05:43:39 +0000 (05:43 +0000)]
Add WKContentRuleList notify action type
https://bugs.webkit.org/show_bug.cgi?id=177013
<rdar://problem/31073936>

Reviewed by Darin Adler.

Source/WebCore:

Covered by new API tests.

* contentextensions/ContentExtensionActions.h:
(WebCore::ContentExtensions::hasStringArgument):
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::resolvePendingDisplayNoneActions):
(WebCore::ContentExtensions::serializeActions):
* contentextensions/ContentExtensionError.cpp:
(WebCore::ContentExtensions::contentExtensionErrorCategory):
* contentextensions/ContentExtensionError.h:
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::loadAction):
* contentextensions/ContentExtensionRule.cpp:
(WebCore::ContentExtensions::Action::deserialize):
(WebCore::ContentExtensions::Action::deserializeType):
(WebCore::ContentExtensions::Action::serializedLength):
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Action::Action):
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad):
(WebCore::ContentExtensions::applyBlockedStatusToRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/PingLoader.cpp:
(WebCore::processContentExtensionRulesForLoad):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequestInternal):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::applyBlockedStatus):
* loader/cache/CachedResourceRequest.h:
* page/ChromeClient.h:

Source/WebKit:

* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::processContentExtensionRulesForLoad):
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::contentRuleListNotification):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient):
* UIProcess/API/C/WKPageNavigationClient.h:
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::contentRuleListNotification):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::contentRuleListNotification):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentRuleListNotification):
* WebProcess/WebCoreSupport/WebChromeClient.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(WebCore::ContentExtensions::operator<<):
(TestWebKitAPI::InMemoryCompiledContentExtension::create):
(TestWebKitAPI::InMemoryCompiledContentExtension::data):
(TestWebKitAPI::InMemoryCompiledContentExtension::InMemoryCompiledContentExtension):
(TestWebKitAPI::makeBackend):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::actionsEqual):
(TestWebKitAPI::sequenceInstances):
(TestWebKitAPI::InMemoryCompiledContentExtension::createFromFilter): Deleted.
(TestWebKitAPI::InMemoryCompiledContentExtension::~InMemoryCompiledContentExtension): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: Added.
(-[ContentRuleListNotificationDelegate _webView:URL:contentRuleListIdentifiers:notifications:]):
(-[ContentRuleListNotificationDelegate webView:startURLSchemeTask:]):
(-[ContentRuleListNotificationDelegate webView:stopURLSchemeTask:]):
(-[ContentRuleListNotificationDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(makeWarnContentRuleList):
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222602 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION(210837): RegExp containing failed non-zero minimum greedy groups incorrect...
msaboff@apple.com [Thu, 28 Sep 2017 05:15:50 +0000 (05:15 +0000)]
REGRESSION(210837): RegExp containing failed non-zero minimum greedy groups incorrectly match
https://bugs.webkit.org/show_bug.cgi?id=177570

Reviewed by Filip Pizlo.

JSTests:

New regression test.

* stress/regress-177570.js: Added.

Source/JavaScriptCore:

The change in r210837 neglected to change the check in Interpreter::backtrackParentheses() that
greedy parenthesis have backtracked as far as possible.  Prior to r210837 when non-zero minimum greedy
parenthesis were factored into a fixed component and then a zero-based variable component.  After
r210837, the variable component is not zero based and the check needs to compare the
backTrack->matchAmount with the quantity iminimum count.

* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::backtrackParentheses):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222601 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoHeap out of bounds read in JSC::Yarr::Parser<JSC::Yarr::SyntaxChecker, unsigned char...
msaboff@apple.com [Thu, 28 Sep 2017 04:48:51 +0000 (04:48 +0000)]
Heap out of bounds read in JSC::Yarr::Parser<JSC::Yarr::SyntaxChecker, unsigned char>::peek()
https://bugs.webkit.org/show_bug.cgi?id=177423

Reviewed by Mark Lam.

JSTests:

Updated regression test.

* stress/regress-177423.js:
(catch):

Source/JavaScriptCore:

Updated fix that restructures that changes the do ... while to a while and adds another
atEndOfPattern() check before looking for the first named group identifier character.

* yarr/YarrParser.h:
(JSC::Yarr::Parser::tryConsumeGroupName):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222600 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUncaught Exception: Attempted to assign to readonly property (at ContentView.js:...
commit-queue@webkit.org [Thu, 28 Sep 2017 04:20:05 +0000 (04:20 +0000)]
Uncaught Exception: Attempted to assign to readonly property (at ContentView.js:​206:​34)​
https://bugs.webkit.org/show_bug.cgi?id=177587

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-27
Reviewed by Matt Baker.

We allow a representedObject to be a string. In strict mode attempting to set
a property on a string results in a TypeError. So we should be careful not to
do this in the rare cases where our representedObject is the a string.

* UserInterface/Views/ContentView.js:
(WI.ContentView.contentViewForRepresentedObject):
(WI.ContentView.closedContentViewForRepresentedObject):
Avoid setting a property on strings. ContentViews backed by a String aren't typically
shared anyways, so the property case would not be useful. If a client really wants
to share they could use `new String(...)` as the representedObject.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222599 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoJSArray::canFastCopy() should fail if the source and destination arrays are the same.
mark.lam@apple.com [Thu, 28 Sep 2017 04:19:13 +0000 (04:19 +0000)]
JSArray::canFastCopy() should fail if the source and destination arrays are the same.
https://bugs.webkit.org/show_bug.cgi?id=177584
<rdar://problem/34463903>

Reviewed by Saam Barati.

JSTests:

* stress/regress-177584.js: Added.
(assertEqual):
(Array.prototype.Symbol.species):

Source/JavaScriptCore:

If the source and destination arrays are the same, we may be copying overlapping
regions.  Hence, we need to take the slow path.

* runtime/JSArrayInlines.h:
(JSC::JSArray::canFastCopy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222598 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, fix the internal build after r222596 and r222595.
wenson_hsieh@apple.com [Thu, 28 Sep 2017 03:58:19 +0000 (03:58 +0000)]
Unreviewed, fix the internal build after r222596 and r222595.

Guarding code in PlatformPasteboardIOS.mm TARGET_OS_IPHONE did not have the intended effect.

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222597 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, fix the internal build after r222595.
wenson_hsieh@apple.com [Thu, 28 Sep 2017 03:18:50 +0000 (03:18 +0000)]
Unreviewed, fix the internal build after r222595.

Add missing iOS compiler guards.

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222596 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoDrag event DataTransfer has unexpected types "dyn.ah62d4..."
wenson_hsieh@apple.com [Thu, 28 Sep 2017 02:29:16 +0000 (02:29 +0000)]
Drag event DataTransfer has unexpected types "dyn.ah62d4..."
https://bugs.webkit.org/show_bug.cgi?id=172526
<rdar://problem/32396081>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Currently, the pasteboard types we expose to web content are simply the types that appear on the platform
pasteboard (i.e. the general NSPasteboard on Mac, and either the general UIPasteboard or a UIDragSession's
NSItemProviders on iOS). This leads to DataTransfer.types exposing many private pasteboard types written by apps
around the system to the page, such as dynamic UTIs, CorePasteboardFlavorTypes, or the "Apple WebKit dummy
pasteboard type". These are not only confusing and not useful for web content (since they mostly hold values of
empty string anyways), but can additionally pose privacy concerns by exposing information meant only for native
applications to unvetted web content.

To address this problem, other browsers (e.g. Chrome and Firefox on Mac) white-list MIME types in DataTransfer's
list of types. By default, when dragging or copying, these are "text/plain", "text/html" and "text/uri-list".
However, this policy alone is insufficient, because the page may also supply its own types, in which case our
naive whitelist would prevent us from delivering them to the page. To address this additional constraint, both
Chrome and Firefox write any custom data supplied by the page to custom pasteboard UTIs
(org.chromium.drag-dummy-type and org.mozilla.custom-clipdata, respectively). The corresponding data is a map
of custom UTI => custom data supplied by the page; upon drop or paste, this mapping is consulted if the page
calls getData() with a custom UTI.

This patch adopts this same approach in WebKit, and introduces the com.apple.WebKit.custom-pasteboard-data UTI
(refer to per-method comments below for more information). These changes are covered by 18 new layout and API
tests, as well as existing drag-and-drop tests.

Tests: editing/pasteboard/data-transfer-get-data-on-drop-custom.html
       editing/pasteboard/data-transfer-get-data-on-drop-plain-text.html
       editing/pasteboard/data-transfer-get-data-on-drop-rich-text.html
       editing/pasteboard/data-transfer-get-data-on-drop-url.html
       editing/pasteboard/data-transfer-get-data-on-paste-custom.html
       editing/pasteboard/data-transfer-get-data-on-paste-plain-text.html
       editing/pasteboard/data-transfer-get-data-on-paste-rich-text.html
       DataInteractionTests.DataTransferGetDataWhenDroppingPlainText
       DataInteractionTests.DataTransferGetDataWhenDroppingCustomData
       DataInteractionTests.DataTransferGetDataWhenDroppingURL
       DataInteractionTests.DataTransferGetDataWhenDroppingImageWithFileURL
       DataInteractionTests.DataTransferGetDataWhenDroppingRespectsPresentationStyle
       DataInteractionTests.DataTransferSetDataCannotWritePlatformTypes
       DataInteractionTests.DataTransferGetDataCannotReadPrivatePlatformTypes
       UIPasteboardTests.DataTransferGetDataWhenPastingURL
       UIPasteboardTests.DataTransferGetDataWhenPastingPlatformRepresentations
       UIPasteboardTests.DataTransferSetDataCannotWritePlatformTypes
       UIPasteboardTests.DataTransferGetDataCannotReadPrivatePlatformTypes

* CMakeLists.txt:

Add Pasteboard.cpp to the WebCore CMakeList.

* WebCore.xcodeproj/project.pbxproj:
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::getData const):
(WebCore::DataTransfer::createForDragStartEvent):

Make a new static helper function to create a StaticPasteboard-backed DataTransfer when dispatching a dragstart
event. Any data supplied by the page will be written to the static pasteboard of this DataTransfer.

(WebCore::DataTransfer::moveDragState):

Add a new helper on DataTransfer to transfer the data required to initiate a drag from one DataTransfer to
another. This is used in EventHandler to transfer the contents of the temporary DataTransfer modified by the
page during the dragstart event over to the DataTransfer used for the rest of the drag initiation codepath,
which is actually connected to the platform. This includes committing the contents of the other
DataTransfer's StaticPasteboard to the new platform-connected Pasteboard.

(WebCore::DataTransfer::hasDragImage const):
* dom/DataTransfer.h:
* editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::selectionInHTMLFormat):
(WebCore::Editor::writeSelectionToPasteboard):
(WebCore::Editor::writeSelection):

Write an additional HTML markup string on iOS. We already do this for Mac, but this data previously had no use
on iOS. This is needed for to vend the "text/html" representation to the page on iOS when pasting.

* editing/mac/EditorMac.mm:
(WebCore::Editor::selectionInHTMLFormat): Deleted.
* editing/wpe/EditorWPE.cpp:
(WebCore::createFragmentFromPasteboardData):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchDragStartEventOnSourceElement):

Renamed from dispatchDragStartEvent to dispatchDragStartEventOnSourceElement. Additionally, simplified the logic
significantly, so that we now just check to see if the StaticPasteboard exposed to the page has any data,
instead of using platform-dependent logic to compare changeCounts. We can do this because StaticPasteboard is
guaranteed to only contain content that the page has supplied during the dragstart event, since it is empty
upon initialization and cannot be written to by the rest of the platform.

(WebCore::EventHandler::handleDrag):

Tweak dispatchDragStartEvent to take a DataTransfer to expose to bindings; at the call site in handleDrag,
create a new DataTransfer backed by a StaticPasteboard that the page may mutate over the course of the dragstart
event. After dispatching to the page, move the dragging information present on the drag start DataTransfer over
to the DragState's DataTransfer. If the drag image has not been set, compute and set the default drag image
element on the DragState's DataTransfer.

(WebCore::EventHandler::dispatchDragStartEvent): Deleted.
* page/EventHandler.h:
* page/Settings.cpp:
(WebCore::Settings::customPasteboardDataEnabled):
* page/Settings.h:
(WebCore::Settings::setCustomPasteboardDataEnabled):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::createDraggingDataTransfer const): Deleted.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::createDraggingDataTransfer const): Deleted.
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::createDraggingDataTransfer const): Deleted.

Remove this helper on both iOS and Mac. This only called createForDrag() before, with the addition of clearing
the platform pasteboard prior to returning. Now that a StaticPasteboard is used when starting a drag, we clear
out the platform pasteboard in platform-invariant code in EventHandler::handleDrag, so these helpers are no
longer useful.

* platform/Pasteboard.cpp: Added.
(WebCore::isSafeTypeForDOMToReadAndWrite):

Add a new helper to determine whether or not a pasteboard type is one of the standard DOM-exposed types. These
are "text/plain", "text/html" and "text/uri-list".

(WebCore::sharedBufferFromCustomData):
(WebCore::customDataFromSharedBuffer):

Add helper methods to serialize and deserialize custom data. The serialized data blob consists of: (1)
versioning information, (2) a dictionary mapping each custom type to a value, and (3) a full list of types
written by the page, in the order they were written.

* platform/Pasteboard.h:

Rename Pasteboard::readString to Pasteboard::readStringForBindings, to reflect that the string being read and
the given type are exposed to and from the DOM.

* platform/PasteboardStrategy.h:
* platform/PasteboardWriterData.h:
* platform/PlatformPasteboard.h:
* platform/StaticPasteboard.cpp:

Split m_stringContents out into m_platformData and m_customData. The former contains type-to-data entries for
the DOM-exposed types, while the second contains entries that don't belong in the former.

(WebCore::StaticPasteboard::hasData):
(WebCore::StaticPasteboard::readStringForBindings):
(WebCore::StaticPasteboard::writeString):
(WebCore::StaticPasteboard::clear):
(WebCore::StaticPasteboard::commitToPasteboard):

Rather than propagate each entry to the client layer one at a time, populate a new PasteboardCustomData struct
and send it to the client layer in one go. This new struct consists of an array of types in the order they were
written by the page, a dictionary of public types (types we want to write directly to the platform pasteboard)
and private types (custom types we want to package under our custom data blob).

(WebCore::StaticPasteboard::readString): Deleted.
* platform/StaticPasteboard.h:
* platform/glib/EventHandlerGLib.cpp:
(WebCore::EventHandler::createDraggingDataTransfer const): Deleted.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::readStringForBindings):
(WebCore::Pasteboard::writeCustomData):
(WebCore::Pasteboard::readString): Deleted.
* platform/gtk/PlatformPasteboardGtk.cpp:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):

Add stub implementations for new custom pasteboard data methods.

* platform/ios/AbstractPasteboard.h:
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeCustomData):

Add new plumbing to ship a custom data (PasteboardCustomData) struct from WebCore to the client layer.

(WebCore::cocoaTypeFromHTMLClipboardType):
(WebCore::readPlatformValueAsString):
(WebCore::Pasteboard::readStringForBindings):
(WebCore::Pasteboard::types):

Rewritten to ask the client layer for DOM-exposed types rather than all types, in the case where custom
pasteboard data is enabled in Settings.

(WebCore::Pasteboard::readString): Deleted.
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::bufferForType):
(WebCore::PlatformPasteboard::getPathnamesForType const):
(WebCore::PlatformPasteboard::numberOfFiles const):
(WebCore::PlatformPasteboard::platformPasteboardTypeForSafeTypeForDOMToReadAndWrite):

Add a new helper to map DOM-safe pasteboard types to their platform counterparts.

(WebCore::PlatformPasteboard::write):
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType):

Add a new helper to map platform pasteboard types to their DOM-safe counterparts.

(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):

Fetch a list of DOM-exposed types. On iOS, for drag and drop, we have the additional constraint of not being
able to read any data before the drop happens. This is problematic, since the page needs to know the list of
types during 'dragover' events. To support this, we instead keep the array of types in the teamData property of
the generated item provider, which is immediately available, even when dragging across different apps. Note that
we still need to check if the pasteboard contains the full custom data blob here to handle the case where we
copy on Mac and perform a continuity paste on iOS, since teamData does not exist on Mac.

(WebCore::PlatformPasteboard::readString):

Tweak to account for how UIPasteboard may return data blobs when reading values.

(WebCore::PlatformPasteboard::getPathnamesForType): Deleted.
(WebCore::PlatformPasteboard::numberOfFiles): Deleted.
* platform/ios/WebItemProviderPasteboard.h:
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderRegistrationInfoList itemProvider]):
(+[WebItemProviderLoadResult loadResultWithItemProvider:typesToLoad:]):
(-[WebItemProviderLoadResult initWithItemProvider:typesToLoad:]):
(-[WebItemProviderLoadResult typesToLoad]):
(-[WebItemProviderLoadResult setFileURL:forType:]):
(-[WebItemProviderLoadResult itemProvider]):
(-[WebItemProviderPasteboard setItemProviders:]):
(-[WebItemProviderPasteboard dataForPasteboardType:]):
(-[WebItemProviderPasteboard typeIdentifiersToLoadForRegisteredTypeIdentfiers:]):
(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout:]):
(+[WebItemProviderLoadResult emptyLoadResult]): Deleted.
(+[WebItemProviderLoadResult loadResultWithFileURLMap:presentationStyle:]): Deleted.
(-[WebItemProviderLoadResult initWithFileURLMap:presentationStyle:]): Deleted.
(-[WebItemProviderPasteboard typeIdentifierToLoadForRegisteredTypeIdentfiers:]): Deleted.

In the case of drag and drop on iOS, we cannot load any data prior to performing the drop; additionally, any
attempts to load data immediately after the drop is performed in the UI process will fail. This means any and
all data that the web process may require in the future when handling the drop must be loaded out of the item
providers and saved when the drop is being handled in the UI process.

Currently, we only load the highest fidelity type we can handle (or, if we don't know what we can handle, we
select the highest fidelity representation conforming to "public.content"). This is a problematic for supporting
DataTransfer.getData() on drop on iOS, because the page can ask for any of the three web-exposed types. To
address this, we refactor WebItemProviderPasteboard to support loading multiple representations per item being
dropped. At minimum, we will load anything conforming to "public.html", "public.plain-text", "public.url", and
the new "com.apple.WebKit.custom-pasteboard-data" so we have means to answer any question that the page could
ask via DataTransfer.getData(). We additonally load the highest fidelity supported (or content-conformant) type,
if it has not already been loaded as a result of the former.

To make this possible, we refactor WebItemProviderLoadResult to take an item provider and a list of types to
load. -doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout: then creates a list of load results and
uses each one to represent the results of loading data from its item provider (i.e. a map of UTI => file URL).

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::writeCustomData):
(WebCore::cocoaTypeFromHTMLClipboardType):
(WebCore::readPlatformValueAsString):
(WebCore::Pasteboard::readStringForBindings):

Change readStringForBindings (formerly, readString) so that if support for custom pasteboard data is enabled,
we only allow reading directly from the platform pasteboard if the given type is DOM-safe; otherwise, we consult
the custom data blob, if it exists. Otherwise, if support for custom pasteboard data is disabled, we fall back
to our current behavior.

(WebCore::Pasteboard::types):
(WebCore::Pasteboard::readString): Deleted.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::numberOfFiles const):
(WebCore::PlatformPasteboard::getPathnamesForType const):
(WebCore::PlatformPasteboard::stringForType):
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):

Add support for reading DOM-exposed types and fetching DOM-exposed data off of the pasteboard. The overall idea
here is similar to iOS, though implementation details vary (e.g. no item provider support).

(WebCore::PlatformPasteboard::write):
(WebCore::PlatformPasteboard::platformPasteboardTypeForSafeTypeForDOMToReadAndWrite):
(WebCore::PlatformPasteboard::numberOfFiles): Deleted.
(WebCore::PlatformPasteboard::getPathnamesForType): Deleted.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::readStringForBindings):
(WebCore::Pasteboard::writeCustomData):
(WebCore::Pasteboard::readString): Deleted.
* platform/wpe/PasteboardWPE.cpp:
(WebCore::Pasteboard::readStringForBindings):
(WebCore::Pasteboard::writeCustomData):
(WebCore::Pasteboard::readString): Deleted.
* platform/wpe/PlatformPasteboardWPE.cpp:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setCustomPasteboardDataEnabled):

Add a new internal settings hook for layout tests to opt in to using custom pasteboard data. By default, custom
pasteboard data is enabled only in Safari, or on applications linked on or after certain releases of iOS and
macOS.

* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit:

Add boilerplate plumbing and encoder/decoder support for new pasteboard codepaths. See WebCore ChangeLog for
more details.

* Scripts/webkit/messages.py:
(headers_for_type):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<PasteboardCustomData>::encode):
(IPC::ArgumentCoder<PasteboardCustomData>::decode):

Add encoder/decoder support for PasteboardCustomData.

(IPC::ArgumentCoder<PasteboardWebContent>::encode):
(IPC::ArgumentCoder<PasteboardWebContent>::decode):

Encode and decode dataInHTMLFormat.

* Shared/WebCoreArgumentCoders.h:
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
(WebKit::WebPasteboardProxy::writeCustomData):
* UIProcess/WebPasteboardProxy.cpp:
(WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
(WebKit::WebPasteboardProxy::writeCustomData):
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::typesSafeForDOMToReadAndWrite):
(WebKit::WebPlatformStrategies::writeCustomData):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

Adjust for changes in WebCore. See WebCore ChangeLog for more details.

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::webExposedTypes):
(WebPlatformStrategies::writeCustomData):

Tools:

Adds new API tests on iOS to cover various cases of using DataTransfer.setData, DataTransfer.getData, and
DataTransfer.types, as well as their interaction with platform objects (source NSItemProviders in the case of
drag and drop, and the general UIPasteboard for copy and paste).

* TestWebKitAPI/PlatformUtilities.h:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/dump-datatransfer-types.html: Added.

Introduce a new API test harness that both drag-and-drop and copy-and-paste tests use to dump DataTransfer's
web-exposed types and values.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(checkFirstTypeIsPresentAndSecondTypeIsMissing):
(checkJSONWithLogging):
(TestWebKitAPI::TEST):
(checkTypeIdentifierAndIsNotOtherTypeIdentifier): Deleted.
* TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
(TestWebKitAPI::checkJSONWithLogging):
(TestWebKitAPI::setUpWebViewForPasteboardTests):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm:
(TestWebKitAPI::Util::jsonMatchesExpectedValues):

LayoutTests:

Add new layout tests on Mac and iOS to test various cases of using DataTransfer.setData, DataTransfer.getData,
and DataTransfer.types for drag-and-drop (tests for Mac WK1 only) and copy-and-paste (all platforms).

* TestExpectations:
* editing/pasteboard/data-transfer-get-data-on-drop-custom-expected.txt: Added.
* editing/pasteboard/data-transfer-get-data-on-drop-custom.html: Added.
* editing/pasteboard/data-transfer-get-data-on-drop-plain-text-expected.txt: Added.
* editing/pasteboard/data-transfer-get-data-on-drop-plain-text.html: Added.
* editing/pasteboard/data-transfer-get-data-on-drop-rich-text-expected.txt: Added.
* editing/pasteboard/data-transfer-get-data-on-drop-rich-text.html: Added.
* editing/pasteboard/data-transfer-get-data-on-drop-url-expected.txt: Added.
* editing/pasteboard/data-transfer-get-data-on-drop-url.html: Added.
* editing/pasteboard/data-transfer-get-data-on-paste-custom-expected.txt: Added.
* editing/pasteboard/data-transfer-get-data-on-paste-custom.html: Added.
* editing/pasteboard/data-transfer-get-data-on-paste-plain-text-expected.txt: Added.
* editing/pasteboard/data-transfer-get-data-on-paste-plain-text.html: Added.
* editing/pasteboard/data-transfer-get-data-on-paste-rich-text-expected.txt: Added.
* editing/pasteboard/data-transfer-get-data-on-paste-rich-text.html: Added.
* platform/ios-simulator-wk1/TestExpectations:

Mark new copy and paste tests as [ Pass ], since editing/pasteboard/ is skipped by default for iOS WK1.

* platform/ios-wk1/editing/pasteboard/data-transfer-get-data-on-paste-rich-text-expected.txt: Added.
* platform/ios-wk2/editing/pasteboard/data-transfer-get-data-on-paste-rich-text-expected.txt: Added.

Add iOS-specific baselines. This is due to the generated HTML markup for "text/html" being slightly different
when pasting.

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222595 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoDeferred image size change makes image-load-on-delay.html flaky.
zalan@apple.com [Thu, 28 Sep 2017 01:38:18 +0000 (01:38 +0000)]
Deferred image size change makes image-load-on-delay.html flaky.
https://bugs.webkit.org/show_bug.cgi?id=177520
<rdar://problem/34674299>

Reviewed by Dean Jackson.

Source/WebCore:

Only defer recomputeIsIgnored when the image change actually triggers layout.

* accessibility/AXObjectCache.cpp:
(WebCore::rendererNeedsDeferredUpdate):
(WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded):
(WebCore::AXObjectCache::deferTextChangedIfNeeded):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):

LayoutTests:

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222594 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Win64] Compile error, 'BasePtrs' is undefined.
pvollan@apple.com [Thu, 28 Sep 2017 01:29:14 +0000 (01:29 +0000)]
[Win64] Compile error, 'BasePtrs' is undefined.
https://bugs.webkit.org/show_bug.cgi?id=177565

Reviewed by Mark Lam.

Copy definition of 'BasePtrs' from bmalloc/GigaCage.h.

* wtf/Gigacage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222593 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoTry to fix the Mac CMake build
timothy_horton@apple.com [Thu, 28 Sep 2017 00:50:49 +0000 (00:50 +0000)]
Try to fix the Mac CMake build

* PlatformMac.cmake:
* pal/PlatformMac.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222592 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoPropagate hasBeenFlattenedBefore in Structure's transition constructor and fix our...
sbarati@apple.com [Thu, 28 Sep 2017 00:44:28 +0000 (00:44 +0000)]
Propagate hasBeenFlattenedBefore in Structure's transition constructor and fix our for-in caching to fail when the prototype chain has an object with a dictionary structure
https://bugs.webkit.org/show_bug.cgi?id=177523

Reviewed by Mark Lam.

JSTests:

* stress/prototype-chain-has-dictionary-structure-for-in-caching.js: Added.
(assert):
(Test):
(addMethods.Test.prototype.string_appeared_here.i.methodNumber):
(addMethods):
(i.Test.prototype.propName):

Source/JavaScriptCore:

There was a bug in Structure's transition constructor where it didn't
propagate forward the hasBeenFlattenedBefore bit. In practice, this meant
that every time we asked a dictionary structure if it has been flattened
before, it would return false. This patch fixes this bug. It also fixes
a bug that this uncovers in our for-in implementation. Our implementation
would cache the property name enumerator even when the prototype chain
included a structure that is as dictionary. This is wrong because that
prototype object may add properties without transitioning, and the for-in
loop would vend a stale set of prototype properties.

* jit/JITOperations.cpp:
* runtime/JSPropertyNameEnumerator.h:
(JSC::propertyNameEnumerator):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::canCachePropertyNameEnumerator const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222590 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMinimum font size may cause elements to have an infinite line-height
mmaxfield@apple.com [Thu, 28 Sep 2017 00:25:59 +0000 (00:25 +0000)]
Minimum font size may cause elements to have an infinite line-height
https://bugs.webkit.org/show_bug.cgi?id=177573
<rdar://problem/34573792>

Reviewed by Dan Bernstein.

Source/WebCore:

When minimum font size is specified, we were trying to preserve the ratio of specified font-size
and specified line-height in order to boost the computed font size proportionately to the font-size
boost. However, this doesn't work when the specified font-size is 0, because the ratio between
line-height and font-size is infinite.

The most straightforward solution is just to make small font-sizes opt out of the line-height
adjustment because the result would be too big.

Test: fast/text/line-height-minimumFontSize-text-small-font-size.html

* css/StyleBuilderCustom.h:
(WebCore::computeLineHeightMultiplierDueToFontSize):
(WebCore::StyleBuilderCustom::applyValueLineHeight):

LayoutTests:

* fast/text/line-height-minimumFontSize-text-small-font-size-expected.txt: Added.
* fast/text/line-height-minimumFontSize-text-small-font-size.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222588 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r222337.
jlewis3@apple.com [Thu, 28 Sep 2017 00:07:12 +0000 (00:07 +0000)]
Unreviewed, rolling out r222337.

This test is failing on iOS.

Reverted changeset:

"Add long press and drag test"
https://bugs.webkit.org/show_bug.cgi?id=177289
http://trac.webkit.org/changeset/222337

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222587 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoYarr::Parser::tryConsumeGroupName() should check for the end of the pattern.
mark.lam@apple.com [Wed, 27 Sep 2017 23:58:33 +0000 (23:58 +0000)]
Yarr::Parser::tryConsumeGroupName() should check for the end of the pattern.
https://bugs.webkit.org/show_bug.cgi?id=177423
<rdar://problem/34621320>

Reviewed by Keith Miller.

JSTests:

* stress/regress-177423.js: Added.

Source/JavaScriptCore:

* yarr/YarrParser.h:
(JSC::Yarr::Parser::tryConsumeGroupName):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222586 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Missing checks in DebuggerSidebarPanel for DOM debugging support
mattbaker@apple.com [Wed, 27 Sep 2017 23:54:41 +0000 (23:54 +0000)]
Web Inspector: Missing checks in DebuggerSidebarPanel for DOM debugging support
https://bugs.webkit.org/show_bug.cgi?id=177574

Reviewed by Joseph Pecoraro.

Check before using class members that are conditionally constructed based
on DOM debugging support.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype.closed):
(WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222585 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAllow modern decoding of std::optional<T>
achristensen@apple.com [Wed, 27 Sep 2017 23:50:21 +0000 (23:50 +0000)]
Allow modern decoding of std::optional<T>
https://bugs.webkit.org/show_bug.cgi?id=177519

Reviewed by Tim Horton.

Source/WebCore:

* platform/DragItem.h:
(WebCore::DragItem::decode):

Source/WebKit:

* Platform/IPC/ArgumentCoders.h:
(IPC::ArgumentCoder<std::optional<T>>::decode):
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::PaymentAuthorizationResult>::decode):
(IPC::ArgumentCoder<WebCore::PaymentError>::decode):
(IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):
(IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::decode):
(IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::decode):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IntPoint>::decode):
(IPC::ArgumentCoder<IntSize>::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::decode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222584 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r222541.
commit-queue@webkit.org [Wed, 27 Sep 2017 23:25:07 +0000 (23:25 +0000)]
Unreviewed, rolling out r222541.
https://bugs.webkit.org/show_bug.cgi?id=177580

WebCore isn't ready for the asynchronousness this was going to
enable (Requested by alexchristensen on #webkit).

Reverted changeset:

"Pass a completion handler instead of a
WebFramePolicyListenerProxy during policy decisions"
https://bugs.webkit.org/show_bug.cgi?id=177509
http://trac.webkit.org/changeset/222541

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222583 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd macOS High Sierra and iOS Simulator 11 support to bisect-builds.
lforschler@apple.com [Wed, 27 Sep 2017 23:18:13 +0000 (23:18 +0000)]
Add macOS High Sierra and iOS Simulator 11 support to bisect-builds.
https://bugs.webkit.org/show_bug.cgi?id=177578

Reviewed by Alexey Proskuryakov.

* Scripts/bisect-builds:
(minified_platforms):
(unminified_platforms):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222582 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, fix x86 breaking due to exhausted registers
utatane.tea@gmail.com [Wed, 27 Sep 2017 22:59:49 +0000 (22:59 +0000)]
Unreviewed, fix x86 breaking due to exhausted registers
https://bugs.webkit.org/show_bug.cgi?id=175823

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222581 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMarked imported/w3c/web-platform-tests/html/browsers/origin/relaxing-the-same-origin...
jlewis3@apple.com [Wed, 27 Sep 2017 22:54:26 +0000 (22:54 +0000)]
Marked imported/w3c/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_null.tentative.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=177440

Unreviewed test gardening.

* platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222580 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoVersioning.
jmarcell@apple.com [Wed, 27 Sep 2017 21:57:33 +0000 (21:57 +0000)]
Versioning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoExpose setShouldSuppressFirstResponderChanges() as WKView SPI
commit-queue@webkit.org [Wed, 27 Sep 2017 21:44:20 +0000 (21:44 +0000)]
Expose setShouldSuppressFirstResponderChanges() as WKView SPI
https://bugs.webkit.org/show_bug.cgi?id=177513
<rdar://problem/34669220>

Patch by Tina Liu <iting_liu@apple.com> on 2017-09-27
Reviewed by Wenson Hsieh.

We already have setShouldSuppressFirstResponderChanges() SPI on WKWebView; Expose it on
WKView as well for clients using legacy WebKit.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setShouldSuppressFirstResponderChanges:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222577 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago"Tag" codepoints require the complex text codepath
mmaxfield@apple.com [Wed, 27 Sep 2017 21:02:46 +0000 (21:02 +0000)]
"Tag" codepoints require the complex text codepath
https://bugs.webkit.org/show_bug.cgi?id=177251
<rdar://problem/34384001>

Reviewed by David Hyatt.

Source/WebCore:

Previously, Tag codepoints (U+E0000 - U+E007F) weren't triggering the
complex text codepath.

Eventually, we should migrate the default from simple to complex. I'll do
that in a separate patch.

Test: fast/text/flag-codepoint.html

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):

LayoutTests:

* fast/text/flag-codepoint-expected.html: Added.
* fast/text/flag-codepoint.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222576 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRename "FlowThread" to "FragmentedFlow"
hyatt@apple.com [Wed, 27 Sep 2017 20:54:17 +0000 (20:54 +0000)]
Rename "FlowThread" to "FragmentedFlow"
https://bugs.webkit.org/show_bug.cgi?id=177557

Reviewed by Zalan Bujtas.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):
* dom/Element.cpp:
(WebCore::Element::absoluteEventBounds):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore::LayoutState::currentRenderFragmentedFlow const):
(WebCore::LayoutState::setCurrentRenderFragmentedFlow):
(WebCore::LayoutState::currentRenderFlowThread const): Deleted.
(WebCore::LayoutState::setCurrentRenderFlowThread): Deleted.
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::ContainingBlockInfo):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::logicalLeftSelectionOffset const):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::logicalRightSelectionOffset const):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFragmentedFlows const):
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFlowThreads const): Deleted.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::clone const):
(WebCore::RenderBlock::removeLeftoverAnonymousBlock):
(WebCore::RenderBlock::preparePaginationBeforeBlockLayout):
(WebCore::RenderBlock::addOverflowFromChildren):
(WebCore::RenderBlock::addVisualOverflowFromTheme):
(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::isSelectionRoot const):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::insertPositionedObject):
(WebCore::isChildHitTestCandidate):
(WebCore::RenderBlock::cachedEnclosingFragmentedFlow const):
(WebCore::RenderBlock::cachedEnclosingFragmentedFlowNeedsUpdate const):
(WebCore::RenderBlock::setCachedEnclosingFragmentedFlowNeedsUpdate):
(WebCore::RenderBlock::updateCachedEnclosingFragmentedFlow const):
(WebCore::RenderBlock::locateEnclosingFragmentedFlow const):
(WebCore::RenderBlock::resetEnclosingFragmentedFlowAndChildInfoIncludingDescendants):
(WebCore::RenderBlock::absoluteQuads const):
(WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage const):
(WebCore::RenderBlock::fragmentAtBlockOffset const):
(WebCore::canComputeFragmentRangeForBox):
(WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
(WebCore::RenderBlock::computeFragmentRangeForBoxChild const):
(WebCore::RenderBlock::estimateFragmentRangeForBoxChild const):
(WebCore::RenderBlock::updateFragmentRangeForBoxChild const):
(WebCore::RenderBlock::cachedFlowThreadContainingBlock const): Deleted.
(WebCore::RenderBlock::cachedFlowThreadContainingBlockNeedsUpdate const): Deleted.
(WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate): Deleted.
(WebCore::RenderBlock::updateCachedFlowThreadContainingBlock const): Deleted.
(WebCore::RenderBlock::locateFlowThreadContainingBlock const): Deleted.
(WebCore::RenderBlock::resetFlowThreadContainingBlockAndChildInfoIncludingDescendants): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willCreateColumns const):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::setStaticInlinePositionForChild):
(WebCore::inNormalFlow):
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::hasNextPage const):
(WebCore::RenderBlockFlow::adjustForUnsplittableChild):
(WebCore::RenderBlockFlow::setPageBreak):
(WebCore::RenderBlockFlow::updateMinimumPageHeight):
(WebCore::RenderBlockFlow::pageLogicalTopForOffset const):
(WebCore::RenderBlockFlow::pageLogicalHeightForOffset const):
(WebCore::RenderBlockFlow::pageRemainingLogicalHeightForOffset const):
(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::updateStylesForColumnChildren):
(WebCore::RenderBlockFlow::computeOverflow):
(WebCore::RenderBlockFlow::paintColumnRules):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::setMultiColumnFlow):
(WebCore::RenderBlockFlow::relayoutForPagination):
(WebCore::RenderBlockFlow::layoutExcludedChildren):
(WebCore::RenderBlockFlow::addChild):
(WebCore::RenderBlockFlow::removeChild):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
(WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
(WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
(WebCore::RenderBlockFlow::computedColumnWidth const):
(WebCore::RenderBlockFlow::computedColumnCount const):
(WebCore::RenderBlockFlow::isTopLayoutOverflowAllowed const):
(WebCore::RenderBlockFlow::isLeftLayoutOverflowAllowed const):
(WebCore::RenderBlockFlow::setMultiColumnFlowThread): Deleted.
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::multiColumnFlow const):
(WebCore::RenderBlockFlow::multiColumnFlowThread const): Deleted.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
(WebCore::RenderBlockFlow::layoutLineBoxes):
(WebCore::RenderBlockFlow::determineStartPosition):
(WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
(WebCore::RenderBlockFlow::lineWidthForPaginatedLineChanged const):
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
(WebCore::RenderBlockFlow::updateFragmentForLine const):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clampToStartAndEndFragments const):
(WebCore::RenderBox::hasFragmentRangeInFragmentedFlow const):
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::absoluteQuads const):
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats const):
(WebCore::RenderBox::containingBlockAvailableLineWidthInFragment const):
(WebCore::RenderBox::offsetFromContainer const):
(WebCore::RenderBox::computeRectForRepaint const):
(WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation const):
(WebCore::RenderBox::availableLogicalHeightUsing const):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
(WebCore::RenderBox::computePositionedLogicalWidth const):
(WebCore::RenderBox::computePositionedLogicalHeight const):
(WebCore::RenderBox::positionForPoint):
(WebCore::RenderBox::createsNewFormattingContext const):
(WebCore::RenderBox::addVisualEffectOverflow):
(WebCore::RenderBox::addOverflowFromChild):
(WebCore::RenderBox::clearOverflow):
(WebCore::RenderBox::offsetFromLogicalTopOfFirstPage const):
(WebCore::RenderBox::hasFragmentRangeInFlowThread const): Deleted.
* rendering/RenderBox.h:
(WebCore::RenderBox::canHaveOutsideFragmentRange const):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent const):
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint const):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::setStyle):
(WebCore::RenderElement::insertChildInternal):
(WebCore::RenderElement::removeChildInternal):
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
(WebCore::RenderElement::adjustFragmentedFlowStateOnContainingBlockChangeIfNeeded):
(WebCore::RenderElement::removeFromRenderFragmentedFlow):
(WebCore::RenderElement::removeFromRenderFragmentedFlowIncludingDescendants):
(WebCore::RenderElement::resetEnclosingFragmentedFlowAndChildInfoIncludingDescendants):
(WebCore::RenderElement::adjustFlowThreadStateOnContainingBlockChangeIfNeeded): Deleted.
(WebCore::RenderElement::removeFromRenderFlowThread): Deleted.
(WebCore::RenderElement::removeFromRenderFlowThreadIncludingDescendants): Deleted.
(WebCore::RenderElement::resetFlowThreadContainingBlockAndChildInfoIncludingDescendants): Deleted.
* rendering/RenderElement.h:
(WebCore::RenderElement::canContainFixedPositionObjects const):
* rendering/RenderFlowThread.cpp: Removed.
* rendering/RenderFlowThread.h: Removed.
* rendering/RenderFragmentContainer.cpp:
(WebCore::RenderFragmentContainer::RenderFragmentContainer):
(WebCore::RenderFragmentContainer::mapFragmentPointIntoFragmentedFlowCoordinates):
(WebCore::RenderFragmentContainer::positionForPoint):
(WebCore::RenderFragmentContainer::pageLogicalWidth const):
(WebCore::RenderFragmentContainer::pageLogicalHeight const):
(WebCore::RenderFragmentContainer::logicalHeightOfAllFragmentedFlowContent const):
(WebCore::RenderFragmentContainer::fragmentedFlowPortionOverflowRect):
(WebCore::RenderFragmentContainer::fragmentedFlowPortionLocation const):
(WebCore::RenderFragmentContainer::overflowRectForFragmentedFlowPortion):
(WebCore::RenderFragmentContainer::pageLogicalTopForOffset const):
(WebCore::RenderFragmentContainer::isFirstFragment const):
(WebCore::RenderFragmentContainer::isLastFragment const):
(WebCore::RenderFragmentContainer::shouldClipFragmentedFlowContent const):
(WebCore::RenderFragmentContainer::styleDidChange):
(WebCore::RenderFragmentContainer::computeOverflowFromFragmentedFlow):
(WebCore::RenderFragmentContainer::repaintFragmentedFlowContent):
(WebCore::RenderFragmentContainer::repaintFragmentedFlowContentRectangle):
(WebCore::RenderFragmentContainer::installFragmentedFlow):
(WebCore::RenderFragmentContainer::attachFragment):
(WebCore::RenderFragmentContainer::detachFragment):
(WebCore::RenderFragmentContainer::logicalTopOfFragmentedFlowContentRect const):
(WebCore::RenderFragmentContainer::logicalBottomOfFragmentedFlowContentRect const):
(WebCore::RenderFragmentContainer::computeIntrinsicLogicalWidths const):
(WebCore::RenderFragmentContainer::adjustFragmentBoundsFromFragmentedFlowPortionRect const):
(WebCore::RenderFragmentContainer::ensureOverflowForBox):
(WebCore::RenderFragmentContainer::rectFlowPortionForBox const):
(WebCore::RenderFragmentContainer::addVisualOverflowForBox):
(WebCore::RenderFragmentContainer::visualOverflowRectForBoxForPropagation):
(WebCore::CurrentRenderFragmentContainerMaintainer::CurrentRenderFragmentContainerMaintainer):
(WebCore::CurrentRenderFragmentContainerMaintainer::~CurrentRenderFragmentContainerMaintainer):
(WebCore::RenderFragmentContainer::mapFragmentPointIntoFlowThreadCoordinates): Deleted.
(WebCore::RenderFragmentContainer::logicalHeightOfAllFlowThreadContent const): Deleted.
(WebCore::RenderFragmentContainer::flowThreadPortionOverflowRect): Deleted.
(WebCore::RenderFragmentContainer::flowThreadPortionLocation const): Deleted.
(WebCore::RenderFragmentContainer::overflowRectForFlowThreadPortion): Deleted.
(WebCore::RenderFragmentContainer::shouldClipFlowThreadContent const): Deleted.
(WebCore::RenderFragmentContainer::computeOverflowFromFlowThread): Deleted.
(WebCore::RenderFragmentContainer::repaintFlowThreadContent): Deleted.
(WebCore::RenderFragmentContainer::repaintFlowThreadContentRectangle): Deleted.
(WebCore::RenderFragmentContainer::installFlowThread): Deleted.
(WebCore::RenderFragmentContainer::logicalTopOfFlowThreadContentRect const): Deleted.
(WebCore::RenderFragmentContainer::logicalBottomOfFlowThreadContentRect const): Deleted.
(WebCore::RenderFragmentContainer::adjustFragmentBoundsFromFlowThreadPortionRect const): Deleted.
* rendering/RenderFragmentContainer.h:
(WebCore::RenderFragmentContainer::setFragmentedFlowPortionRect):
(WebCore::RenderFragmentContainer::fragmentedFlowPortionRect const):
(WebCore::RenderFragmentContainer::fragmentedFlow const):
(WebCore::RenderFragmentContainer::logicalTopForFragmentedFlowContent const):
(WebCore::RenderFragmentContainer::logicalBottomForFragmentedFlowContent const):
(WebCore::RenderFragmentContainer::setFlowThreadPortionRect): Deleted.
(WebCore::RenderFragmentContainer::flowThreadPortionRect const): Deleted.
(WebCore::RenderFragmentContainer::flowThread const): Deleted.
(WebCore::RenderFragmentContainer::logicalTopForFlowThreadContent const): Deleted.
(WebCore::RenderFragmentContainer::logicalBottomForFlowThreadContent const): Deleted.
* rendering/RenderFragmentContainerSet.cpp:
(WebCore::RenderFragmentContainerSet::RenderFragmentContainerSet):
(WebCore::RenderFragmentContainerSet::installFragmentedFlow):
(WebCore::RenderFragmentContainerSet::expandToEncompassFragmentedFlowContentsIfNeeded):
(WebCore::RenderFragmentContainerSet::installFlowThread): Deleted.
(WebCore::RenderFragmentContainerSet::expandToEncompassFlowThreadContentsIfNeeded): Deleted.
* rendering/RenderFragmentContainerSet.h:
* rendering/RenderFragmentedFlow.cpp: Copied from rendering/RenderFlowThread.cpp.
(WebCore::RenderFragmentedFlow::RenderFragmentedFlow):
(WebCore::RenderFragmentedFlow::createFragmentedFlowStyle):
(WebCore::RenderFragmentedFlow::styleDidChange):
(WebCore::RenderFragmentedFlow::removeFlowChildInfo):
(WebCore::RenderFragmentedFlow::removeFragmentFromThread):
(WebCore::RenderFragmentedFlow::invalidateFragments):
(WebCore::RenderFragmentedFlow::validateFragments):
(WebCore::RenderFragmentedFlow::layout):
(WebCore::RenderFragmentedFlow::updateLogicalWidth):
(WebCore::RenderFragmentedFlow::computeLogicalHeight const):
(WebCore::RenderFragmentedFlow::nodeAtPoint):
(WebCore::RenderFragmentedFlow::shouldRepaint const):
(WebCore::RenderFragmentedFlow::repaintRectangleInFragments const):
(WebCore::RenderFragmentedFlow::fragmentAtBlockOffset const):
(WebCore::RenderFragmentedFlow::adjustedPositionRelativeToOffsetParent const):
(WebCore::RenderFragmentedFlow::pageLogicalTopForOffset const):
(WebCore::RenderFragmentedFlow::pageLogicalWidthForOffset const):
(WebCore::RenderFragmentedFlow::pageLogicalHeightForOffset const):
(WebCore::RenderFragmentedFlow::pageRemainingLogicalHeightForOffset const):
(WebCore::RenderFragmentedFlow::mapFromFlowToFragment const):
(WebCore::RenderFragmentedFlow::removeRenderBoxFragmentInfo):
(WebCore::RenderFragmentedFlow::removeLineFragmentInfo):
(WebCore::RenderFragmentedFlow::logicalWidthChangedInFragmentsForBlock):
(WebCore::RenderFragmentedFlow::contentLogicalWidthOfFirstFragment const):
(WebCore::RenderFragmentedFlow::contentLogicalHeightOfFirstFragment const):
(WebCore::RenderFragmentedFlow::contentLogicalLeftOfFirstFragment const):
(WebCore::RenderFragmentedFlow::firstFragment const):
(WebCore::RenderFragmentedFlow::lastFragment const):
(WebCore::RenderFragmentedFlow::clearRenderBoxFragmentInfoAndCustomStyle):
(WebCore::RenderFragmentedFlow::setFragmentRangeForBox):
(WebCore::RenderFragmentedFlow::hasCachedFragmentRangeForBox const):
(WebCore::RenderFragmentedFlow::getFragmentRangeForBoxFromCachedInfo const):
(WebCore::RenderFragmentedFlow::getFragmentRangeForBox const):
(WebCore::RenderFragmentedFlow::computedFragmentRangeForBox const):
(WebCore::RenderFragmentedFlow::fragmentInRange const):
(WebCore::RenderFragmentedFlow::objectShouldFragmentInFlowFragment const):
(WebCore::RenderFragmentedFlow::objectInFlowFragment const):
(WebCore::RenderFragmentedFlow::checkLinesConsistency const):
(WebCore::RenderFragmentedFlow::clearLinesToFragmentMap):
(WebCore::RenderFragmentedFlow::deleteLines):
(WebCore::RenderFragmentedFlow::willBeDestroyed):
(WebCore::RenderFragmentedFlow::markFragmentsForOverflowLayoutIfNeeded):
(WebCore::RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect):
(WebCore::RenderFragmentedFlow::addForcedFragmentBreak):
(WebCore::RenderFragmentedFlow::collectLayerFragments):
(WebCore::RenderFragmentedFlow::fragmentsBoundingBox):
(WebCore::RenderFragmentedFlow::offsetFromLogicalTopOfFirstFragment const):
(WebCore::RenderFragmentedFlow::FragmentSearchAdapter::collectIfNeeded):
(WebCore::RenderFragmentedFlow::mapLocalToContainer const):
(WebCore::RenderFragmentedFlow::mapFromLocalToFragmentedFlow const):
(WebCore::RenderFragmentedFlow::mapFromFragmentedFlowToLocal const):
(WebCore::RenderFragmentedFlow::flipForWritingModeLocalCoordinates const):
(WebCore::RenderFragmentedFlow::addFragmentsVisualEffectOverflow):
(WebCore::RenderFragmentedFlow::addFragmentsVisualOverflowFromTheme):
(WebCore::RenderFragmentedFlow::addFragmentsOverflowFromChild):
(WebCore::RenderFragmentedFlow::addFragmentsLayoutOverflow):
(WebCore::RenderFragmentedFlow::addFragmentsVisualOverflow):
(WebCore::RenderFragmentedFlow::clearFragmentsOverflow):
(WebCore::RenderFragmentedFlow::currentFragment const):
(WebCore::RenderFragmentedFlow::containingFragmentMap):
(WebCore::RenderFlowThread::RenderFlowThread): Deleted.
(WebCore::RenderFlowThread::createFlowThreadStyle): Deleted.
(WebCore::RenderFlowThread::styleDidChange): Deleted.
(WebCore::RenderFlowThread::removeFlowChildInfo): Deleted.
(WebCore::RenderFlowThread::removeFragmentFromThread): Deleted.
(WebCore::RenderFlowThread::invalidateFragments): Deleted.
(WebCore::RenderFlowThread::validateFragments): Deleted.
(WebCore::RenderFlowThread::layout): Deleted.
(WebCore::RenderFlowThread::updateLogicalWidth): Deleted.
(WebCore::RenderFlowThread::computeLogicalHeight const): Deleted.
(WebCore::RenderFlowThread::nodeAtPoint): Deleted.
(WebCore::RenderFlowThread::shouldRepaint const): Deleted.
(WebCore::RenderFlowThread::repaintRectangleInFragments const): Deleted.
(WebCore::RenderFlowThread::fragmentAtBlockOffset const): Deleted.
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent const): Deleted.
(WebCore::RenderFlowThread::pageLogicalTopForOffset const): Deleted.
(WebCore::RenderFlowThread::pageLogicalWidthForOffset const): Deleted.
(WebCore::RenderFlowThread::pageLogicalHeightForOffset const): Deleted.
(WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset const): Deleted.
(WebCore::RenderFlowThread::mapFromFlowToFragment const): Deleted.
(WebCore::RenderFlowThread::removeRenderBoxFragmentInfo): Deleted.
(WebCore::RenderFlowThread::removeLineFragmentInfo): Deleted.
(WebCore::RenderFlowThread::logicalWidthChangedInFragmentsForBlock): Deleted.
(WebCore::RenderFlowThread::contentLogicalWidthOfFirstFragment const): Deleted.
(WebCore::RenderFlowThread::contentLogicalHeightOfFirstFragment const): Deleted.
(WebCore::RenderFlowThread::contentLogicalLeftOfFirstFragment const): Deleted.
(WebCore::RenderFlowThread::firstFragment const): Deleted.
(WebCore::RenderFlowThread::lastFragment const): Deleted.
(WebCore::RenderFlowThread::clearRenderBoxFragmentInfoAndCustomStyle): Deleted.
(WebCore::RenderFlowThread::setFragmentRangeForBox): Deleted.
(WebCore::RenderFlowThread::hasCachedFragmentRangeForBox const): Deleted.
(WebCore::RenderFlowThread::getFragmentRangeForBoxFromCachedInfo const): Deleted.
(WebCore::RenderFlowThread::getFragmentRangeForBox const): Deleted.
(WebCore::RenderFlowThread::computedFragmentRangeForBox const): Deleted.
(WebCore::RenderFlowThread::fragmentInRange const): Deleted.
(WebCore::RenderFlowThread::objectShouldFragmentInFlowFragment const): Deleted.
(WebCore::RenderFlowThread::objectInFlowFragment const): Deleted.
(WebCore::RenderFlowThread::checkLinesConsistency const): Deleted.
(WebCore::RenderFlowThread::clearLinesToFragmentMap): Deleted.
(WebCore::RenderFlowThread::deleteLines): Deleted.
(WebCore::RenderFlowThread::willBeDestroyed): Deleted.
(WebCore::RenderFlowThread::markFragmentsForOverflowLayoutIfNeeded): Deleted.
(WebCore::RenderFlowThread::updateFragmentsFlowThreadPortionRect): Deleted.
(WebCore::RenderFlowThread::addForcedFragmentBreak): Deleted.
(WebCore::RenderFlowThread::collectLayerFragments): Deleted.
(WebCore::RenderFlowThread::fragmentsBoundingBox): Deleted.
(WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstFragment const): Deleted.
(WebCore::RenderFlowThread::FragmentSearchAdapter::collectIfNeeded): Deleted.
(WebCore::RenderFlowThread::mapLocalToContainer const): Deleted.
(WebCore::RenderFlowThread::mapFromLocalToFlowThread const): Deleted.
(WebCore::RenderFlowThread::mapFromFlowThreadToLocal const): Deleted.
(WebCore::RenderFlowThread::flipForWritingModeLocalCoordinates const): Deleted.
(WebCore::RenderFlowThread::addFragmentsVisualEffectOverflow): Deleted.
(WebCore::RenderFlowThread::addFragmentsVisualOverflowFromTheme): Deleted.
(WebCore::RenderFlowThread::addFragmentsOverflowFromChild): Deleted.
(WebCore::RenderFlowThread::addFragmentsLayoutOverflow): Deleted.
(WebCore::RenderFlowThread::addFragmentsVisualOverflow): Deleted.
(WebCore::RenderFlowThread::clearFragmentsOverflow): Deleted.
(WebCore::RenderFlowThread::currentFragment const): Deleted.
(WebCore::RenderFlowThread::containingFragmentMap): Deleted.
* rendering/RenderFragmentedFlow.h: Copied from rendering/RenderFlowThread.h.
* rendering/RenderGeometryMap.cpp:
(WebCore::canMapBetweenRenderersViaLayers):
(WebCore::RenderGeometryMap::pushRenderFragmentedFlow):
(WebCore::RenderGeometryMap::pushRenderFlowThread): Deleted.
* rendering/RenderGeometryMap.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::layoutShadowControls):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::addChild):
(WebCore::RenderInline::clone const):
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::offsetFromContainer const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::updatePagination):
(WebCore::transparencyClipBox):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::enclosingFragmentedFlowAncestor const):
(WebCore::RenderLayer::hitTestContents const):
(WebCore::RenderLayer::calculateClipRects const):
(WebCore::RenderLayer::enclosingFlowThreadAncestor const): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::canBeComposited const):
* rendering/RenderMedia.cpp:
* rendering/RenderMultiColumnFlow.cpp: Copied from rendering/RenderMultiColumnFlowThread.cpp.
(WebCore::RenderMultiColumnFlow::RenderMultiColumnFlow):
(WebCore::RenderMultiColumnFlow::~RenderMultiColumnFlow):
(WebCore::RenderMultiColumnFlow::renderName const):
(WebCore::RenderMultiColumnFlow::firstMultiColumnSet const):
(WebCore::RenderMultiColumnFlow::lastMultiColumnSet const):
(WebCore::RenderMultiColumnFlow::firstColumnSetOrSpanner const):
(WebCore::RenderMultiColumnFlow::nextColumnSetOrSpannerSiblingOf):
(WebCore::RenderMultiColumnFlow::previousColumnSetOrSpannerSiblingOf):
(WebCore::RenderMultiColumnFlow::layout):
(WebCore::findSetRendering):
(WebCore::RenderMultiColumnFlow::populate):
(WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
(WebCore::RenderMultiColumnFlow::addFragmentToThread):
(WebCore::RenderMultiColumnFlow::willBeRemovedFromTree):
(WebCore::RenderMultiColumnFlow::resolveMovedChild const):
(WebCore::isValidColumnSpanner):
(WebCore::spannerPlacehoderCandidate):
(WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant):
(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
(WebCore::RenderMultiColumnFlow::handleSpannerRemoval):
(WebCore::RenderMultiColumnFlow::fragmentedFlowRelativeWillBeRemoved):
(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantBoxLaidOut):
(WebCore::RenderMultiColumnFlow::computeLogicalHeight const):
(WebCore::RenderMultiColumnFlow::initialLogicalWidth const):
(WebCore::RenderMultiColumnFlow::setPageBreak):
(WebCore::RenderMultiColumnFlow::updateMinimumPageHeight):
(WebCore::RenderMultiColumnFlow::fragmentAtBlockOffset const):
(WebCore::RenderMultiColumnFlow::setFragmentRangeForBox):
(WebCore::RenderMultiColumnFlow::addForcedFragmentBreak):
(WebCore::RenderMultiColumnFlow::computeLineGridPaginationOrigin const):
(WebCore::RenderMultiColumnFlow::offsetFromContainer const):
(WebCore::RenderMultiColumnFlow::mapAbsoluteToLocalPoint const):
(WebCore::RenderMultiColumnFlow::physicalTranslationFromFragmentToFlow const):
(WebCore::RenderMultiColumnFlow::mapFromFlowToFragment const):
(WebCore::RenderMultiColumnFlow::physicalTranslationOffsetFromFlowToFragment const):
(WebCore::RenderMultiColumnFlow::physicalTranslationFromFlowToFragment const):
(WebCore::RenderMultiColumnFlow::isPageLogicalHeightKnown const):
(WebCore::RenderMultiColumnFlow::nodeAtPoint):
(WebCore::RenderMultiColumnFlow::shouldCheckColumnBreaks const):
(WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread): Deleted.
(WebCore::RenderMultiColumnFlowThread::~RenderMultiColumnFlowThread): Deleted.
(WebCore::RenderMultiColumnFlowThread::renderName const): Deleted.
(WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet const): Deleted.
(WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet const): Deleted.
(WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner const): Deleted.
(WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf): Deleted.
(WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf): Deleted.
(WebCore::RenderMultiColumnFlowThread::layout): Deleted.
(WebCore::RenderMultiColumnFlowThread::populate): Deleted.
(WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy): Deleted.
(WebCore::RenderMultiColumnFlowThread::addFragmentToThread): Deleted.
(WebCore::RenderMultiColumnFlowThread::willBeRemovedFromTree): Deleted.
(WebCore::RenderMultiColumnFlowThread::resolveMovedChild const): Deleted.
(WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant): Deleted.
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted): Deleted.
(WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval): Deleted.
(WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved): Deleted.
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut): Deleted.
(WebCore::RenderMultiColumnFlowThread::computeLogicalHeight const): Deleted.
(WebCore::RenderMultiColumnFlowThread::initialLogicalWidth const): Deleted.
(WebCore::RenderMultiColumnFlowThread::setPageBreak): Deleted.
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight): Deleted.
(WebCore::RenderMultiColumnFlowThread::fragmentAtBlockOffset const): Deleted.
(WebCore::RenderMultiColumnFlowThread::setFragmentRangeForBox): Deleted.
(WebCore::RenderMultiColumnFlowThread::addForcedFragmentBreak): Deleted.
(WebCore::RenderMultiColumnFlowThread::computeLineGridPaginationOrigin const): Deleted.
(WebCore::RenderMultiColumnFlowThread::offsetFromContainer const): Deleted.
(WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint const): Deleted.
(WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFragmentToFlow const): Deleted.
(WebCore::RenderMultiColumnFlowThread::mapFromFlowToFragment const): Deleted.
(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToFragment const): Deleted.
(WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToFragment const): Deleted.
(WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown const): Deleted.
(WebCore::RenderMultiColumnFlowThread::nodeAtPoint): Deleted.
(WebCore::RenderMultiColumnFlowThread::shouldCheckColumnBreaks const): Deleted.
* rendering/RenderMultiColumnFlow.h: Copied from rendering/RenderMultiColumnFlowThread.h.
* rendering/RenderMultiColumnFlowThread.cpp: Removed.
* rendering/RenderMultiColumnFlowThread.h: Removed.
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::firstRendererInFragmentedFlow const):
(WebCore::RenderMultiColumnSet::lastRendererInFragmentedFlow const):
(WebCore::RenderMultiColumnSet::containsRendererInFragmentedFlow const):
(WebCore::RenderMultiColumnSet::setLogicalTopInFragmentedFlow):
(WebCore::RenderMultiColumnSet::setLogicalBottomInFragmentedFlow):
(WebCore::RenderMultiColumnSet::pageLogicalTopForOffset const):
(WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
(WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
(WebCore::RenderMultiColumnSet::calculateBalancedHeight const):
(WebCore::RenderMultiColumnSet::recalculateColumnHeight):
(WebCore::RenderMultiColumnSet::updateLogicalWidth):
(WebCore::RenderMultiColumnSet::requiresBalancing const):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::beginFlow):
(WebCore::RenderMultiColumnSet::endFlow):
(WebCore::RenderMultiColumnSet::layout):
(WebCore::RenderMultiColumnSet::calculateMaxColumnHeight const):
(WebCore::RenderMultiColumnSet::columnCount const):
(WebCore::RenderMultiColumnSet::columnLogicalLeft const):
(WebCore::RenderMultiColumnSet::columnLogicalTop const):
(WebCore::RenderMultiColumnSet::columnIndexAtOffset const):
(WebCore::RenderMultiColumnSet::fragmentedFlowPortionRectAt const):
(WebCore::RenderMultiColumnSet::fragmentedFlowPortionOverflowRect):
(WebCore::RenderMultiColumnSet::paintColumnRules):
(WebCore::RenderMultiColumnSet::repaintFragmentedFlowContent):
(WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting const):
(WebCore::RenderMultiColumnSet::collectLayerFragments):
(WebCore::RenderMultiColumnSet::columnTranslationForOffset const):
(WebCore::RenderMultiColumnSet::adjustFragmentBoundsFromFragmentedFlowPortionRect const):
(WebCore::RenderMultiColumnSet::positionForPoint):
(WebCore::RenderMultiColumnSet::translateFragmentPointToFragmentedFlow const):
(WebCore::RenderMultiColumnSet::updateHitTestResult):
(WebCore::RenderMultiColumnSet::firstRendererInFlowThread const): Deleted.
(WebCore::RenderMultiColumnSet::lastRendererInFlowThread const): Deleted.
(WebCore::RenderMultiColumnSet::containsRendererInFlowThread const): Deleted.
(WebCore::RenderMultiColumnSet::setLogicalTopInFlowThread): Deleted.
(WebCore::RenderMultiColumnSet::setLogicalBottomInFlowThread): Deleted.
(WebCore::RenderMultiColumnSet::flowThreadPortionRectAt const): Deleted.
(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect): Deleted.
(WebCore::RenderMultiColumnSet::repaintFlowThreadContent): Deleted.
(WebCore::RenderMultiColumnSet::adjustFragmentBoundsFromFlowThreadPortionRect const): Deleted.
(WebCore::RenderMultiColumnSet::translateFragmentPointToFlowThread const): Deleted.
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.cpp:
(WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
(WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setFragmentedFlowStateIncludingDescendants):
(WebCore::RenderObject::computedFragmentedFlowState):
(WebCore::RenderObject::initializeFragmentedFlowStateOnInsertion):
(WebCore::RenderObject::resetFragmentedFlowStateOnRemoval):
(WebCore::RenderObject::containerForRepaint const):
(WebCore::RenderObject::repaintUsingContainer const):
(WebCore::enclosingFragmentedFlowFromRenderer):
(WebCore::RenderObject::outputRegionsInformation const):
(WebCore::RenderObject::selectionRoot const):
(WebCore::RenderObject::offsetFromContainer const):
(WebCore::RenderObject::insertedIntoTree):
(WebCore::RenderObject::locateEnclosingFragmentedFlow const):
(WebCore::RenderObject::setIsRenderFragmentedFlow):
(WebCore::RenderObject::setFlowThreadStateIncludingDescendants): Deleted.
(WebCore::RenderObject::computedFlowThreadState): Deleted.
(WebCore::RenderObject::initializeFlowThreadStateOnInsertion): Deleted.
(WebCore::RenderObject::resetFlowThreadStateOnRemoval): Deleted.
(WebCore::flowThreadContainingBlockFromRenderer): Deleted.
(WebCore::RenderObject::locateFlowThreadContainingBlock const): Deleted.
(WebCore::RenderObject::setIsRenderFlowThread): Deleted.
* rendering/RenderObject.h:
(WebCore::RenderObject::enclosingFragmentedFlow const):
(WebCore::RenderObject::isInFlowRenderFragmentedFlow const):
(WebCore::RenderObject::isOutOfFlowRenderFragmentedFlow const):
(WebCore::RenderObject::isRenderMultiColumnFlow const):
(WebCore::RenderObject::fragmentedFlowState const):
(WebCore::RenderObject::setFragmentedFlowState):
(WebCore::RenderObject::isAnonymousBlock const):
(WebCore::RenderObject::isRenderFragmentedFlow const):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
(WebCore::RenderObject::RenderObjectBitfields::fragmentedFlowState const):
(WebCore::RenderObject::RenderObjectBitfields::setFragmentedFlowState):
(WebCore::RenderObject::RenderObjectRareData::RenderObjectRareData):
(WebCore::RenderObject::flowThreadContainingBlock const): Deleted.
(WebCore::RenderObject::isInFlowRenderFlowThread const): Deleted.
(WebCore::RenderObject::isOutOfFlowRenderFlowThread const): Deleted.
(WebCore::RenderObject::isRenderMultiColumnFlowThread const): Deleted.
(WebCore::RenderObject::flowThreadState const): Deleted.
(WebCore::RenderObject::setFlowThreadState): Deleted.
(WebCore::RenderObject::isRenderFlowThread const): Deleted.
(WebCore::RenderObject::RenderObjectBitfields::flowThreadState const): Deleted.
(WebCore::RenderObject::RenderObjectBitfields::setFlowThreadState): Deleted.
* rendering/RenderReplaced.cpp:
* rendering/RenderRuby.cpp:
(WebCore::isRubyChildForNormalRemoval):
* rendering/RenderTextFragment.cpp:
(WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
* rendering/RenderView.cpp:
(WebCore::RenderView::availableLogicalHeight const):
(WebCore::RenderView::pageOrViewLogicalHeight const):
(WebCore::RenderView::updateHitTestResult):
(WebCore::RenderView::pageNumberForBlockProgressionOffset const):
(WebCore::RenderView::pageCount const):
* rendering/RenderView.h:
* rendering/RenderingAllInOne.cpp:
* rendering/RootInlineBox.cpp:
(WebCore::containingFragmentMap):
(WebCore::RootInlineBox::~RootInlineBox):
(WebCore::RootInlineBox::containingFragment const):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForWithReason):
* rendering/line/LineLayoutState.h:
(WebCore::LineLayoutState::LineLayoutState):
(WebCore::LineLayoutState::fragmentedFlow const):
(WebCore::LineLayoutState::setFragmentedFlow):
(WebCore::LineLayoutState::flowThread const): Deleted.
(WebCore::LineLayoutState::setFlowThread): Deleted.
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):
* style/RenderTreePosition.h:
* style/RenderTreeUpdaterListItem.cpp:
(WebCore::RenderTreeUpdater::ListItem::updateMarker):
* style/RenderTreeUpdaterMultiColumn.cpp:
(WebCore::RenderTreeUpdater::MultiColumn::update):
(WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeUpdater::MultiColumn::createFlowThread): Deleted.
* style/RenderTreeUpdaterMultiColumn.h:
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222575 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUpdate TestResultsServer for High Sierra queues.
ryanhaddad@apple.com [Wed, 27 Sep 2017 20:42:51 +0000 (20:42 +0000)]
Update TestResultsServer for High Sierra queues.
https://bugs.webkit.org/show_bug.cgi?id=177500

Reviewed by Alexey Proskuryakov.

* TestResultServer/static-dashboards/builders.jsonp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222574 268f45cc-cd09-0410-ab3c-d52691b4dbfc