WebKit-https.git
2 years agoUse enum classes within FileSystem
commit-queue@webkit.org [Thu, 9 Nov 2017 18:33:34 +0000 (18:33 +0000)]
Use enum classes within FileSystem
https://bugs.webkit.org/show_bug.cgi?id=175172

Patch by Christopher Reid <chris.reid@sony.com> on 2017-11-09
Reviewed by Darin Adler.

Source/WebCore:

No new tests, no change in behavior.

Further cleanup to FileSystem's enum classes.
Shortening FileSystem's enum names now that they are enum classes.
Adding OptionSet<FileLockMode> to functions using the FileLockMode enum.

* Modules/webdatabase/OriginLock.cpp:
* loader/appcache/ApplicationCacheStorage.cpp:
* platform/FileHandle.h:
* platform/FileStream.cpp:
* platform/FileSystem.cpp:
* platform/FileSystem.h:
* platform/cocoa/FileMonitorCocoa.mm:
* platform/glib/FileSystemGlib.cpp:
* platform/network/curl/CurlCacheEntry.cpp:
* platform/network/curl/CurlCacheManager.cpp:
* platform/posix/FileSystemPOSIX.cpp:
* platform/win/FileSystemWin.cpp:
* rendering/RenderThemeWin.cpp:

Source/WebKit:

* NetworkProcess/Downloads/BlobDownloadClient.cpp:
* NetworkProcess/NetworkDataTaskBlob.cpp:
* NetworkProcess/cache/NetworkCache.cpp:
* NetworkProcess/capture/NetworkCaptureManager.cpp:
* NetworkProcess/capture/NetworkCaptureRecorder.cpp:
* Shared/WebMemorySampler.cpp:
* UIProcess/API/APIContentRuleListStore.cpp:
* UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:

Source/WebKitLegacy/win:

* Plugins/PluginDatabase.cpp:

Tools:

* TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
* TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm:

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

2 years agoWeb Inspector: Make domain availability a list of types instead of a single type
commit-queue@webkit.org [Thu, 9 Nov 2017 18:32:26 +0000 (18:32 +0000)]
Web Inspector: Make domain availability a list of types instead of a single type
https://bugs.webkit.org/show_bug.cgi?id=179457

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-11-09
Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/scripts/codegen/generate_js_backend_commands.py:
(JSBackendCommandsGenerator.generate_domain):
Update output of `InspectorBackend.activateDomain` to include the list.

* inspector/scripts/codegen/models.py:
(Protocol.parse_domain):
Parse `availability` as a list and include a new supported value of "service-worker".

* inspector/protocol/ApplicationCache.json:
* inspector/protocol/CSS.json:
* inspector/protocol/Canvas.json:
* inspector/protocol/DOM.json:
* inspector/protocol/DOMDebugger.json:
* inspector/protocol/DOMStorage.json:
* inspector/protocol/Database.json:
* inspector/protocol/IndexedDB.json:
* inspector/protocol/LayerTree.json:
* inspector/protocol/Memory.json:
* inspector/protocol/Network.json:
* inspector/protocol/Page.json:
* inspector/protocol/Timeline.json:
* inspector/protocol/Worker.json:
Update `availability` to be a list.

* inspector/scripts/tests/generic/domain-availability.json:
* inspector/scripts/tests/generic/expected/domain-availability.json-result:
* inspector/scripts/tests/generic/expected/fail-on-domain-availability-type.json-error: Added.
* inspector/scripts/tests/generic/expected/fail-on-domain-availability-value.json-error: Added.
* inspector/scripts/tests/generic/expected/fail-on-domain-availability.json-error:
* inspector/scripts/tests/generic/fail-on-domain-availability-type.json: Copied from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-availability.json.
* inspector/scripts/tests/generic/fail-on-domain-availability-value.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-availability.json.
Update tests to include a test for the type and an invalid value.

Source/WebInspectorUI:

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype.activateDomain):
The second value changed to be an optional list. Check if the active
debuggable type is in the list or not.

* UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
* Versions/Inspector-iOS-10.0.json:
* Versions/Inspector-iOS-10.3.json:
* Versions/Inspector-iOS-11.0.json:
* Versions/Inspector-iOS-8.0.json:
* Versions/Inspector-iOS-9.0.json:
* Versions/Inspector-iOS-9.3.json:
Since this is a change to how we generate the frontend resource,
update the legacy versioned backends and regenerate their resource.

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

2 years agoServiceWorkerClientFetch should create not null ResourceError
commit-queue@webkit.org [Thu, 9 Nov 2017 18:24:21 +0000 (18:24 +0000)]
ServiceWorkerClientFetch should create not null ResourceError
https://bugs.webkit.org/show_bug.cgi?id=179485

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-09
Reviewed by Darin Adler.

* WebProcess/Storage/ServiceWorkerClientFetch.cpp:
(WebKit::ServiceWorkerClientFetch::didReceiveResponse):

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

2 years ago[LayoutState cleanup] LayouState::m_lineGrid should be a weak pointer
zalan@apple.com [Thu, 9 Nov 2017 18:21:58 +0000 (18:21 +0000)]
[LayoutState cleanup] LayouState::m_lineGrid should be a weak pointer
https://bugs.webkit.org/show_bug.cgi?id=179484
<rdar://problem/35442725>

Reviewed by Darin Adler.

Covered by existing tests.

* rendering/LayoutState.cpp:
(WebCore::LayoutState::propagateLineGridInfo):
(WebCore::LayoutState::establishLineGrid):
* rendering/LayoutState.h:
(WebCore::LayoutState::lineGrid const):

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

2 years agoTest fix after r224609
bfulgham@apple.com [Thu, 9 Nov 2017 17:36:11 +0000 (17:36 +0000)]
Test fix after r224609
https://bugs.webkit.org/show_bug.cgi?id=178565
<rdar://problem/11115901>

Unreviewed test fix after r224609.

Correct two test cases that attempt to push local file URLs in violation of our
same origin policies. The fix is to grant universal file access, as we do for similar
LayoutTests.

* TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp:
(TestWebKitAPI::TEST):

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

2 years ago[iOS] Adopt UIPreviewDataAttachmentListIsContentManaged
aestes@apple.com [Thu, 9 Nov 2017 17:20:27 +0000 (17:20 +0000)]
[iOS] Adopt UIPreviewDataAttachmentListIsContentManaged
https://bugs.webkit.org/show_bug.cgi?id=179458
<rdar://problem/35034691>

Reviewed by Dan Bernstein.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):

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

2 years ago[Win] Add WebKitQuartzCoreAdditions library.
pvollan@apple.com [Thu, 9 Nov 2017 17:11:24 +0000 (17:11 +0000)]
[Win] Add WebKitQuartzCoreAdditions library.
https://bugs.webkit.org/show_bug.cgi?id=179331

Reviewed by Alex Christensen.

Source/WebKitLegacy:

This library should be added to the OpenSource repository.

* CMakeLists.txt:

Source/WebKitLegacy/win:

* WebKitQuartzCoreAdditions: Added.
* WebKitQuartzCoreAdditions/API: Added.
* WebKitQuartzCoreAdditions/API/WKCACFImage.cpp: Added.
(toImage):
(WKCACFImageGetWidth):
(WKCACFImageGetHeight):
(WKCACFImageCopyFileMapping):
(WKCACFImageCreateWithImage):
(WKCACFImageFinalize):
(WKCACFImageCopyFormattingDescription):
(WKCACFImageCopyDebugDescription):
(WKCACFImageGetTypeID):
* WebKitQuartzCoreAdditions/API/WKCACFImage.h: Added.
* WebKitQuartzCoreAdditions/API/WKCACFImageInternal.h: Added.
* WebKitQuartzCoreAdditions/API/WKCACFView.cpp: Added.
(toView):
(toImpl):
(WKCACFViewCreate):
(WKCACFViewSetLayer):
(WKCACFViewUpdate):
(WKCACFViewFlushContext):
(WKCACFViewInvalidateRects):
(WKCACFViewCanDraw):
(WKCACFViewDraw):
(WKCACFViewCopyDrawnImage):
(WKCACFViewDrawIntoDC):
(contextDidChangeCallback):
(WKCACFViewSetContextDidChangeCallback):
(WKCACFViewGetLastCommitTime):
(WKCACFViewSetContextUserData):
(WKCACFViewGetContext):
(WKCACFViewFinalize):
(WKCACFViewCopyFormattingDescription):
(WKCACFViewCopyDebugDescription):
(WKCACFViewGetTypeID):
(WKCACFViewSetShouldInvertColors):
(WKCACFViewGetD3DDevice9):
* WebKitQuartzCoreAdditions/API/WKCACFView.h: Added.
* WebKitQuartzCoreAdditions/API/WKCACFViewPrivate.h: Added.
* WebKitQuartzCoreAdditions/API/WebKitQuartzCoreAdditions.cpp: Added.
(WKQCA::dllInstance):
(DllMain):
(WKCACFShutDown):
* WebKitQuartzCoreAdditions/API/WebKitQuartzCoreAdditionsBase.h: Added.
* WebKitQuartzCoreAdditions/CAD3DRenderer.cpp: Added.
(WKQCA::D3DPostProcessingContext::D3DPostProcessingContext):
(WKQCA::d3d):
(WKQCA::initialPresentationParameters):
(WKQCA::CAD3DRenderer::shared):
(WKQCA::CAD3DRenderer::CAD3DRenderer):
(WKQCA::CAD3DRenderer::swapChain):
(WKQCA::CAD3DRenderer::createD3DPostProcessingContext):
(WKQCA::hardwareCapabilitiesIndicateCoreAnimationSupport):
(WKQCA::CAD3DRenderer::initialize):
(WKQCA::D3DMatrixOrthoOffCenterRH):
(WKQCA::prepareDevice):
(WKQCA::updateBounds):
(WKQCA::CAD3DRenderer::renderAndPresent):
(WKQCA::CAD3DRenderer::renderToImage):
(WKQCA::CAD3DRenderer::setDeviceIsLost):
(WKQCA::CAD3DRenderer::renderInternal):
(WKQCA::CAD3DRenderer::postProcess):
(WKQCA::CAD3DRenderer::resetD3DDevice):
(WKQCA::CAD3DRenderer::createShaderIfNeeded):
(WKQCA::CAD3DRenderer::release):
* WebKitQuartzCoreAdditions/CAD3DRenderer.h: Added.
(WKQCA::D3DPostProcessingContext::sceneTexture const):
(WKQCA::D3DPostProcessingContext::overlayQuad const):
(WKQCA::CAD3DRenderer::d3dDevice9 const):
* WebKitQuartzCoreAdditions/CAView.cpp: Added.
(WKQCA::CAView::Handle::create):
(WKQCA::CAView::Handle::~Handle):
(WKQCA::CAView::Handle::mutex):
(WKQCA::CAView::Handle::view const):
(WKQCA::CAView::Handle::clear):
(WKQCA::CAView::Handle::Handle):
(WKQCA::globalStateMutex):
(WKQCA::registerMessageWindowClass):
(WKQCA::createMessageWindow):
(WKQCA::CAView::releaseAllD3DResources):
(WKQCA::CAView::CAView):
(WKQCA::CAView::~CAView):
(WKQCA::CAView::create):
(WKQCA::CAView::setContextDidChangeCallback):
(WKQCA::CAView::setLayer):
(WKQCA::CAView::update):
(WKQCA::CAView::invalidateRects):
(WKQCA::CAView::drawToWindow):
(WKQCA::CAView::drawToWindowInternal):
(WKQCA::CAView::drawToImage):
(WKQCA::CAView::willDraw):
(WKQCA::CAView::didDraw):
(WKQCA::CAView::drawIntoDC):
(WKQCA::CAView::setShouldInvertColors):
(WKQCA::CAView::scheduleNextDraw):
(WKQCA::CAView::displayLinkReachedCAMediaTime):
(WKQCA::CAView::contextDidChangeCallback):
(WKQCA::CAView::contextDidChange):
(WKQCA::CAView::updateSoon):
(WKQCA::CAView::updateViewsNow):
(WKQCA::CAView::d3dDevice9):
* WebKitQuartzCoreAdditions/CAView.h: Added.
(WKQCA::CAView::context const):
(WKQCA::CAView::canDraw const):
(WKQCA::CAView::ContextDidChangeCallback::ContextDidChangeCallback):
* WebKitQuartzCoreAdditions/CMakeLists.txt: Added.
* WebKitQuartzCoreAdditions/CVDisplayLink.cpp: Added.
(WKQCA::CVDisplayLink::CVDisplayLink):
(WKQCA::CVDisplayLink::~CVDisplayLink):
(WKQCA::CVDisplayLink::create):
(WKQCA::CVDisplayLink::start):
(WKQCA::CVDisplayLink::stop):
(WKQCA::CVDisplayLink::setPaused):
(WKQCA::CVDisplayLink::runIOThread):
* WebKitQuartzCoreAdditions/CVDisplayLink.h: Added.
* WebKitQuartzCoreAdditions/CVDisplayLinkClient.h: Added.
(WKQCA::CVDisplayLinkClient::~CVDisplayLinkClient):
* WebKitQuartzCoreAdditions/Image.cpp: Added.
(WKQCA::numBytesForSize):
(WKQCA::Image::create):
(WKQCA::Image::Image):
(WKQCA::Image::~Image):
(WKQCA::bitmapInfo):
(WKQCA::Image::createDIB const):
(WKQCA::Image::copyFileMapping):
* WebKitQuartzCoreAdditions/Image.h: Added.
(WKQCA::Image::size const):
* WebKitQuartzCoreAdditions/ImageConversion.cpp: Added.
(WKQCA::getBackBufferRectAsRenderTarget):
(WKQCA::getSystemMemoryCopy):
(WKQCA::copyRectToBitmap):
(WKQCA::getImageCopy):
(WKQCA::getBackBufferRectAsImage):
* WebKitQuartzCoreAdditions/ImageConversion.h: Added.
* WebKitQuartzCoreAdditions/InvertColorPS.hlsl: Added.
* WebKitQuartzCoreAdditions/WebKitQuartzCoreAdditionsInternal.h: Added.
* WebKitQuartzCoreAdditions/WebKitQuartzCoreAdditionsPrefix.cpp: Added.
* WebKitQuartzCoreAdditions/WebKitQuartzCoreAdditionsPrefix.h: Added.

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

2 years agoUnreviewed, remove Dan from the soup network watchlist
mcatanzaro@igalia.com [Thu, 9 Nov 2017 16:18:32 +0000 (16:18 +0000)]
Unreviewed, remove Dan from the soup network watchlist

Per his request. It's not Hotel California; we should probably let him leave.

* Scripts/webkitpy/common/config/watchlist:

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

2 years ago[JSC][JIT] Clean up SlowPathCall stubs
utatane.tea@gmail.com [Thu, 9 Nov 2017 15:16:22 +0000 (15:16 +0000)]
[JSC][JIT] Clean up SlowPathCall stubs
https://bugs.webkit.org/show_bug.cgi?id=179247

Reviewed by Saam Barati.

We have bunch of duplicate functions that just call a slow path function.
This patch cleans up the above duplication.

* jit/JIT.cpp:
(JSC::JIT::emitSlowCaseCall):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emitSlow_op_unsigned): Deleted.
(JSC::JIT::emitSlow_op_inc): Deleted.
(JSC::JIT::emitSlow_op_dec): Deleted.
(JSC::JIT::emitSlow_op_bitand): Deleted.
(JSC::JIT::emitSlow_op_bitor): Deleted.
(JSC::JIT::emitSlow_op_bitxor): Deleted.
(JSC::JIT::emitSlow_op_lshift): Deleted.
(JSC::JIT::emitSlow_op_rshift): Deleted.
(JSC::JIT::emitSlow_op_urshift): Deleted.
(JSC::JIT::emitSlow_op_div): Deleted.
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emitSlow_op_unsigned): Deleted.
(JSC::JIT::emitSlow_op_inc): Deleted.
(JSC::JIT::emitSlow_op_dec): Deleted.
* jit/JITOpcodes.cpp:
(JSC::JIT::emitSlow_op_create_this): Deleted.
(JSC::JIT::emitSlow_op_check_tdz): Deleted.
(JSC::JIT::emitSlow_op_to_this): Deleted.
(JSC::JIT::emitSlow_op_to_primitive): Deleted.
(JSC::JIT::emitSlow_op_not): Deleted.
(JSC::JIT::emitSlow_op_stricteq): Deleted.
(JSC::JIT::emitSlow_op_nstricteq): Deleted.
(JSC::JIT::emitSlow_op_to_number): Deleted.
(JSC::JIT::emitSlow_op_to_string): Deleted.
(JSC::JIT::emitSlow_op_to_object): Deleted.
(JSC::JIT::emitSlow_op_get_direct_pname): Deleted.
(JSC::JIT::emitSlow_op_has_structure_property): Deleted.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emitSlow_op_to_primitive): Deleted.
(JSC::JIT::emitSlow_op_not): Deleted.
(JSC::JIT::emitSlow_op_stricteq): Deleted.
(JSC::JIT::emitSlow_op_nstricteq): Deleted.
(JSC::JIT::emitSlow_op_to_number): Deleted.
(JSC::JIT::emitSlow_op_to_string): Deleted.
(JSC::JIT::emitSlow_op_to_object): Deleted.
(JSC::JIT::emitSlow_op_create_this): Deleted.
(JSC::JIT::emitSlow_op_to_this): Deleted.
(JSC::JIT::emitSlow_op_check_tdz): Deleted.
(JSC::JIT::emitSlow_op_get_direct_pname): Deleted.
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitSlow_op_resolve_scope): Deleted.
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emitSlow_op_resolve_scope): Deleted.
* jit/SlowPathCall.h:
(JSC::JITSlowPathCall::JITSlowPathCall):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:

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

2 years ago[LayoutState cleanup] Add pagination parameter to subtree LayoutState
zalan@apple.com [Thu, 9 Nov 2017 15:08:46 +0000 (15:08 +0000)]
[LayoutState cleanup] Add pagination parameter to subtree LayoutState
https://bugs.webkit.org/show_bug.cgi?id=179465
<rdar://problem/35434096>

Reviewed by Antti Koivisto.

It enables us to remove the last setters from LayoutState.

No change in functionality.

* page/LayoutContext.cpp:
(WebCore::LayoutContext::pushLayoutStateForPaginationIfNeeded):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::layoutDeltaMatches const):
(WebCore::LayoutState::layoutDeltaMatches): Deleted.
* rendering/LayoutState.h:
(WebCore::LayoutState::isPaginated const):
(WebCore::LayoutState::setIsPaginated): Deleted.
(WebCore::LayoutState::setPageLogicalHeight): Deleted.

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

2 years ago[GTK] Gardening 09 nov
clopez@igalia.com [Thu, 9 Nov 2017 12:36:07 +0000 (12:36 +0000)]
[GTK] Gardening 09 nov
https://bugs.webkit.org/show_bug.cgi?id=179472

Unreviewed GTK gardening

* platform/gtk/TestExpectations:

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

2 years ago[JSC][MIPS] Use fcsr to check the validity of the result of trunc.w.d
guijemont@igalia.com [Thu, 9 Nov 2017 09:02:10 +0000 (09:02 +0000)]
[JSC][MIPS] Use fcsr to check the validity of the result of trunc.w.d
https://bugs.webkit.org/show_bug.cgi?id=179446

Reviewed by Žan Doberšek.

The trunc.w.d mips instruction should give a 0x7fffffff result when
the source value is Infinity, NaN, or rounds to an integer outside the
range -2^31 to 2^31 -1. This is what branchTruncateDoubleToInt32() and
branchTruncateDoubleToUInt32() have been relying on. It turns out that
this assumption is not true on some CPUs, including on the ci20 on
which we run the testbot (we get 0x80000000 instead). We should the
invalid operation cause bit instead to check whether the source value
could be properly truncated. This requires the addition of the cfc1
instruction, as well as the special registers that can be used with it
(control registers of CP1).

* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::firstSPRegister):
(JSC::MIPSAssembler::lastSPRegister):
(JSC::MIPSAssembler::numberOfSPRegisters):
(JSC::MIPSAssembler::sprName):
Added control registers of CP1.
(JSC::MIPSAssembler::cfc1):
Added.
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchOnTruncateResult):
(JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32):
(JSC::MacroAssemblerMIPS::branchTruncateDoubleToUint32):
Use fcsr to check if the value could be properly truncated.

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

2 years ago[GTK] Test gardening
commit-queue@webkit.org [Thu, 9 Nov 2017 08:51:50 +0000 (08:51 +0000)]
[GTK] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=179447

Patch by Alicia Boya García <aboya@igalia.com> on 2017-11-09
Reviewed by Michael Catanzaro.

* platform/gtk/TestExpectations:

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

2 years agoREGRESSION(r224566): [GTK][WPE] Many inspector tests are failing after r224566
commit-queue@webkit.org [Thu, 9 Nov 2017 08:12:04 +0000 (08:12 +0000)]
REGRESSION(r224566): [GTK][WPE] Many inspector tests are failing after r224566
https://bugs.webkit.org/show_bug.cgi?id=179419

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-11-09
Reviewed by Carlos Alberto Lopez Perez.

All of them fail with the following error:

Uncaught exception in Inspector page: ReferenceError: Can't find variable: CodeMirror [TestCombined.js:36658:15]

This is because Test.html, even when combined, is trying to load CodeMirror from External/CodeMirror, but
CodeMirror was already combined for Main.html. We need to also combine CodeMirror for Test.html.

* Scripts/copy-user-interface-resources.pl:

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

2 years agoAVSampleBufferGenerator leaks seen on leaks bot
commit-queue@webkit.org [Thu, 9 Nov 2017 07:59:31 +0000 (07:59 +0000)]
AVSampleBufferGenerator leaks seen on leaks bot
https://bugs.webkit.org/show_bug.cgi?id=179464

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-11-08
Reviewed by Jer Noble.

* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(WebCore::ImageDecoderAVFObjC::readSampleMetadata):
(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
Adopt the allocation into our RetainPtr.

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

2 years agoInclude a more complete block signature in public headers to avoid potential -Wstrict...
commit-queue@webkit.org [Thu, 9 Nov 2017 06:05:07 +0000 (06:05 +0000)]
Include a more complete block signature in public headers to avoid potential -Wstrict-prototypes warnings
https://bugs.webkit.org/show_bug.cgi?id=179466

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-11-08
Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKHTTPCookieStore.h:
* UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
(-[WKHTTPCookieStore setCookie:completionHandler:]):
(-[WKHTTPCookieStore deleteCookie:completionHandler:]):

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

2 years agoContent not painted when scrolling an overflow node inside an iframe
simon.fraser@apple.com [Thu, 9 Nov 2017 05:35:34 +0000 (05:35 +0000)]
Content not painted when scrolling an overflow node inside an iframe
https://bugs.webkit.org/show_bug.cgi?id=179315
rdar://problem/35364166

Reviewed by Tim Horton.

Source/WebCore:

When scrolling overflow:scroll, we need to check for overlap updates just as we do
for page scrolls.

Test: compositing/ios/overflow-scroll-update-overlap.html

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

LayoutTests:

* compositing/ios/overflow-scroll-update-overlap-expected.html: Added.
* compositing/ios/overflow-scroll-update-overlap.html: Added.

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

2 years agoCordova: elements with tag position:fixed disappears (flickering) when a long content...
simon.fraser@apple.com [Thu, 9 Nov 2017 05:27:22 +0000 (05:27 +0000)]
Cordova: elements with tag position:fixed disappears (flickering) when a long content is scrolling and appears again when the scroll is finished.
https://bugs.webkit.org/show_bug.cgi?id=178066

Reviewed by Tim Horton.

In UIWebView, we were failing to call setIsViewportConstrained() on layers for position:fixed,
causing us to detach their backing store sometimes on page scrolling.

Fix by hoisting the call to RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole()
up the stack into code that runs for both UIWebView and WKWebView. This required moving some of
the sanity check code up out of updateScrollCoordinatedLayer() into the caller.

Not testable because the bug only manifested in UIWebView.

* rendering/RenderLayerCompositor.cpp:
(WebCore::canCoordinateScrollingForLayer):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

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

2 years ago[LayoutState cleanup] Move RenderMultiColumnFlow::computeLineGridPaginationOrigin...
zalan@apple.com [Thu, 9 Nov 2017 04:57:38 +0000 (04:57 +0000)]
[LayoutState cleanup] Move RenderMultiColumnFlow::computeLineGridPaginationOrigin to LayoutState
https://bugs.webkit.org/show_bug.cgi?id=179462

Reviewed by Antti Koivisto.

This is in preparation for having no setters on LayoutState.
Having all the related functions (pagination/line-grid) in one place also helps with moving
them to a more appropriate place later.

No change in functionality.

* rendering/LayoutState.cpp:
(WebCore::LayoutState::computePaginationInformation):
(WebCore::LayoutState::computeLineGridPaginationOrigin):
(WebCore::LayoutState::establishLineGrid):
* rendering/LayoutState.h:
(WebCore::LayoutState::setLineGridPaginationOrigin): Deleted.
(WebCore::LayoutState::currentRenderFragmentedFlow const): Deleted.
(WebCore::LayoutState::setCurrentRenderFragmentedFlow): Deleted.
* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::computeLineGridPaginationOrigin const): Deleted.

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

2 years agoReplace some stack raw pointers with RefPtrs within WebCore/svg
jiewen_tan@apple.com [Thu, 9 Nov 2017 03:55:05 +0000 (03:55 +0000)]
Replace some stack raw pointers with RefPtrs within WebCore/svg
https://bugs.webkit.org/show_bug.cgi?id=179314
<rdar://problem/34842204>

Reviewed by Ryosuke Niwa.

Besides replacing pointers directly, some of the methods are changed to return
RefPtrs as well.

No changes in behaviors.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::remoteSVGRootElement const):
* dom/EventPath.h:
(WebCore::EventPath::eventTargetRespectingTargetRules):
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::hasValidGlyphElements const):
* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::hasValidAttributeType):
(WebCore::SVGAnimateElementBase::calculateAnimatedValue):
(WebCore::SVGAnimateElementBase::calculateFromAndToValues):
(WebCore::SVGAnimateElementBase::calculateFromAndByValues):
(WebCore::SVGAnimateElementBase::resetAnimatedType):
(WebCore::SVGAnimateElementBase::applyResultsToTarget):
(WebCore::SVGAnimateElementBase::calculateDistance):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::hasValidAttributeType):
(WebCore::SVGAnimateMotionElement::updateAnimationPath):
(WebCore::SVGAnimateMotionElement::resetAnimatedType):
(WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
(WebCore::SVGAnimateMotionElement::applyResultsToTarget):
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::hasValidAttributeType):
* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::adjustForInheritance):
(WebCore::SVGAnimationElement::determinePropertyValueTypes):
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::rootElement):
(WebCore::SVGDocument::zoomAndPanEnabled const):
(WebCore::SVGDocument::startPan):
(WebCore::SVGDocument::updatePan const):
* svg/SVGDocument.h:
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemovalMap):
* svg/SVGDocumentExtensions.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::~SVGElement):
(WebCore::SVGElement::correspondingUseElement const):
(WebCore::SVGElement::setCorrespondingElement):
(WebCore::SVGElement::resolveCustomStyle):
(WebCore::SVGElement::computedStyle):
(WebCore::SVGElement::buildPendingResourcesIfNeeded):
(WebCore::SVGElement::updateRelativeLengthsInformation):
(WebCore::SVGElement::invalidateInstances):
* svg/SVGElement.h:
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::build):
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::build):
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::build):
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::build):
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::build):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::build):
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::build):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::build):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::build):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::buildPendingResource):
(WebCore::SVGFEImageElement::notifyFinished):
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::findLightSource):
(WebCore::SVGFELightElement::svgAttributeChanged):
(WebCore::SVGFELightElement::childrenChanged):
* svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::build):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::build):
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::build):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::build):
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::build):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::invalidateFilterPrimitiveParent):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/SVGFontFaceFormatElement.cpp:
(WebCore::SVGFontFaceFormatElement::childrenChanged):
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::childrenChanged):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::rendererIsNeeded):
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::determineViewport const):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::collectGradientAttributes):
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::buildPendingResource):
(WebCore::SVGMPathElement::pathElement):
* svg/SVGMPathElement.h:
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::collectGradientAttributes):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::frameForCurrentScale const):
(WebCore::SVGSVGElement::currentScale const):
(WebCore::SVGSVGElement::setCurrentScale):
(WebCore::SVGSVGElement::deselectAll):
(WebCore::SVGSVGElement::localCoordinateSpaceTransform const):
(WebCore::SVGSVGElement::scrollToAnchor):
(WebCore::SVGSVGElement::getElementById):
* svg/SVGSVGElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::setDisabled):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::detachTarget):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::elementFromRenderer):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::buildPendingResource):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::transferSizeAttributesToTargetClone const):
(WebCore::SVGUseElement::svgAttributeChanged):
(WebCore::SVGUseElement::targetClone const):
(WebCore::SVGUseElement::toClipPath):
(WebCore::SVGUseElement::rendererClipChild const):
(WebCore::SVGUseElement::findTarget const):
(WebCore::SVGUseElement::invalidateDependentShadowTrees):
(WebCore::SVGUseElement::selfHasRelativeLengths const):
* svg/SVGUseElement.h:
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::updateAnimations):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::buildPendingResource):
(WebCore::SVGSMILElement::insertedIntoAncestor):
(WebCore::SVGSMILElement::connectConditions):
(WebCore::SVGSMILElement::disconnectConditions):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::rootElement const):
(WebCore::SVGImage::hasSingleSecurityOrigin const):
(WebCore::SVGImage::setContainerSize):
(WebCore::SVGImage::containerSize const):
(WebCore::SVGImage::draw):
(WebCore::SVGImage::embeddedContentBox const):
(WebCore::SVGImage::hasRelativeWidth const):
(WebCore::SVGImage::hasRelativeHeight const):
(WebCore::SVGImage::computeIntrinsicDimensions):
(WebCore::SVGImage::startAnimation):
(WebCore::SVGImage::stopAnimation):
(WebCore::SVGImage::isAnimating const):
(WebCore::SVGImage::reportApproximateMemoryCost const):
* svg/graphics/SVGImage.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):
* svg/graphics/filters/SVGFilterBuilder.cpp:
(WebCore::SVGFilterBuilder::getEffectById const):
* svg/graphics/filters/SVGFilterBuilder.h:
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
* svg/properties/SVGListPropertyTearOff.h:

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

2 years agoMark imported/w3c/web-platform-tests/service-workers/service-worker/register-same...
ryanhaddad@apple.com [Thu, 9 Nov 2017 01:47:56 +0000 (01:47 +0000)]
Mark imported/w3c/web-platform-tests/service-workers/service-worker/register-same-scope-different-script-url.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=179452

Unreviewed test gardening.

* TestExpectations:

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

2 years agoMark http/tests/workers/service/registration-task-queue-scheduling-1.html as flaky.
ryanhaddad@apple.com [Thu, 9 Nov 2017 01:44:21 +0000 (01:44 +0000)]
Mark http/tests/workers/service/registration-task-queue-scheduling-1.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=179342

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years ago[LayoutState cleanup] LayoutContext should own the stack of LayoutState objects
zalan@apple.com [Thu, 9 Nov 2017 01:32:17 +0000 (01:32 +0000)]
[LayoutState cleanup] LayoutContext should own the stack of LayoutState objects
https://bugs.webkit.org/show_bug.cgi?id=179408
<rdar://problem/35423075>

Reviewed by Antti Koivisto.

No change in functionality.

* page/LayoutContext.cpp:
(WebCore::LayoutContext::layoutDelta const):
(WebCore::LayoutContext::addLayoutDelta):
(WebCore::LayoutContext::layoutDeltaMatches):
(WebCore::LayoutContext::layoutState const):
(WebCore::LayoutContext::pushLayoutState):
(WebCore::LayoutContext::pushLayoutStateForPaginationIfNeeded):
(WebCore::LayoutContext::popLayoutState):
* page/LayoutContext.h:
(WebCore::LayoutContext::isPaintOffsetCacheEnabled const):
(WebCore::LayoutContext::layoutState const): Deleted.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::computeOffsets):
(WebCore::LayoutState::computeClipRect):
(WebCore::LayoutState::computePaginationInformation):
(WebCore::LayoutState::propagateLineGridInfo):
(WebCore::LayoutState::establishLineGrid):
(WebCore::LayoutState::clearPaginationInformation): Deleted.
* rendering/LayoutState.h:
(WebCore::LayoutState::setIsPaginated):

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

2 years agoServiceWorkerRegistration::updateStateFromServer fix! (Don't always create a new...
beidson@apple.com [Thu, 9 Nov 2017 01:13:27 +0000 (01:13 +0000)]
ServiceWorkerRegistration::updateStateFromServer fix! (Don't always create a new ServiceWorker every time).
https://bugs.webkit.org/show_bug.cgi?id=179456

Reviewed by Chris Dumez.

No new tests (No behavior change yet).

* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::updateStateFromServer): Re-use a previous worker instead of always creating a new one.

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

2 years agoAdd Windows powershell EWS script
don.olmstead@sony.com [Thu, 9 Nov 2017 00:53:58 +0000 (00:53 +0000)]
Add Windows powershell EWS script
https://bugs.webkit.org/show_bug.cgi?id=179453

Reviewed by Brent Fulgham.

* EWSTools/Start-Queue.ps1: Added.

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

2 years agoXMLHttpRequest should not treat file URLs as same origin
bfulgham@apple.com [Thu, 9 Nov 2017 00:46:33 +0000 (00:46 +0000)]
XMLHttpRequest should not treat file URLs as same origin
https://bugs.webkit.org/show_bug.cgi?id=178565
<rdar://problem/11115901>

Reviewed by Daniel Bates.

Source/WebCore:

Based on a Blink patch by <jannhorn@googlemail.com>.
https://chromium.googlesource.com/chromium/src/+/c362e001551abc2bea392773f32eaf043d8bc29f

Test: security/cannot-read-self-from-file.html

* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::passesFileCheck const): Do not treat file as same-origin.

LayoutTests:

* security/cannot-read-self-from-file-expected.txt: Added.
* security/cannot-read-self-from-file.html: Added.
* security/resources/cannot-read-self-from-file.html: Added.

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

2 years agoMake WKFullScreenWidnowController more robust against modification by the embedding...
commit-queue@webkit.org [Thu, 9 Nov 2017 00:45:47 +0000 (00:45 +0000)]
Make WKFullScreenWidnowController more robust against modification by the embedding app.
https://bugs.webkit.org/show_bug.cgi?id=179413
rdar://problem/35408061

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-11-08
Reviewed by Darin Adler.

Present fullscreen UViewController in a separate UIWindow to prevent interaction with the embedding app's
UIViewController hierarchy.

Immediately tear down the fullscreen interface if the embedding app removes the WKWebView from the fullscreen window.
This prevents the fullscreen interface from getting into an invalid state.

Preserve scrollView.zoomScale because it is not effectively preserved by the more indirect _viewScale.

Use a custom root view controller to allow hiding of the status bar.

Remove the no-longer-necessary dispatch_after calls during enter and exit fullscreen.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView removeFromSuperview]):
* UIProcess/ios/WKFullScreenWindowControllerIOS.h:
* UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
(WebKit::WKWebViewState::applyTo):
(WebKit::WKWebViewState::store):
(-[_WKFullScreenViewController loadView]):
(-[_WKFullscreenRootViewController prefersStatusBarHidden]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController completedExitFullScreen]):
(-[WKFullScreenWindowController exitFullscreenImmediately]):
(-[WKFullScreenWindowController close]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[_WKFullScreenViewController viewDidDisappear:]): Deleted.

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

2 years agoHTMLMediaElement should not use element fullscreen on iOS
commit-queue@webkit.org [Thu, 9 Nov 2017 00:43:35 +0000 (00:43 +0000)]
HTMLMediaElement should not use element fullscreen on iOS
https://bugs.webkit.org/show_bug.cgi?id=179418
rdar://problem/35409277

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-11-08
Reviewed by Eric Carlson.

Add ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN to determine if HTMLMediaElement should use element full screen or not.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen):

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 years agoWeb Inspector: Show Internal properties of PaymentRequest in Web Inspector Console
joepeck@webkit.org [Thu, 9 Nov 2017 00:36:15 +0000 (00:36 +0000)]
Web Inspector: Show Internal properties of PaymentRequest in Web Inspector Console
https://bugs.webkit.org/show_bug.cgi?id=179276

Reviewed by Andy Estes.

Source/JavaScriptCore:

* inspector/InjectedScriptHost.h:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::getInternalProperties):
Call through to virtual implementation so that WebCore can provide custom
internal properties for Web / DOM objects.

Source/WebCore:

Test: http/tests/inspector/runtime/internal-properties-payment-request.https.html

* Modules/paymentrequest/PaymentRequest.h:
Expose access to internal state.

* inspector/WebInjectedScriptHost.h:
* inspector/WebInjectedScriptHost.cpp:
(WebCore::constructInternalProperty):
(WebCore::WebInjectedScriptHost::getInternalProperties):
Provide internal properties for a PaymentRequest.

* testing/Internals.cpp:
(WebCore::Internals::withUserGesture):
* testing/Internals.h:
* testing/Internals.idl:
Provide a simple way to run code inside of a user gesture.

Source/WebInspectorUI:

* UserInterface/Test.html:
* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness.prototype.evaluateInPage):
* UserInterface/Test/TestUtilities.js: Added.
(promisify):
Make async tests a little easier to work with by providing promises
in some cases that would normally take a callback.

LayoutTests:

* TestExpectations:
* platform/mac-wk2/TestExpectations:
Pass test on platforms that support Payment Requests.

* http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt: Added.
* http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html: Added.
Test for internal properties on PaymentRequest instances.

* resources/ui-helper.js:
(window.UIHelper.withUserGesture):
Provide an easier way to simulate work inside of a user gesture.

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

2 years agoMark many service worker tests as flaky on iOS.
ryanhaddad@apple.com [Thu, 9 Nov 2017 00:25:05 +0000 (00:25 +0000)]
Mark many service worker tests as flaky on iOS.
https://bugs.webkit.org/show_bug.cgi?id=179454

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

2 years agoREGRESSION(r224534): Crash inside Document::updateStyleIfNeeded
rniwa@webkit.org [Wed, 8 Nov 2017 23:54:15 +0000 (23:54 +0000)]
REGRESSION(r224534): Crash inside Document::updateStyleIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=179442

Reviewed by Simon Fraser.

Disable the assertion when the web thread is used.

* dom/Document.cpp:
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayout):

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

2 years agoA JSFunction's ObjectAllocationProfile should watch the poly prototype watchpoint...
sbarati@apple.com [Wed, 8 Nov 2017 23:38:55 +0000 (23:38 +0000)]
A JSFunction's ObjectAllocationProfile should watch the poly prototype watchpoint so it can clear its object allocation profile
https://bugs.webkit.org/show_bug.cgi?id=177792

Reviewed by Yusuke Suzuki.

JSTests:

* microbenchmarks/poly-proto-clear-js-function-allocation-profile.js: Added.
(assert):
(foo.Foo.prototype.ensureX):
(foo.Foo):
(foo):
(access):

Source/JavaScriptCore:

Before this patch, if a JSFunction's rare data initialized its allocation profile
before its backing Executable's poly proto watchpoint was invalidated, that
JSFunction would continue to allocate non-poly proto objects until its allocation
profile was cleared (which essentially never happens in practice). This patch
improves on this pathology. A JSFunction's rare data will now watch the poly
proto watchpoint if it's still valid and clear its allocation profile when we
detect that we should go poly proto.

* bytecode/ObjectAllocationProfile.h:
* bytecode/ObjectAllocationProfileInlines.h:
(JSC::ObjectAllocationProfile::initializeProfile):
* runtime/FunctionRareData.cpp:
(JSC::FunctionRareData::initializeObjectAllocationProfile):
(JSC::FunctionRareData::AllocationProfileClearingWatchpoint::fireInternal):
* runtime/FunctionRareData.h:
(JSC::FunctionRareData::hasAllocationProfileClearingWatchpoint const):
(JSC::FunctionRareData::createAllocationProfileClearingWatchpoint):
(JSC::FunctionRareData::AllocationProfileClearingWatchpoint::AllocationProfileClearingWatchpoint):

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

2 years agoSource/WebCore:
commit-queue@webkit.org [Wed, 8 Nov 2017 23:22:32 +0000 (23:22 +0000)]
Source/WebCore:
Added mime type check to the picture source preloader to avoid downloading incompatible resources.
https://bugs.webkit.org/show_bug.cgi?id=179231

Patch by Colin Bendell <colin@bendell.ca> on 2017-11-08
Reviewed by Alex Christensen.

Test: http/tests/loading/preload-picture-type.html

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): include type match state when selecting candidate imgs
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): added type attribute evaluation and matching

LayoutTests:
Add tests to ensure that <source> tags are only preloaded when the `type`
attribute matches.
https://bugs.webkit.org/show_bug.cgi?id=179231

Patch by Colin Bendell <colin@bendell.ca> on 2017-11-08
Reviewed by Alex Christensen.

The actual execution of the test is a bit racy because of the need to refresh
the browser to change the DPR. Should also move the other testHad to move the tests to /preload (instead of tests/loading with the other
picture tests) to avoid the logging from

* http/tests/preload/picture-type-expected.txt: Added.
* http/tests/preload/picture-type.html: Added.

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

2 years agoSome SW Container and Registration tweaks.
beidson@apple.com [Wed, 8 Nov 2017 23:15:03 +0000 (23:15 +0000)]
Some SW Container and Registration tweaks.
https://bugs.webkit.org/show_bug.cgi?id=179450

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt:

Source/WebCore:

No new tests (Progression in an existing test).

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):

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

2 years agoMove inlineElementContinuation function to RenderBoxModelObject and rename to inlineC...
antti@apple.com [Wed, 8 Nov 2017 23:13:42 +0000 (23:13 +0000)]
Move inlineElementContinuation function to RenderBoxModelObject and rename to inlineContinuation
https://bugs.webkit.org/show_bug.cgi?id=179437

Reviewed by Zalan Bujtas.

Unify RenderInline::inlineElementContinuation and RenderBlock::inlineElementContinuation.
It is simply a function to find the next RenderInline in the continuation chain.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::lastChildConsideringContinuation):
(WebCore::startOfContinuations):
(WebCore::endOfContinuations):
(WebCore::childBeforeConsideringContinuations):
(WebCore::AccessibilityRenderObject::nextSibling const):
(WebCore::nextContinuation):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::absoluteRects const):
(WebCore::RenderBlock::addFocusRingRects):
(WebCore::RenderBlock::inlineElementContinuation const): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::accumulateInFlowPositionOffsets):
(WebCore::RenderBoxModelObject::inlineContinuation const):
* rendering/RenderBoxModelObject.h:
* rendering/RenderInline.cpp:
(WebCore::updateStyleOfAnonymousBlockContinuations):
(WebCore::RenderInline::styleDidChange):
(WebCore::nextContinuation):
(WebCore::RenderInline::positionForPoint):
(WebCore::RenderInline::inlineElementContinuation const): Deleted.
* rendering/RenderInline.h:
* rendering/line/LineInlineHeaders.h:
(WebCore::hasInlineDirectionBordersPaddingOrMargin):

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

2 years agoMark test262.yaml/test262/test/language/statements/try/tco-catch.js as passing.
ryanhaddad@apple.com [Wed, 8 Nov 2017 23:11:56 +0000 (23:11 +0000)]
Mark test262.yaml/test262/test/language/statements/try/tco-catch.js as passing.
https://bugs.webkit.org/show_bug.cgi?id=178592

Unreviewed test gardening.

* test262.yaml:

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

2 years ago[ios-simulator] API test WebKit.BundleParameters is a flaky failure
timothy_horton@apple.com [Wed, 8 Nov 2017 22:50:59 +0000 (22:50 +0000)]
[ios-simulator] API test WebKit.BundleParameters is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=178363
<rdar://problem/35043144>

Reviewed by Brent Fulgham.

* wtf/RefCounter.h:
(WTF::RefCounter<T>::Count::deref):
(WTF::RefCounter<T>::Count::refCounterWasDeleted):
(WTF::RefCounter<T>::~RefCounter):
If a RefCounter::Count is deref()'d and drops its RefCounter's value to
zero, and the RefCounter is deleted in that valueDidChangeCallback, it
will delete the Counter that is in the middle of deref(). Keep track
of whether we're inside the callback and defer the deletion until
the end of deref().

* TestWebKitAPI/Tests/WTF/RefCounter.cpp:
(TestWebKitAPI::TEST):
Add a test.

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

2 years agoWeb Inspector: Eliminate unnecessary hash lookups with NetworkResourceData
commit-queue@webkit.org [Wed, 8 Nov 2017 22:01:15 +0000 (22:01 +0000)]
Web Inspector: Eliminate unnecessary hash lookups with NetworkResourceData
https://bugs.webkit.org/show_bug.cgi?id=179361

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-11-08
Reviewed by Brian Burg.

* inspector/NetworkResourcesData.h:
(WebCore::NetworkResourcesData::ResourceData::setURL):
(WebCore::NetworkResourcesData::ResourceData::setUrl): Deleted.
Drive-by fix the name `setUrl` to `setURL`.

* inspector/NetworkResourcesData.h:
Store unique_ptrs in the HashMap.

* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::resourceCreated):
(WebCore::NetworkResourcesData::responseReceived):
Create new versions of methods that combine two operations.

(WebCore::NetworkResourcesData::removeCachedResource):
(WebCore::NetworkResourcesData::clear):
(WebCore::NetworkResourcesData::ensureNoDataForRequestId):
Handle unique_ptrs in the HashMap.

* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::frameIdentifier):
(WebCore::InspectorNetworkAgent::willSendRequest):
(WebCore::InspectorNetworkAgent::didReceiveResponse):
(WebCore::InspectorNetworkAgent::didFailLoading):
Use the new version of operations to avoid multiple lookups.

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

2 years agoWeb Inspector: fix incorrect curly quote orientation in a UIString
bburg@apple.com [Wed, 8 Nov 2017 21:48:13 +0000 (21:48 +0000)]
Web Inspector: fix incorrect curly quote orientation in a UIString
https://bugs.webkit.org/show_bug.cgi?id=179353
<rdar://problem/35368697>

Reviewed by Joseph Pecoraro.

I didn't see any other instances of this mistake in our localized strings.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ResourceTimelineDataGridNode.js:
Fix it.

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

2 years agoAdd super sampler begin and end bytecodes.
keith_miller@apple.com [Wed, 8 Nov 2017 21:26:33 +0000 (21:26 +0000)]
Add super sampler begin and end bytecodes.
https://bugs.webkit.org/show_bug.cgi?id=179376

Reviewed by Filip Pizlo.

This patch adds a way to measure a narrow range of bytecodes for
performance. This is done using the same infrastructure as the
super sampler. I also added a class that helps do the bytecode
checking with RAII. One problem with the current way this is done
is that we don't handle decrementing early exits, either from
branches or exceptions. So, when using this API users need to
ensure that there are no early exits or that those exits don't
occur on the measure code.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeDumper.cpp:
(JSC::BytecodeDumper<Block>::dumpBytecode):
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitSuperSamplerBegin):
(JSC::BytecodeGenerator::emitSuperSamplerEnd):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/SuperSamplerBytecodeScope.h: Added.
(JSC::SuperSamplerBytecodeScope::SuperSamplerBytecodeScope):
(JSC::SuperSamplerBytecodeScope::~SuperSamplerBytecodeScope):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGClobbersExitState.cpp:
(JSC::DFG::clobbersExitState):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGMayExit.cpp:
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileSuperSamplerBegin):
(JSC::FTL::DFG::LowerDFGToB3::compileSuperSamplerEnd):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_super_sampler_begin):
(JSC::JIT::emit_op_super_sampler_end):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:

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

2 years ago[Attachment Support] Implement delegate hooks for attachment element insertion and...
wenson_hsieh@apple.com [Wed, 8 Nov 2017 21:10:00 +0000 (21:10 +0000)]
[Attachment Support] Implement delegate hooks for attachment element insertion and removal
https://bugs.webkit.org/show_bug.cgi?id=179016
<rdar://problem/35250890>

Reviewed by Tim Horton.

Source/WebCore:

Relanding this patch with a tweaked API test. WKAttachmentTests.AttachmentUpdatesWhenChangingFontStyles, in its
original form, hit a debug assertion and exposed an existing bug related to EditingStyles and text decoration.
After some investigation, this debug assertion is unrelated to the attachment logic introduced here; see
<https://bugs.webkit.org/show_bug.cgi?id=179431> for additional analysis, and several proposed fixes.

* editing/Editor.cpp:
(WebCore::Editor::respondToChangedSelection):
(WebCore::Editor::editorUIUpdateTimerFired):
(WebCore::Editor::scheduleEditorUIUpdate):
(WebCore::Editor::didInsertAttachmentElement):
(WebCore::Editor::didRemoveAttachmentElement):
(WebCore::Editor::notifyClientOfAttachmentUpdates):
(WebCore::Editor::insertAttachmentFromFile):
* editing/Editor.h:
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::HTMLAttachmentElement):
(WebCore::HTMLAttachmentElement::insertedIntoAncestor):
(WebCore::HTMLAttachmentElement::removedFromAncestor):
(WebCore::HTMLAttachmentElement::uniqueIdentifier const):
(WebCore::HTMLAttachmentElement::setUniqueIdentifier):
* html/HTMLAttachmentElement.h:
* html/HTMLAttributeNames.in:
* page/EditorClient.h:
(WebCore::EditorClient::didInsertAttachment):
(WebCore::EditorClient::didRemoveAttachment):

Source/WebKit:

See WebCore/ChangeLog for more details.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didInsertAttachment:]):
(-[WKWebView _didRemoveAttachment:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/Cocoa/PageClientImplCocoa.h:
* UIProcess/Cocoa/PageClientImplCocoa.mm:
(WebKit::PageClientImplCocoa::didInsertAttachment):
(WebKit::PageClientImplCocoa::didRemoveAttachment):
* UIProcess/PageClient.h:
(WebKit::PageClient::didInsertAttachment):
(WebKit::PageClient::didRemoveAttachment):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didInsertAttachment):
(WebKit::WebPageProxy::didRemoveAttachment):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::didInsertAttachment):
(WebKit::WebEditorClient::didRemoveAttachment):
* WebProcess/WebCoreSupport/WebEditorClient.h:

Tools:

See WebCore/ChangeLog for more details.

* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[AttachmentUpdateObserver init]):
(-[AttachmentUpdateObserver inserted]):
(-[AttachmentUpdateObserver removed]):
(-[AttachmentUpdateObserver _webView:didInsertAttachment:]):
(-[AttachmentUpdateObserver _webView:didRemoveAttachment:]):
(TestWebKitAPI::ObserveAttachmentUpdatesForScope::ObserveAttachmentUpdatesForScope):
(TestWebKitAPI::ObserveAttachmentUpdatesForScope::~ObserveAttachmentUpdatesForScope):
(TestWebKitAPI::ObserveAttachmentUpdatesForScope::observer const):
(TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectAttachmentUpdates):
(-[TestWKWebView _synchronouslyExecuteEditCommand:argument:]):
(-[TestWKWebView expectUpdatesAfterCommand:withArgument:expectedRemovals:expectedInsertions:]):
(TestWebKitAPI::TEST):

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

2 years agoTurn recursive tail calls into loops
rmorisset@apple.com [Wed, 8 Nov 2017 20:42:15 +0000 (20:42 +0000)]
Turn recursive tail calls into loops
https://bugs.webkit.org/show_bug.cgi?id=176601

Reviewed by Saam Barati.

Relanding after https://bugs.webkit.org/show_bug.cgi?id=178834.

JSTests:

Add some simple test that computes factorial in several ways, and other trivial computations.
They all tests the case where foo calls bar (in an inlineable way) that then does a tail call.
Depending on the nature of both calls, it is possible or not to turn the tail call into a loop.
I have no clear way of checking that the call was indeed transformed, but I can check that the code computes the right result
(which it doesn't if that tail call is transformed into a loop in the unsound cases).

* stress/inline-call-to-recursive-tail-call.js: Added.
(factorial.aux):
(factorial):
(factorial2.aux2):
(factorial2.id):
(factorial2):
(factorial3.aux3):
(factorial3):
(aux4):
(factorial4):
(foo):
(auxBar):
(bar):
(test):

Source/JavaScriptCore:

We want to turn recursive tail calls into loops early in the pipeline, so that the loops can then be optimized.
One difficulty is that we need to split the entry block of the function we are jumping to in order to have somewhere to jump to.
Worse: it is not necessarily the first block of the codeBlock, because of inlining! So we must do the splitting in the DFGByteCodeParser, at the same time as inlining.
We do this part through modifying the computation of the jump targets.
Importantly, we only do this splitting for functions that have tail calls.
It is the only case where the optimisation is sound, and doing the splitting unconditionnaly destroys performance on Octane/raytrace.

We must then do the actual transformation also in DFGByteCodeParser, to avoid code motion moving code out of the body of what will become a loop.
The transformation is entirely contained in handleRecursiveTailCall, which is hooked to the inlining machinery.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasTailCalls const):
* bytecode/PreciseJumpTargets.cpp:
(JSC::getJumpTargetsForBytecodeOffset):
(JSC::computePreciseJumpTargetsInternal):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::hasTailCalls const):
(JSC::UnlinkedCodeBlock::setHasTailCalls):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitEnter):
(JSC::BytecodeGenerator::emitCallInTailPosition):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::allocateTargetableBlock):
(JSC::DFG::ByteCodeParser::makeBlockTargetable):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parse):

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

2 years agoSimplify ServiceWorkerContainer::jobResolvedWithRegistration()
cdumez@apple.com [Wed, 8 Nov 2017 20:02:58 +0000 (20:02 +0000)]
Simplify ServiceWorkerContainer::jobResolvedWithRegistration()
https://bugs.webkit.org/show_bug.cgi?id=179429

Reviewed by Brady Eidson.

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

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

2 years ago[Service Workers] Make sure SWServerRegistration update functions always message...
cdumez@apple.com [Wed, 8 Nov 2017 20:02:24 +0000 (20:02 +0000)]
[Service Workers] Make sure SWServerRegistration update functions always message back the connection that scheduled the job
https://bugs.webkit.org/show_bug.cgi?id=179428

Reviewed by Brady Eidson.

* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::install):
(WebCore::SWServerJobQueue::didFinishInstall):
* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::updateRegistrationState):
(WebCore::SWServerRegistration::updateWorkerState):
(WebCore::SWServerRegistration::fireUpdateFoundEvent):
(WebCore::SWServerRegistration::firePostInstallEvents):
(WebCore::SWServerRegistration::forEachConnection):
* workers/service/server/SWServerRegistration.h:

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

2 years agoiOS supports some text encodings supposedly due to lack of TEC that aren't supported...
mjs@apple.com [Wed, 8 Nov 2017 19:35:18 +0000 (19:35 +0000)]
iOS supports some text encodings supposedly due to lack of TEC that aren't supported by the TEC decoder on macOS
https://bugs.webkit.org/show_bug.cgi?id=179309

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/encoding/legacy-ios-encodings.html

* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::registerEncodingNames): Remove most iOS-specific adding of names, leaving only softbank-sjis.
Most were either redundant or unnecessary.
(WebCore::TextCodecICU::registerCodecs): ditto

LayoutTests:

* fast/encoding/legacy-ios-encodings-expected.txt: Added.
* fast/encoding/legacy-ios-encodings.html: Added. Check that we don't support some old iOS-only encoding names
and check for some nonstandard encoding names that we do support (for now).

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

2 years agoGigacage.cpp:44:46: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint...
mcatanzaro@igalia.com [Wed, 8 Nov 2017 19:30:36 +0000 (19:30 +0000)]
Gigacage.cpp:44:46: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
https://bugs.webkit.org/show_bug.cgi?id=179427

Reviewed by Saam Barati.

Tweak the conditional to suppress the warning.

* bmalloc/Gigacage.cpp:
(Gigacage::ensureGigacage):

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

2 years agoUnreviewed. Attempting to unbork the WinCairo bot after r224578.
zandobersek@gmail.com [Wed, 8 Nov 2017 19:08:48 +0000 (19:08 +0000)]
Unreviewed. Attempting to unbork the WinCairo bot after r224578.

* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
Add a missing semicolon after the deafult initialization of a member
variable in the GraphicsContextPlatformPrivate class.

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

2 years agoWeb Inspector: Remove unused Page.ScriptIdentifier protocol type
commit-queue@webkit.org [Wed, 8 Nov 2017 18:32:24 +0000 (18:32 +0000)]
Web Inspector: Remove unused Page.ScriptIdentifier protocol type
https://bugs.webkit.org/show_bug.cgi?id=179407

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

Source/JavaScriptCore:

* inspector/protocol/Page.json:
Remove unused protocol type.

Source/WebInspectorUI:

* Versions/Inspector-iOS-10.0.json:
* Versions/Inspector-iOS-10.3.json:
* Versions/Inspector-iOS-11.0.json:
* Versions/Inspector-iOS-7.0.json:
* Versions/Inspector-iOS-8.0.json:
* Versions/Inspector-iOS-9.0.json:
* Versions/Inspector-iOS-9.3.json:
Remove unused protocol type.

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

2 years agoSwitch encoding WPT test suite to updating via import-w3c-tests
mjs@apple.com [Wed, 8 Nov 2017 17:44:39 +0000 (17:44 +0000)]
Switch encoding WPT test suite to updating via import-w3c-tests
https://bugs.webkit.org/show_bug.cgi?id=179412

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* resources/import-expectations.json: Import encoding tests instead of skipping.
* web-platform-tests/encoding/eof-utf-8-one-expected.html: Added.
* web-platform-tests/encoding/eof-utf-8-three-expected.html: Added.
* web-platform-tests/encoding/eof-utf-8-two-expected.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/w3c-import.log: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/w3c-import.log: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/w3c-import.log: Added.
* web-platform-tests/encoding/resources/w3c-import.log: Added.
* web-platform-tests/encoding/textdecoder-copy.any-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-copy.any.html: Added.
* web-platform-tests/encoding/textdecoder-copy.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-copy.any.worker.html: Added.
* web-platform-tests/encoding/textdecoder-labels-expected.txt.rej: Added.
* web-platform-tests/encoding/textencoder-constructor-non-utf-expected.txt.rej: Added.
* web-platform-tests/encoding/w3c-import.log: Added.

LayoutTests:

* TestExpectations: Remove mention of slow encoding tests here...
* tests-options.json: ...because they are now recorded here.

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

2 years ago[Service Workers] Support waitUntil() on the 'install' event
cdumez@apple.com [Wed, 8 Nov 2017 17:26:22 +0000 (17:26 +0000)]
[Service Workers] Support waitUntil() on the 'install' event
https://bugs.webkit.org/show_bug.cgi?id=179396

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

Rebaseline a few WPT tests.

* web-platform-tests/service-workers/service-worker/oninstall-script-error.https-expected.txt:
* web-platform-tests/service-workers/service-worker/register-wait-forever-in-install-worker.https-expected.txt:

Source/WebCore:

Support waitUntil() on the 'install' event:
- https://w3c.github.io/ServiceWorker/#installation-algorithm (step 10.4)
- https://w3c.github.io/ServiceWorker/#wait-until-method

Tests: http/tests/workers/service/basic-install-event-waitUntil-multiple-promises.html
       http/tests/workers/service/basic-install-event-waitUntil-reject.html
       http/tests/workers/service/basic-install-event-waitUntil-resolve.html

* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:
* workers/service/ExtendableEvent.cpp:
(WebCore::ExtendableEvent::waitUntil):
(WebCore::ExtendableEvent::addExtendLifetimePromise):
(WebCore::ExtendableEvent::whenAllExtendLifetimePromisesAreSettled):
* workers/service/ExtendableEvent.h:
(WebCore::ExtendableEvent::pendingPromiseCount const):
* workers/service/FetchEvent.cpp:
(WebCore::FetchEvent::respondWith):
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::addRegistration):
(WebCore::ServiceWorkerContainer::removeRegistration):
* workers/service/ServiceWorkerContainer.h:
* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::fireInstallEvent):
* workers/service/server/SWClientConnection.h:
* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::didFinishInstall):
* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::firePostInstallEvents):

LayoutTests:

Add layout test coverage.

* http/tests/workers/service/basic-install-event-waitUntil-multiple-promises-expected.txt: Added.
* http/tests/workers/service/basic-install-event-waitUntil-multiple-promises.html: Added.
* http/tests/workers/service/basic-install-event-waitUntil-reject-expected.txt: Added.
* http/tests/workers/service/basic-install-event-waitUntil-reject.html: Added.
* http/tests/workers/service/basic-install-event-waitUntil-resolve-expected.txt: Added.
* http/tests/workers/service/basic-install-event-waitUntil-resolve.html: Added.
* http/tests/workers/service/resources/basic-install-event-waitUntil-multiple-promises-worker.js: Added.
(event.i.event.waitUntil.new.Promise):
* http/tests/workers/service/resources/basic-install-event-waitUntil-reject-worker.js: Added.
(event.event.waitUntil.new.Promise):
* http/tests/workers/service/resources/basic-install-event-waitUntil-resolve-worker.js: Added.
(event.event.waitUntil.new.Promise):
* http/wpt/service-workers/extendableEvent.https-expected.txt:
* http/wpt/service-workers/extendableEvent.https.html:

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

2 years agoRemove Element::isInlineElementContinuation
antti@apple.com [Wed, 8 Nov 2017 16:39:02 +0000 (16:39 +0000)]
Remove Element::isInlineElementContinuation
https://bugs.webkit.org/show_bug.cgi?id=179425

Reviewed by Zalan Bujtas.

It is really just isInline+isContinuation test and most callers know it is an inline already.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::firstChildConsideringContinuation):
(WebCore::startOfContinuations):
(WebCore::firstChildIsInlineContinuation):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
(WebCore::InlineFlowBox::paint):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addContinuationWithOutline):
* rendering/RenderElement.h:
(WebCore::RenderElement::setIsContinuation):
(WebCore::RenderElement::isElementContinuation const): Deleted.
(WebCore::RenderElement::isInlineElementContinuation const): Deleted.
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
(WebCore::RenderInline::updateHitTestResult):
* rendering/line/LineInlineHeaders.h:
(WebCore::hasInlineDirectionBordersPaddingOrMargin):

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

2 years ago[Experiment] Implement code to detect high frequency painting
hyatt@apple.com [Wed, 8 Nov 2017 16:11:55 +0000 (16:11 +0000)]
[Experiment] Implement code to detect high frequency painting
https://bugs.webkit.org/show_bug.cgi?id=179118
Source/WebCore:

<rdar://problem/35347068>

Reviewed by Simon Fraser.

This patch implements a model for detecting that objects whose
graphics resources we want to cache (like glyphs or paths) are painting
frequently enough that it's worth taking the memory hit to cache them.

Paint frequency detection is done at the self-painting RenderLayer level, since
a lower level of granularity (e.g., per-RenderObject) would be too memory-intensive.

* rendering/PaintInfo.h:
(WebCore::PaintInfo::PaintInfo):
(WebCore::PaintInfo::enclosingSelfPaintingLayer):
Add the enclosing self-painting layer that is currently painting to the PaintInfo
so that objects that have cachaeble graphics resources can notify the layer when
they actually paint them.

* rendering/RenderLayer.cpp:
(WebCore::PaintFrequencyInfo::PaintFrequencyInfo):
(WebCore::PaintFrequencyInfo::paintingFrequently const):
(WebCore::PaintFrequencyInfo::updatePaintFrequency):
(WebCore::PaintFrequencyInfo::paintingCacheableResource):
RenderLayers have a pointer to PaintFrequencyInfo that is allocated once you've
painted cachaeble resources.

(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
(WebCore::RenderLayer::paintChildClippingMaskForFragments):
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayer.h:
Patch to pass the layer with the PaintInfo.

* testing/Internals.cpp:
(WebCore::Internals::isPaintingFrequently):
(WebCore::Internals::incrementFrequentPaintCounter):
* testing/Internals.h:
* testing/Internals.idl:
Test methods for making layout tests to ensure we go into the mode properly.

LayoutTests:

Reviewed by Simon Fraser.

* fast/block/block-move-frequent-paint-expected.txt: Added.
* fast/block/block-move-frequent-paint.html: Added.

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

2 years agoUpdate XMLHttpRequest tests.
Ms2ger@igalia.com [Wed, 8 Nov 2017 16:00:18 +0000 (16:00 +0000)]
Update XMLHttpRequest tests.
https://bugs.webkit.org/show_bug.cgi?id=179421

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

* resources/import-expectations.json: enabled some more tests
* web-platform-tests/XMLHttpRequest/abort-during-done.htm:
* web-platform-tests/XMLHttpRequest/abort-during-headers-received.htm:
* web-platform-tests/XMLHttpRequest/abort-during-loading.htm:
* web-platform-tests/XMLHttpRequest/open-after-abort.htm:
* web-platform-tests/XMLHttpRequest/open-url-multi-window-2-expected.txt:
* web-platform-tests/XMLHttpRequest/open-url-multi-window-2.htm:
* web-platform-tests/XMLHttpRequest/open-url-multi-window-3-expected.txt:
* web-platform-tests/XMLHttpRequest/open-url-multi-window-3.htm:
* web-platform-tests/XMLHttpRequest/open-url-multi-window-4.htm:
* web-platform-tests/XMLHttpRequest/open-url-multi-window-6.htm:
* web-platform-tests/XMLHttpRequest/open-url-redirected-worker-origin-expected.txt:
* web-platform-tests/XMLHttpRequest/open-url-redirected-worker-origin.htm:
* web-platform-tests/XMLHttpRequest/open-url-worker-origin-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-worker-origin.htm: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-xml.htm:
* web-platform-tests/XMLHttpRequest/resources/workerxhr-origin-referrer.js:
* web-platform-tests/XMLHttpRequest/resources/workerxhr-simple.js:
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-simple.js:
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-synconmain.js:
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-synconworker.js:
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-twice.js:
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout.js:
* web-platform-tests/XMLHttpRequest/responsedocument-decoding.htm:
* web-platform-tests/XMLHttpRequest/send-authentication-basic-cors-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-cors.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-repeat-no-args-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-repeat-no-args.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-setrequestheader.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-competing-names-passwords-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-competing-names-passwords.htm: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-basic-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-basic.htm: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-document-expected.txt:
* web-platform-tests/XMLHttpRequest/send-entity-body-document.htm:
* web-platform-tests/XMLHttpRequest/send-entity-body-get-head-async.htm:
* web-platform-tests/XMLHttpRequest/send-entity-body-get-head.htm:
* web-platform-tests/XMLHttpRequest/send-network-error-async-events.sub-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-network-error-async-events.sub.htm: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-infinite.htm:
* web-platform-tests/XMLHttpRequest/send-redirect-no-location.htm:
* web-platform-tests/XMLHttpRequest/send-redirect-post-upload.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-after-send.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-before-open.htm:
* web-platform-tests/XMLHttpRequest/w3c-import.log:
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-reused.html:
* web-platform-tests/XMLHttpRequest/xmlhttprequest-unsent.htm:

LayoutTests:

* TestExpectations: removed flaky expectation: the test was fixed upstream.

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

2 years ago[WPE] Turn on ENABLE_INDEXED_DATABASE_IN_WORKERS
mcatanzaro@igalia.com [Wed, 8 Nov 2017 15:53:41 +0000 (15:53 +0000)]
[WPE] Turn on ENABLE_INDEXED_DATABASE_IN_WORKERS
https://bugs.webkit.org/show_bug.cgi?id=179094

Reviewed by Carlos Alberto Lopez Perez.

* Source/cmake/OptionsWPE.cmake:

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

2 years ago[LayoutState cleanup] Make public data members private.
zalan@apple.com [Wed, 8 Nov 2017 15:02:10 +0000 (15:02 +0000)]
[LayoutState cleanup] Make public data members private.
https://bugs.webkit.org/show_bug.cgi?id=179409
<rdar://problem/35406184>

Reviewed by Sam Weinig.

No change in functionality.

* page/LayoutContext.cpp:
(WebCore::LayoutContext::layoutDelta const):
(WebCore::LayoutContext::addLayoutDelta):
(WebCore::LayoutContext::layoutDeltaMatches):
(WebCore::LayoutContext::pushLayoutStateForPaginationIfNeeded):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::addLayoutDelta):
(WebCore::LayoutState::layoutDeltaMatches):
* rendering/LayoutState.h:
(WebCore::LayoutState::setIsPaginated):
(WebCore::LayoutState::setPageLogicalHeight):
(WebCore::LayoutState::paintOffset const):
(WebCore::LayoutState::renderer const):
(WebCore::LayoutState::clipRect const):
(WebCore::LayoutState::isClipped const):
(WebCore::LayoutState::layoutDelta const):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage const):
(WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
(WebCore::RenderBlockFlow::pageLogicalTopForOffset const):
(WebCore::RenderBlockFlow::pageLogicalHeightForOffset const):
(WebCore::RenderBlockFlow::pageRemainingLogicalHeightForOffset const):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer const):
(WebCore::RenderBox::computeRectForRepaint const):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint const):
(WebCore::RenderInline::mapLocalToContainer const):

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

2 years ago[Cairo] Improve PlatformContextCairo lifetime management in GraphicsContextPlatformPr...
zandobersek@gmail.com [Wed, 8 Nov 2017 13:55:46 +0000 (13:55 +0000)]
[Cairo] Improve PlatformContextCairo lifetime management in GraphicsContextPlatformPrivate
https://bugs.webkit.org/show_bug.cgi?id=179424

Reviewed by Carlos Garcia Campos.

When the PlatformContextCairo object is owned by GraphicsContextPlatformPrivate,
the latter should hold it in a std::unique_ptr<>. When PlatformContextCairo is
not owned, the std::unique_ptr<> should remain null, and the PlatformContextCairo
reference should point to the externally-managed object.

A new GraphicsContextPlatformPrivate constructor accepts a std::unique_ptr<> that
manages a PlatformContextCairo object and moves it into the member variable, tying
lifetime of that PlatformContextCairo object to the private object.

This enables dropping the GraphicsContextPlatformPrivateToplevel class, and the
virtual table is no longer required. Small cleanups to the remaining class are
also performed.

No new tests -- no changes in behavior.

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::platformContext const):
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
(WebCore::GraphicsContextPlatformPrivate::save):
(WebCore::GraphicsContextPlatformPrivate::restore):
(WebCore::GraphicsContextPlatformPrivate::flush):
(WebCore::GraphicsContextPlatformPrivate::clip):
(WebCore::GraphicsContextPlatformPrivate::scale):
(WebCore::GraphicsContextPlatformPrivate::rotate):
(WebCore::GraphicsContextPlatformPrivate::translate):
(WebCore::GraphicsContextPlatformPrivate::concatCTM):
(WebCore::GraphicsContextPlatformPrivate::setCTM):
(WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): Deleted.
(WebCore::GraphicsContextPlatformPrivateToplevel::GraphicsContextPlatformPrivateToplevel): Deleted.
(WebCore::GraphicsContextPlatformPrivateToplevel::~GraphicsContextPlatformPrivateToplevel): Deleted.
* platform/graphics/win/GraphicsContextCairoWin.cpp:
(WebCore::GraphicsContext::platformInit):

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

2 years ago[Cairo] Move transparency layers Vector to PlatformContextCairo
zandobersek@gmail.com [Wed, 8 Nov 2017 13:37:51 +0000 (13:37 +0000)]
[Cairo] Move transparency layers Vector to PlatformContextCairo
https://bugs.webkit.org/show_bug.cgi?id=179420

Reviewed by Carlos Garcia Campos.

Move the Vector of transparency layer float values from the
GraphicsContextPlatformPrivate class to PlatformContextCairo.
It fits better there since it's a platform-specific context
state, just like e.g. the ShadowBlur member.

No new tests -- no change in behavior.

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::beginPlatformTransparencyLayer):
(WebCore::GraphicsContext::endPlatformTransparencyLayer):
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
* platform/graphics/cairo/PlatformContextCairo.h:
(WebCore::PlatformContextCairo::layers):
* platform/graphics/win/GraphicsContextCairoWin.cpp:
(WebCore::drawBitmapToContext):
(WebCore::GraphicsContext::releaseWindowsContext):
(WebCore::GraphicsContext::drawWindowsBitmap):

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

2 years agoWeb Inspector: use JSON::{Array,Object,Value} instead of Inspector{Array,Object,Value}
carlosgc@webkit.org [Wed, 8 Nov 2017 13:02:13 +0000 (13:02 +0000)]
Web Inspector: use JSON::{Array,Object,Value} instead of Inspector{Array,Object,Value}
https://bugs.webkit.org/show_bug.cgi?id=173619

Source/JavaScriptCore:

Reviewed by Alex Christensen and Brian Burg.

Eventually all classes used for our JSON-RPC message passing should be outside
of the Inspector namespace since the protocol is used outside of Inspector code.
This will also allow us to unify the primitive JSON types with parameteric types
like Inspector::Protocol::Array<T> and other protocol-related types which don't
need to be in the Inspector namespace.

Start this refactoring off by making JSON::Value a typedef for InspectorValue. In following
patches, other clients will move to use JSON::Value and friends. When all uses are
changed, the actual implementation will be renamed. This patch just focuses on the typedef
and making changes in generated protocol code.

Original patch by Brian Burg, rebased and updated by me.

* inspector/InspectorValues.cpp:
* inspector/InspectorValues.h:
* inspector/scripts/codegen/cpp_generator.py:
(CppGenerator.cpp_protocol_type_for_type):
(CppGenerator.cpp_type_for_unchecked_formal_in_parameter):
(CppGenerator.cpp_type_for_type_with_name):
(CppGenerator.cpp_type_for_stack_in_parameter):
* inspector/scripts/codegen/cpp_generator_templates.py:
(void):
* inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
(_generate_class_for_object_declaration):
(_generate_forward_declarations_for_binding_traits):
* inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:
(CppProtocolTypesImplementationGenerator._generate_assertion_for_object_declaration):
(CppProtocolTypesImplementationGenerator._generate_assertion_for_enum):
* inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/generic/expected/domain-availability.json-result:
* inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/generic/expected/enum-values.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
* inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
* inspector/scripts/tests/generic/expected/worker-supported-domains.json-result:
* inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:

Tools:

Reviewed by Brian Burg.

Update InspectorValue unit tests to use JSON namespace and add more basic tests to cover all the API.

* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/JavaScriptCore/InspectorValue.cpp:
(TestWebKitAPI::TEST):

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

2 years agoREGRESSION(r223773): [GTK] WebKitWebInspector bring-to-front signal is emitted right...
carlosgc@webkit.org [Wed, 8 Nov 2017 12:55:22 +0000 (12:55 +0000)]
REGRESSION(r223773): [GTK] WebKitWebInspector bring-to-front signal is emitted right after open-window
https://bugs.webkit.org/show_bug.cgi?id=179365

Reviewed by Michael Catanzaro.

In the GTK+ API, open-window already implies presenting the window to bring it to the front, so it's not
expected that bring-to-front is emitted on open. This is happening since r223773 that moved common code from
platform specific inspector files to the main file, but in the case of open the mac implementation was not
exactly the same as the GTK+ one. This broke /webkit2/WebKitWebInspector/default and
/webkit2/WebKitWebInspector/manual-attach-detach.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::open): Set m_isOpening for the scope of the function.
* UIProcess/WebInspectorProxy.h: Add m_isOpening.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformBringToFront): Return early if m_isOpening is true.

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

2 years agoDisable implicit animations when adding or removing text track representation layers.
commit-queue@webkit.org [Wed, 8 Nov 2017 09:49:03 +0000 (09:49 +0000)]
Disable implicit animations when adding or removing text track representation layers.
https://bugs.webkit.org/show_bug.cgi?id=179406
rdar://problem/34369835

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-11-08
Reviewed by Simon Fraser.

No new tests because this has no effect on the DOM.

This change prevents implicit animations when the text track layer is added or removed from
the video layer.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::syncTextTrackBounds):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setTextTrackRepresentation):
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):

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

2 years agoREGRESSION(r224179): [GTK] Several WebViewEditor tests are failing since r224179
carlosgc@webkit.org [Wed, 8 Nov 2017 07:25:40 +0000 (07:25 +0000)]
REGRESSION(r224179): [GTK] Several WebViewEditor tests are failing since r224179
https://bugs.webkit.org/show_bug.cgi?id=179366

Reviewed by Michael Catanzaro.

Source/WebKit:

In r224179, webkit_web_view_can_execute_editing_command() was optimized to use the sync path for commands
supported by the WebViewEditorState, but the state requires a redraw to be up to date. We can't know if
WebViewEditorState is in sync, when webkit_web_view_can_execute_editing_command() is called, so we always need
to ask the web process.

* UIProcess/API/glib/WebKitWebView.cpp:
(webkit_web_view_can_execute_editing_command):

Tools:

Use always a toplevel window for WebViewEditor tests instead of creating and destroying one only to flush editor
state.

* TestWebKitAPI/Tests/WebKitGtk/TestWebViewEditor.cpp:

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

2 years ago[GTK][WPE] Build inspector resources using copy-user-interface-resources.pl script
carlosgc@webkit.org [Wed, 8 Nov 2017 07:23:38 +0000 (07:23 +0000)]
[GTK][WPE] Build inspector resources using copy-user-interface-resources.pl script
https://bugs.webkit.org/show_bug.cgi?id=179317

Reviewed by Michael Catanzaro.

Source/WebKit:

This is the script used by Apple and it has several advantages:

  - It allows to combine and minify most of the js and css files, which improves performance and binary size.
  - It removes the debug resources and assertions in production builds.
  - It allows to remove the test resources in production builds.

The patch also moves the common cmake code to generate the resources to a new file InspectorGResources.cmake included
by GTK+ and WPE platform cmake files.

* InspectorGResources.cmake: Added.
* PlatformGTK.cmake:
* PlatformWPE.cmake:

Tools:

Move generate-inspector-gresource-manifest.py to glib dir to be shared by GTK+ and WPE ports and update it to
receive an input directory instead of a list of patterns.
File::Copy::Recursive is required by copy-user-interface-resources.pl, so make sure it's installed.

* glib/generate-inspector-gresource-manifest.py: Renamed from Tools/gtk/generate-inspector-gresource-manifest.py.
(get_filenames):
(get_filenames.should_ignore_resource):
* gtk/install-dependencies:
* wpe/generate-inspector-gresource-manifest.py: Removed.
* wpe/install-dependencies:

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

2 years agoGet rid of unsightly hex numbers from unified build object files
mjs@apple.com [Wed, 8 Nov 2017 07:10:02 +0000 (07:10 +0000)]
Get rid of unsightly hex numbers from unified build object files
https://bugs.webkit.org/show_bug.cgi?id=179410

Reviewed by Saam Barati.

Source/JavaScriptCore:

* JavaScriptCore.xcodeproj/project.pbxproj: Rename UnifiedSource*.mm to UnifiedSource*-mm.mm for more readable build output.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Rename UnifiedSource*.mm to UnifiedSource*-mm.mm for more readable build output.

Source/WTF:

* Scripts/generate-unified-source-bundles.rb: For extensions other than "cpp", also include
the extension in the base name of the file, to avoid ugly Xcode-generated object file names.

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

2 years agoOnly cage double butterfly accesses
sbarati@apple.com [Wed, 8 Nov 2017 06:29:31 +0000 (06:29 +0000)]
Only cage double butterfly accesses
https://bugs.webkit.org/show_bug.cgi?id=179202

Reviewed by Mark Lam.

This patch removes caging from all butterfly accesses except double loads/stores.
This is a performance vs security tradeoff. Double loads/stores are the only butterfly
loads/stores that can write arbitrary bit patterns, so we choose to keep them safe
by caging. The other load/stores we are no longer caging to get back performance on
various benchmarks.

* bytecode/AccessCase.cpp:
(JSC::AccessCase::generateImpl):
* bytecode/InlineAccess.cpp:
(JSC::InlineAccess::dumpCacheSizesAndCrash):
(JSC::InlineAccess::generateSelfPropertyAccess):
(JSC::InlineAccess::generateSelfPropertyReplace):
(JSC::InlineAccess::generateArrayLength):
* dfg/DFGFixedButterflyAccessUncagingPhase.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCreateRest):
(JSC::DFG::SpeculativeJIT::compileSpread):
(JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetDirectPname):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitContiguousLoad):
(JSC::JIT::emitArrayStorageLoad):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
* llint/LowLevelInterpreter64.asm:
* runtime/AuxiliaryBarrier.h:
(JSC::AuxiliaryBarrier::operator-> const):
* runtime/Butterfly.h:
(JSC::Butterfly::caged):
(JSC::Butterfly::contiguousDouble):
* runtime/JSArray.cpp:
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::shiftCountWithAnyIndexingType):
(JSC::JSArray::unshiftCountWithAnyIndexingType):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToArguments):
* runtime/JSArrayInlines.h:
(JSC::JSArray::pushInline):
* runtime/JSObject.cpp:
(JSC::JSObject::heapSnapshot):
(JSC::JSObject::createInitialIndexedStorage):
(JSC::JSObject::createArrayStorage):
(JSC::JSObject::convertUndecidedToInt32):
(JSC::JSObject::ensureLengthSlow):
(JSC::JSObject::reallocateAndShrinkButterfly):
(JSC::JSObject::allocateMoreOutOfLineStorage):
* runtime/JSObject.h:
(JSC::JSObject::canGetIndexQuickly):
(JSC::JSObject::getIndexQuickly):
(JSC::JSObject::tryGetIndexQuickly const):
(JSC::JSObject::canSetIndexQuickly):
(JSC::JSObject::butterfly const):
(JSC::JSObject::butterfly):

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

2 years agoRemove RenderBlock::isAnonymousBlockContinuation()
antti@apple.com [Wed, 8 Nov 2017 05:41:30 +0000 (05:41 +0000)]
Remove RenderBlock::isAnonymousBlockContinuation()
https://bugs.webkit.org/show_bug.cgi?id=179403

Non-anonymous blocks don't have continuations so this is the same as simply calling continuation().

Some of these are also really isContinuation() tests. This ends up being the same as calling
continuation() as block continuations always have next continuation too. This patch uses
isContinuation() where appropriate.

Reviewed by Zalan Bujtas.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeForHitTest const):
(WebCore::RenderBlock::absoluteRects const):
(WebCore::RenderBlock::absoluteQuads const):
(WebCore::RenderBlock::rectWithOutlineForRepaint const):
(WebCore::RenderBlock::hoverAncestor const):
(WebCore::RenderBlock::outlineStyleForRepaint const):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::isAnonymousBlockContinuation const): Deleted.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
* rendering/RenderInline.cpp:
(WebCore::updateStyleOfAnonymousBlockContinuations):

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

2 years agoDisable isoheaps on iOS
fpizlo@apple.com [Wed, 8 Nov 2017 01:30:14 +0000 (01:30 +0000)]
Disable isoheaps on iOS

Reviewed by Ryosuke Niwa.

* wtf/IsoMalloc.h:

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

2 years agoThere is no such thing as block element continuation
antti@apple.com [Wed, 8 Nov 2017 01:02:32 +0000 (01:02 +0000)]
There is no such thing as block element continuation
https://bugs.webkit.org/show_bug.cgi?id=179400

Reviewed by Zalan Bujtas.

There are no non-anonymous block continuations. This is dead code.

* rendering/RenderBlock.cpp:
(WebCore::borderOrPaddingLogicalWidthChanged):
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::blockElementContinuation const): Deleted.

    This would always return null.

* rendering/RenderBlock.h:

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

2 years agoFix webkitpy tests after rev 224549.
don.olmstead@sony.com [Wed, 8 Nov 2017 00:30:45 +0000 (00:30 +0000)]
Fix webkitpy tests after rev 224549.

Unreviewed build fix.

* Scripts/webkitpy/common/config/ports.py:
(WinCairoPort.run_webkit_tests_command):
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_wincairo_port):

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

2 years ago[LayoutState cleanup] Rename enable/disableLayoutState
zalan@apple.com [Wed, 8 Nov 2017 00:29:33 +0000 (00:29 +0000)]
[LayoutState cleanup] Rename enable/disableLayoutState
https://bugs.webkit.org/show_bug.cgi?id=179399
<rdar://problem/35400245>

Reviewed by Antti Koivisto.

It only enables/disables paint offset caching.

No change in functionality.

* page/LayoutContext.cpp:
(WebCore::LayoutContext::pushLayoutState):
(WebCore::LayoutContext::checkLayoutState):
* page/LayoutContext.h:
(WebCore::LayoutContext::isPaintOffsetCacheEnabled const):
(WebCore::LayoutContext::disablePaintOffsetCache):
(WebCore::LayoutContext::enablePaintOffsetCache):
(WebCore::LayoutContext::layoutStateEnabled const): Deleted.
(WebCore::LayoutContext::disableLayoutState): Deleted.
(WebCore::LayoutContext::enableLayoutState): Deleted.
* rendering/LayoutState.cpp:
(WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
(WebCore::LayoutStateMaintainer::push):
(WebCore::LayoutStateMaintainer::pop):
(WebCore::LayoutStateDisabler::LayoutStateDisabler):
(WebCore::LayoutStateDisabler::~LayoutStateDisabler):
(WebCore::shouldDisablePaintOffsetCacheForSubtree):
(WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
(WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
(WebCore::shouldDisableLayoutStateForSubtree): Deleted.
* rendering/LayoutState.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer const):
(WebCore::RenderBox::computeRectForRepaint const):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint const):
(WebCore::RenderInline::computeRectForRepaint const):
(WebCore::RenderInline::mapLocalToContainer const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeRectForRepaint const):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::layout):

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

2 years agoAdd downcast support for FullscreenClient.
commit-queue@webkit.org [Wed, 8 Nov 2017 00:01:45 +0000 (00:01 +0000)]
Add downcast support for FullscreenClient.
https://bugs.webkit.org/show_bug.cgi?id=178824

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-11-07
Reviewed by Simon Fraser.

Add SPECIALIZE_TYPE_TRAITS macros for API::FullscreenClient and WebKit::Fullscreen client so
downcasts can be done safely.

* UIProcess/API/APIFullscreenClient.h:
(API::FullscreenClient::isType const):
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageSetFullscreenDelegate):
(WKPageGetFullscreenDelegate):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setFullscreenDelegate:]):
(-[WKWebView _fullscreenDelegate]):
* UIProcess/Cocoa/FullscreenClient.h:
(isType):
* UIProcess/Cocoa/FullscreenClient.mm:

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

2 years agoWe should PROT_NONE the Gigacage runway so OOB accesses crash
sbarati@apple.com [Tue, 7 Nov 2017 23:31:22 +0000 (23:31 +0000)]
We should PROT_NONE the Gigacage runway so OOB accesses crash
https://bugs.webkit.org/show_bug.cgi?id=179392

Reviewed by Mark Lam.

If we assume that an attacker will exploit JSC and cause OOB accesses,
we should make OOB accesses in the Gigacage runway crash.

* bmalloc/Gigacage.cpp:
(Gigacage::ensureGigacage):

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

2 years agoUpdate TestExpectations for slow WPT encoding LayoutTests.
ryanhaddad@apple.com [Tue, 7 Nov 2017 23:21:38 +0000 (23:21 +0000)]
Update TestExpectations for slow  WPT encoding LayoutTests.

Unreviewed test gardening.

Mark some of the tests as slow on Debug and skip those that time out even though they are already marked as slow.

* TestExpectations:

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

2 years agoImplement "UpdateWorkerState" and use it
beidson@apple.com [Tue, 7 Nov 2017 23:06:55 +0000 (23:06 +0000)]
Implement "UpdateWorkerState" and use it
https://bugs.webkit.org/show_bug.cgi?id=179318

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/update.https-expected.txt:

Source/WebCore:

No new tests (Existing tests and changes there-to).

* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::allWorkers):
(WebCore::ServiceWorker::mutableAllWorkers):
(WebCore::ServiceWorker::ServiceWorker):
(WebCore::ServiceWorker::~ServiceWorker):
(WebCore::ServiceWorker::updateWorkerState):
(WebCore::ServiceWorker::setState): Deleted.
* workers/service/ServiceWorker.h:

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::updateRegistrationState):
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
* workers/service/ServiceWorkerContainer.h:

* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::updateStateFromServer):

* workers/service/ServiceWorkerRegistrationData.cpp:
(WebCore::ServiceWorkerRegistrationData::isolatedCopy const):
* workers/service/ServiceWorkerRegistrationData.h:
(WebCore::ServiceWorkerRegistrationData::encode const):
(WebCore::ServiceWorkerRegistrationData::decode):

* workers/service/ServiceWorkerRegistrationKey.cpp:
(WebCore::ServiceWorkerRegistrationKey::loggingString const):
* workers/service/ServiceWorkerRegistrationKey.h:

* workers/service/ServiceWorkerTypes.h:

* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::registerServiceWorkerThreadForInstall):
(WebCore::SWContextManager::registerServiceWorkerThreadForUpdate): Deleted.
* workers/service/context/SWContextManager.h:

* workers/service/server/SWClientConnection.cpp:
(WebCore::SWClientConnection::updateRegistrationState):
(WebCore::SWClientConnection::updateWorkerState):
* workers/service/server/SWClientConnection.h:

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::updateWorker):
* workers/service/server/SWServer.h:
(WebCore::SWServer::workerByID const):

* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::scriptFetchFinished):
(WebCore::SWServerJobQueue::scriptContextStarted):
(WebCore::SWServerJobQueue::install):
(WebCore::SWServerJobQueue::tryClearRegistration):

* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::updateRegistrationState):
(WebCore::SWServerRegistration::updateWorkerState):
(WebCore::SWServerRegistration::data const):
* workers/service/server/SWServerRegistration.h:
(WebCore::SWServerRegistration::setActiveServiceWorkerIdentifier): Deleted.

* workers/service/server/SWServerWorker.h:
(WebCore::SWServerWorker::state const):
(WebCore::SWServerWorker::setState):

Source/WebKit:

* Scripts/webkit/messages.py:
(headers_for_type):
* Shared/WebCoreArgumentCoders.h:

       * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::updateWorkerStateInClient):
(WebKit::WebSWServerConnection::installServiceWorkerContext):
(WebKit::WebSWServerConnection::setContextConnection):
(WebKit::WebSWServerConnection::updateServiceWorkerContext): Deleted.
* StorageProcess/ServiceWorker/WebSWServerConnection.h:

* WebProcess/Storage/WebSWClientConnection.messages.in:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
(WebKit::WebSWContextManagerConnection::updateServiceWorker): Deleted.
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:

Source/WTF:

* wtf/ObjectIdentifier.h:
(WTF::ObjectIdentifier::loggingString const):

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

2 years agoEnable webkitpy EWS bubbles
aakash_jain@apple.com [Tue, 7 Nov 2017 23:04:34 +0000 (23:04 +0000)]
Enable webkitpy EWS bubbles
https://bugs.webkit.org/show_bug.cgi?id=178539

Reviewed by Alexey Proskuryakov.

* QueueStatusServer/config/queues.py: Added webkitpy EWS.

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

2 years agoAdd platform argument for syncing script.
dewei_zhu@apple.com [Tue, 7 Nov 2017 22:57:05 +0000 (22:57 +0000)]
Add platform argument for syncing script.
https://bugs.webkit.org/show_bug.cgi?id=179162

Reviewed by Ryosuke Niwa.

Syncing script should pass platform name to buildbot if platform argument is specified in configuration.

* server-tests/tools-sync-buildbot-integration-tests.js:
(return.createTriggerable.configWithPlatformName.then): Added unit test for platform argument.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer): Add '_platformPropertyName' property.
(BuildbotSyncer.prototype.scheduleRequest): Add '_platformPropertyName' to build property if specified.
(BuildbotSyncer._loadConfig): Read '_plaformPropertyName' from config.

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

2 years agoIntroduce a default RegisterSet constructor so that we can use { } notation.
mark.lam@apple.com [Tue, 7 Nov 2017 22:52:34 +0000 (22:52 +0000)]
Introduce a default RegisterSet constructor so that we can use { } notation.
https://bugs.webkit.org/show_bug.cgi?id=179389

Reviewed by Saam Barati.

I also replaced uses of "RegisterSet()" with "{ }" where the use of "RegisterSet()"
does not add any code documentation value.

* b3/air/AirAllocateRegistersAndStackByLinearScan.cpp:
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::setRegsInPriorityOrder):
* b3/air/AirPrintSpecial.cpp:
(JSC::B3::Air::PrintSpecial::extraEarlyClobberedRegs):
(JSC::B3::Air::PrintSpecial::extraClobberedRegs):
* b3/air/testair.cpp:
* bytecode/PolymorphicAccess.h:
(JSC::AccessGenerationState::preserveLiveRegistersToStackForCall):
(JSC::AccessGenerationState::restoreLiveRegistersFromStackForCall):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::liveRegistersToPreserveAtExceptionHandlingCallSite):
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::liveRegistersToPreserveAtExceptionHandlingCallSite):
* jit/JITCode.cpp:
(JSC::JITCode::liveRegistersToPreserveAtExceptionHandlingCallSite):
* jit/RegisterSet.cpp:
(JSC::RegisterSet::reservedHardwareRegisters):
(JSC::RegisterSet::runtimeRegisters):
(JSC::RegisterSet::macroScratchRegisters):
* jit/RegisterSet.h:
(JSC::RegisterSet::RegisterSet):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::emitTierUpCheck):

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

2 years agoAdd a WinCairo EWS queue
don.olmstead@sony.com [Tue, 7 Nov 2017 22:38:34 +0000 (22:38 +0000)]
Add a WinCairo EWS queue
https://bugs.webkit.org/show_bug.cgi?id=179390

Reviewed by Lucas Forschler.

* QueueStatusServer/config/queues.py:
* QueueStatusServer/model/queues.py:
* Scripts/webkitpy/common/config/ews.json:
* Scripts/webkitpy/common/config/ports.py:
* Scripts/webkitpy/common/config/ports_unittest.py:
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:

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

2 years agofix check-webkit-style errors in webkitpy about not having two spaces before inline...
aakash_jain@apple.com [Tue, 7 Nov 2017 22:33:41 +0000 (22:33 +0000)]
fix check-webkit-style errors in webkitpy about not having two spaces before inline comment
https://bugs.webkit.org/show_bug.cgi?id=171506

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(SCMTest._shared_test_reverse_diff): Added two spaces before inline comment.
(test_create_patch_is_full_patch): Ditto.
* Scripts/webkitpy/common/thread/messagepump.py:
(MessagePump): Ditto.
* Scripts/webkitpy/layout_tests/servers/http_server.py:
(Lighttpd._prepare_config): Ditto.
* Scripts/webkitpy/style/checker.py: Ditto.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(OrderOfIncludesTest.test_check_preprocessor_in_include_section): Ditto.

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

2 years agoAdd support for webkitpy tests EWS
aakash_jain@apple.com [Tue, 7 Nov 2017 22:30:57 +0000 (22:30 +0000)]
Add support for webkitpy tests EWS
https://bugs.webkit.org/show_bug.cgi?id=178480

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/config/ews.json: Added webkitpy EWS.
* Scripts/webkitpy/common/net/generictestresults.py: Renamed from Scripts/webkitpy/common/net/bindingstestresults.py.
* Scripts/webkitpy/common/net/generictestresults_unittest.py: Renamed from Scripts/webkitpy/common/net/bindingstestresults_unittest.py.
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
(PatchAnalysisTask._test_patch): Do not retry webkitpy test since they are not flaky.
* Scripts/webkitpy/tool/bot/bindingstestresultsreader.py: Updated import for BindingsTestResult.
* Scripts/webkitpy/tool/bot/retrylogic_unittest.py: Ditto.
* Scripts/webkitpy/tool/bot/webkitpytestresultsreader.py: Copied from Scripts/webkitpy/tool/bot/bindingstestresultsreader.py.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.begin_work_queue): Added webkitpy test result reader.
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: Updated unit-tests.
* Scripts/webkitpy/tool/steps/checkpatchrelevance.py: Run webkitpy EWS only for relevant changes.
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run): Run webkitpy tests when --group=webkitpy is passed.
(RunTests._run_webkitpy_tests): Method to invoke webkitpy tests.
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(test_runtests_webkitpy): Added unit-test.

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

2 years ago[LayoutState cleanup] Remove explicit LayoutStateMaintainer::pop calls.
zalan@apple.com [Tue, 7 Nov 2017 21:36:07 +0000 (21:36 +0000)]
[LayoutState cleanup] Remove explicit LayoutStateMaintainer::pop calls.
https://bugs.webkit.org/show_bug.cgi?id=179380
<rdar://problem/35392161>

Reviewed by Antti Koivisto.

Besides the pagination related explicit pops (FIXME), all LayoutStateMaintainer pops are
now in LayoutStateMaintainer's d'tor.

Covered by existing tests.

* rendering/LayoutState.cpp:
(WebCore::LayoutStateMaintainer::~LayoutStateMaintainer):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedLayout):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::layout):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::layoutShadowControls):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layout):
(WebCore::RenderTableSection::layoutRows):
* rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::layout):
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):

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

2 years agoAdd SPI function pointers qualifiers for CPU(ARM64E)
msaboff@apple.com [Tue, 7 Nov 2017 21:19:33 +0000 (21:19 +0000)]
Add SPI function pointers qualifiers for CPU(ARM64E)
https://bugs.webkit.org/show_bug.cgi?id=179383

Reviewed by Mark Lam.

For ARM64E, use the appropriate SPI qualifiers for helper function pointers.

* wtf/BlockPtr.h:
(WTF::BlockPtr<R):

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

2 years agoUnreviewed, rolling out r224512 and r224521.
ryanhaddad@apple.com [Tue, 7 Nov 2017 20:52:40 +0000 (20:52 +0000)]
Unreviewed, rolling out r224512 and r224521.
https://bugs.webkit.org/show_bug.cgi?id=179388

An API test added with this change is failing an assertion on
the bots. (Requested by ryanhaddad on #webkit).

Reverted changesets:

"[Attachment Support] Implement delegate hooks for attachment
element insertion and removal"
https://bugs.webkit.org/show_bug.cgi?id=179016
https://trac.webkit.org/changeset/224512

"Remove stray logging from a newly added API test"
https://trac.webkit.org/changeset/224521

Patch by Commit Queue <commit-queue@webkit.org> on 2017-11-07

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

2 years ago<video> does not respect pointer-events
commit-queue@webkit.org [Tue, 7 Nov 2017 20:17:55 +0000 (20:17 +0000)]
<video> does not respect pointer-events
https://bugs.webkit.org/show_bug.cgi?id=179378
<rdar://problem/34687668>

Patch by Antoine Quint <graouts@apple.com> on 2017-11-07
Reviewed by Simon Fraser.

Source/WebCore:

We now honor the "pointer-events" property value set on the <video> element by setting it to "inherit"
on the media controls shadow root container.

Test: media/modern-media-controls/css/pointer-events-none.html

* Modules/modern-media-controls/controls/media-controls.css:
(.media-controls-container):

LayoutTests:

Add a new test that checks that settings "pointer-events: none" on the <video> element
correctly reflects that same value on the media controls shadow root container.

* media/modern-media-controls/css/pointer-events-none-expected.txt: Added.
* media/modern-media-controls/css/pointer-events-none.html: Added.
* platform/ios/TestExpectations:

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

2 years ago[Service Workers] Add support for "install" event
cdumez@apple.com [Tue, 7 Nov 2017 20:11:58 +0000 (20:11 +0000)]
[Service Workers] Add support for "install" event
https://bugs.webkit.org/show_bug.cgi?id=179338

Reviewed by Youenn Fablet.

Source/WebCore:

Add support for "install" event as per:
- https://w3c.github.io/ServiceWorker/#installation-algorithm (Step 10)

For now, install always succeeds as our support for ExtendableEvent.waitUntil() is
still incomplete.

Test: http/tests/workers/service/basic-install-event.html

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::firePostInstallEvents):
* workers/service/ServiceWorkerContainer.h:
* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::fireInstallEvent):
* workers/service/context/SWContextManager.h:
* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::fireInstallEvent):
* workers/service/context/ServiceWorkerThread.h:
* workers/service/server/SWClientConnection.cpp:
(WebCore::SWClientConnection::firePostInstallEvents):
* workers/service/server/SWClientConnection.h:
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::Connection::didFinishInstall):
(WebCore::SWServer::didFinishInstall):
(WebCore::SWServer::fireInstallEvent):
* workers/service/server/SWServer.h:
* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::scriptContextStarted):
(WebCore::SWServerJobQueue::install):
(WebCore::SWServerJobQueue::didFinishInstall):
* workers/service/server/SWServerJobQueue.h:
* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::firePostInstallEvents):
* workers/service/server/SWServerRegistration.h:

Source/WebKit:

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::firePostInstallEvents):
(WebKit::WebSWServerConnection::fireInstallEvent):
* StorageProcess/ServiceWorker/WebSWServerConnection.h:
* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::didFinishServiceWorkerInstall):
* StorageProcess/StorageProcess.h:
* StorageProcess/StorageProcess.messages.in:
* WebProcess/Storage/WebSWClientConnection.messages.in:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::fireInstallEvent):
(WebKit::WebSWContextManagerConnection::didFinishInstall):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:

LayoutTests:

Add layout test coverage.

* http/tests/workers/service/basic-install-event-expected.txt: Added.
* http/tests/workers/service/basic-install-event.html: Added.
* http/tests/workers/service/resources/basic-install-event-worker.js: Added.
* http/tests/workers/service/resources/sw-test-pre.js:
(waitForState):

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

2 years agoUnreviewed, rolling out r224498.
ryanhaddad@apple.com [Tue, 7 Nov 2017 20:02:48 +0000 (20:02 +0000)]
Unreviewed, rolling out r224498.

The LayoutTest for this change is flaky and affecting EWS
results.

Reverted changeset:

"Add tests to ensure that <source> tags are only preloaded
when the `type`"
https://bugs.webkit.org/show_bug.cgi?id=179231
https://trac.webkit.org/changeset/224498

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

2 years agoWeb Inspector: Add some fast returns in cases where we only call through to a Network...
joepeck@webkit.org [Tue, 7 Nov 2017 20:01:08 +0000 (20:01 +0000)]
Web Inspector: Add some fast returns in cases where we only call through to a NetworkAgent
https://bugs.webkit.org/show_bug.cgi?id=179359

Reviewed by Devin Rousso.

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willSendRequest):
(WebCore::InspectorInstrumentation::willSendRequestOfType):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
(WebCore::InspectorInstrumentation::didReceiveThreadableLoaderResponse):
(WebCore::InspectorInstrumentation::didReceiveData):
(WebCore::InspectorInstrumentation::didFinishXHRLoading):
(WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
(WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
(WebCore::InspectorInstrumentation::scriptImported):
(WebCore::InspectorInstrumentation::didReceiveScriptResponse):
Fast return if no frontend in cases that only call into NetworkAgent
because the NetworkAgent is only available if there is a frontend.

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

2 years agoAccessCase::generateImpl() should exclude the result register when restoring register...
mark.lam@apple.com [Tue, 7 Nov 2017 19:33:22 +0000 (19:33 +0000)]
AccessCase::generateImpl() should exclude the result register when restoring registers after a call.
https://bugs.webkit.org/show_bug.cgi?id=179355
<rdar://problem/35263053>

Reviewed by Saam Barati.

JSTests:

* stress/regress-179355.js: Added.

Source/JavaScriptCore:

In the Transition case in AccessCase::generateImpl(), we were restoring registers
using restoreLiveRegistersFromStackForCall() without excluding the scratchGPR
where we previously stashed the reallocated butterfly.  If the generated code is
under heavy register pressure, scratchGPR could have been from the set of preserved
registers, and hence, would be restored by restoreLiveRegistersFromStackForCall().
As a result, the restoration would trash the butterfly result we stored there.
This patch fixes the issue by excluding the scratchGPR in the restoration.

* bytecode/AccessCase.cpp:
(JSC::AccessCase::generateImpl):

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

2 years agoLayoutTest http/tests/security/cross-frame-access-put.html is a flaky failure
cdumez@apple.com [Tue, 7 Nov 2017 19:29:31 +0000 (19:29 +0000)]
LayoutTest http/tests/security/cross-frame-access-put.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=179195

Reviewed by Ryosuke Niwa.

Fix flaky test by calling the testRunner functions as early as possible, not in
the onload event handler.

* http/tests/security/cross-frame-access-put.html:

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

2 years agobmalloc should support strictly type-segregated isolated heaps
fpizlo@apple.com [Tue, 7 Nov 2017 19:21:52 +0000 (19:21 +0000)]
bmalloc should support strictly type-segregated isolated heaps
https://bugs.webkit.org/show_bug.cgi?id=178108

Reviewed by Saam Barati, Simon Fraser, and Ryosuke Niwa.
Source/bmalloc:

This introduces a new allocation API in bmalloc called IsoHeap. An IsoHeap is templatized by
type and created in static storage. When unused, it takes only a few words. When you do use
it, each IsoHeap gets a bag of virtual pages unique to it. This prevents use-after-free bugs
in one IsoHeap from affecting any other memory. At worst, two pointers of the same type will
point to the same object even though they should not have.

IsoHeaps allocate using a first-fit discipline that combines ideas from bmalloc and Riptide
(the JSC GC):

Like Riptide, it uses a bump'n'pop allocator. What Riptide calls blocks, IsoHeaps calls
pages. Pages are collected into directories. Directories track pages using bitvectors, so
that it's easy to quickly find a completely free page or one that has at least one free
object. I think that the bump'n'pop allocator is as fast as the bmalloc Immix-style (page and
line) allocator, but is better at allocating in holes. It's guaranteed to follow a first-fit
discipline. However, the real reason why I wrote it that was is that this is what I'm more
familiar with. This is a part of the design I want to revisit (bug 179278).

Like bmalloc, it uses a deallocation log. This means that the internal IsoHeap data
structures can be locked with a coarse-grained lock, since the deallocator only grabs it when
flushing the log. Similarly, the allocator only grabs it when refilling the bump'n'pop
FreeList.

This adds a unit test for IsoHeaps. In this change, IsoHeaps are adopted only by WebCore's
RenderObject.

Note that despite the use of GC concepts, it's not a goal to make this code directly sharable
with GC. The GC will probably have to do isolated heaps its own way (likely a special
Subspace or something like that).

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/Algorithm.h:
(bmalloc::findBitInWord):
* bmalloc/AllIsoHeaps.cpp: Added.
(bmalloc::AllIsoHeaps::AllIsoHeaps):
(bmalloc::AllIsoHeaps::add):
(bmalloc::AllIsoHeaps::head):
* bmalloc/AllIsoHeaps.h: Added.
* bmalloc/AllIsoHeapsInlines.h: Added.
(bmalloc::AllIsoHeaps::forEach):
* bmalloc/BMalloced.h: Added.
* bmalloc/Bits.h: Added.
(bmalloc::bitsArrayLength):
(bmalloc::BitsWordView::BitsWordView):
(bmalloc::BitsWordView::numBits const):
(bmalloc::BitsWordView::word const):
(bmalloc::BitsWordOwner::BitsWordOwner):
(bmalloc::BitsWordOwner::view const):
(bmalloc::BitsWordOwner::operator=):
(bmalloc::BitsWordOwner::setAll):
(bmalloc::BitsWordOwner::clearAll):
(bmalloc::BitsWordOwner::set):
(bmalloc::BitsWordOwner::numBits const):
(bmalloc::BitsWordOwner::arrayLength const):
(bmalloc::BitsWordOwner::word const):
(bmalloc::BitsWordOwner::word):
(bmalloc::BitsWordOwner::words const):
(bmalloc::BitsWordOwner::words):
(bmalloc::BitsAndWords::BitsAndWords):
(bmalloc::BitsAndWords::view const):
(bmalloc::BitsAndWords::numBits const):
(bmalloc::BitsAndWords::word const):
(bmalloc::BitsOrWords::BitsOrWords):
(bmalloc::BitsOrWords::view const):
(bmalloc::BitsOrWords::numBits const):
(bmalloc::BitsOrWords::word const):
(bmalloc::BitsNotWords::BitsNotWords):
(bmalloc::BitsNotWords::view const):
(bmalloc::BitsNotWords::numBits const):
(bmalloc::BitsNotWords::word const):
(bmalloc::BitsImpl::BitsImpl):
(bmalloc::BitsImpl::numBits const):
(bmalloc::BitsImpl::size const):
(bmalloc::BitsImpl::arrayLength const):
(bmalloc::BitsImpl::operator== const):
(bmalloc::BitsImpl::operator!= const):
(bmalloc::BitsImpl::at const):
(bmalloc::BitsImpl::operator[] const):
(bmalloc::BitsImpl::isEmpty const):
(bmalloc::BitsImpl::operator& const):
(bmalloc::BitsImpl::operator| const):
(bmalloc::BitsImpl::operator~ const):
(bmalloc::BitsImpl::forEachSetBit const):
(bmalloc::BitsImpl::forEachClearBit const):
(bmalloc::BitsImpl::forEachBit const):
(bmalloc::BitsImpl::findBit const):
(bmalloc::BitsImpl::findSetBit const):
(bmalloc::BitsImpl::findClearBit const):
(bmalloc::BitsImpl::wordView const):
(bmalloc::BitsImpl::atImpl const):
(bmalloc::Bits::Bits):
(bmalloc::Bits::operator=):
(bmalloc::Bits::resize):
(bmalloc::Bits::setAll):
(bmalloc::Bits::clearAll):
(bmalloc::Bits::setAndCheck):
(bmalloc::Bits::operator|=):
(bmalloc::Bits::operator&=):
(bmalloc::Bits::at const):
(bmalloc::Bits::operator[] const):
(bmalloc::Bits::BitReference::BitReference):
(bmalloc::Bits::BitReference::operator bool const):
(bmalloc::Bits::BitReference::operator=):
(bmalloc::Bits::at):
(bmalloc::Bits::operator[]):
* bmalloc/CryptoRandom.cpp: Replaced with Source/bmalloc/bmalloc/CryptoRandom.cpp.
(bmalloc::cryptoRandom):
* bmalloc/CryptoRandom.h: Replaced with Source/bmalloc/bmalloc/CryptoRandom.h.
* bmalloc/DeferredDecommit.h: Added.
* bmalloc/DeferredDecommitInlines.h: Added.
(bmalloc::DeferredDecommit::DeferredDecommit):
* bmalloc/DeferredTrigger.h: Added.
(bmalloc::DeferredTrigger::DeferredTrigger):
* bmalloc/DeferredTriggerInlines.h: Added.
(bmalloc::DeferredTrigger<trigger>::didBecome):
(bmalloc::DeferredTrigger<trigger>::handleDeferral):
* bmalloc/EligibilityResult.h: Added.
(bmalloc::EligibilityResult::EligibilityResult):
* bmalloc/EligibilityResultInlines.h: Added.
(bmalloc::EligibilityResult<Config>::EligibilityResult):
* bmalloc/FixedVector.h:
* bmalloc/FreeList.cpp: Added.
(bmalloc::FreeList::FreeList):
(bmalloc::FreeList::~FreeList):
(bmalloc::FreeList::clear):
(bmalloc::FreeList::initializeList):
(bmalloc::FreeList::initializeBump):
(bmalloc::FreeList::contains const):
* bmalloc/FreeList.h: Added.
(bmalloc::FreeCell::scramble):
(bmalloc::FreeCell::descramble):
(bmalloc::FreeCell::setNext):
(bmalloc::FreeCell::next const):
(bmalloc::FreeList::allocationWillFail const):
(bmalloc::FreeList::allocationWillSucceed const):
(bmalloc::FreeList::originalSize const):
(bmalloc::FreeList::head const):
* bmalloc/FreeListInlines.h: Added.
(bmalloc::FreeList::allocate):
(bmalloc::FreeList::forEach const):
* bmalloc/IsoAllocator.h: Added.
* bmalloc/IsoAllocatorInlines.h: Added.
(bmalloc::IsoAllocator<Config>::IsoAllocator):
(bmalloc::IsoAllocator<Config>::~IsoAllocator):
(bmalloc::IsoAllocator<Config>::allocate):
(bmalloc::IsoAllocator<Config>::allocateSlow):
(bmalloc::IsoAllocator<Config>::scavenge):
* bmalloc/IsoConfig.h: Added.
* bmalloc/IsoDeallocator.h: Added.
* bmalloc/IsoDeallocatorInlines.h: Added.
(bmalloc::IsoDeallocator<Config>::IsoDeallocator):
(bmalloc::IsoDeallocator<Config>::~IsoDeallocator):
(bmalloc::IsoDeallocator<Config>::deallocate):
(bmalloc::IsoDeallocator<Config>::scavenge):
* bmalloc/IsoDirectory.h: Added.
(bmalloc::IsoDirectoryBaseBase::IsoDirectoryBaseBase):
(bmalloc::IsoDirectoryBaseBase::~IsoDirectoryBaseBase):
(bmalloc::IsoDirectoryBase::heap):
* bmalloc/IsoDirectoryInlines.h: Added.
(bmalloc::IsoDirectoryBase<Config>::IsoDirectoryBase):
(bmalloc::passedNumPages>::IsoDirectory):
(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::didBecome):
(bmalloc::passedNumPages>::didDecommit):
(bmalloc::passedNumPages>::scavenge):
(bmalloc::passedNumPages>::forEachCommittedPage):
* bmalloc/IsoDirectoryPage.h: Added.
(bmalloc::IsoDirectoryPage::index const):
* bmalloc/IsoDirectoryPageInlines.h: Added.
(bmalloc::IsoDirectoryPage<Config>::IsoDirectoryPage):
(bmalloc::IsoDirectoryPage<Config>::pageFor):
* bmalloc/IsoHeap.h: Added.
(bmalloc::api::IsoHeap::allocatorOffset):
(bmalloc::api::IsoHeap::setAllocatorOffset):
(bmalloc::api::IsoHeap::deallocatorOffset):
(bmalloc::api::IsoHeap::setDeallocatorOffset):
* bmalloc/IsoHeapImpl.cpp: Added.
(bmalloc::IsoHeapImplBase::IsoHeapImplBase):
(bmalloc::IsoHeapImplBase::~IsoHeapImplBase):
(bmalloc::IsoHeapImplBase::scavengeNow):
(bmalloc::IsoHeapImplBase::finishScavenging):
* bmalloc/IsoHeapImpl.h: Added.
* bmalloc/IsoHeapImplInlines.h: Added.
(bmalloc::IsoHeapImpl<Config>::IsoHeapImpl):
(bmalloc::IsoHeapImpl<Config>::takeFirstEligible):
(bmalloc::IsoHeapImpl<Config>::didBecomeEligible):
(bmalloc::IsoHeapImpl<Config>::scavenge):
(bmalloc::IsoHeapImpl<Config>::allocatorOffset):
(bmalloc::IsoHeapImpl<Config>::deallocatorOffset):
(bmalloc::IsoHeapImpl<Config>::numLiveObjects):
(bmalloc::IsoHeapImpl<Config>::numCommittedPages):
(bmalloc::IsoHeapImpl<Config>::forEachDirectory):
(bmalloc::IsoHeapImpl<Config>::forEachCommittedPage):
(bmalloc::IsoHeapImpl<Config>::forEachLiveObject):
* bmalloc/IsoHeapInlines.h: Added.
(bmalloc::api::IsoHeap<Type>::allocate):
(bmalloc::api::IsoHeap<Type>::tryAllocate):
(bmalloc::api::IsoHeap<Type>::deallocate):
(bmalloc::api::IsoHeap<Type>::scavenge):
(bmalloc::api::IsoHeap<Type>::isInitialized):
(bmalloc::api::IsoHeap<Type>::impl):
* bmalloc/IsoPage.h: Added.
(bmalloc::IsoPage::index const):
(bmalloc::IsoPage::directory):
(bmalloc::IsoPage::isInUseForAllocation const):
(bmalloc::IsoPage::indexOfFirstObject):
* bmalloc/IsoPageInlines.h: Added.
(bmalloc::IsoPage<Config>::tryCreate):
(bmalloc::IsoPage<Config>::IsoPage):
(bmalloc::IsoPage<Config>::free):
(bmalloc::IsoPage<Config>::startAllocating):
(bmalloc::IsoPage<Config>::stopAllocating):
(bmalloc::IsoPage<Config>::forEachLiveObject):
* bmalloc/IsoPageTrigger.h: Added.
* bmalloc/IsoTLS.cpp: Added.
(bmalloc::IsoTLS::scavenge):
(bmalloc::IsoTLS::IsoTLS):
(bmalloc::IsoTLS::ensureEntries):
(bmalloc::IsoTLS::destructor):
(bmalloc::IsoTLS::sizeForCapacity):
(bmalloc::IsoTLS::capacityForSize):
(bmalloc::IsoTLS::size):
(bmalloc::IsoTLS::forEachEntry):
* bmalloc/IsoTLS.h: Added.
* bmalloc/IsoTLSAllocatorEntry.h: Added.
* bmalloc/IsoTLSAllocatorEntryInlines.h: Added.
(bmalloc::IsoTLSAllocatorEntry<Config>::IsoTLSAllocatorEntry):
(bmalloc::IsoTLSAllocatorEntry<Config>::~IsoTLSAllocatorEntry):
(bmalloc::IsoTLSAllocatorEntry<Config>::construct):
* bmalloc/IsoTLSDeallocatorEntry.h: Added.
* bmalloc/IsoTLSDeallocatorEntryInlines.h: Added.
(bmalloc::IsoTLSDeallocatorEntry<Config>::IsoTLSDeallocatorEntry):
(bmalloc::IsoTLSDeallocatorEntry<Config>::~IsoTLSDeallocatorEntry):
(bmalloc::IsoTLSDeallocatorEntry<Config>::construct):
* bmalloc/IsoTLSEntry.cpp: Added.
(bmalloc::IsoTLSEntry::IsoTLSEntry):
(bmalloc::IsoTLSEntry::~IsoTLSEntry):
* bmalloc/IsoTLSEntry.h: Added.
(bmalloc::IsoTLSEntry::offset const):
(bmalloc::IsoTLSEntry::alignment const):
(bmalloc::IsoTLSEntry::size const):
(bmalloc::IsoTLSEntry::extent const):
* bmalloc/IsoTLSEntryInlines.h: Added.
(bmalloc::IsoTLSEntry::walkUpToInclusive):
(bmalloc::DefaultIsoTLSEntry<EntryType>::DefaultIsoTLSEntry):
(bmalloc::DefaultIsoTLSEntry<EntryType>::~DefaultIsoTLSEntry):
(bmalloc::DefaultIsoTLSEntry<EntryType>::move):
(bmalloc::DefaultIsoTLSEntry<EntryType>::destruct):
(bmalloc::DefaultIsoTLSEntry<EntryType>::scavenge):
* bmalloc/IsoTLSInlines.h: Added.
(bmalloc::IsoTLS::allocate):
(bmalloc::IsoTLS::deallocate):
(bmalloc::IsoTLS::scavenge):
(bmalloc::IsoTLS::allocator):
(bmalloc::IsoTLS::deallocator):
(bmalloc::IsoTLS::get):
(bmalloc::IsoTLS::set):
(bmalloc::IsoTLS::ensureHeap):
(bmalloc::IsoTLS::ensureHeapAndEntries):
* bmalloc/IsoTLSLayout.cpp: Added.
(bmalloc::IsoTLSLayout::IsoTLSLayout):
(bmalloc::IsoTLSLayout::add):
* bmalloc/IsoTLSLayout.h: Added.
(bmalloc::IsoTLSLayout::head const):
* bmalloc/PerHeapKind.h:
* bmalloc/PerProcess.h:
(bmalloc::PerProcess<T>::getFastCase):
* bmalloc/Scavenger.cpp:
(bmalloc::Scavenger::scavenge):
* bmalloc/Scavenger.h:
* bmalloc/bmalloc.h:
(bmalloc::api::scavengeThisThread):
* test: Added.
* test/testbmalloc.cpp: Added.
(hiddenTruthBecauseNoReturnIsStupid):
(usage):
(assertEmptyPointerSet):
(assertHasObjects):
(assertHasOnlyObjects):
(assertClean):
(testIsoSimple):
(testIsoSimpleScavengeBeforeDealloc):
(testIsoFlipFlopFragmentedPages):
(testIsoFlipFlopFragmentedPagesScavengeInMiddle):
(BisoMalloced::BisoMalloced):
(testBisoMalloced):
(BisoMallocedInline::BisoMallocedInline):
(testBisoMallocedInline):
(run):
(main):

Source/WebCore:

No new tests because no new change in behavior. Though, the bmalloc change has a unit test.

Adopting IsoHeap means dropping in macros in both the .h and .cpp file of each class that we
opt in. It's not pretty, but it helps ensure speedy allocation since it means that we never
have to do any kind of switch or dynamic lookup to find the right allocator for a type.

This change is perf-neutral on MotionMark, PLT3, and membuster.

* Sources.txt:
* html/shadow/SliderThumbElement.cpp:
* html/shadow/SliderThumbElement.h:
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
* html/shadow/mac/ImageControlsRootElementMac.cpp:
* rendering/RenderAttachment.cpp:
* rendering/RenderAttachment.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderBoxModelObject.h:
* rendering/RenderButton.cpp:
* rendering/RenderButton.h:
* rendering/RenderCombineText.cpp:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.cpp:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderDetailsMarker.cpp:
* rendering/RenderDetailsMarker.h:
* rendering/RenderElement.cpp:
* rendering/RenderElement.h:
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFileUploadControl.cpp:
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFragmentContainer.cpp:
* rendering/RenderFragmentContainer.h:
* rendering/RenderFragmentContainerSet.cpp:
* rendering/RenderFragmentContainerSet.h:
* rendering/RenderFragmentedFlow.cpp:
* rendering/RenderFragmentedFlow.h:
* rendering/RenderFrameBase.cpp:
* rendering/RenderFrameBase.h:
* rendering/RenderFrameSet.cpp:
* rendering/RenderFrameSet.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.cpp:
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.cpp:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderImage.cpp:
* rendering/RenderImage.h:
* rendering/RenderImageResourceStyleImage.cpp:
* rendering/RenderImageResourceStyleImage.h:
* rendering/RenderInline.cpp:
* rendering/RenderInline.h:
* rendering/RenderLayerModelObject.cpp:
* rendering/RenderLayerModelObject.h:
* rendering/RenderLineBreak.cpp:
* rendering/RenderLineBreak.h:
* rendering/RenderListBox.cpp:
* rendering/RenderListBox.h:
* rendering/RenderListItem.cpp:
* rendering/RenderListItem.h:
* rendering/RenderListMarker.cpp:
* rendering/RenderListMarker.h:
* rendering/RenderMedia.cpp:
* rendering/RenderMedia.h:
* rendering/RenderMediaControlElements.cpp:
* rendering/RenderMediaControlElements.h:
* rendering/RenderMenuList.cpp:
* rendering/RenderMenuList.h:
* rendering/RenderMeter.cpp:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnFlow.cpp:
* rendering/RenderMultiColumnFlow.h:
* rendering/RenderMultiColumnSet.cpp:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.cpp:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
* rendering/RenderProgress.cpp:
* rendering/RenderProgress.h:
* rendering/RenderQuote.cpp:
* rendering/RenderQuote.h:
* rendering/RenderReplaced.cpp:
* rendering/RenderReplaced.h:
* rendering/RenderReplica.cpp:
* rendering/RenderReplica.h:
* rendering/RenderRuby.cpp:
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.cpp:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.cpp:
* rendering/RenderRubyText.h:
* rendering/RenderScrollbarPart.cpp:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.cpp:
* rendering/RenderSearchField.h:
* rendering/RenderSlider.cpp:
* rendering/RenderSlider.h:
* rendering/RenderTable.cpp:
* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp:
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.cpp:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.cpp:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.cpp:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.cpp:
* rendering/RenderTableSection.h:
* rendering/RenderText.cpp:
* rendering/RenderText.h:
* rendering/RenderTextControl.cpp:
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.cpp:
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.cpp:
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderTextFragment.cpp:
* rendering/RenderTextFragment.h:
* rendering/RenderVTTCue.cpp:
* rendering/RenderVTTCue.h:
* rendering/RenderVideo.cpp:
* rendering/RenderVideo.h:
* rendering/RenderView.cpp:
* rendering/RenderView.h:
* rendering/RenderWidget.cpp:
* rendering/RenderWidget.h:
* rendering/mathml/RenderMathMLBlock.cpp:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFenced.cpp:
* rendering/mathml/RenderMathMLFenced.h:
* rendering/mathml/RenderMathMLFencedOperator.cpp:
* rendering/mathml/RenderMathMLFencedOperator.h:
* rendering/mathml/RenderMathMLFraction.cpp:
* rendering/mathml/RenderMathMLFraction.h:
* rendering/mathml/RenderMathMLMath.cpp:
* rendering/mathml/RenderMathMLMath.h:
* rendering/mathml/RenderMathMLMenclose.cpp:
* rendering/mathml/RenderMathMLMenclose.h:
* rendering/mathml/RenderMathMLOperator.cpp:
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLPadded.cpp:
* rendering/mathml/RenderMathMLPadded.h:
* rendering/mathml/RenderMathMLRoot.cpp:
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.cpp:
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLScripts.cpp:
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLSpace.cpp:
* rendering/mathml/RenderMathMLSpace.h:
* rendering/mathml/RenderMathMLToken.cpp:
* rendering/mathml/RenderMathMLToken.h:
* rendering/mathml/RenderMathMLUnderOver.cpp:
* rendering/mathml/RenderMathMLUnderOver.h:
* rendering/svg/RenderSVGBlock.cpp:
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGContainer.cpp:
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGEllipse.cpp:
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.cpp:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGGradientStop.cpp:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGHiddenContainer.cpp:
* rendering/svg/RenderSVGHiddenContainer.h:
* rendering/svg/RenderSVGImage.cpp:
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInline.cpp:
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGInlineText.cpp:
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGModelObject.cpp:
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGPath.cpp:
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.cpp:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceGradient.cpp:
* rendering/svg/RenderSVGResourceGradient.h:
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.cpp:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.cpp:
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGTSpan.cpp: Added.
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.cpp:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTextPath.cpp:
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.cpp:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.cpp:
* rendering/svg/RenderSVGViewportContainer.h:

Source/WTF:

This just adds an easy way of using the bmalloc IsoHeap API in WebKit. If bmalloc is not
enabled, these macros will just make the object FastMalloced.

* WTF.xcodeproj/project.pbxproj:
* wtf/FastTLS.h:
* wtf/IsoMalloc.h: Added.
* wtf/IsoMallocInlines.h: Added.

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

2 years agoUpdate WPT encoding test suite to the latest version.
mjs@apple.com [Tue, 7 Nov 2017 18:29:46 +0000 (18:29 +0000)]
Update WPT encoding test suite to the latest version.
https://bugs.webkit.org/show_bug.cgi?id=179312

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* resources/resource-files.json: Mark HTML files that aren't tests
but which are not in resources/ directories.

The remaining changes are updates from upstream.

* web-platform-tests/encoding/OWNERS:
* web-platform-tests/encoding/api-invalid-label-expected.txt:
* web-platform-tests/encoding/api-invalid-label.html:
* web-platform-tests/encoding/api-replacement-encodings-expected.txt:
* web-platform-tests/encoding/api-replacement-encodings.html:
* web-platform-tests/encoding/eof-shift_jis-ref.html: Added.
* web-platform-tests/encoding/eof-shift_jis.html: Added.
* web-platform-tests/encoding/eof-utf-8-one-ref.html: Added.
* web-platform-tests/encoding/eof-utf-8-one.html: Added.
* web-platform-tests/encoding/eof-utf-8-three-ref.html: Added.
* web-platform-tests/encoding/eof-utf-8-three.html: Added.
* web-platform-tests/encoding/eof-utf-8-two-ref.html: Added.
* web-platform-tests/encoding/eof-utf-8-two.html: Added.
* web-platform-tests/encoding/idlharness.html:
* web-platform-tests/encoding/iso-2022-jp-decoder-expected.txt:
* web-platform-tests/encoding/iso-2022-jp-decoder.html:
* web-platform-tests/encoding/legacy-mb-japanese: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/jis0208_index.js: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-csshiftjis-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-csshiftjis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-errors-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-errors.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-ms932-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-ms932.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-ms_kanji-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-ms_kanji.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-shift-jis-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-shift-jis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-sjis-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-sjis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-windows-31j-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-windows-31j.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-x-sjis-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-x-sjis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decoder.js: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-csshiftjis-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-csshiftjis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-csshiftjis.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-han-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-han.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-han.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-hangul-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-hangul.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-hangul.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-misc-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-misc.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-misc.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-ms932-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-ms932.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-ms932.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-ms_kanji-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-ms_kanji.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-ms_kanji.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-shift-jis-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-shift-jis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-shift-jis.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-sjis-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-sjis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-sjis.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-windows-31j-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-windows-31j.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-windows-31j.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-x-sjis-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-x-sjis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-x-sjis.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-han-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-han.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-han.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-hangul-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-hangul.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-hangul.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-misc-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-misc.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-misc.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encoder.js: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-csshiftjis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-csshiftjis.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-ms932.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-ms932.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-ms_kanji.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-ms_kanji.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-shift-jis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-shift-jis.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-sjis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-sjis.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-windows-31j.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-windows-31j.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-x-sjis.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-x-sjis.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_errors.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis_errors.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-cseuckr-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-cseuckr.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-csksc56011987-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-csksc56011987.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-errors-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-errors.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-iso-ir-149-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-iso-ir-149.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-korean-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-korean.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ks_c_5601-1987-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ks_c_5601-1987.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ks_c_5601-1989-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ks_c_5601-1989.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ksc5601-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ksc5601.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ksc_5601-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ksc_5601.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-windows-949-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-windows-949.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decoder.js: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-cseuckr-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-cseuckr.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-cseuckr.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-csksc56011987-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-csksc56011987.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-csksc56011987.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-han-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-han.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-han.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-misc-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-misc.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-misc.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-iso-ir-149-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-iso-ir-149.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-iso-ir-149.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-korean-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-korean.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-korean.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ks_c_5601-1987-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ks_c_5601-1987.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ks_c_5601-1987.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ks_c_5601-1989-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ks_c_5601-1989.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ks_c_5601-1989.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ksc5601-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ksc5601.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ksc5601.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ksc_5601-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ksc_5601.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ksc_5601.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-windows-949-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-windows-949.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-windows-949.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-errors-han-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-errors-han.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-errors-han.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-errors-misc-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-errors-misc.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-errors-misc.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encoder.js: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-cseuckr.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-cseuckr.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-csksc56011987.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-csksc56011987.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-iso-ir-149.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-iso-ir-149.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-korean.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-korean.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ks_c_5601-1987.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ks_c_5601-1987.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ks_c_5601-1989.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ks_c_5601-1989.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ksc5601.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ksc5601.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ksc_5601.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ksc_5601.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-windows-949.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-windows-949.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_chars.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_errors.html: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_errors.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr_index.js: Added.
* web-platform-tests/encoding/legacy-mb-tchinese: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-big5-hkscs-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-big5-hkscs.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-cn-big5-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-cn-big5.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-csbig5-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-csbig5.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-errors-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-errors.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-extra-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-extra.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-x-x-big5-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-x-x-big5.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decoder.js: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-enc-ascii-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-enc-ascii.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-enc-ascii.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-big5-hkscs-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-big5-hkscs.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-big5-hkscs.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-cn-big5-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-cn-big5.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-cn-big5.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-csbig5-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-csbig5.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-csbig5.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-extBa-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-extBa.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-extBa.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-extBb-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-extBb.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-extBb.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-han-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-han.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-han.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-hangul-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-hangul.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-hangul.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-misc-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-misc.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-misc.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-pua-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-pua.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-x-x-big5-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-x-x-big5.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-x-x-big5.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-han-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-han.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-han.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-hangul-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-hangul.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-hangul.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-misc-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-misc.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-misc.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encoder.js: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars-big5-hkscs.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars-big5-hkscs.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars-cn-big5.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars-cn-big5.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars-csbig5.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars-csbig5.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars-x-x-big5.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars-x-x-big5.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars_extra.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_chars_extra.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_errors.html: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_errors.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5_index.js: Added.
* web-platform-tests/encoding/reftest.list: Added.
* web-platform-tests/encoding/replacement-encodings-expected.txt: Added.
* web-platform-tests/encoding/replacement-encodings.html: Added.
* web-platform-tests/encoding/resources/decoding-helpers.js: Added.
* web-platform-tests/encoding/resources/encodings.js:
* web-platform-tests/encoding/resources/utf-32-big-endian-bom.html: Added.
* web-platform-tests/encoding/resources/utf-32-big-endian-bom.xml: Added.
* web-platform-tests/encoding/resources/utf-32-big-endian-nobom.html: Added.
* web-platform-tests/encoding/resources/utf-32-big-endian-nobom.xml: Added.
* web-platform-tests/encoding/resources/utf-32-little-endian-bom.html: Added.
* web-platform-tests/encoding/resources/utf-32-little-endian-bom.xml: Added.
* web-platform-tests/encoding/resources/utf-32-little-endian-nobom.html: Added.
* web-platform-tests/encoding/resources/utf-32-little-endian-nobom.xml: Added.
* web-platform-tests/encoding/single-byte-decoder-expected.txt:
* web-platform-tests/encoding/single-byte-decoder.html:
* web-platform-tests/encoding/textdecoder-copy.any.js: Added.
* web-platform-tests/encoding/textdecoder-fatal-single-byte-expected.txt:
* web-platform-tests/encoding/textdecoder-fatal-single-byte.html:
* web-platform-tests/encoding/textdecoder-labels-expected.txt:
* web-platform-tests/encoding/textdecoder-labels.html:
* web-platform-tests/encoding/textencoder-constructor-non-utf-expected.txt:
* web-platform-tests/encoding/textencoder-constructor-non-utf.html:
* web-platform-tests/encoding/unsupported-encodings-expected.txt: Added.
* web-platform-tests/encoding/unsupported-encodings.html: Added.
* web-platform-tests/encoding/utf-32-expected.txt: Added.
* web-platform-tests/encoding/utf-32.html: Added.

LayoutTests:

* TestExpectations: Mark some WPT enncoding tests as slow (either
globally or on debug builds) based on what times out in EWS.

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

2 years agoDynamic media queries don't update in shadow tree stylesheets
antti@apple.com [Tue, 7 Nov 2017 18:10:40 +0000 (18:10 +0000)]
Dynamic media queries don't update in shadow tree stylesheets
https://bugs.webkit.org/show_bug.cgi?id=179324

Reviewed by Ryosuke Niwa.

Source/WebCore:

Viewport and accessibility queries should work dynamically also in shadow trees.

Test: fast/shadow-dom/media-query-in-shadow-style.html

* page/LayoutContext.cpp:
(WebCore::LayoutContext::updateStyleForLayout):
* page/Page.cpp:
(WebCore::Page::accessibilitySettingsDidChange):

    Evaluate media query list (JS API) unconditionally as it is independent from style queries.
    Remove some logging.

* style/StyleScope.cpp:
(WebCore::Style::Scope::evaluateMediaQueriesForViewportChange):
(WebCore::Style::Scope::evaluateMediaQueriesForAccessibilitySettingsChange):

    Factor into functions in style scope.

(WebCore::Style::Scope::evaluateMediaQueries):

    Evaluate queries in all shadow trees too.

* style/StyleScope.h:

LayoutTests:

* fast/shadow-dom/media-query-in-shadow-style-expected.html: Added.
* fast/shadow-dom/media-query-in-shadow-style.html: Added.
* fast/shadow-dom/resources/media-query-in-shadow-style-frame.html: Added.

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

2 years agoRelease-assert NoEventDispatchAssertion in canExecute, updateLayout, and updateStyle
rniwa@webkit.org [Tue, 7 Nov 2017 17:41:05 +0000 (17:41 +0000)]
Release-assert NoEventDispatchAssertion in canExecute, updateLayout, and updateStyle
https://bugs.webkit.org/show_bug.cgi?id=179281
<rdar://problem/35008993>

Reviewed by Antti Koivisto.

Surgically enable NoEventDispatchAssertion::InMainThread::isEventAllowed() in release builds to prevent
against insecure execution of author scripts.

No new tests since there should be no behavioral changes (other than preventing potential security bugs
from being exploited).

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::canExecuteScripts): Use the release assert here. This function is consulted
whenever author scripts are executed in event handler, script element, etc... in the main thread so
enabling the release assert here should basically prevent all unwanted script executions protected by
NoEventDispatchAssertion.
* dom/ContainerNode.cpp:
(NoEventDispatchAssertion::s_count): Now always compiled.
* dom/Document.cpp:
(WebCore::Document::updateStyleIfNeeded): Use the release assert here. This assertion would prevent
unwanted style updating. This part of the change can be reverted if it turns out to be too crashy since
just updating the style would not directly introduce a security vulnerability.
(WebCore::Document::updateLayout): Ditto for updating the layout.
* dom/NoEventDispatchAssertion.h:
(WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion): Enabled this in release builds.
(WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion): Ditto.
(WebCore::NoEventDispatchAssertion::isEventAllowedInMainThread): Ditto.
(WebCore::NoEventDispatchAssertion::InMainThread::InMainThread): Ditto.
(WebCore::NoEventDispatchAssertion::InMainThread::~InMainThread): Ditto.
(WebCore::NoEventDispatchAssertion::InMainThread::isEventDispatchAllowedInSubtree): We still don't enable
this assertion because this check requires O(n) operation. Added a comment to that end.
(WebCore::NoEventDispatchAssertion::InMainThread::isEventAllowed): Enabled this in release builds.
(WebCore::NoEventDispatchAssertion::DisableAssertionsInScope): Ditto.
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::executeClassicScript): Use the release assert here. This is the function used by
the HTML parser to run scripts via HTMLScriptRunner::executePendingScriptAndDispatchEvent. Having a release
assertion here should prevent the rest of the unwanted script executions in the HTML parser not caught by
canExecuteScripts.

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

2 years ago[WPE][GTK] Building with ENABLE_VIDEO=OFF fails to find AudioTrack.idl
aperez@igalia.com [Tue, 7 Nov 2017 16:28:24 +0000 (16:28 +0000)]
[WPE][GTK] Building with ENABLE_VIDEO=OFF fails to find AudioTrack.idl
https://bugs.webkit.org/show_bug.cgi?id=179372

Reviewed by Michael Catanzaro.

Arrange MSE extensions defined in {Audio,Text,Video}TrackMediaSource.idl to be
only used for building when both ENABLE_VIDEO_TRACK and ENABLE_MEDIA_SOURCE are
enabled.

No new tests needed.

* CMakeLists.txt: Add conditional for ENABLE_MEDIA_SOURCE and move the addition
of the IDL files to the build there.
* Sources.txt: Conversely, source unification should skip sources derived from
the IDL files when ENABLE_MEDIA_SOURCE disabled, so add guards as well.

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

2 years agoSupport the case of fetch events that are not responded
commit-queue@webkit.org [Tue, 7 Nov 2017 16:25:58 +0000 (16:25 +0000)]
Support the case of fetch events that are not responded
https://bugs.webkit.org/show_bug.cgi?id=179336

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-07
Reviewed by Chris Dumez.

Source/WebCore:

Covered by updated test.

Implementing https://w3c.github.io/ServiceWorker/#on-fetch-request-algorithm step 19.
Making FetchEvent cancellable.

* workers/service/FetchEvent.h:
* workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::dispatchFetchEvent):
* workers/service/context/ServiceWorkerFetch.h:

Source/WebKit:

* WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
(WebKit::WebServiceWorkerFetchTaskClient::didNotHandle):
* WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:

LayoutTests:

* http/tests/workers/service/basic-fetch.https-expected.txt:
* http/tests/workers/service/resources/basic-fetch-worker.js:
(event.event.request.url.indexOf):
* http/tests/workers/service/resources/basic-fetch.js:
(async.test):

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

2 years ago[WPE] Turn on ENABLE_MEDIA_SOURCE
mcatanzaro@igalia.com [Tue, 7 Nov 2017 14:59:05 +0000 (14:59 +0000)]
[WPE] Turn on ENABLE_MEDIA_SOURCE
https://bugs.webkit.org/show_bug.cgi?id=179093

Reviewed by Carlos Alberto Lopez Perez.

* Source/cmake/OptionsWPE.cmake:

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

2 years agoWeb Inspector: Create inspector agents lazily
commit-queue@webkit.org [Tue, 7 Nov 2017 09:32:14 +0000 (09:32 +0000)]
Web Inspector: Create inspector agents lazily
https://bugs.webkit.org/show_bug.cgi?id=179360

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-11-07
Reviewed by Sam Weinig.

* inspector/CommandLineAPIHost.h:
Modernize style.

* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::pageAgentContext):
(WebCore::InspectorController::createLazyAgents):
(WebCore::InspectorController::connectFrontend):
Move many of the agent construction to happen lazily. These
agent's aren't needed until an inspector connects, so defer
creation until an inspector connects.

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

2 years ago[LayoutState cleanup] Move m_layoutState from RenderView to LayoutContext
zalan@apple.com [Tue, 7 Nov 2017 04:09:59 +0000 (04:09 +0000)]
[LayoutState cleanup] Move m_layoutState from RenderView to LayoutContext
https://bugs.webkit.org/show_bug.cgi?id=179282
<rdar://problem/35348653>

Reviewed by Antti Koivisto.

LayoutContext now owns the top level LayoutState object.
It makes RenderView behave like any other renderer by constructing a LayoutStateMaintainer on the stack.
This is mostly moving code from RenderView.h/.cpp to LayoutContext.h/.cpp and fixing the callsites.
(While view().frameView().layoutContext().layoutState() is a bit lengthy, it's
temporary only, since LayoutState is planned to be an argument of the layout() method.

Covered by existing test.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
* page/LayoutContext.cpp:
(WebCore::LayoutContext::layoutDelta const):
(WebCore::LayoutContext::addLayoutDelta):
(WebCore::LayoutContext::layoutDeltaMatches):
(WebCore::LayoutContext::pushLayoutState):
(WebCore::LayoutContext::pushLayoutStateForPaginationIfNeeded):
(WebCore::LayoutContext::popLayoutState):
(WebCore::LayoutContext::checkLayoutState):
* page/LayoutContext.h:
(WebCore::LayoutContext::layoutState const):
(WebCore::LayoutContext::layoutStateEnabled const):
(WebCore::LayoutContext::disableLayoutState):
(WebCore::LayoutContext::enableLayoutState):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::computeClipRect):
(WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
(WebCore::LayoutStateMaintainer::push):
(WebCore::LayoutStateMaintainer::pop):
(WebCore::LayoutStateDisabler::LayoutStateDisabler):
(WebCore::LayoutStateDisabler::~LayoutStateDisabler):
(WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
(WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
(WebCore::PaginatedLayoutStateMaintainer::PaginatedLayoutStateMaintainer):
(WebCore::PaginatedLayoutStateMaintainer::~PaginatedLayoutStateMaintainer):
* rendering/LayoutState.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::setLogicalLeftForChild):
(WebCore::RenderBlock::setLogicalTopForChild):
(WebCore::RenderBlock::layoutPositionedObject):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
(WebCore::RenderBlock::adjustLogicalLeftOffsetForLine const):
(WebCore::RenderBlock::adjustLogicalRightOffsetForLine const):
(WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage const):
(WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChildren):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::collapseMarginsWithChildInfo):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
(WebCore::RenderBlockFlow::hasNextPage const):
(WebCore::RenderBlockFlow::pageLogicalTopForOffset const):
(WebCore::RenderBlockFlow::pageLogicalHeightForOffset const):
(WebCore::RenderBlockFlow::pageRemainingLogicalHeightForOffset const):
(WebCore::RenderBlockFlow::repaintOverhangingFloats):
(WebCore::RenderBlockFlow::insertFloatingObject):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::layoutSimpleLines):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutRunsAndFloats):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
(WebCore::RenderBlockFlow::layoutLineBoxes):
(WebCore::RenderBlockFlow::determineStartPosition):
(WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::outlineBoundsForRepaint const):
(WebCore::RenderBox::mapLocalToContainer const):
(WebCore::RenderBox::clippedOverflowRectForRepaint const):
(WebCore::RenderBox::computeRectForRepaint const):
(WebCore::RenderBox::offsetFromLogicalTopOfFirstPage const):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
(WebCore::layoutChildIfNeededApplyingDelta):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::insertChildInternal):
(WebCore::RenderElement::takeChildInternal):
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderFragmentedFlow.cpp:
(WebCore::RenderFragmentedFlow::repaintRectangleInFragments const):
* rendering/RenderGrid.cpp:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint const):
(WebCore::RenderInline::computeRectForRepaint const):
(WebCore::RenderInline::mapLocalToContainer const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::layout):
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::layout):
(WebCore::RenderMediaControlTimelineContainer::layout):
(WebCore::RenderTextTrackContainerElement::layout):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintRectangle const):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::clippedOverflowRectForRepaint const):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::clippedOverflowRectForRepaint const):
(WebCore::RenderTableCell::computeRectForRepaint const):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layout):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::setLogicalPositionForCell const):
* rendering/RenderVTTCue.cpp:
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
(WebCore::RenderView::layoutContent): Deleted.
(WebCore::RenderView::checkLayoutState): Deleted.
(WebCore::RenderView::initializeLayoutState): Deleted.
(WebCore::RenderView::pushLayoutState): Deleted.
(WebCore::RenderView::pushLayoutStateForPaginationIfNeeded): Deleted.
* rendering/RenderView.h:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::lineSnapAdjustment const):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::layout):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
* style/RenderTreeUpdaterFirstLetter.cpp:
(WebCore::RenderTreeUpdater::FirstLetter::update):
* style/RenderTreeUpdaterListItem.cpp:
(WebCore::RenderTreeUpdater::ListItem::updateMarker):

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

2 years agoUnreviewed GTK test gardening
mcatanzaro@igalia.com [Tue, 7 Nov 2017 03:22:14 +0000 (03:22 +0000)]
Unreviewed GTK test gardening

* platform/gtk/TestExpectations:

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

2 years ago[CG] Adopt CGContextDrawPathDirect()
commit-queue@webkit.org [Tue, 7 Nov 2017 02:28:45 +0000 (02:28 +0000)]
[CG] Adopt CGContextDrawPathDirect()
https://bugs.webkit.org/show_bug.cgi?id=179339
<rdar://problem/26283575>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-11-06
Reviewed by Simon Fraser.

Source/WebCore:

Adopt this function on macOS >= 10.12 and iOS >= 10.0. Instead of clearing
the current path and creating a new one by calling CGContextBeginPath()
and then adding a CGPath by calling CGContextAddPath() and then calling
one of the drawing path functions, we just call CGContextDrawPathDirect().

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawPath):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath): Don't call CGContextBeginPath()
and CGContextAddPath() for the drawing CGContext in the case of gradient
shadow because we add the CGPath to the layerContext and at the end we
draw this CGLayer into the drawing context.

Source/WebCore/PAL:

Add CGContextDrawPathDirect() as a new CoreGraphics SPI.

* pal/spi/cg/CoreGraphicsSPI.h:

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

2 years agoWeb Inspector: Styles Redesign: Display warnings
nvasilyev@apple.com [Tue, 7 Nov 2017 01:19:11 +0000 (01:19 +0000)]
Web Inspector: Styles Redesign: Display warnings
https://bugs.webkit.org/show_bug.cgi?id=179215

Reviewed by Brian Burg.

Display warning icons on the right of the property.

For now, the warning icons have only three title messages:
- Invalid property name;
- Invalid property value;
- Duplicate property.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property):
(.spreadsheet-style-declaration-editor .property-toggle):
(.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .value):
(.spreadsheet-style-declaration-editor .property.has-warning):
(.spreadsheet-style-declaration-editor .property .warning):
Draw the warning arrow and icon using only one HTML element.
Don't set "top" property so the element remains vertically where it would be if it had "position: static".

(.spreadsheet-style-declaration-editor .property.has-warning .warning):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
(WI.SpreadsheetCSSStyleDeclarationEditor):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration):
(.spreadsheet-css-declaration :matches(.header, .header-media)):
(.spreadsheet-css-declaration .close-brace):
Make properties span the entire width of the styles sidebar. Unsupported properties have yellow
background. There should be no gaps between the property element and sidebar left and right edges.

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty):
(WI.SpreadsheetStyleProperty.prototype.updateStatus):
(WI.SpreadsheetStyleProperty.prototype._update):
(WI.SpreadsheetStyleProperty.prototype.updateClassNames): Deleted.
Rename updateClassNames to updateStatus since it modifies title attribute of the warning element.

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