Timeline



Oct 9, 2017:

10:53 PM Changeset in webkit [223124] by Yusuke Suzuki
  • 9 edits
    6 adds in trunk

async should be able to be used as an imported binding name
https://bugs.webkit.org/show_bug.cgi?id=176573

Reviewed by Saam Barati.

JSTests:

  • modules/import-default-async.js: Added.
  • modules/import-named-async-as.js: Added.
  • modules/import-named-async.js: Added.
  • modules/import-named-async/target.js: Added.
  • modules/import-namespace-async.js: Added.
  • test262.yaml:

Source/JavaScriptCore:

Previously, we have ASYNC keyword in the parser. This is introduced only for performance,
and ECMA262 spec does not categorize "async" to keyword. This makes parser code complicated,
since ASYNC should be handled as IDENT. If we missed this ASYNC keyword, we cause a bug.
For example, import declaration failed to bind imported binding to the name "async" because
the parser considered ASYNC as keyword.

This patch removes ASYNC keyword from the parser. By carefully handling ASYNC, we can keep
the current performance without using this ASYNC keyword.

We also add escaped field to token data since contextual keyword is valid only if it does
not contain any escape sequences. We fix bunch of contextual keyword use with this fix too
e.g. of in for-of. This improves test262 score.

  • parser/Keywords.table:
  • parser/Lexer.cpp:

(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
(JSC::Lexer<CharacterType>::parseIdentifierSlowCase):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::parseForStatement):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::maybeParseAsyncFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
(JSC::Parser<LexerType>::printUnexpectedTokenText):

  • parser/Parser.h:

(JSC::Parser::matchContextualKeyword):

  • parser/ParserTokens.h:
  • runtime/CommonIdentifiers.h:
10:11 PM Changeset in webkit [223123] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

We don't need to clearEmptyObjectStructureForPrototype because JSGlobalObject* is part of the cache's key
https://bugs.webkit.org/show_bug.cgi?id=177987

Reviewed by Filip Pizlo.

  • runtime/JSProxy.cpp:

(JSC::JSProxy::setTarget):

  • runtime/PrototypeMap.cpp:

(JSC::PrototypeMap::clearEmptyObjectStructureForPrototype): Deleted.

  • runtime/PrototypeMap.h:
9:44 PM Changeset in webkit [223122] by commit-queue@webkit.org
  • 4 edits in trunk

Vector should be able to easily create from a list of movable only items
https://bugs.webkit.org/show_bug.cgi?id=176432

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

Source/WTF:

Adding static from method to construct a Vector from movable-only items.
This may also be used instead of initializer list constructor for types that would benefit of being moved.

  • wtf/Vector.h:

(WTF::Vector::Vector):
(WTF::Vector::from):
(WTF::Vector::uncheckedInitialize): Introduced as an optimization to set the vector size once.
(WTF::Malloc>::reserveInitialCapacity):

Tools:

  • TestWebKitAPI/Tests/WTF/Vector.cpp:

(TestWebKitAPI::TEST):

9:28 PM Changeset in webkit [223121] by fpizlo@apple.com
  • 6 edits
    2 adds in trunk/Source/bmalloc

Use one virtual allocation for all gigacages and their runways
https://bugs.webkit.org/show_bug.cgi?id=178050

Reviewed by Saam Barati.

  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):
(Gigacage::runway): Deleted.
(Gigacage::totalSize): Deleted.

  • bmalloc/Gigacage.h:
9:12 PM Changeset in webkit [223120] by jmarcell@apple.com
  • 3 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r221430. rdar://problem/34770998

9:12 PM Changeset in webkit [223119] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r222995. rdar://problem/34891302

9:10 PM Changeset in webkit [223118] by Chris Dumez
  • 5 edits in trunk

Calling fileSystemDirectoryEntry.getDirectory() with empty path should not fail
https://bugs.webkit.org/show_bug.cgi?id=178114

Reviewed by Ryosuke Niwa.

Source/WebCore:

Calling fileSystemDirectoryEntry.getDirectory() with empty/null/undefined path should not fail as per:

The empty string is a valid path as per:

This aligns out behavior with Chrome.

No new tests, updated existing test.

  • Modules/entriesapi/DOMFileSystem.cpp:

(WebCore::isValidVirtualPath):
(WebCore::resolveRelativeVirtualPath):

LayoutTests:

Extend layout test coverage.

  • editing/pasteboard/entries-api/datatransfer-items-drop-getDirectory-expected.txt:
  • editing/pasteboard/entries-api/datatransfer-items-drop-getDirectory.html:
8:19 PM Changeset in webkit [223117] by Chris Dumez
  • 5 edits in trunk

It should not be possible to submit a form that is disconnected
https://bugs.webkit.org/show_bug.cgi?id=178099

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline several WPT tests now that more checks are passing.

  • web-platform-tests/dom/events/Event-dispatch-click-expected.txt:
  • web-platform-tests/html/semantics/forms/the-button-element/button-click-submits-expected.txt:

Source/WebCore:

It should not be possible to submit a form that is disconnected. Both Firefox and Chrome agree with the specification.

This is as per:
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm (step 1)
which refers to:
https://html.spec.whatwg.org/multipage/links.html#cannot-navigate

Form cannot navigate when it is disconnected.

No new tests, rebaselined existing tests.

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::prepareForSubmission):

7:48 PM Changeset in webkit [223116] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

JSCell::didBecomePrototype is racy
https://bugs.webkit.org/show_bug.cgi?id=178110

Reviewed by Saam Barati.

The indexing type can be modified by any thread using CAS. So, we need to use atomics when
modifying it. We don't need to use atomics when reading it though (since it's just one field).

  • runtime/JSCellInlines.h:

(JSC::JSCell::didBecomePrototype):

7:14 PM Changeset in webkit [223115] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Mark http/tests/paymentrequest/payment-request-abort-method.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=178107

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
7:05 PM Changeset in webkit [223114] by Ryan Haddad
  • 2 edits
    2 deletes in trunk/LayoutTests

Rebaseline imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent.html for iOS.

Unreviewed test gardening.

  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt: Removed.
  • platform/ios-wk2/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt: Removed.
  • platform/ios/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
6:40 PM Changeset in webkit [223113] by fpizlo@apple.com
  • 21 edits
    4 adds in trunk

Enable gigacage on iOS
https://bugs.webkit.org/show_bug.cgi?id=177586

Reviewed by JF Bastien.
JSTests:


Add tests for when Gigacage gets runtime disabled.

  • stress/disable-gigacage-arrays.js: Added.

(foo):

  • stress/disable-gigacage-strings.js: Added.

(foo):

  • stress/disable-gigacage-typed-arrays.js: Added.

(foo):

Source/bmalloc:


Introduce the ability to disable gigacage at runtime if allocation fails. If any step of gigacage
allocation fails, we free all of the gigacages and turn off gigacage support.

Reland this after confirming that the 20% Kraken regression was a one-bot fluke. Local testing on the
same kind of system did not show the regression. Saam and I both tried independently.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/Cache.cpp:

(bmalloc::Cache::scavenge):

  • bmalloc/Cache.h:

(bmalloc::Cache::tryAllocate):
(bmalloc::Cache::allocate):
(bmalloc::Cache::deallocate):
(bmalloc::Cache::reallocate):

  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):
(Gigacage::runway):
(Gigacage::totalSize):
(Gigacage::shouldBeEnabled):
(): Deleted.
(Gigacage::Callback::Callback): Deleted.
(Gigacage::Callback::function): Deleted.
(Gigacage::PrimitiveDisableCallbacks::PrimitiveDisableCallbacks): Deleted.

  • bmalloc/Gigacage.h:

(Gigacage::wasEnabled):
(Gigacage::isEnabled):
(Gigacage::runway): Deleted.
(Gigacage::totalSize): Deleted.

  • bmalloc/HeapKind.cpp: Added.

(bmalloc::isActiveHeapKind):
(bmalloc::mapToActiveHeapKind):

  • bmalloc/HeapKind.h:

(bmalloc::isActiveHeapKindAfterEnsuringGigacage):
(bmalloc::mapToActiveHeapKindAfterEnsuringGigacage):

  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::scavenge):

  • bmalloc/bmalloc.h:

(bmalloc::api::tryLargeMemalignVirtual):
(bmalloc::api::freeLargeVirtual):
(bmalloc::api::isEnabled):

Source/JavaScriptCore:

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

Also, this makes the code handle disabling the gigacage a bit better.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::caged):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::cage):
(JSC::AssemblyHelpers::cageConditionally):

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

Tools:


Add a mode to test disabling Gigacage.

  • Scripts/run-jsc-stress-tests:
  • Scripts/webkitruby/jsc-stress-test-writer-default.rb:
6:30 PM Changeset in webkit [223112] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Evaluate the benefit of skipping dead code in the DFGByteCodeParser when a function returns in its first block
https://bugs.webkit.org/show_bug.cgi?id=177925

Reviewed by Saam Barati.

We used to do a rather weird "optimisation" in the bytecode parser: when a function would return in its first block,
the rest of the function was skipped. Since it has no actual impact on any benchmarks from what I could see, I removed
that code. It allows some changes to parseBlock(), since it now returns void and no-longer bool (it was returning a boolean that said whether that case happened or not).

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):

6:20 PM Changeset in webkit [223111] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WTF

Disable INPUT_TYPE_COLOR in FeatureDefines.h
https://bugs.webkit.org/show_bug.cgi?id=178103
<rdar://problem/34872127>

Reviewed by Simon Fraser.

  • wtf/FeatureDefines.h:

Because FeatureDefines.h overrides features that are not enabled in
FeatureDefines.xcconfig, you currently have to turn INPUT_TYPE_COLOR
off in two places. Since we only ever want it on for Mac, it's OK
to depend on the xcconfig defining it.

6:15 PM Changeset in webkit [223110] by mmaxfield@apple.com
  • 6 edits
    3 adds in trunk

Delete button doesn't fully delete certain emoji
https://bugs.webkit.org/show_bug.cgi?id=178096
<rdar://problem/34785106>

Reviewed by Simon Fraser.

Source/WebCore:

System infrastructure for handling emoji changes every year. Instead of having
custom code to specifically walk over codepoints, we should delegate to the
system handling.

Test: editing/deleting/delete-emoji.html

  • rendering/RenderText.cpp:

(WebCore::RenderText::previousOffset const):
(WebCore::RenderText::previousOffsetForBackwardDeletion const):
(WebCore::RenderText::nextOffset const):
(WebCore::isHangulLVT): Deleted.
(WebCore::isMark): Deleted.
(WebCore::isRegionalIndicator): Deleted.
(WebCore::isInArmenianToLimbuRange): Deleted.

LayoutTests:

  • editing/deleting/delete-emoji-2.html:
  • platform/mac/editing/deleting/delete-emoji-expected.txt:
  • platform/mac/editing/deleting/delete-emoji-2-expected.txt:
  • platform/ios/editing/deleting/delete-emoji-expected.txt:
  • platform/ios/editing/deleting/delete-emoji-2-expected.txt:
  • platform/win/TestExpectations:
5:19 PM Changeset in webkit [223109] by aestes@apple.com
  • 1 edit in trunk/Source/WebCore/testing/Internals.cpp

Fix two test crashes caused by r223076.

  • testing/Internals.cpp:

(WebCore::Internals::Internals):

5:08 PM Changeset in webkit [223108] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r222786. rdar://problem/34820881

5:08 PM Changeset in webkit [223107] by jmarcell@apple.com
  • 6 edits in branches/safari-604-branch

Cherry-pick r222779. rdar://problem/34820881

5:08 PM Changeset in webkit [223106] by jmarcell@apple.com
  • 20 edits
    2 adds in branches/safari-604-branch

Cherry-pick r220412. rdar://problem/34771061

5:08 PM Changeset in webkit [223105] by jmarcell@apple.com
  • 8 edits
    3 adds in branches/safari-604-branch

Cherry-pick r221098. rdar://problem/34771028

5:08 PM Changeset in webkit [223104] by jmarcell@apple.com
  • 12 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r221046. rdar://problem/34891067

5:08 PM Changeset in webkit [223103] by jmarcell@apple.com
  • 7 edits
    10 adds in branches/safari-604-branch

Cherry-pick r222402. rdar://problem/34770839

5:08 PM Changeset in webkit [223102] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/JavaScriptCore

Cherry-pick r222748. rdar://problem/34820919

5:08 PM Changeset in webkit [223101] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Apply patch. rdar://problem/34770842

Cherry-pick r221083. rdar://problem/34770842, rdar://problem/34770849

5:08 PM Changeset in webkit [223100] by jmarcell@apple.com
  • 3 edits
    1 add in branches/safari-604-branch

Cherry-pick r222598. rdar://problem/34771434

5:08 PM Changeset in webkit [223099] by jmarcell@apple.com
  • 14 edits in branches/safari-604-branch

Cherry-pick r222190. rdar://problem/34771470

5:08 PM Changeset in webkit [223098] by jmarcell@apple.com
  • 3 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r221100. rdar://problem/34771028

5:08 PM Changeset in webkit [223097] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebKit

Cherry-pick r221036. rdar://problem/34771044

5:08 PM Changeset in webkit [223096] by jmarcell@apple.com
  • 4 edits
    2 adds in branches/safari-604-branch

Cherry-pick r221016. rdar://problem/34770830

5:08 PM Changeset in webkit [223095] by jmarcell@apple.com
  • 3 edits
    2 deletes in branches/safari-604-branch

Cherry-pick r220484. rdar://problem/34770810

5:07 PM Changeset in webkit [223094] by jmarcell@apple.com
  • 14 edits
    2 adds in branches/safari-604-branch

Cherry-pick r220302. rdar://problem/34770803

5:07 PM Changeset in webkit [223093] by jmarcell@apple.com
  • 3 edits
    2 adds in branches/safari-604-branch

Cherry-pick r221400. rdar://problem/34771396

5:07 PM Changeset in webkit [223092] by jmarcell@apple.com
  • 4 edits
    2 adds in branches/safari-604-branch

Cherry-pick r221128. rdar://problem/34771005

5:07 PM Changeset in webkit [223091] by commit-queue@webkit.org
  • 13 edits in trunk/Source/WebCore

Image data should be coalesced if it comes in small chunks before updating the ImageSource
https://bugs.webkit.org/show_bug.cgi?id=175890

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

Coalesce the updates, which an Image makes when receiving encoded data in
small chunks, for all platforms. Ensure the clients of the CachedImage
won't be notified unless an update in the ImageSource happens.

I need to change some functions' names to better implement this patch.
The names of these functions have been confusing:

CachedImage::addData(SharedBuffer&)
CachedImage::addDataBuffer(const char* data, unsigned)
CachedImage::addIncrementalDataBuffer(SharedBuffer&)

The image data is not buffered incrementally into the CachedImage. When
new data is received, SubresourceLoader calls CachedImage to "update" its
m_data with either a SharedBuffer or a data pointer. In either case the
SharedBuffer or the pointer contains all the loaded data. SubresourceLoader
calls CachedImage to update its m_data, to ensure its m_image is created
and to notify its clients with the new data.

The verb "add" in the functions' name is misleading. I am suggesting the
following names instead:

CachedImage::updateBuffer(SharedBuffer&)
CachedImage::updateData(const char*, unsigned)
CachedImage::doUpdateBuffer(SharedBuffer&)

The first two are the virtual ones. They are called form SubresourceLoader.
The third one is the internal implementation to update the m_data member.
The same names will be used in the following classes:

CachedResource which is the base class of CachedImage
CachedRawResource which is derived from CachedResource
CachedTextTrack which is derived from CachedResource

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::updateDuringParsing):

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveDataOrBuffer):

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::clearImage): Reset the update back off members.
(WebCore::CachedImage::doUpdateBuffer): Don't update CachedImage with
the new data if it comes in small chunks with fast rate.
(WebCore::CachedImage::shouldDeferUpdateImageData const): This code is moved
from ImageSource::dataChanged().
(WebCore::CachedImage::didUpdateImageData): Ditto.
(WebCore::CachedImage::updateImageData):
(WebCore::CachedImage::updateBuffer):
(WebCore::CachedImage::updateData):
(WebCore::CachedImage::finishLoading):
(WebCore::CachedImage::addIncrementalDataBuffer): Deleted.
(WebCore::CachedImage::setImageDataBuffer): Deleted.
(WebCore::CachedImage::addDataBuffer): Deleted.
(WebCore::CachedImage::addData): Deleted.

  • loader/cache/CachedImage.h:
  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::updateBuffer):
(WebCore::CachedRawResource::updateData):
(WebCore::CachedRawResource::addDataBuffer): Deleted.
(WebCore::CachedRawResource::addData): Deleted.

  • loader/cache/CachedRawResource.h:
  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::updateBuffer):
(WebCore::CachedResource::updateData):
(WebCore::CachedResource::addDataBuffer): Deleted.
(WebCore::CachedResource::addData): Deleted.

  • loader/cache/CachedResource.h:
  • loader/cache/CachedTextTrack.cpp:

(WebCore::CachedTextTrack::doUpdateBuffer): Rename updateData() to doUpdateBuffer().
(WebCore::CachedTextTrack::updateBuffer): Rename addDataBuffer() to updateBuffer().
(WebCore::CachedTextTrack::finishLoading): Call the internal function doUpdateBuffer().
(WebCore::CachedTextTrack::updateData): Deleted.
(WebCore::CachedTextTrack::addDataBuffer): Deleted.

  • loader/cache/CachedTextTrack.h:
  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::dataChanged): Move the update back off code to CachedImage::updateData().

  • platform/graphics/ImageSource.h:
5:07 PM Changeset in webkit [223090] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r221116. rdar://problem/34771068

5:07 PM Changeset in webkit [223089] by jmarcell@apple.com
  • 19 edits in branches/safari-604-branch

Cherry-pick r220718. rdar://problem/34771041

5:07 PM Changeset in webkit [223088] by jmarcell@apple.com
  • 6 edits in branches/safari-604-branch/Source

Cherry-pick r220496. rdar://problem/34770816

5:05 PM Changeset in webkit [223087] by Chris Dumez
  • 3 edits in trunk/LayoutTests/imported/w3c

usemap-casing.html test passes in browser, fails in LayoutTests because it is taller than 600px
https://bugs.webkit.org/show_bug.cgi?id=178053

Reviewed by Youenn Fablet.

Re-sync html/semantics/embedded-content/the-img-element/usemap-casing.html after:

  • web-platform-tests/html/semantics/embedded-content/the-img-element/usemap-casing-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/usemap-casing.html:
4:55 PM Changeset in webkit [223086] by rmorisset@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Refactor the inliner to simplify block linking
https://bugs.webkit.org/show_bug.cgi?id=177922

Reviewed by Saam Barati.

The biggest refactor changes the way blocks are linked. In DFGByteCodeParser, most terminals (such as Jump or Branch) jump to nullptr initially, and have
some metadata indicating the bytecode index corresponding to their targets. They are later linked to the right basic block using two fields of InlineStackEntry:

  • m_unlinkedBlocks is just a worklist of blocks with a terminal that needs to be linked
  • m_linkingTargets is a dictionary from bytecode indices to BasicBlock*

Before refactoring, every block was automatically added to both of these fields, for the InlineStackEntry of whatever function allocated it.
This created a significant number of corner cases, such as blocks allocated in a caller, with a terminal written by an inlined callee and pointing to a block in the callee,
or blocks allocated in an inline callee, with a terminal written by the caller after it returns and pointing to a block in the caller, or blocks with a manually linked
terminal that needs to be taken off m_unlinkedBlocks.
I changed things so that blocks are only added to m_unlinkedBlocks when their terminal gets written (see the LAST_OPCODE macro) making it a lot easier to be in the "right" InlineStackEntry,
that is the one that holds their target in its m_linkingTargets field.

There are a few much smaller refactors in this patch:

  • parse() is now of type void insted of bool (it was always returning true)
  • The 7 and 8 arguments of handleCall were inlined in its 3 arguments version for readability
  • The 9 argument version was cleaned up and simplified
  • I made separate allocateBlock routines because the little dance with adoptRef(* new BasicBlock(...)) was being repeated in lots of places, and typos in that were a major source of bugs during other refactorings
  • Jumps are now created with explicit addJumpTo() functions, providing some sanity checking through asserts and didLink()
  • Blocks are only added to m_unlinkedBlocks if they end in a terminal that linkBlock works with (see LAST_OPCODE)
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::refineStatically):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
(JSC::DFG::ByteCodeParser::parse):
(JSC::DFG::parse):
(JSC::DFG::ByteCodeParser::cancelLinkingForBlock): Deleted.

  • dfg/DFGByteCodeParser.h:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

4:45 PM Changeset in webkit [223085] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.3.5.0.1

Tag Safari-604.3.5.0.1.

4:35 PM Changeset in webkit [223084] by jmarcell@apple.com
  • 13 edits
    1 add in branches/safari-604.3.5.0-branch

Apply patch. rdar://problem/34857459

Apply patch. rdar://problem/34857459

4:27 PM Changeset in webkit [223083] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix typo of virtual keyword in PageClientImplIOS.h
https://bugs.webkit.org/show_bug.cgi?id=178088

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

This compile error happens when FULLSCREEN_API is enabled for iOS.
Remove the redundant virtual keyword since function is marked override.

  • UIProcess/ios/PageClientImplIOS.h:
4:27 PM Changeset in webkit [223082] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS][WK2] Tiles outsides the viewport are sometimes missing after relaunching a crashes WebProcess
https://bugs.webkit.org/show_bug.cgi?id=178095
<rdar://problem/34415016>

Reviewed by Simon Fraser.

Make sure we reset WKWebView._hasScheduledVisibleRectUpdate to NO in WKWebView._processDidExit.
_scheduleVisibleContentRectUpdateAfterScrollInView would otherwise return early because
WKWebView._hasScheduledVisibleRectUpdate is always YES. Normally,
_addUpdateVisibleContentRectPreCommitHandler sets a CATransaction commit handler that
resets _hasScheduledVisibleRectUpdate to NO, but it does not do so when ![webView _isValid]
(which is true when the WebProcess has crashed.

Also reset WKWebView._commitDidRestoreScrollPosition to NO in WKWebView._processDidExit even
though it does not seem to be the cause of this bug. It seems to make sense to reset this member
when the process crashes.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _processDidExit]):

4:14 PM Changeset in webkit [223081] by msaboff@apple.com
  • 15 edits
    17 adds in trunk

Implement RegExp Unicode property escapes
https://bugs.webkit.org/show_bug.cgi?id=172069

Reviewed by JF Bastien.

JSTests:

Enabled Unicode Property tests.

  • test262.yaml:

Source/JavaScriptCore:

Added Unicode Properties by extending the existing CharacterClass processing.

Introduced a new Python script, generateYarrUnicodePropertyTables.py, that parses
Unicode Database files to create character class data. The result is a set of functions
that return character classes, one for each of the required Unicode properties.
There are many cases where many properties are handled by one function, primarily due to
property aliases, but also due to Script_Extension properties that are the same as the
Script property for the same script value.

Extended the BuiltInCharacterClassID enum so it can be used also for Unicode property
character classes. Unicode properties are the enum value BaseUnicodePropertyID plus a
zero based value, that value being the index to the corrensponding character class
function. The generation script also creates static hashing tables similar to what we
use for the generated .lut.h lookup table files. These hashing tables map property
names to the function index. Using these hashing tables, we can lookup a property
name and if present convert it to a function index. We add that index to
BaseUnicodePropertyID to create a BuiltInCharacterClassID.

When we do syntax parsing, we convert the property to its corresponding BuiltInCharacterClassID.
When doing real parsing we takes the returned BuiltInCharacterClassID and use it to get
the actual character class by calling the corresponding generated function.

Added a new CharacterClass constructor that can take literal arrays for ranges and matches
to make the creation of large static character classes more efficent.

Since the Unicode character classes typically have more matches and ranges, the character
class matching in the interpreter has been updated to use binary searching for matches and
ranges with more than 6 entries.

  • CMakeLists.txt:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/generateYarrUnicodePropertyTables.py: Added.

(openOrExit):
(openUCDFileOrExit):
(verifyUCDFilesExist):
(ceilingToPowerOf2):
(Aliases):
(Aliases.init):
(Aliases.parsePropertyAliasesFile):
(Aliases.parsePropertyValueAliasesFile):
(Aliases.globalAliasesFor):
(Aliases.generalCategoryAliasesFor):
(Aliases.generalCategoryForAlias):
(Aliases.scriptAliasesFor):
(Aliases.scriptNameForAlias):
(PropertyData):
(PropertyData.init):
(PropertyData.setAliases):
(PropertyData.makeCopy):
(PropertyData.getIndex):
(PropertyData.getCreateFuncName):
(PropertyData.addMatch):
(PropertyData.addRange):
(PropertyData.addMatchUnorderedForMatchesAndRanges):
(PropertyData.addRangeUnorderedForMatchesAndRanges):
(PropertyData.addMatchUnordered):
(PropertyData.addRangeUnordered):
(PropertyData.removeMatchFromRanges):
(PropertyData.removeMatch):
(PropertyData.dumpMatchData):
(PropertyData.dump):
(PropertyData.dumpAll):
(PropertyData.dumpAll.std):
(PropertyData.createAndDumpHashTable):
(Scripts):
(Scripts.init):
(Scripts.parseScriptsFile):
(Scripts.parseScriptExtensionsFile):
(Scripts.dump):
(GeneralCategory):
(GeneralCategory.init):
(GeneralCategory.createSpecialPropertyData):
(GeneralCategory.findPropertyGroupFor):
(GeneralCategory.addNextCodePoints):
(GeneralCategory.parse):
(GeneralCategory.dump):
(BinaryProperty):
(BinaryProperty.init):
(BinaryProperty.parsePropertyFile):
(BinaryProperty.dump):

  • Scripts/hasher.py: Added.

(stringHash):

  • Sources.txt:
  • ucd/DerivedBinaryProperties.txt: Added.
  • ucd/DerivedCoreProperties.txt: Added.
  • ucd/DerivedNormalizationProps.txt: Added.
  • ucd/PropList.txt: Added.
  • ucd/PropertyAliases.txt: Added.
  • ucd/PropertyValueAliases.txt: Added.
  • ucd/ScriptExtensions.txt: Added.
  • ucd/Scripts.txt: Added.
  • ucd/UnicodeData.txt: Added.
  • ucd/emoji-data.txt: Added.
  • yarr/Yarr.h:
  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::testCharacterClass):

  • yarr/YarrParser.h:

(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::parseTokens):
(JSC::Yarr::Parser::isUnicodePropertyValueExpressionChar):
(JSC::Yarr::Parser::tryConsumeUnicodePropertyExpression):

  • yarr/YarrPattern.cpp:

(JSC::Yarr::CharacterClassConstructor::appendInverted):
(JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
(JSC::Yarr::YarrPattern::errorMessage):
(JSC::Yarr::PatternTerm::dump):

  • yarr/YarrPattern.h:

(JSC::Yarr::CharacterRange::CharacterRange):
(JSC::Yarr::CharacterClass::CharacterClass):
(JSC::Yarr::YarrPattern::reset):
(JSC::Yarr::YarrPattern::unicodeCharacterClassFor):

  • yarr/YarrUnicodeProperties.cpp: Added.

(JSC::Yarr::HashTable::entry const):
(JSC::Yarr::unicodeMatchPropertyValue):
(JSC::Yarr::unicodeMatchProperty):
(JSC::Yarr::createUnicodeCharacterClassFor):

  • yarr/YarrUnicodeProperties.h: Added.

Source/WebCore:

Refactoring change - Added BuiltInCharacterClassID:: prefix to uses of the enum.

  • contentextensions/URLFilterParser.cpp:

(WebCore::ContentExtensions::PatternParser::atomBuiltInCharacterClass):

LayoutTests:

New test.

  • js/regexp-unicode-properties-expected.txt: Added.
  • js/regexp-unicode-properties.html: Added.
  • js/script-tests/regexp-unicode-properties.js: Added.
3:58 PM Changeset in webkit [223080] by jmarcell@apple.com
  • 7 edits in branches/safari-604.3.5.0-branch/Source

Versioning.

3:49 PM Changeset in webkit [223079] by dino@apple.com
  • 4 edits in trunk/LayoutTests/imported/w3c

ImageBitmap test gardening after https://bugs.webkit.org/show_bug.cgi?id=177963

  • web-platform-tests/imagebitmap-renderingcontext/bitmaprenderer-as-imagesource-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/context-creation-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/context-preserves-canvas-expected.txt:
3:47 PM Changeset in webkit [223078] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Network Tab - Include remote address in the Headers view
https://bugs.webkit.org/show_bug.cgi?id=178094
<rdar://problem/34895221>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-09
Reviewed by Devin Rousso.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/ResourceHeadersContentView.js:

(WI.ResourceHeadersContentView.prototype._refreshSummarySection):
(WI.ResourceHeadersContentView.prototype._resourceMetricsDidChange):

3:44 PM Changeset in webkit [223077] by jmarcell@apple.com
  • 7 edits in branches/safari-604.3.5.1-branch/Source

Versioning.

3:40 PM Changeset in webkit [223076] by aestes@apple.com
  • 19 edits
    3 copies
    5 adds
    2 deletes in trunk

[Payment Request] Implement PaymentRequest.show() and PaymentRequest.hide()
https://bugs.webkit.org/show_bug.cgi?id=178043
<rdar://problem/34076639>

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-abort-method.https-expected.txt: Removed.
  • web-platform-tests/payment-request/payment-request-show-method.https-expected.txt: Removed.

Source/WebCore:

Tests: http/tests/paymentrequest/payment-request-abort-method.https.html

http/tests/paymentrequest/payment-request-show-method.https.html

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentSession.h: Virtually inherited from PaymentSessionBase to

accommodate ApplePayPaymentHandler inheriting from both this and PaymentHandler.
(WebCore::PaymentSession::~PaymentSession): Deleted.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::paymentCoordinator): Virtually inherited from PaymentSessionBase to accommodate
ApplePayPaymentHandler inheriting from both this and PaymentSession.
(WebCore::ApplePayPaymentHandler::hasActiveSession): Added. Calls PaymentCoordinator::hasActiveSession().
(WebCore::ApplePayPaymentHandler::show): Added. Calls PaymentCoordinator::beginPaymentSession().
(WebCore::ApplePayPaymentHandler::hide): Added. Calls PaymentCoordinator::abortPaymentSession().

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.h: Inherited from PaymentSession in

addition to PaymentHandler so that this can be PaymentCoordinator active session.

  • Modules/paymentrequest/PaymentHandler.cpp:

(WebCore::PaymentHandler::create):
(WebCore::PaymentHandler::hasActiveSession):

  • Modules/paymentrequest/PaymentHandler.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::~PaymentRequest):
(WebCore::PaymentRequest::show): Rejected the promise if PaymentCoordinator has an active session.
(WebCore::PaymentRequest::abort): Called stop().
(WebCore::PaymentRequest::canSuspendForDocumentSuspension const): Returned true if state is
Interactive and there is an active handler showing.
(WebCore::PaymentRequest::stop): Hid the active session if it's showing, then set state to
Closed and rejected the show promise.

  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/paymentrequest/PaymentSessionBase.h: Added. Inherits from

RefCounted<PaymentSessionBase> and defines a virtual destructor. This allows subclasses to
virtually inherit a single ref-count to support multiple inheritance.

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/scripts/CodeGeneratorJS.pm:

(GetGnuVTableOffsetForType): Added ApplePaySession to the list of classes that need a vtable
offset of 3.

  • page/MainFrame.cpp:

(WebCore::MainFrame::setPaymentCoordinator): Added a setter for m_paymentCoordinator.

  • page/MainFrame.h:
  • testing/Internals.cpp:

(WebCore::Internals::Internals): Set the main frame's payment coordinator to a new
PaymentCoordinator with MockPaymentCoordinator as its client.

  • testing/MockPaymentCoordinator.cpp: Added a mock PaymentCoordinatorClient for testing.

(WebCore::MockPaymentCoordinator::supportsVersion):
(WebCore::MockPaymentCoordinator::canMakePayments):
(WebCore::MockPaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::MockPaymentCoordinator::openPaymentSetup):
(WebCore::MockPaymentCoordinator::showPaymentUI):
(WebCore::MockPaymentCoordinator::paymentCoordinatorDestroyed):

  • testing/MockPaymentCoordinator.h: Added.

LayoutTests:

Copied payment-request-abort-method.https.html and payment-request-show-method.https.html
from web-platform-tests/payment-request/ and changed the payment method from basic-card to
Apple Pay. This needs to eventually be upstreamed back to WPT.

  • TestExpectations:
  • http/tests/paymentrequest/payment-request-abort-method.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-request-abort-method.https.html: Added.
  • http/tests/paymentrequest/payment-request-show-method.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-request-show-method.https.html: Added.
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
3:30 PM Changeset in webkit [223075] by jmarcell@apple.com
  • 1 copy in branches/safari-604.3.5.0-branch

New branch.

3:28 PM Changeset in webkit [223074] by jmarcell@apple.com
  • 1 copy in branches/safari-604.3.5.1-branch

New branch.

3:17 PM Changeset in webkit [223073] by commit-queue@webkit.org
  • 31 edits
    3 adds in trunk

Add quota to cache API
https://bugs.webkit.org/show_bug.cgi?id=177552

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

Source/WebCore:

Tests: http/wpt/cache-storage/cache-quota.any.html

Storing padded opaque response body sizes within FetchResponse and CacheStorageConnection.
See https://github.com/whatwg/storage/issues/31 for the rationale about this padding.
Storing in CacheStorageConnection is needed for handling cloned network fetched created responses.
Storing in FetchResponse is needed for handling cloned cache-storage created opaque responses.

Adding internals to query and set the fuzzed size of a response.

  • Modules/cache/CacheStorageConnection.cpp:

(WebCore::computeRealBodySize):
(WebCore::CacheStorageConnection::computeRecordBodySize):
(WebCore::CacheStorageConnection::setResponseBodySizeWithPadding):
(WebCore::CacheStorageConnection::responseBodySizeWithPadding const):

  • Modules/cache/CacheStorageConnection.h:
  • Modules/cache/DOMCache.cpp:

(WebCore::DOMCache::toConnectionRecord):
(WebCore::DOMCache::updateRecords):

  • Modules/cache/DOMCache.h:
  • Modules/cache/DOMCacheEngine.cpp:

(WebCore::DOMCacheEngine::errorToException):
(WebCore::DOMCacheEngine::Record::copy const):

  • Modules/cache/DOMCacheEngine.h:
  • Modules/cache/WorkerCacheStorageConnection.cpp:

(WebCore::toCrossThreadRecordData):
(WebCore::fromCrossThreadRecordData):

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::clone):
(WebCore::FetchResponse::BodyLoader::didReceiveResponse):

  • Modules/fetch/FetchResponse.h:
  • Modules/fetch/FetchResponse.idl:
  • testing/Internals.cpp:

(WebCore::Internals::setResponseSizeWithPadding):
(WebCore::Internals::responseSizeWithPadding const):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

Adding support for quota checking in CacheStorage::Caches.
It is passed to NetworkProcess at creation time.
Default quota size is configured to 400Ko by origin per default.
This value is suitable for testing.
Future patch should raise this default value and allows configuring it.

Quota is computed based on the response body size.
This size is padded at WebCore for opaque responses.
Size is stored persistently as opaque response padded size should remain stable.
See https://github.com/whatwg/storage/issues/31 for the rationale about this padding.

In case of putting several records at the same time, the size of all records
is computed so that all records will be written or rejected together.

Sending QuotaExceeded error when quota is exceeded.
Future effort should allow asking UIProcess for quota extension.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::cacheStoragePerOriginQuota const):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::readCachesFromDisk):

  • NetworkProcess/cache/CacheStorageEngineCache.cpp:

(WebKit::CacheStorage::Cache::toRecordInformation):
(WebKit::CacheStorage::isolatedCopy):
(WebKit::CacheStorage::Cache::open):
(WebKit::CacheStorage::Cache::storeRecords):
(WebKit::CacheStorage::Cache::put):
(WebKit::CacheStorage::Cache::writeRecordToDisk):
(WebKit::CacheStorage::Cache::updateRecordToDisk):
(WebKit::CacheStorage::Cache::removeRecordFromDisk):
(WebKit::CacheStorage::Cache::encode):
(WebKit::CacheStorage::Cache::decodeRecordHeader):
(WebKit::CacheStorage::Cache::decode):

  • NetworkProcess/cache/CacheStorageEngineCache.h:
  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::Caches):
(WebKit::CacheStorage::Caches::initialize):
(WebKit::CacheStorage::Caches::initializeSize):
(WebKit::CacheStorage::Caches::requestSpace):
(WebKit::CacheStorage::Caches::writeRecord):
(WebKit::CacheStorage::Caches::removeRecord):
(WebKit::CacheStorage::Caches::removeCacheEntry):

  • NetworkProcess/cache/CacheStorageEngineCaches.h:

(WebKit::CacheStorage::Caches::create):
(WebKit::CacheStorage::Caches::hasEnoughSpace const):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::traverse):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<DOMCacheEngine::Record>::encode):
(IPC::ArgumentCoder<DOMCacheEngine::Record>::decode):

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

LayoutTests:

  • http/wpt/cache-storage/cache-quota.https.any-expected.txt: Added.
  • http/wpt/cache-storage/cache-quota.https.any.html: Added.
  • http/wpt/cache-storage/cache-quota.https.any.js: Added.
2:57 PM Changeset in webkit [223072] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

Remove redundant RenderObject::virtualContinuation
https://bugs.webkit.org/show_bug.cgi?id=178091
<rdar://problem/34892906>

Reviewed by Antti Koivisto.

virtualContinuation sounds like a feature of continuation, while it's just a (not super useful)helper override.

No change in functionality.

  • rendering/RenderBlock.cpp:

(WebCore::canMergeContiguousAnonymousBlocks):
(WebCore::RenderBlock::takeChild):

  • rendering/RenderBlock.h:
  • rendering/RenderInline.h:
  • rendering/RenderObject.h:

(WebCore::RenderObject::isBlockElementContinuation const):
(WebCore::RenderObject::virtualContinuation const): Deleted.

2:49 PM Changeset in webkit [223071] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Unskipped http/tests/cache/disk-cache/disk-cache-validation-no-body.html
https://bugs.webkit.org/show_bug.cgi?id=178019

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
2:17 PM Changeset in webkit [223070] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKitLegacy

[Win] Link error: cannot open input file 'WebKitLegacyGUID.lib'
https://bugs.webkit.org/show_bug.cgi?id=178087

Reviewed by Alexey Proskuryakov.

For compatibility reasons, the library still has the name WebKitGUID.lib.

  • PlatformWin.cmake:
2:17 PM Changeset in webkit [223069] by commit-queue@webkit.org
  • 21 edits
    4 deletes in trunk

Unreviewed, rolling out r223015 and r223025.
https://bugs.webkit.org/show_bug.cgi?id=178093

Regressed Kraken on iOS by 20% (Requested by keith_mi_ on
#webkit).

Reverted changesets:

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

"Unreviewed, disable Gigacage on ARM64 Linux"
https://bugs.webkit.org/show_bug.cgi?id=177586
http://trac.webkit.org/changeset/223025

1:57 PM Changeset in webkit [223068] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Unreviewed, minified WebInspector opens blank.
<rdar://problem/34892307>

  • UserInterface/Views/ResourceHeadersContentView.js:

(WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection):
Regression introduced in r223006. The minified build has a SyntaxError
causing WebInspector top open blank. Add the missing semicolon.

1:46 PM Changeset in webkit [223067] by Ryan Haddad
  • 2 edits in trunk/JSTests

Update expectations for test262 tests that pass after r223043.
https://bugs.webkit.org/show_bug.cgi?id=176685

Unreviewed test gardening.

  • test262.yaml:
1:45 PM Changeset in webkit [223066] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, sort unified sources again now that they are numbered numerically rather than lexicographically.

1:38 PM Changeset in webkit [223065] by Joseph Pecoraro
  • 10 edits
    2 adds in trunk/Source/WebInspectorUI

Web Inspector: Network Tab - Filter resources based on URL / Text Content
https://bugs.webkit.org/show_bug.cgi?id=178071
<rdar://problem/34071562>

Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:

New strings.

  • UserInterface/Views/FilterBar.css:

(.filter-bar.active > input[type="search"]::-webkit-search-decoration):
(.filter-bar.indicating-progress > input[type="search"]::-webkit-search-decoration):
New icon for progress / active states.

  • UserInterface/Views/FilterBar.js:

(WI.FilterBar.prototype.get inputField):
(WI.FilterBar.prototype.get placeholder):
(WI.FilterBar.prototype.set placeholder):
(WI.FilterBar.prototype.get incremental):
(WI.FilterBar.prototype.set incremental):
(WI.FilterBar.prototype.get indicatingProgress):
(WI.FilterBar.prototype.set indicatingProgress):
(WI.FilterBar.prototype.get indicatingActive):
(WI.FilterBar.prototype.set indicatingActive):
(WI.FilterBar.prototype._handleFilterInputEvent):
When incremental is set to false on the FilterBar still dispatch an
event when the textfield clears.

  • UserInterface/Images/FilterFieldActiveGlyph.svg: Added.
  • UserInterface/Images/gtk/FilterFieldActiveGlyph.svg: Added.

New blue icon for active state.

  • UserInterface/Controllers/FrameResourceManager.js:

(WI.FrameResourceManager.prototype.resourceForIdentifier):
Accessor for arbitrary resource.

  • UserInterface/Views/NetworkTableContentView.css:

(.content-view.network .navigation-bar .filter-bar):
(.content-view.network .warning-banner):
(body[dir=ltr] .content-view.network .warning-banner):
(body[dir=rtl] .content-view.network .warning-banner):
(.content-view.network .warning-banner > a):
Warning banner when the filter produces no results. This matches the
warning in the Debugger tab when breakpoints are disabled.

  • UserInterface/Views/ScopeBar.js:

(WI.ScopeBar.prototype.resetToDefault):
Provide a way to easily reset a scope bar to the default item.

  • UserInterface/Views/RadioButtonNavigationItem.css:

(.navigation-bar .item.radio.button.text-only:active):

  • UserInterface/Views/ScopeBar.css:

(.scope-bar > li:active):
Cleanup some styles that should be using a variable.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype.get filterNavigationItems):
(WI.NetworkTableContentView.prototype.layout):
(WI.NetworkTableContentView.prototype._processPendingEntries):
(WI.NetworkTableContentView.prototype._checkTextFilterAgainstFinishedResource):
(WI.NetworkTableContentView.prototype._checkTextFilterAgainstFailedResource):
(WI.NetworkTableContentView.prototype._updateTextFilterActiveIndicator):
(WI.NetworkTableContentView.prototype._updateEmptyFilterResultsWarning):
(WI.NetworkTableContentView.prototype._showEmptyFilterResultsWarning):
(WI.NetworkTableContentView.prototype._hideEmptyFilterResultsWarning):
(WI.NetworkTableContentView.prototype._positionEmptyFilterMessage):
(WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
(WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
(WI.NetworkTableContentView.prototype._networkTimelineRecordAdded):
(WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
(WI.NetworkTableContentView.prototype._hasTypeFilter):
(WI.NetworkTableContentView.prototype._hasTextFilter):
(WI.NetworkTableContentView.prototype._hasActiveFilter):
(WI.NetworkTableContentView.prototype._passTypeFilter):
(WI.NetworkTableContentView.prototype._passTextFilter):
(WI.NetworkTableContentView.prototype._passFilter):
(WI.NetworkTableContentView.prototype._updateFilteredEntries):
(WI.NetworkTableContentView.prototype._resetFilters):
(WI.NetworkTableContentView.prototype._textFilterDidChange):
(WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth):
There are now two filters.

  • FilterBar - Filters URL and Full Text Content
  • ScopeBar - Filters Resource Type

The text content filter is asynchronous. We reuse the existing Search
functionality when filtering on text. We need to defer text content
filtering until the resource finishes loading.

1:23 PM Changeset in webkit [223064] by commit-queue@webkit.org
  • 2 edits
    17 adds in trunk/LayoutTests/imported/w3c

REGRESSION: Some bots fail to run LayoutTests due to a WPT Server error
https://bugs.webkit.org/show_bug.cgi?id=178017

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-09
Reviewed by Sam Weinig.

  • resources/import-expectations.json:
  • web-platform-tests/tools/six/: Added.
1:16 PM Changeset in webkit [223063] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

[WebGL] Third IOSurface buffer might be allocated with the wrong size
https://bugs.webkit.org/show_bug.cgi?id=178092
<rdar://problem/34893173>

Reviewed by Jer Noble.

If the WebGL canvas resizes after the third buffer was allocated, it
was never getting told that its backing store should be thrown away.

  • platform/graphics/cocoa/WebGLLayer.mm: Allocate the third buffer at

the same time as the first two.
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):
(-[WebGLLayer bindFramebufferToNextAvailableSurface]):

1:02 PM Changeset in webkit [223062] by Ryan Haddad
  • 6 edits
    5 deletes in trunk

Unreviewed, rolling out r223022.

This change introduced 18 test262 failures.

Reverted changeset:

"async should be able to be used as an imported binding
name"
https://bugs.webkit.org/show_bug.cgi?id=176573
http://trac.webkit.org/changeset/223022

1:01 PM Changeset in webkit [223061] by commit-queue@webkit.org
  • 10 edits in trunk

Make HashMap::keys() and HashMap::values() work with WTF::map/WTF::copyToVector
https://bugs.webkit.org/show_bug.cgi?id=178072

Patch by Sam Weinig <sam@webkit.org> on 2017-10-09
Reviewed by Darin Adler.

Source/WebCore:

  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:

(WebCore::MediaSelectionGroupAVFObjC::options):

Update for type change for HashMap::values().

Source/WebKit:

  • Shared/AsyncRequest.h:

(WebKit::AsyncRequestMap::values):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::pages const):

Update for type change for HashMap::values().

Source/WTF:

Introduce SizedIteratorRange, a variant of IteratorRange that includes
a reference to a backing container in order to get the size of container.
This is useful for algorithms like WTF::map and WTF::copyToVector, that
can use the size to efficiently allocate things of the correct size.

The main beneficiary are HashMap's keys() and values() functions which
used to return IteratorRanges and now return SizedIteratorRange. This
allows us to remove (in a future change) copyKeysToVector() and
copyValuesToVector() by replacing them with copyToVector(map.keys()) and
copyToVector(map.values()) respectively.

  • wtf/HashMap.h:
  • wtf/IteratorRange.h:

(WTF::SizedIteratorRange::SizedIteratorRange):
(WTF::SizedIteratorRange::size const):
(WTF::SizedIteratorRange::begin const):
(WTF::SizedIteratorRange::end const):
(WTF::makeSizedIteratorRange):

Tools:

  • TestWebKitAPI/Tests/WTF/Vector.cpp:

(TestWebKitAPI::TEST):

Add tests for HashMap::keys() and HashMap::values() working with copyToVector.

12:55 PM Changeset in webkit [223060] by dino@apple.com
  • 2 edits
    14 adds in trunk/LayoutTests/imported/w3c

Import WPT imagebitmap-renderingcontext
https://bugs.webkit.org/show_bug.cgi?id=177963

Reviewed by Sam Weinig.

  • resources/import-expectations.json:
  • web-platform-tests/imagebitmap-renderingcontext/bitmaprenderer-as-imagesource-expected.txt: Added.
  • web-platform-tests/imagebitmap-renderingcontext/bitmaprenderer-as-imagesource.html: Added.
  • web-platform-tests/imagebitmap-renderingcontext/context-creation-expected.txt: Added.
  • web-platform-tests/imagebitmap-renderingcontext/context-creation-with-alpha-expected.txt: Added.
  • web-platform-tests/imagebitmap-renderingcontext/context-creation-with-alpha.html: Added.
  • web-platform-tests/imagebitmap-renderingcontext/context-creation.html: Added.
  • web-platform-tests/imagebitmap-renderingcontext/context-preserves-canvas-expected.txt: Added.
  • web-platform-tests/imagebitmap-renderingcontext/context-preserves-canvas.html: Added.
  • web-platform-tests/imagebitmap-renderingcontext/tranferFromImageBitmap-null-expected.txt: Added.
  • web-platform-tests/imagebitmap-renderingcontext/tranferFromImageBitmap-null.html: Added.
  • web-platform-tests/imagebitmap-renderingcontext/transferFromImageBitmap-detached-expected.txt: Added.
  • web-platform-tests/imagebitmap-renderingcontext/transferFromImageBitmap-detached.html: Added.
  • web-platform-tests/imagebitmap-renderingcontext/w3c-import.log: Added.
12:32 PM Changeset in webkit [223059] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Network Tab: Row wrapping (waterfall displaying behind next row's name)
https://bugs.webkit.org/show_bug.cgi?id=178015
<rdar://problem/34858720>

Reviewed by Brian Burg.

  • UserInterface/Views/Table.css:

(.table > .header):
(.table > .data-container > .data-list > li):
Disallow wrapping.

12:32 PM Changeset in webkit [223058] by Joseph Pecoraro
  • 12 edits
    1 copy
    4 adds in trunk

Web Inspector: Network Tab - Cookies Detail View
https://bugs.webkit.org/show_bug.cgi?id=177988
<rdar://problem/34071927>

Reviewed by Brian Burg.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:
  • UserInterface/Test.html:

New strings and resources.

  • UserInterface/Models/Cookie.js: Added.

(WI.Cookie):
(WI.Cookie.parseCookieRequestHeader):
(WI.Cookie.parseSetCookieResponseHeader):
Encapsulation for Cookie attributes.

  • UserInterface/Models/Resource.js:

(WI.Resource.prototype.get requestCookies):
(WI.Resource.prototype.get responseCookies):
(WI.Resource.prototype.updateForRedirectResponse):
(WI.Resource.prototype.updateForResponse):
(WI.Resource.prototype.updateWithMetrics):
New computed accessors for requestCookies and responseCookies.

  • UserInterface/Views/NetworkResourceDetailView.js:

(WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
Show the new Cookie View.

  • UserInterface/Views/NetworkTableContentView.css:

(.content-view.network .network-table .icon):
(.network-table li:not(.filler) .cell.name):
(.network-table .cache-type):
(.network-table .error):
(body[dir=ltr] .network-table .cell.name > .status):
(body[dir=rtl] .network-table .cell.name > .status):
(.network-table .cell.name > .status .indeterminate-progress-spinner):
(.showing-detail .network-table .cell:not(.name)):
(.showing-detail .network-table .resizer:not(:first-of-type)):
(.network-table :not(.header) .cell:first-of-type):
Rework these styles to be specific to the .network-table.

  • UserInterface/Views/Table.css:

(.table :not(.header) .cell:first-of-type): Deleted.
Move this to the network table styles, it shouldn't apply to all tables.

  • UserInterface/Views/ResourceCookiesContentView.css:

(.resource-cookies > section > .details.has-table):
(.resource-cookies .table):
(.resource-cookies .table > .header):
Styles for Cookies view and table.

  • UserInterface/Views/ResourceCookiesContentView.js: Added.

(WI.ResourceCookiesContentView):
(WI.ResourceCookiesContentView.prototype.tableNumberOfRows):
(WI.ResourceCookiesContentView.prototype.tableSortChanged):
(WI.ResourceCookiesContentView.prototype.tablePopulateCell):
(WI.ResourceCookiesContentView.prototype.initialLayout):
(WI.ResourceCookiesContentView.prototype._incompleteSectionWithMessage):
(WI.ResourceCookiesContentView.prototype._incompleteSectionWithLoadingIndicator):
(WI.ResourceCookiesContentView.prototype._dataSourceForTable):
(WI.ResourceCookiesContentView.prototype._generateSortComparator):
(WI.ResourceCookiesContentView.prototype._refreshRequestCookiesSection):
(WI.ResourceCookiesContentView.prototype._refreshResponseCookiesSection):
(WI.ResourceCookiesContentView.prototype._sizeForTable):
(WI.ResourceCookiesContentView.prototype._resourceRequestHeadersDidChange):
(WI.ResourceCookiesContentView.prototype._resourceResponseReceived):
Tables for Request and Response cookies. They are simliar with slightly different columns.
Handle simple display and sorting for the tables.

  • UserInterface/Views/ResourceHeadersContentView.js:

(WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection):
Break out Set-Cookie headers as multiple headers. THey should never be combined.

  • UserInterface/Views/Table.js:

(WI.Table.prototype.showColumn):
(WI.Table.prototype.hideColumn):
(WI.Table.prototype._handleHeaderContextMenu):

  • UserInterface/Views/TableColumn.js:

(WI.TableColumn.prototype.get hideable):
(WI.TableColumn.prototype.set hidden):
(WI.TableColumn):
(WI.TableColumn.prototype.setHidden): Deleted.
Make it so some columns can not be hidden. For example the "value" column
in the Cookie tables.

LayoutTests:

  • inspector/unit-tests/cookie-expected.txt: Added.
  • inspector/unit-tests/cookie.html: Added.
12:27 PM Changeset in webkit [223057] by Joseph Pecoraro
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Network Tab - Search Headers Detail View
https://bugs.webkit.org/show_bug.cgi?id=177981

Reviewed by Brian Burg.

  • UserInterface/Base/Main.js:
  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.performSearch):
Rename "Dom" to "DOM" in utility function.

  • UserInterface/Views/ResourceHeadersContentView.css:

(.resource-headers.showing-find-banner .search-highlight):
Search highlight styles.

  • UserInterface/Views/ResourceHeadersContentView.js:

(WI.ResourceHeadersContentView.prototype.get supportsSearch):
(WI.ResourceHeadersContentView.prototype.get numberOfSearchResults):
(WI.ResourceHeadersContentView.prototype.get hasPerformedSearch):
(WI.ResourceHeadersContentView.prototype.set automaticallyRevealFirstSearchResult):
(WI.ResourceHeadersContentView.prototype.performSearch):
(WI.ResourceHeadersContentView.prototype.searchCleared):
(WI.ResourceHeadersContentView.prototype.revealPreviousSearchResult):
(WI.ResourceHeadersContentView.prototype.revealNextSearchResult):
(WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
(WI.ResourceHeadersContentView.prototype._revealSearchResult):
Implement ContentView search behavior.

11:37 AM Changeset in webkit [223056] by sbarati@apple.com
  • 3 edits in trunk/JSTests

3 poly-proto JSC tests timing out on debug after r222827
https://bugs.webkit.org/show_bug.cgi?id=177880
<rdar://problem/34817122>

Unreviewed.

I'm skipping these type profiler tests on debug since they are long running.

  • typeProfiler/deltablue-for-of.js:
  • typeProfiler/getter-richards.js:
11:13 AM Changeset in webkit [223055] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked inspector/dom/csp-big5-hash.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=177608

Unreviewed test garding.

  • platform/mac/TestExpectations:
11:04 AM Changeset in webkit [223054] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, another build fix attempt after r223031

The default constructor of DragTargetResponse is also invoked via initializer list in EventHandler.cpp, so we'll
need to explicitly declare this constructor in the header.

  • page/EventHandler.h:
11:01 AM Changeset in webkit [223053] by Ryan Haddad
  • 15 edits
    2 adds
    2 deletes in trunk

Unreviewed, rolling out r223021.

LayoutTests added with this change are failing.

Reverted changeset:

"[Payment Request] Implement PaymentRequest.show() and
PaymentRequest.hide()"
https://bugs.webkit.org/show_bug.cgi?id=178043
http://trac.webkit.org/changeset/223021

10:56 AM Changeset in webkit [223052] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Blurry captions on retina screens.
https://bugs.webkit.org/show_bug.cgi?id=177560
rdar://problem/17913388

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-10-09
Reviewed by Jer Noble.

No new tests because the contents scale of the captions layer is not exposed to the DOM.

The captions layer contents scale needs to take into account the device screen scale to get the correct resolution for captions.

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):

10:54 AM Changeset in webkit [223051] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Incorrect fullscreen animation when element has a transform.
https://bugs.webkit.org/show_bug.cgi?id=177558
rdar://problem/29603741

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-10-09
Reviewed by Jer Noble.

Use a bit of code from element fullscreen to do this correctly for video fullscreen.
The key is to get the absolute quad from the renderer. This will work for scaling,
But since we still take the bounding box, it won't work for rotations.

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::inlineVideoFrame):

10:52 AM WebKitGTK/2.18.x edited by Adrian Perez de Castro
(diff)
10:27 AM Changeset in webkit [223050] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix the Windows build after r223031

Speculative build fix; no change in behavior.

  • page/EventHandler.h:

(WebCore::EventHandler::DragTargetResponse::DragTargetResponse):

10:24 AM Changeset in webkit [223049] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Reduce includes in Document.h
https://bugs.webkit.org/show_bug.cgi?id=178035

Reviewed by Darin Adler.

  • dom/Document.h:
10:12 AM Changeset in webkit [223048] by jdiggs@igalia.com
  • 6 edits
    2 adds in trunk

AX: [ATK] Explicitly-set aria-sort value of "none" should be exposed as an object attribute
https://bugs.webkit.org/show_bug.cgi?id=177955

Reviewed by Chris Fleizach.

Source/WebCore:

Expose "none" as the value of aria-sort when the attribute is present and not
one of the other valid sort types. Also add a new AccessibilitySortDirection,
SortDirectionInvalid. This is currently only being used when the sort direction
is sought for a role which does not support this ARIA attribute, but might come
in handy if we want to add further sanity checks on the author-provided values.

Test: accessibility/gtk/aria-sort-values.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::sortDirection const):

  • accessibility/AccessibilityObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):

LayoutTests:

  • accessibility/gtk/aria-sort-values-expected.txt: Added.
  • accessibility/gtk/aria-sort-values.html: Added.
9:49 AM Changeset in webkit [223047] by rmorisset@apple.com
  • 50 edits in trunk/Source

Source/JavaScriptCore:
Make the names of the options consistent
https://bugs.webkit.org/show_bug.cgi?id=177933

Reviewed by Saam Barati.

I added an alias so the old spelling still works.
I also fixed a bunch of typos in comments all around the codebase.

  • b3/B3LowerToAir.cpp:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGSSAConversionPhase.h:
  • dfg/DFGSpeculativeJIT.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):

  • ftl/FTLOSREntry.cpp:

(JSC::FTL::prepareOSREntry):

  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::prepareForTailCall):

  • parser/Nodes.h:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseExportDeclaration):

  • runtime/Options.h:

Source/WebCore:
Make the names of the options consistent
https://bugs.webkit.org/show_bug.cgi?id=177933

Reviewed by Saam Barati.

No functional change, just fixing comments.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::buffered const):
(WebCore::MediaSource::monitorSourceBuffers):

  • Modules/webaudio/AudioBufferSourceNode.cpp:

(WebCore::AudioBufferSourceNode::process):

  • bindings/scripts/generate-bindings.pl:
  • css/StyleResolver.cpp:

(WebCore::StyleResolver::adjustRenderStyle):

  • editing/BreakBlockquoteCommand.cpp:

(WebCore::BreakBlockquoteCommand::doApply):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::doApply):

  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):

  • editing/VisibleUnits.cpp:

(WebCore::closestWordBoundaryForPosition):

  • html/parser/AtomicHTMLToken.h:
  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::end):

  • inspector/InspectorOverlayPage.js:

(reset):

  • page/ViewportConfiguration.cpp:

(WebCore::ViewportConfiguration::layoutWidth const):
(WebCore::ViewportConfiguration::layoutHeight const):

  • platform/graphics/FloatPolygon.h:
  • platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:

(WebCore::InbandTextTrackPrivateAVF::processCueAttributes):

  • platform/graphics/filters/FilterOperation.h:
  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::texImage2D):

  • platform/mac/WidgetMac.mm:

(WebCore::safeRemoveFromSuperview):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::collapseMarginsWithChildInfo):

  • rendering/RenderBlockFlow.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePositionedLogicalWidthReplaced const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::propagateRepaintToParentWithOutlineAutoIfNeeded const):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::disabledTextColor const):

  • style/ClassChangeInvalidation.cpp:

(WebCore::Style::computeClassChange):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::didChangeStyleSheetEnvironment):

  • svg/SVGAltGlyphDefElement.cpp:

(WebCore::SVGAltGlyphDefElement::hasValidGlyphElements const):

Source/WebKit:
Make the names of the options consistent
https://bugs.webkit.org/show_bug.cgi?id=177933

Reviewed by Saam Barati.

  • NetworkProcess/capture/json.hpp:
  • Platform/IPC/Connection.cpp:

(IPC::Connection::connectionDidClose):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _keyboardWillHide:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runModal):

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::selectWithGesture):

Source/WebKitLegacy/mac:
Make the names of the options consistent
https://bugs.webkit.org/show_bug.cgi?id=177933

Reviewed by Saam Barati.

  • WebView/WebFrame.h:
  • WebView/WebHTMLView.mm:

(-[WebHTMLView setMarkedText:selectedRange:]):

  • WebView/WebView.h:
9:37 AM Changeset in webkit [223046] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/media-source/media-source-paint-to-canvas.html as failing.
https://bugs.webkit.org/show_bug.cgi?id=178083

Unreviewed test gardening.

  • platform/mac/TestExpectations:
9:04 AM Changeset in webkit [223045] by Adrian Perez de Castro
  • 6 edits in trunk

[WPE][GTK] Propagate libepoxy compiler flags obtained from pkg-config
https://bugs.webkit.org/show_bug.cgi?id=178081

Reviewed by Carlos Alberto Lopez Perez.

.:

  • Source/cmake/FindLibEpoxy.cmake: Define the ${LIBEPOXY_DEFINITIONS} variable when libepoxy

is found by pkg-config. This contains the value of the "Cflags" field from "epoxy.pc".

Source/WebCore:

No new tests needed.

  • CMakeLists.txt: Use ${LIBEPOXY_DEFINITIONS} for building WebCore.

Source/WebKit:

  • CMakeLists.txt: Use ${LIBEPOXY_DEFINITIONS} for building WebKit.
5:53 AM Changeset in webkit [223044] by romain.bellessort@crf.canon.fr
  • 3 edits in trunk/Source/WebCore

[Readable Streams API] Implement canCloseOrEnqueue
https://bugs.webkit.org/show_bug.cgi?id=178005

Reviewed by Youenn Fablet.

Implemented readableStreamDefaultControllerCanCloseOrEnqueue [1]. This is
just a refactoring (based on spec) aiming at factorizing a set of tests
that are done at multiple places.

[1] https://streams.spec.whatwg.org/#readable-stream-default-controller-can-close-or-enqueue

No new tests (refactoring, no new behavior).

  • Modules/streams/ReadableStreamDefaultController.js:

(enqueue): Updated.
(close): Updated.

  • Modules/streams/ReadableStreamInternals.js:

(readableStreamDefaultControllerClose): Updated.
(readableStreamDefaultControllerCanCloseOrEnqueue): Added.

5:48 AM WebKitGTK/2.18.x edited by clopez@igalia.com
(diff)
5:46 AM WebKitGTK/2.16.x edited by clopez@igalia.com
(diff)
2:59 AM Changeset in webkit [223043] by gskachkov@gmail.com
  • 5 edits in trunk

Safari 10 /11 problem with if (!await get(something)).
https://bugs.webkit.org/show_bug.cgi?id=176685

Reviewed by Saam Barati.

JSTests:

  • stress/async-await-basic.js:

(awaitEpression.async):

  • stress/async-await-syntax.js:

(testTopLevelAsyncAwaitSyntaxSloppyMode.testSyntax):
(prototype.testTopLevelAsyncAwaitSyntaxStrictMode):

Source/JavaScriptCore:

Using unary operator before await lead to count it as identifier.
According to spec https://tc39.github.io/ecma262/#sec-async-function-definitions
and Note 1 await is as AwaitExpression and it is allowed to use unary operator

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parsePrimaryExpression):

2:08 AM Changeset in webkit [223042] by fred.wang@free.fr
  • 9 edits
    1 add
    1 delete in trunk

Remove WOFF2 from Source/ThirdParty.
https://bugs.webkit.org/show_bug.cgi?id=177862

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-05
Reviewed by Michael Catanzaro.

.:

  • Source/CMakeLists.txt: Do not build the woff2 source.
  • Source/cmake/FindWOFF2Dec.cmake: Added. New cmake module for woff2.
  • Source/cmake/OptionsGTK.cmake: Load the woff2 package.

Source/ThirdParty:

  • woff2/CMakeLists.txt: Removed.
  • woff2/LICENSE: Removed.
  • woff2/README.webkit: Removed.
  • woff2/include/woff2/decode.h: Removed.
  • woff2/include/woff2/encode.h: Removed.
  • woff2/include/woff2/output.h: Removed.
  • woff2/src/buffer.h: Removed.
  • woff2/src/convert_woff2ttf_*.cc: Removed.
  • woff2/src/file.h: Removed.
  • woff2/src/font.cc: Removed.
  • woff2/src/font.h: Removed.
  • woff2/src/glyph.cc: Removed.
  • woff2/src/glyph.h: Removed.
  • woff2/src/normalize.cc: Removed.
  • woff2/src/normalize.h: Removed.
  • woff2/src/port.h: Removed.
  • woff2/src/round.h: Removed.
  • woff2/src/store_bytes.h: Removed.
  • woff2/src/table_tags.cc: Removed.
  • woff2/src/table_tags.h: Removed.
  • woff2/src/transform.cc: Removed.
  • woff2/src/transform.h: Removed.
  • woff2/src/variable_length.cc: Removed.
  • woff2/src/variable_length.h: Removed.
  • woff2/src/woff2_common.cc: Removed.
  • woff2/src/woff2_common.h: Removed.
  • woff2/src/woff2_compress.cc: Removed.
  • woff2/src/woff2_dec.cc: Removed.
  • woff2/src/woff2_decompress.cc: Removed.
  • woff2/src/woff2_enc.cc: Removed.
  • woff2/src/woff2_info.cc: Removed.
  • woff2/src/woff2_out.cc: Removed.
  • woff2/update.sh: Removed.

Source/WebCore:

No new tests, already covered by existing tests.

  • CMakeLists.txt: Use the system brotli/woff2 headers/libraries.

Tools:

  • Scripts/webkitpy/style/checker.py: Remove woff2.
  • gtk/jhbuild.modules: Add new jhbuild module for woff2.

Oct 8, 2017:

9:08 PM Changeset in webkit [223041] by commit-queue@webkit.org
  • 4 edits in trunk

It should be possible to create a ListHashSet with a std::initializer_list.
https://bugs.webkit.org/show_bug.cgi?id=178070

Patch by Sam Weinig <sam@webkit.org> on 2017-10-08
Reviewed by Darin Adler.

Source/WTF:

  • wtf/ListHashSet.h:

(WTF::U>::ListHashSet):
Add a constructor that takes a std::initializer_list.

Tools:

  • TestWebKitAPI/Tests/WTF/ListHashSet.cpp:

(TestWebKitAPI::TEST):
Add a test for using std::initializer_list with ListHashSet.

8:43 PM Changeset in webkit [223040] by weinig@apple.com
  • 2 edits in trunk/Source/WTF

Address additional feedback from Darin for r223039 and sort the using declarations.

  • wtf/Vector.h:
8:08 PM Changeset in webkit [223039] by commit-queue@webkit.org
  • 4 edits in trunk

There should be a version of copyToVector that returns a Vector, rather than using an out parameter
https://bugs.webkit.org/show_bug.cgi?id=177732

Patch by Sam Weinig <sam@webkit.org> on 2017-10-08
Reviewed by Saam Barati.

Source/WTF:

Add two new helper functions, copyToVector and copyToVectorOf, which will be able to
replace the existing out parameter taking copyToVector. Like it's ancestral namesake,
copyToVector takes an object that is both iterable (supports begin() and end()) and
has a size, and returns a Vector with a copy of all the items iterated. The copyToVectorOf
variant allow the user to specify a type to convert to, so if you have a HashSet<int>
but want those as floats in a Vector, you can do:

auto floatVector = copyToVectorOf<float>(intSet);

  • wtf/Vector.h:

(WTF::copyToVector):
(WTF::copyToVectorOf):

Tools:

  • TestWebKitAPI/Tests/WTF/Vector.cpp:

(TestWebKitAPI::TEST):
Add tests for the new copyToVector and copyToVectorOf functions.

6:10 PM Changeset in webkit [223038] by webkit@devinrousso.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: add autocompletion for min/max within a CSS calc
https://bugs.webkit.org/show_bug.cgi?id=178068

Reviewed by Joseph Pecoraro.

  • UserInterface/Models/CSSKeywordCompletions.js:

(WI.CSSKeywordCompletions.forFunction):

5:44 PM Changeset in webkit [223037] by sbarati@apple.com
  • 3 edits in trunk/JSTests

Unreviewed. Make some type profiler tests run for less time to avoid debug timeouts.

  • typeProfiler/deltablue-for-of.js:
  • typeProfiler/getter-richards.js:
5:11 PM Changeset in webkit [223036] by Darin Adler
  • 10 edits in trunk

Update HTMLOListElement.start to behavior from latest HTML specification
https://bugs.webkit.org/show_bug.cgi?id=178057

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-expected.txt:
  • web-platform-tests/html/semantics/grouping-content/the-ol-element/ol.start-reflection-2-expected.txt:

Updated to expect more tests to pass.

Source/WebCore:

  • html/HTMLOListElement.cpp:

(optionalValue): Added. Helper function that we can put into Expected.h later
if we like; makes it easier to turn Expected into std::optional.
(WebCore::HTMLOListElement::HTMLOListElement): Moved data member initialization
into class definition so it doesn't have to be done here.
(WebCore::HTMLOListElement::parseAttribute): Simplified using the new
optionalValue function. Moved the call to update values in here since it's
a trivial one-liner (albeit done twice).
(WebCore::HTMLOListElement::updateItemValues): Deleted. Moved this into the
parseAttribute function.
(WebCore::HTMLOListElement::itemCount): Updated to use std::optional instead
of a separate m_shouldRecalculateItemCount flag. Also inlined the
recalculateItemCount function since it's a trivial one-liner.
(WebCore::HTMLOListElement::itemCountAfterLayout): Deleted. The only use of
this was to implement the now-obsolete behavior of the start attribute.
(WebCore::HTMLOListElement::recalculateItemCount): Deleted. Moved this into
the itemCount function.

  • html/HTMLOListElement.h: Changed startForBindings to return 1 when start

is not specified; this what the HTML specification now calls for. Updated
for the changes above. Merged m_itemCount and m_shouldRecalculateItemCount
into a single optional m_itemCount, and made it mutable so it can be
computed as a side effect of calling the const member function start.

LayoutTests:

  • fast/lists/ol-reversed-simple-expected.txt:
  • fast/lists/ol-reversed-simple.html:
  • fast/lists/ol-reversed-simple.xhtml:

Updated test and results to expect the new behavior.

3:17 PM Changeset in webkit [223035] by Darin Adler
  • 18 edits in trunk

Fix bugs related to setting reflected floating point DOM attributes
https://bugs.webkit.org/show_bug.cgi?id=178061

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/html/dom/reflection-forms-expected.txt:

Updated to expect meter reflection tests to pass.

Source/WebCore:

  • html/HTMLProgressElement.cpp:

(WebCore::HTMLProgressElement::setValue): Changed the semantics to match what
the HTML specification calls for. When a caller passes a negative number or
zero, the value does get set on the element. Negative numbers are not allowed
when you get the current value, but are allowed to be set.
(WebCore::HTMLProgressElement::setMax): Changed the semantics to match what
the HTML specification calls for. When a caller passes a negative number or
zero, this should leave the attribute unchanged.

  • html/shadow/MediaControlElementTypes.cpp:

(WebCore::MediaControlVolumeSliderElement::setVolume): Use
String::numberToStringECMAScript instead of String::number since that is what
we want any time we are setting an attribute value from a floating point value.

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlTimelineElement::setPosition): Ditto.
(WebCore::MediaControlTimelineElement::setDuration): Removed unneeded check
of std::isfinite since the single caller already checks that.

Source/WTF:

  • wtf/dtoa.cpp:

(WTF::formatStringTruncatingTrailingZerosIfNeeded): Fix a bug where
this function would remove trailing zeroes from the exponent if
present instead of from the mantissa. This meant that it would
format 1e10 as "1.00000e+1" instead of "1e+10". Added regression
tests for this to TestWebKitAPI.

  • wtf/dtoa/utils.h:

(WTF::double_conversion::StringBuilder::RemoveCharacters): Added.
Used by the fix above.

  • wtf/text/AtomicString.cpp:

(WTF::AtomicString::number): Note: This function is used by code
that sets the values of reflected floating point DOM attributes.
Changed the function to use the rules from numberToString rather
ones from numberToFixedPrecisionString. This is analogous to
String::numberToStringECMAScript, and in the future we should change
String and StringBuilder so this "ECMAScript" semantic is the default
way to convert a floating point number to a string, and rename the fixed
precision version that is currently called String::number. I audited
the small number of sites calling AtomicString::number, by temporarily
renaming it, and discovered that this is the correct behavior for all;
none needed fixed precision. Also, fixed a mistake where this explicitly
converted to String. That was defeating the purpose of having these
functions in AtomicString: It would allocate a new String and then
destroy it in the case where an equal string was already in the
AtomicString table.

Tools:

  • TestWebKitAPI/Tests/WTF/AtomicString.cpp: Added a test of the

AtomicString::number function, based on the test cases we already
had for String::numberToStringECMAScript, and with some additional
cases with powers of 10 that check handling of trailng zeroes.

  • TestWebKitAPI/Tests/WTF/WTFString.cpp: Added test cases to the

existing tests of the String::numberToStringECMAScript function
as above. Also added tests for String::number and for
String::numberToStringFixedWidth. Also changed the tests to all use
EXPECT instead of ASSERT macros since these are all non-fatal.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::dumpFrameScrollPosition): Use StringBuilder::appendECMAScriptNumber
instead of String::number.

LayoutTests:

  • fast/dom/HTMLProgressElement/set-progress-properties-expected.txt: Updated test to expect

setting HTMLProgressElement.max to 0 to have no effect, rather than setting max to "1".

  • fast/dom/HTMLProgressElement/set-progress-properties.html: Ditto.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:

Updated to expect meter reflection tests to pass.

2:58 PM Changeset in webkit [223034] by wenson_hsieh@apple.com
  • 11 edits
    4 adds in trunk

DataTransfer.items does not contain items for custom types supplied via add or setData
https://bugs.webkit.org/show_bug.cgi?id=178016

Reviewed by Darin Adler.

Source/WebCore:

Minor tweaks to expose pasteboard types and data through DataTransfer's item list. This patch fixes two primary
issues: (1) custom pasteboard data is not exposed through the item list in any way, and (2) the "Files"
compatibility type is exposed as a separate data transfer item of kind 'string' when dropping or pasting files.

Tests: editing/pasteboard/data-transfer-items-add-custom-data.html

editing/pasteboard/data-transfer-items-drop-file.html

  • dom/DataTransfer.cpp:

(WebCore::normalizeType):

Use stripLeadingAndTrailingHTMLSpaces instead of stripWhitespace.

(WebCore::shouldReadOrWriteTypeAsCustomData):
(WebCore::DataTransfer::getDataForItem const):
(WebCore::DataTransfer::getData const):

Add getDataForItem, a version of getData that does not normalize types before reading from the pasteboard. This
normalization step is only needed for backwards compatibility with legacy types (such as "text" and "url")
written to and read from using getData and setData; when using DataTransferItemList.add to set data, adding data
for these types should instead write as custom pasteboard data.

(WebCore::DataTransfer::setDataFromItemList):
(WebCore::DataTransfer::types const):
(WebCore::DataTransfer::typesForItemList const):

Add typesForItemList, which fetches the list of types to expose as items on the DataTransfer. Importantly, this
does not include the "Files" type added for compatibility when accessing DataTransfer.types, instead returning
an empty array. The actual files are added separately, by iterating over DataTransfer's files in ensureItems.

Note that when starting a drag or copying, we will still expose the full list of file and string types to
bindings and not just file-backed items. Since all of this information is supplied by the page in the first
place, we don't have to worry about exposing information, such as file paths, that may exist on the pasteboard.

  • dom/DataTransfer.h:
  • dom/DataTransferItem.cpp:

(WebCore::DataTransferItem::getAsString const):

  • dom/DataTransferItemList.cpp:

(WebCore::shouldExposeTypeInItemList):
(WebCore::DataTransferItemList::add):
(WebCore::DataTransferItemList::ensureItems const):
(WebCore::isSupportedType): Deleted.

LayoutTests:

Adds new layout tests to check DataTransfer.items when dropping a file, and when copying and pasting with custom
pasteboard data types. Tweaks an existing test to adjust for normalizeType stripping HTML whitespace rather than
ASCII whitespace.

  • TestExpectations:
  • editing/pasteboard/data-transfer-get-data-non-normalized-types-expected.txt:
  • editing/pasteboard/data-transfer-get-data-non-normalized-types.html:
  • editing/pasteboard/data-transfer-items-add-custom-data-expected.txt: Added.
  • editing/pasteboard/data-transfer-items-add-custom-data.html: Added.
  • editing/pasteboard/data-transfer-items-drop-file-expected.txt: Added.
  • editing/pasteboard/data-transfer-items-drop-file.html: Added.
  • platform/ios-simulator-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
1:30 PM Changeset in webkit [223033] by dino@apple.com
  • 2 edits in trunk/Tools

Make sort-Xcode-project file handle UnifiedSources
https://bugs.webkit.org/show_bug.cgi?id=178042

Reviewed by Sam Weinig.

Sort the UnifiedSource(\d+) files by number rather
than alphabetically.

  • Scripts/sort-Xcode-project-file:

(sortChildrenByFileName):
(sortFilesByFileName):

10:18 AM Changeset in webkit [223032] by Darin Adler
  • 7 edits in trunk

CustomElementRegistry.define was throwing a JavaScript syntax error instead of a DOM syntax error
https://bugs.webkit.org/show_bug.cgi?id=178055

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/custom-elements/custom-element-registry/define-expected.txt:

Updated to expect more tests to pass.

Source/WebCore:

Both the JavaScript language and the DOM have "syntax error" exceptions, but
they are not the same thing.

Also, since the time a while back where we moved JavaScript error handling to
use WebCore::Exception and WebCore::ExceptionOr, there are a number of functions
that are no longer used and can be deleted.

  • bindings/js/JSCustomElementRegistryCustom.cpp:

(WebCore::validateCustomElementNameAndThrowIfNeeded): Call throwDOMSyntaxError
instead of throwSyntaxError.

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::reportDeprecatedGetterError): Deleted. Unused.
(WebCore::reportDeprecatedSetterError): Deleted. Unused.
(WebCore::throwNotSupportedError): Deleted the overload without an error message,
since it's unused. Changed the other overload to take an ASCIILiteral, since
that is what all the callers need.
(WebCore::throwInvalidStateError): Take ASCIILiteral as above.
(WebCore::throwArrayElementTypeError): Deleted. Unused.
(WebCore::throwDOMSyntaxError): Added an ASCIILiteral message argument. This
function was unused; it's now being used above, always with a literal message.
(WebCore::throwIndexSizeError): Deleted. Unused.
(WebCore::throwTypeMismatchError): Deleted. Unused.

  • bindings/js/JSDOMExceptionHandling.h: Updated for the changes above.
  • bindings/js/JSHTMLElementCustom.cpp:

(WebCore::constructJSHTMLElement): Fixed a typo in the error message.

3:08 AM Changeset in webkit [223031] by rniwa@webkit.org
  • 10 edits
    2 adds in trunk

dragenter and dragleave shouldn't use the same data transfer object
https://bugs.webkit.org/show_bug.cgi?id=178056

Reviewed by Darin Adler.

Source/WebCore:

This patch fixes the bug that we were using a single DataTransfer to fire dragleave and dragenter events
when the drag target moves from one element to another.

It alos refactors DragController and EventHandler code so that the construction of DataTransfer object
happens in EventHandler instead of DragController, and extracts createForUpdatingDropTarget out of
createForDrop to have a better encapsulation over the data store mode.

drag related functions in EventHandler now takes std::unique_ptr<Pasteboard>&&, drag operation mask set
by the drag source, and a boolean indicating whether this drag & drop is for files or not. updateDragAndDrop
takes a closure which makes a pasteboard because it has to create two instances of DataTransfer one for
dragleave event and another one for dragenter event in some cases.

Test: editing/pasteboard/data-transfer-is-unique-for-dragenter-and-dragleave.html

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::createForDrop): Now takes Pasteboard instead of DragData.
(WebCore::DataTransfer::createForUpdatingDropTarget): Extracted out of createForDrop. Moved the code to
use Readonly mode in dashboad here from createDataTransferToUpdateDrag in DragController.cpp.

  • dom/DataTransfer.h:
  • page/DragController.cpp:

(WebCore::createDataTransferToUpdateDrag): Deleted.
(WebCore::DragController::dragExited):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::tryDHTMLDrag):

  • page/EventHandler.cpp:

(WebCore::EventHandler::dispatchDragEvent): Made this fucntion take DataTransfer& instead of DataTransfer*.
(WebCore::findDropZone): Ditto.
(WebCore::EventHandler::dispatchDragEnterOrDragOverEvent): Added.
(WebCore::EventHandler::updateDragAndDrop):
(WebCore::EventHandler::cancelDragAndDrop):
(WebCore::EventHandler::performDragAndDrop):
(WebCore::EventHandler::dispatchDragSrcEvent):
(WebCore::EventHandler::dispatchDragStartEventOnSourceElement):

  • page/EventHandler.h:

LayoutTests:

Added a regression test for checking the uniqueness of dataTransfer object for dragenter and dragleave events.
Unfortunately, the test is only runnable in Mac WebKit1 port due to the lack of support in WebKitTestRunner.

  • TestExpectations:
  • editing/pasteboard/data-transfer-is-unique-for-dragenter-and-dragleave-expected.txt: Added.
  • editing/pasteboard/data-transfer-is-unique-for-dragenter-and-dragleave.html: Added.
  • platform/mac-wk1/TestExpectations:
1:00 AM Changeset in webkit [223030] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

mediaPlaybackRequiresUserAction API replacement annotation is wrong
https://bugs.webkit.org/show_bug.cgi?id=178063

Reviewed by Dan Bernstein.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.h:

mediaPlaybackRequiresUserAction suggests that you should use
requiresUserActionForMediaPlayback instead, but that is also deprecated.
Instead, follow the chain and suggest mediaTypesRequiringUserActionForPlayback.

12:52 AM Changeset in webkit [223029] by jer.noble@apple.com
  • 5 edits
    1 copy
    1 add in trunk

SourceBuffer remove throws out way more content than requested
https://bugs.webkit.org/show_bug.cgi?id=177884
<rdar://problem/34817104>

Reviewed by Darin Adler.

Source/WebCore:

Test: media/media-source/media-source-remove-too-much.html

The end parameter is exclusive, not inclusive, of the range to be removed.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::removeCodedFrames):

LayoutTests:

  • media/media-source/media-source-remove-decodeorder-crash-expected.txt:
  • media/media-source/media-source-remove-decodeorder-crash.html:
  • media/media-source/media-source-remove-too-much-expected.txt: Added.
  • media/media-source/media-source-remove-too-much.html: Added.
12:47 AM Changeset in webkit [223028] by Brent Fulgham
  • 3 edits
    2 adds in trunk

Nullptr deref in WebCore::Node::computeEditability
https://bugs.webkit.org/show_bug.cgi?id=177905
<rdar://problem/34138402>

Reviewed by Darin Adler.

Source/WebCore:

Script can run when setting focus, because a blur event and a focus event are generated.
A handler for one of these events can cause the focused element to be cleared. We should
handle this possibility gracefully.

Test: fast/dom/focus-shift-crash.html

  • dom/Document.cpp:

(WebCore::Document::setFocusedElement):

LayoutTests:

  • fast/dom/focus-shift-crash-expected.txt: Added.
  • fast/dom/focus-shift-crash.html: Added.

Oct 7, 2017:

8:15 PM Changeset in webkit [223027] by fpizlo@apple.com
  • 36 edits
    1 add
    1 delete in trunk/Source/JavaScriptCore

direct-construct-arity-mismatch.js can have GCs that take ~70ms if you force poly proto and disable generational GC
https://bugs.webkit.org/show_bug.cgi?id=178051

Reviewed by Saam Barati.

After I studied the profile of this test, I found two pathologies in our code relating to
prototypes. I think that now that we support poly proto, it's more likely for these pathologies to
happen. Also, the fact that we force poly proto in some tests, it's possible for one of our tests
to trigger these pathologies.

  • WeakGCMap::m_prototoypes is the set of all prototypes. That's super dangerous. This patch turns this into a bit in the JSCell header. It uses the last spare bit in indexingTypeAndMisc. Note that we still have 6 spare bits in cellState, but those are a bit more annoying to get at.


  • WeakGCMap registers itself with GC using a std::function. That means allocating things in the malloc heap. This changes it to a virtual method on WeakGCMap. I don't know for sure that this is a problem area, but there are places where we could allocate a lot of WeakGCMaps, like if we have a lot of transition tables. It's good to reduce the amount of memory those require.


Also, I saw a FIXME about turning the std::tuple in PrototypeMap into a struct, so I did that while
I was at it. I initially thought that this would have to be part of my solution, but it turned out
not to be. I think it's worth landing anyway since it makes the code a lot more clear.

This fixes the timeout in that test and probably reduces memory consumption.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGOperations.cpp:
  • heap/Heap.cpp:

(JSC::Heap::pruneStaleEntriesFromWeakGCMaps):
(JSC::Heap::registerWeakGCMap):
(JSC::Heap::unregisterWeakGCMap):

  • heap/Heap.h:
  • inspector/JSInjectedScriptHostPrototype.cpp:

(Inspector::JSInjectedScriptHostPrototype::finishCreation):

  • inspector/JSJavaScriptCallFramePrototype.cpp:

(Inspector::JSJavaScriptCallFramePrototype::finishCreation):

  • runtime/ArrayIteratorPrototype.cpp:

(JSC::ArrayIteratorPrototype::finishCreation):

  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::finishCreation):

  • runtime/AsyncFromSyncIteratorPrototype.cpp:

(JSC::AsyncFromSyncIteratorPrototype::finishCreation):

  • runtime/AsyncFunctionPrototype.cpp:

(JSC::AsyncFunctionPrototype::finishCreation):

  • runtime/AsyncGeneratorFunctionPrototype.cpp:

(JSC::AsyncGeneratorFunctionPrototype::finishCreation):

  • runtime/AsyncGeneratorPrototype.cpp:

(JSC::AsyncGeneratorPrototype::finishCreation):

  • runtime/AsyncIteratorPrototype.cpp:

(JSC::AsyncIteratorPrototype::finishCreation):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/GeneratorFunctionPrototype.cpp:

(JSC::GeneratorFunctionPrototype::finishCreation):

  • runtime/GeneratorPrototype.cpp:

(JSC::GeneratorPrototype::finishCreation):

  • runtime/IndexingType.h:
  • runtime/IteratorPrototype.cpp:

(JSC::IteratorPrototype::finishCreation):

  • runtime/JSCInlines.h:
  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::mayBePrototype const):
(JSC::JSCell::didBecomePrototype):

  • runtime/JSObject.cpp:

(JSC::JSObject::notifyPresenceOfIndexedAccessors):
(JSC::JSObject::setPrototypeDirect):

  • runtime/JSProxy.cpp:

(JSC::JSProxy::setTarget):

  • runtime/MapIteratorPrototype.cpp:

(JSC::MapIteratorPrototype::finishCreation):

  • runtime/MapPrototype.cpp:

(JSC::MapPrototype::finishCreation):

  • runtime/ObjectPrototype.cpp:

(JSC::ObjectPrototype::finishCreation):

  • runtime/PrototypeKey.h: Added.

(JSC::PrototypeKey::PrototypeKey):
(JSC::PrototypeKey::prototype const):
(JSC::PrototypeKey::inlineCapacity const):
(JSC::PrototypeKey::classInfo const):
(JSC::PrototypeKey::globalObject const):
(JSC::PrototypeKey::operator== const):
(JSC::PrototypeKey::operator!= const):
(JSC::PrototypeKey::operator bool const):
(JSC::PrototypeKey::isHashTableDeletedValue const):
(JSC::PrototypeKey::hash const):
(JSC::PrototypeKeyHash::hash):
(JSC::PrototypeKeyHash::equal):

  • runtime/PrototypeMap.cpp:

(JSC::PrototypeMap::createEmptyStructure):
(JSC::PrototypeMap::clearEmptyObjectStructureForPrototype):

  • runtime/PrototypeMap.h:

(JSC::PrototypeMap::PrototypeMap):

  • runtime/PrototypeMapInlines.h: Removed.
  • runtime/SetIteratorPrototype.cpp:

(JSC::SetIteratorPrototype::finishCreation):

  • runtime/SetPrototype.cpp:

(JSC::SetPrototype::finishCreation):

  • runtime/StringIteratorPrototype.cpp:

(JSC::StringIteratorPrototype::finishCreation):

  • runtime/WeakGCMap.h:

(JSC::WeakGCMapBase::~WeakGCMapBase):

  • runtime/WeakGCMapInlines.h:

(JSC::KeyTraitsArg>::WeakGCMap):

  • runtime/WeakMapPrototype.cpp:

(JSC::WeakMapPrototype::finishCreation):

  • runtime/WeakSetPrototype.cpp:

(JSC::WeakSetPrototype::finishCreation):

7:55 PM Changeset in webkit [223026] by Yusuke Suzuki
  • 5 edits in trunk/PerformanceTests

Unreviewed, build fix for MallocBench in Linux 32bit
https://bugs.webkit.org/show_bug.cgi?id=177856

  • MallocBench/MallocBench/Interpreter.cpp:

(Interpreter::Interpreter):
(Interpreter::readOps):
Suppress warnings in some GCC versions.

  • MallocBench/MallocBench/big.cpp:

(benchmark_big):

  • MallocBench/MallocBench/medium.cpp:

(benchmark_medium):
Build fix for Linux 32bit.

  • MallocBench/MallocBench/message.cpp:

(benchmark_message_many):
Use more efficient WorkQueue allocation.

7:06 PM Changeset in webkit [223025] by Yusuke Suzuki
  • 2 edits in trunk/Source/bmalloc

Unreviewed, disable Gigacage on ARM64 Linux
https://bugs.webkit.org/show_bug.cgi?id=177586

Gigacage's LLInt change breaks ARM64 Linux.
Currently we do not have maintainers for this.
Let's simply disable it.

  • bmalloc/Gigacage.h:
6:10 PM Changeset in webkit [223024] by fpizlo@apple.com
  • 11 edits in trunk/Source/JavaScriptCore

Octane/splay can leak memory due to stray pointers on the stack when run from the command line
https://bugs.webkit.org/show_bug.cgi?id=178054

Reviewed by Saam Barati.

This throws in a bunch of sanitize calls. It fixes the problem. It's also performance-neutral. In
most cases, calling the sanitize function is O(1), because it doesn't have anything to do if the stack
height stays relatively constant.

  • dfg/DFGOperations.cpp:
  • dfg/DFGTierUpCheckInjectionPhase.cpp:

(JSC::DFG::TierUpCheckInjectionPhase::run):

  • ftl/FTLOSREntry.cpp:
  • heap/Heap.cpp:

(JSC::Heap::runCurrentPhase):

  • heap/MarkedAllocatorInlines.h:

(JSC::MarkedAllocator::tryAllocate):
(JSC::MarkedAllocator::allocate):

  • heap/Subspace.cpp:

(JSC::Subspace::tryAllocateSlow):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::sanitizeStackInline):

  • jit/ThunkGenerators.cpp:

(JSC::slowPathFor):

  • runtime/VM.h:

(JSC::VM::addressOfLastStackTop):

4:44 PM Changeset in webkit [223023] by Darin Adler
  • 12 edits in trunk

Update Document.createEvent for recent DOM specification changes
https://bugs.webkit.org/show_bug.cgi?id=178052

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt: Updated to expect more tests to pass.
  • web-platform-tests/dom/nodes/Document-createEvent-expected.txt: Ditto.
  • web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling-expected.txt: Ditto.

Source/WebCore:

  • dom/BeforeUnloadEvent.cpp:

(WebCore::BeforeUnloadEvent::BeforeUnloadEvent): Added a constructor for
createForBindings.
(WebCore::BeforeUnloadEvent::~BeforeUnloadEvent): Deleted. Just let the
compiler generate this.

  • dom/BeforeUnloadEvent.h: Added createForBindings. Also made more things private.
  • dom/Document.cpp:

(WebCore::Document::createEvent): Updated comments for clarity. Responding to
changes to the DOM specification, added support for "beforeunloadevent", "focusevent",
and "svgevents", moved "keyboardevents" and "popstateevent" into the list of strings
we should remove, and moved "compositionevent", "devicemotionevent",
"deviceorientationevent", "hashchangeevent", "storageevent", and "textevent" into
the list of strings we should keep.

  • dom/Event.h: Added a virtual setRelatedTarget alongside the virtual relatedTarget

to allow us to clean up the code that manipulates it.

  • dom/EventContext.cpp:

(WebCore::MouseOrFocusEventContext::handleLocalEvents const): Call the virtual
setRelatedTarget instead of doing a little type casting dance.

  • dom/FocusEvent.h: Added createForBindings. Made more functions private and

changed setRelatedTarget into a private final override.

  • dom/MouseEvent.h: Changed setRelatedTarget into a private final override.
2:16 PM Changeset in webkit [223022] by Yusuke Suzuki
  • 6 edits
    6 adds in trunk

async should be able to be used as an imported binding name
https://bugs.webkit.org/show_bug.cgi?id=176573

Reviewed by Darin Adler.

JSTests:

  • modules/import-default-async.js: Added.
  • modules/import-named-async-as.js: Added.
  • modules/import-named-async.js: Added.
  • modules/import-named-async/target.js: Added.
  • modules/import-namespace-async.js: Added.

Source/JavaScriptCore:

Previously, we have ASYNC keyword in the parser. This is introduced only for performance,
and ECMA262 spec does not categorize "async" to keyword. This makes parser code complicated,
since ASYNC should be handled as IDENT. If we missed this ASYNC keyword, we cause a bug.
For example, import declaration failed to bind imported binding to the name "async" because
the parser considered ASYNC as keyword.

This patch removes ASYNC keyword from the parser. By carefully handling ASYNC, we can keep
the current performance without using this ASYNC keyword.

  • parser/Keywords.table:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::maybeParseAsyncFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
(JSC::Parser<LexerType>::printUnexpectedTokenText):

  • parser/ParserTokens.h:
  • runtime/CommonIdentifiers.h:
12:24 PM Changeset in webkit [223021] by aestes@apple.com
  • 15 edits
    1 copy
    5 adds
    2 deletes in trunk

[Payment Request] Implement PaymentRequest.show() and PaymentRequest.hide()
https://bugs.webkit.org/show_bug.cgi?id=178043
<rdar://problem/34076639>

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-abort-method.https-expected.txt: Removed.
  • web-platform-tests/payment-request/payment-request-show-method.https-expected.txt: Removed.

Source/WebCore:

Tests: http/tests/paymentrequest/payment-request-abort-method.https.html

http/tests/paymentrequest/payment-request-show-method.https.html

  • Modules/applepay/PaymentSession.h: Virtually inherited from PaymentSessionBase to

accommodate ApplePayPaymentHandler inheriting from both this and PaymentHandler.
(WebCore::PaymentSession::~PaymentSession): Deleted.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::paymentCoordinator): Virtually inherited from PaymentSessionBase to accommodate
ApplePayPaymentHandler inheriting from both this and PaymentSession.
(WebCore::ApplePayPaymentHandler::hasActiveSession): Added. Calls PaymentCoordinator::hasActiveSession().
(WebCore::ApplePayPaymentHandler::show): Added. Calls PaymentCoordinator::beginPaymentSession().
(WebCore::ApplePayPaymentHandler::hide): Added. Calls PaymentCoordinator::abortPaymentSession().

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.h: Inherited from PaymentSession in

addition to PaymentHandler so that this can be PaymentCoordinator active session.

  • Modules/paymentrequest/PaymentHandler.cpp:

(WebCore::PaymentHandler::create):
(WebCore::PaymentHandler::hasActiveSession):

  • Modules/paymentrequest/PaymentHandler.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::~PaymentRequest):
(WebCore::PaymentRequest::show): Rejected the promise if PaymentCoordinator has an active session.
(WebCore::PaymentRequest::abort): Called stop().
(WebCore::PaymentRequest::canSuspendForDocumentSuspension const): Returned true if state is
Interactive and there is an active handler showing.
(WebCore::PaymentRequest::stop): Hid the active session if it's showing, then set state to
Closed and rejected the show promise.

  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/paymentrequest/PaymentSessionBase.h: Added. Inherits from

RefCounted<PaymentSessionBase> and defines a virtual destructor. This allows subclasses to
virtually inherit a single ref-count to support multiple inheritance.

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/scripts/CodeGeneratorJS.pm:

(GetGnuVTableOffsetForType): Added ApplePaySession to the list of classes that need a vtable
offset of 3.

LayoutTests:

Copied payment-request-abort-method.https.html and payment-request-show-method.https.html
from web-platform-tests/payment-request/ and changed the payment method from basic-card to
Apple Pay. This needs to eventually be upstreamed back to WPT.

  • TestExpectations:
  • http/tests/paymentrequest/payment-request-abort-method.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-request-abort-method.https.html: Added.
  • http/tests/paymentrequest/payment-request-show-method.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-request-show-method.https.html: Added.
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
12:04 AM Changeset in webkit [223020] by rniwa@webkit.org
  • 4 edits in trunk/Source/WebCore

WebContentReader::readHTML should be shared between macOS and iOS
https://bugs.webkit.org/show_bug.cgi?id=178044

Reviewed by Wenson Hsieh.

Merged the implementations for WebContentReader::readHTML between macOS and iOS.

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::WebContentReader::readHTML):

  • editing/ios/WebContentReaderIOS.mm:

(WebCore::WebContentReader::readHTML): Deleted.

  • editing/mac/WebContentReaderMac.mm:

(WebCore::WebContentReader::readHTML): Deleted.

12:02 AM Changeset in webkit [223019] by aestes@apple.com
  • 1 edit in trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm

Try to fix the Apple Internal SDK builds after r223014.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

Oct 6, 2017:

9:15 PM Changeset in webkit [223018] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

RenderTable should not hold a collection of raw pointers to RenderTableCaption
https://bugs.webkit.org/show_bug.cgi?id=178026
<rdar://problem/34863090>

Reviewed by Simon Fraser.

Similar to sections, RenderTable should not store captions as raw pointers. Their lifetimes are
not guaranteed to be sync with the RenderTable's.

Covered by existing tests.

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::addCaption):
(WebCore::RenderTable::removeCaption):
(WebCore::RenderTable::addOverflowFromChildren):

  • rendering/RenderTable.h:
  • rendering/RenderTableCaption.cpp:

(WebCore::RenderTableCaption::insertedIntoTree):
(WebCore::RenderTableCaption::willBeRemovedFromTree):

7:36 PM Changeset in webkit [223017] by wenson_hsieh@apple.com
  • 3 edits in trunk/Source/WebKit

[iOS WK2] API tests added in r222991 are failing in iOS 11 test runners
https://bugs.webkit.org/show_bug.cgi?id=178037

Reviewed by Tim Horton.

This patch carries out some minor cleanup around UIKitSPI.h in WebKit2, so that the internal SDK isn't required
to implement -[WKContentView insertTextSuggestion:].

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView insertTextSuggestion:]):

7:33 PM Changeset in webkit [223016] by commit-queue@webkit.org
  • 6 edits
    18 deletes in trunk/LayoutTests

Remove global-constructors-attributes tests
https://bugs.webkit.org/show_bug.cgi?id=178041

Patch by Sam Weinig <sam@webkit.org> on 2017-10-06
Rubber-stamped by Alexey Proskuryakov.

In discusstion with Alexey, we agreed these tests were much more trouble than they
were worth, due to testing very little, but requiring the update of up to eight
platform specific results per global constructor changed.

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt: Removed.
  • js/dom/global-constructors-attributes-dedicated-worker.html: Removed.
  • js/dom/global-constructors-attributes-expected.txt: Removed.
  • js/dom/global-constructors-attributes-idb-expected.txt: Removed.
  • js/dom/global-constructors-attributes-idb.html: Removed.
  • js/dom/global-constructors-attributes.html: Removed.
  • js/dom/script-tests/global-constructors-attributes-idb.js: Removed.
  • js/dom/script-tests/global-constructors-attributes.js: Removed.
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt: Removed.
  • platform/mac-elcapitan-wk2/js/dom/global-constructors-attributes-expected.txt: Removed.
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt: Removed.
  • platform/mac-sierra-wk1/js/dom/global-constructors-attributes-expected.txt: Removed.
  • platform/mac-sierra/js/dom/global-constructors-attributes-expected.txt: Removed.
  • platform/mac-wk1/js/dom/global-constructors-attributes-dedicated-worker-expected.txt: Removed.
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt: Removed.
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt: Removed.
  • platform/mac/js/dom/global-constructors-attributes-expected.txt: Removed.
  • platform/win/js/dom/global-constructors-attributes-expected.txt: Removed.
  • platform/wpe/js/dom/global-constructors-attributes-expected.txt: Removed.
7:29 PM Changeset in webkit [223015] by fpizlo@apple.com
  • 21 edits
    4 adds in trunk

Enable gigacage on iOS
https://bugs.webkit.org/show_bug.cgi?id=177586

Reviewed by JF Bastien.
JSTests:


Add tests for when Gigacage gets runtime disabled.

  • stress/disable-gigacage-arrays.js: Added.

(foo):

  • stress/disable-gigacage-strings.js: Added.

(foo):

  • stress/disable-gigacage-typed-arrays.js: Added.

(foo):

Source/bmalloc:


Introduce the ability to disable gigacage at runtime if allocation fails. If any step of gigacage
allocation fails, we free all of the gigacages and turn off gigacage support.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/Cache.cpp:

(bmalloc::Cache::scavenge):

  • bmalloc/Cache.h:

(bmalloc::Cache::tryAllocate):
(bmalloc::Cache::allocate):
(bmalloc::Cache::deallocate):
(bmalloc::Cache::reallocate):

  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):
(Gigacage::runway):
(Gigacage::totalSize):
(Gigacage::shouldBeEnabled):
(): Deleted.
(Gigacage::Callback::Callback): Deleted.
(Gigacage::Callback::function): Deleted.
(Gigacage::PrimitiveDisableCallbacks::PrimitiveDisableCallbacks): Deleted.

  • bmalloc/Gigacage.h:

(Gigacage::wasEnabled):
(Gigacage::isEnabled):
(Gigacage::runway): Deleted.
(Gigacage::totalSize): Deleted.

  • bmalloc/HeapKind.cpp: Added.

(bmalloc::isActiveHeapKind):
(bmalloc::mapToActiveHeapKind):

  • bmalloc/HeapKind.h:

(bmalloc::isActiveHeapKindAfterEnsuringGigacage):
(bmalloc::mapToActiveHeapKindAfterEnsuringGigacage):

  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::scavenge):

  • bmalloc/bmalloc.h:

(bmalloc::api::tryLargeMemalignVirtual):
(bmalloc::api::freeLargeVirtual):
(bmalloc::api::isEnabled):

Source/JavaScriptCore:

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

Also, this makes the code handle disabling the gigacage a bit better.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::caged):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::cage):
(JSC::AssemblyHelpers::cageConditionally):

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

Tools:


Add a mode to test disabling Gigacage.

  • Scripts/run-jsc-stress-tests:
  • Scripts/webkitruby/jsc-stress-test-writer-default.rb:
5:25 PM Changeset in webkit [223014] by Chris Dumez
  • 4 edits in trunk/Source

[Beacon][Cocoa] Beacon requests with BufferSource payload should not have a Content-Type HTTP header
https://bugs.webkit.org/show_bug.cgi?id=178027
<rdar://problem/34748470>

Reviewed by Youenn Fablet.

Source/WebCore/PAL:

Add new CFNetwork SPI.

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Use new NSURLSessionConfiguration._suppressedAutoAddedHTTPHeaders CFNetwork SPI to
make sure that CFNetwork never adds a Content-Type HTTP headers to our requests
when we did not add one.

This is covered by the following tests on newer OSes:

  • imported/w3c/web-platform-tests/beacon/headers/header-content-type.html
  • http/tests/blink/sendbeacon/beacon-same-origin.html
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

5:18 PM Changeset in webkit [223013] by dbates@webkit.org
  • 5 edits
    2 adds in trunk

Spelling error annotation should encompass hyphen in misspelled word that wraps across multiple lines
https://bugs.webkit.org/show_bug.cgi?id=177980
<rdar://problem/34847454>

Reviewed by Simon Fraser.

Source/WebCore:

On macOS the spelling and grammar annotations for a word or word phrase encompass
hyphenations added because the word or word phrase wraps across more than one line.
The effect tends to be more aesthetically pleasing and consistent with how these
annotations would be pointed out by a person in conversation: by identify the word
or phrase that has a spelling or grammar issue regardless of whether that word or
phrase is broken into halves due to line wrapping. The same argument applies to
other annotations on macOS, including text matches. Therefore, we should always
include any hyphens encompassed by a marker that were added due to line wrapping
when painting the marker.

Test: editing/spelling/spelling-marker-includes-hyphen.html

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paintDocumentMarker): Compute the text run including any
added hyphens. If a hyphen was added then the inline text box represents that text
up to the hyphen. Adjust the end position of the marker to be the length of the text
run if its greater than or equal to the length of the text box.

LayoutTests:

Add a test to ensure that a spelling error decoration encompasses the hyphen for a misspelled
word that is hyphenated because it is broken across more than one line.

  • editing/spelling/spelling-marker-includes-hyphen-expected.html: Added.
  • editing/spelling/spelling-marker-includes-hyphen.html: Added.
  • platform/ios/TestExpectations: Mark the test as WontFix as spelling and

grammar markers are not support on iOS.

5:09 PM Changeset in webkit [223012] by commit-queue@webkit.org
  • 8 edits in trunk

Source/WebKit:
[iOS] Respect the "caret-color" CSS property when editing
https://bugs.webkit.org/show_bug.cgi?id=177489
<rdar://problem/34600419>

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

This change adds support for the caret-color property on iOS.

  • Shared/EditorState.cpp:

(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):

  • Shared/EditorState.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView insertionPointColor]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::platformEditorState const):

Tools:
[iOS] Respect the "caret-color" CSS property when editing
https://bugs.webkit.org/show_bug.cgi?id=177489
<rdar://problem/34600419>

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

Adds test for iOS caret color support.

  • TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/UIKitSPI.h:
4:31 PM Changeset in webkit [223011] by Matt Baker
  • 16 edits
    2 copies
    5 adds in trunk

Web Inspector: Add Canvas tab and CanvasOverviewContentView
https://bugs.webkit.org/show_bug.cgi?id=177604
<rdar://problem/34714650>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

This patch adds experimental feature support for the Canvas tab. Initially
the tab provides only an overview of the canvases in the page, and will
exist side-by-side with the existing experimental Canvas UI.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Main.js:

(WI.contentLoaded):

  • UserInterface/Base/Setting.js:
  • UserInterface/Images/Canvas.svg: Added.
  • UserInterface/Images/CanvasOverview.svg: Added.
  • UserInterface/Main.html:

Add new art and canvas UI classes.

  • UserInterface/Models/Canvas.js:

(WI.Canvas.requestNode):
(WI.Canvas.prototype.requestContent):
(WI.Canvas.prototype.requestCSSCanvasClientNodes):
(WI.Canvas.prototype.requestSize.calculateSize.getAttributeValue):
(WI.Canvas.prototype.requestSize.calculateSize):
(WI.Canvas.prototype.requestSize.getPropertyValue):
(WI.Canvas.prototype.requestSize):
Use promises to retrieve canvas data asynchronously.

  • UserInterface/Models/CollectionTypes.js: Added.

(WI.CanvasCollection):
New location for concrete collection types. Having a class to type check
makes using a collection as a represented object a bit simpler.

  • UserInterface/Views/CanvasContentView.css:

(.content-view.canvas:not(.tab)):
(.content-view.canvas:not(.tab) > .preview):
(.content-view.canvas:not(.tab) > .preview > img):
(.content-view.canvas:not(.tab) > :matches(header, footer)):
(.content-view.canvas): Deleted.
(.content-view.canvas > .preview): Deleted.
(.content-view.canvas > .preview > img): Deleted.
During the transition to the new Canvas tab, CanvasContentView needs to
support being shown as a full-size content view, and as an item in a
CollectionContentView. Hide header and footer elements by default.

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView):
(WI.CanvasContentView.prototype.refresh):
(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype.layout):
(WI.CanvasContentView.prototype.shown):
(WI.CanvasContentView.prototype.attached):
(WI.CanvasContentView.prototype.detached):
(WI.CanvasContentView.prototype._showError):
(WI.CanvasContentView.prototype._refreshPixelSize):
(WI.CanvasContentView.prototype._showGridButtonClicked):
(WI.CanvasContentView.prototype._updateImageGrid):
(WI.CanvasContentView.prototype._updateMemoryCost):
(WI.CanvasContentView.prototype._updatePixelSize):
(WI.CanvasContentView.prototype._updateRecordNavigationItem):
(WI.CanvasContentView.prototype.hidden): Deleted.
(WI.CanvasContentView.prototype.closed): Deleted.
(WI.CanvasContentView.prototype._showPreview): Deleted.
Added new UI for display in the Canvas overview. These elements are always
created, but only appear when the canvas is viewed as a "card".

Canvas previews are no longer shown as soon as they are available from
the backend. Instead, once the canvas content is ready a layout is scheduled.
This guarantees that refreshing all canvases at once causes no flicker,
and introduces no perceptible delay.

Finally, the "Cancel recording" tooltip has been renamed "Stop recording",
to match the behavior of the command.

  • UserInterface/Views/CanvasDetailsSidebarPanel.js:

(WI.CanvasDetailsSidebarPanel.prototype._refreshSourceSection.this._canvas.requestNode.): Deleted.
Canvas.prototype.requestNode now returns a promise.

  • UserInterface/Views/CanvasOverviewContentView.css: Added.

(.content-view.canvas-overview):
(.content-view.canvas-overview .content-view.canvas):
(.content-view.canvas-overview .content-view.canvas.selected:not(.is-recording)):
(.content-view.canvas-overview .content-view.canvas > :matches(header, footer)):
(.content-view.canvas-overview .content-view.canvas > header):
(.content-view.canvas-overview .content-view.canvas.is-recording > header):
(.content-view.canvas-overview .content-view.canvas > header > .titles,):
(.content-view.canvas-overview .content-view.canvas > header > .titles > .title):
(.content-view.canvas-overview .content-view.canvas > header > .titles > .subtitle,):
(.content-view.canvas-overview .content-view.canvas > header .subtitle::before):
(.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .title):
(.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .subtitle):
(.content-view.canvas-overview .content-view.canvas.is-recording > header > .navigation-bar > .item):
(.content-view.canvas-overview .content-view.canvas > header > .navigation-bar):
(.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording) > header > .navigation-bar):
(.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop.disabled):
(.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop):
(.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop:not(.disabled):hover):
(.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop:not(.disabled):active):
(.content-view.canvas-overview .content-view.canvas > .preview):
(.content-view.canvas-overview .content-view.canvas > .preview > img):
(.content-view.canvas-overview .content-view.canvas > .preview > .message-text-view):
(.content-view.canvas-overview .content-view.canvas > footer):
(.content-view.canvas-overview .content-view.canvas > footer .memory-cost):
Add header, navigation bar, and footer styles to CanvasContentView when
it is being shown as an item in a CollectionContentView.

  • UserInterface/Views/CanvasOverviewContentView.js: Added.

(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype.get navigationItems):
(WI.CanvasOverviewContentView.prototype.get selectionPathComponents):
(WI.CanvasOverviewContentView.prototype.hidden):
(WI.CanvasOverviewContentView.prototype.contentViewAdded):
(WI.CanvasOverviewContentView.prototype.contentViewRemoved):
(WI.CanvasOverviewContentView.prototype.attached):
(WI.CanvasOverviewContentView.prototype.detached):
(WI.CanvasOverviewContentView.prototype._refreshPreviews):
(WI.CanvasOverviewContentView.prototype._selectedPathComponentChanged):
(WI.CanvasOverviewContentView.prototype._showGridButtonClicked):
(WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange.createCanvasPathComponent):
(WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange):
(WI.CanvasOverviewContentView.prototype._updateNavigationItems):
(WI.CanvasOverviewContentView.prototype._updateShowImageGrid):
(WI.CanvasOverviewContentView.prototype._contentViewMouseEnter):
(WI.CanvasOverviewContentView.prototype._contentViewMouseLeave):
The overview extends CollectionContentView, adding buttons for global canvas actions
(refresh all and show/hide grid for all), and maintains a non-visible
outline of CanvasTreeElements to facilitate display of the hierarchical
path in the navigation bar.

  • UserInterface/Views/CanvasTabContentView.css: Added.

(.content-view.tab.canvas .navigation-bar > .item > .hierarchical-path-component > .icon):
(.content-view.tab.canvas .navigation-bar > .item > .canvas-overview > .icon):
(.content-view.tab.canvas .navigation-bar > .item .canvas .icon):

  • UserInterface/Views/CanvasTabContentView.js: Added.

(WI.CanvasTabContentView):
(WI.CanvasTabContentView.tabInfo):
(WI.CanvasTabContentView.isTabAllowed):
(WI.CanvasTabContentView.prototype.get type):
(WI.CanvasTabContentView.prototype.get supportsSplitContentBrowser):
(WI.CanvasTabContentView.prototype.canShowRepresentedObject):
(WI.CanvasTabContentView.prototype.shown):
(WI.CanvasTabContentView.prototype.treeElementForRepresentedObject):
(WI.CanvasTabContentView.prototype.restoreFromCookie):
(WI.CanvasTabContentView.prototype.saveStateToCookie):
(WI.CanvasTabContentView.prototype.attached):
(WI.CanvasTabContentView.prototype.detached):
(WI.CanvasTabContentView.prototype._canvasAdded):
(WI.CanvasTabContentView.prototype._canvasRemoved):
(WI.CanvasTabContentView.prototype._overviewPathComponentClicked):
(WI.CanvasTabContentView.prototype._mainResourceDidChange):

  • UserInterface/Views/CollectionContentView.js:

(WI.CollectionContentView):
(WI.CollectionContentView.prototype.setSelectedItem):
(WI.CollectionContentView.prototype.addContentViewForItem):
(WI.CollectionContentView.prototype.removeContentViewForItem):
(WI.CollectionContentView.prototype.initialLayout):
(WI.CollectionContentView.prototype._showContentPlaceholder):
(WI.CollectionContentView.prototype._hideContentPlaceholder):
Placeholder content should be created lazily, and shown after a slight delay
to give represented objects a chance to load. Make sure to call the
shown or hidden method after adding or removing a content view.

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

  • UserInterface/Views/Variables.css:

(:root):
(body.window-inactive *):

  • UserInterface/Views/View.js:

(WI.View.fromElement):

LayoutTests:

Add test for new static function View.fromElement.

  • inspector/view/basics-expected.txt:
  • inspector/view/basics.html:
4:21 PM Changeset in webkit [223010] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Enable RegExp JIT for match only Unicode RegExp's
https://bugs.webkit.org/show_bug.cgi?id=178033

Reviewed by JF Bastien.

I forgot to turn on JIT'ing for match-only Unicode RegExp's in r221052. Do it now.

  • runtime/RegExp.cpp:

(JSC::RegExp::compileMatchOnly):

4:15 PM Changeset in webkit [223009] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

RenderTable should not hold a collection of raw pointers to RenderTableCol
https://bugs.webkit.org/show_bug.cgi?id=178030
<rdar://problem/34865236>

Reviewed by Simon Fraser.

In addition to the m_columnRenderersValid flag, this patch ensures that
we don't dereference stale column renderers even when the flag is out of sync.

Covered by existing tests.

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::updateColumnCache const):
(WebCore::RenderTable::slowColElement const):

  • rendering/RenderTable.h:
4:06 PM Changeset in webkit [223008] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

LayoutTest http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=177679

Reviewed by Alexey Proskuryakov.

Move runTest() from an inline script to a load event handler to avoid a race between parsing and navigation.

  • http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt:
  • http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:
4:05 PM Changeset in webkit [223007] by BJ Burg
  • 3 edits in trunk/Source/WebKit

Web Inspector: clicking in Inspector webview clears the selection in the inspected page
https://bugs.webkit.org/show_bug.cgi?id=178014
<rdar://problem/12706857>

Reviewed by Timothy Hatcher.

If the Inspector is docked to the inspected view, clicking on the Inspector
webview will cause selection in the inspected view to be lost. This is because
the selection is lost when the web view resigns first responder.

Add a check in maintainsInactiveSelection to always retain selection if
Web Inspector is open. This approach seems simpler than trying to sync a client's
usage of WKPageSetMaintainsInactiveSelection with overrides that need to be applied
and unapplied when an inspector web view is shown or hidden.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::maintainsInactiveSelection const):
(WebKit::WebPageProxy::inspector const): Drive by, use nullptr.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::maintainsInactiveSelection const): Deleted.

3:48 PM Changeset in webkit [223006] by Joseph Pecoraro
  • 14 edits
    3 copies
    1 add in trunk

Web Inspector: Network Tab - Headers Detail View
https://bugs.webkit.org/show_bug.cgi?id=177896
<rdar://problem/34071924>

Source/WebInspectorUI:

Reviewed by Devin Rousso.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:

New resources and strings.

  • UserInterface/Base/URLUtilities.js:

(parseURL):
(WI.h2Authority):
(WI.h2Path):
Utility methods to get the :authority and :path pseudo-headers from a URL.
This required adding user info (user:pass@) support to URL parsing.

  • UserInterface/Views/NetworkTabContentView.js:

(WI.NetworkTabContentView):

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.get navigationItems):
(WI.NetworkTableContentView.prototype.get filterNavigationItems):
Move the NetworkTab's filter controls to the left. Since these are not
dynamic just vend them from the TableContentView and place them in the
navigation bar.

  • UserInterface/Models/Resource.js:

(WI.Resource.prototype.updateWithMetrics):
New event whenever metrics change. This is the first event that will allow
a client to react to a resource.protocol change.

  • UserInterface/Views/NetworkResourceDetailView.css:

(.content-view.resource-details):
Base styles for the sub detail views.

  • UserInterface/Views/NetworkResourceDetailView.js:

(WI.NetworkResourceDetailView):
(WI.NetworkResourceDetailView.prototype.headersContentViewGoToRequestData):
(WI.NetworkResourceDetailView.prototype.initialLayout):
(WI.NetworkResourceDetailView.prototype._showPreferredContentView):
(WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
Create a Header view and provide a way to switch to a particular view. This wil
be useful to jump from the Header's Request Data directly to the Preview's
Request ContentView.

  • UserInterface/Views/ResourceDetailsSection.css:

(.resource-details > section):
(.resource-details > section > .title):
(.resource-details > section > .details):
(.resource-details > section > .details > p):
(.resource-details > section.incomplete > .details):

  • UserInterface/Views/ResourceDetailsSection.js:

(WI.ResourceDetailsSection):
(WI.ResourceDetailsSection.prototype.get element):
(WI.ResourceDetailsSection.prototype.get titleElement):
(WI.ResourceDetailsSection.prototype.get detailsElement):
(WI.ResourceDetailsSection.prototype.toggleIncomplete):
(WI.ResourceDetailsSection.prototype.toggleError):
Simple sections with a title and details div with a border.
It may be common to have an incomplete load / error so this
provides some APIs and styles for sections marked incomplete
or with errors.

  • UserInterface/Views/ResourceHeadersContentView.css:

(.resource-headers > section > .details):
(.resource-headers > section.headers > .details):
(.resource-headers > section.error > .details):
(.resource-headers > section.error .key):
Style the left border different colors for different sections or cases.

(.resource-headers .details):
(.resource-headers .details .pair):
(.resource-headers .details .key):
(.resource-headers .value):
(.resource-headers .header > .key):
(.resource-headers .h1-status > .key):
(.resource-headers .h2-pseudo-header > .key):
Wrapped text for key/value pairs and different colors for different
sections or cases.

(.resource-headers .go-to-arrow):
Go-to arrow styles for a request data section.

  • UserInterface/Views/ResourceHeadersContentView.js: Added.

(WI.ResourceHeadersContentView):
(WI.ResourceHeadersContentView.prototype.initialLayout):
(WI.ResourceHeadersContentView.prototype.layout):
(WI.ResourceHeadersContentView.prototype._incompleteSectionWithMessage):
(WI.ResourceHeadersContentView.prototype._incompleteSectionWithLoadingIndicator):
(WI.ResourceHeadersContentView.prototype._appendKeyValuePair):
(WI.ResourceHeadersContentView.prototype._responseSourceDisplayString):
(WI.ResourceHeadersContentView.prototype._refreshSummarySection):
(WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection):
(WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection):
(WI.ResourceHeadersContentView.prototype._refreshQueryStringSection):
(WI.ResourceHeadersContentView.prototype._refreshRequestDataSection):
(WI.ResourceHeadersContentView.prototype._resourceMetricsDidChange):
(WI.ResourceHeadersContentView.prototype._resourceRequestHeadersDidChange):
(WI.ResourceHeadersContentView.prototype._resourceResponseReceived):
(WI.ResourceHeadersContentView.prototype._goToRequestDataClicked):
Summary, Request, Response, Query String, and Request Data sections.
The sections refresh as data becomes available.

  • UserInterface/Views/Table.css:

(.table):
These variables are already defined globally.

  • UserInterface/Views/Variables.css:

(:root):
New variables for the colors we use. They closely match, and are
sometimes identical to ones used in Timelines / Memory views.

Source/WebInspectorUI/../../LayoutTests:

Reviewed by NOBODY (OOPS!).

  • inspector/unit-tests/url-utilities-expected.txt:
  • inspector/unit-tests/url-utilities.html:

Tests for new utility functions.

3:38 PM Changeset in webkit [223005] by achristensen@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Build fix after r223002.

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer):
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):

3:14 PM Changeset in webkit [223004] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

RootInlineBox should not hold a collection of raw pointers to RenderBox
https://bugs.webkit.org/show_bug.cgi?id=178025
<rdar://problem/34862488>

Reviewed by Simon Fraser.

There are already some assertions in place to check if the renderers are valid.

Covered by existing test cases.

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::reattachCleanLineFloats):
(WebCore::RenderBlockFlow::determineStartPosition):
(WebCore::RenderBlockFlow::determineEndPosition):

  • rendering/RootInlineBox.h:

(WebCore::RootInlineBox::appendFloat):
(WebCore::RootInlineBox::floatsPtr):

3:13 PM Changeset in webkit [223003] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Continuation map should not hold a raw pointer
https://bugs.webkit.org/show_bug.cgi?id=178021
<rdar://problem/34861590>

Reviewed by Simon Fraser.

This patch ensures proper lifetime management for renderers stored in the Continuation map
(currently they rely on the correctness of addChild/takeChild methods).

Covered by existing tests.

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::continuation const):
(WebCore::RenderBoxModelObject::setContinuation):

3:12 PM Changeset in webkit [223002] by Ryan Haddad
  • 100 edits
    2 moves
    13 deletes in trunk

Unreviewed, rolling out r222791 and r222873.
https://bugs.webkit.org/show_bug.cgi?id=178031

Caused crashes with workers/wasm LayoutTests (Requested by
ryanhaddad on #webkit).

Reverted changesets:

"WebAssembly: no VM / JS version of everything but Instance"
https://bugs.webkit.org/show_bug.cgi?id=177473
http://trac.webkit.org/changeset/222791

"WebAssembly: address no VM / JS follow-ups"
https://bugs.webkit.org/show_bug.cgi?id=177887
http://trac.webkit.org/changeset/222873

Patch by Commit Queue <commit-queue@webkit.org> on 2017-10-06

3:07 PM Changeset in webkit [223001] by achristensen@apple.com
  • 14 edits in trunk

Source/WebCore:
Add more infrastructure to apply custom header fields to same-origin requests
https://bugs.webkit.org/show_bug.cgi?id=177629

Reviewed by Ryosuke Niwa.

Covered by new API tests.

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::customHeaderFields):

  • loader/HTTPHeaderField.cpp:

(WebCore::HTTPHeaderField::create):
(WebCore::HTTPHeaderField::HTTPHeaderField): Deleted.

  • loader/HTTPHeaderField.h:

(WebCore::HTTPHeaderField::encode const):
(WebCore::HTTPHeaderField::decode):

Change HTTPHeaderField from one String containing the name and value
to a string for the name and another for value. This matches HTTPHeaderMap
and NSURLRequest more closely where names and values are treated as separate Strings.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

If the DocumentLoader has custom header fields from the WebsitePolicies, apply them to any same-origin requests.

  • loader/cache/CachedResourceRequest.h:

(WebCore::CachedResourceRequest::resourceRequest):

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setCachePolicy):
(WebCore::ResourceRequestBase::setTimeoutInterval):
(WebCore::ResourceRequestBase::setHTTPMethod):
(WebCore::ResourceRequestBase::setHTTPHeaderField):
(WebCore::ResourceRequestBase::clearHTTPAuthorization):
(WebCore::ResourceRequestBase::clearHTTPContentType):
(WebCore::ResourceRequestBase::clearHTTPReferrer):
(WebCore::ResourceRequestBase::clearHTTPOrigin):
(WebCore::ResourceRequestBase::clearHTTPUserAgent):
(WebCore::ResourceRequestBase::clearHTTPAccept):
(WebCore::ResourceRequestBase::clearHTTPAcceptEncoding):
(WebCore::ResourceRequestBase::setResponseContentDispositionEncodingFallbackArray):
(WebCore::ResourceRequestBase::setHTTPBody):
(WebCore::ResourceRequestBase::setAllowCookies):
(WebCore::ResourceRequestBase::setPriority):
(WebCore::ResourceRequestBase::addHTTPHeaderFieldIfNotPresent):
(WebCore::ResourceRequestBase::addHTTPHeaderField):
(WebCore::ResourceRequestBase::setHTTPHeaderFields):

non-HTTP/HTTPS ResourceRequests need to be updated, too, if header fields are added.
Skipping updating non-HTTP/HTTPS ResourceRequests is not a valid shortcut, and with the
growing importance of custom schemes with our new public API, we should update ResourceRequests
of custom schemes correctly.

Source/WebKit:
Add more infrastructure to apply custom headers to same-origin requests
https://bugs.webkit.org/show_bug.cgi?id=177629

Reviewed by Ryosuke Niwa.

  • UIProcess/API/C/WKWebsitePolicies.cpp:

(WKWebsitePoliciesCopyCustomHeaderFields):
(WKWebsitePoliciesSetCustomHeaderFields):

  • UIProcess/API/C/WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies customHeaderFields]):
(-[_WKWebsitePolicies setCustomHeaderFields:]):

Make the SPI for setting custom header fields take a dictionary<String, String>
instead of an array of Strings with colons. This matches NSURLRequest and other
APIs that deal with header fields.

Tools:
Add more infrastructure to apply custom header fields to same-origin requests
https://bugs.webkit.org/show_bug.cgi?id=177629

Reviewed by Ryosuke Niwa.

  • TestWebKitAPI/Tests/WebCore/HTTPHeaderField.cpp:

(canonicalizeHTTPHeader):
(shouldRemainUnchanged):
(shouldBeInvalid):
(shouldBecome):

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(TEST):
(expectHeaders):
(-[CustomHeaderFieldsDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[CustomHeaderFieldsDelegate webView:startURLSchemeTask:]):
(-[CustomHeaderFieldsDelegate webView:stopURLSchemeTask:]):

Test main resource requests, subresource requests, and cross-origin requests.

2:45 PM Changeset in webkit [223000] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

2:41 PM Changeset in webkit [222999] by n_wang@apple.com
  • 2 edits in trunk/LayoutTests

AX: [iOS] Layout Test accessibility/ios-simulator/video-elements-ios.html is failing
https://bugs.webkit.org/show_bug.cgi?id=177954
<rdar://problem/34838094>

The test is flaky because that the video element has triggered the canplaythrough event before
we registered the event handler. Fixed it by setting the source after registering the handler.

Reviewed by Chris Fleizach.

  • accessibility/ios-simulator/video-elements-ios.html:
2:40 PM Changeset in webkit [222998] by matthew_hanson@apple.com
  • 7 edits in trunk/Source

Versioning.

2:29 PM Changeset in webkit [222997] by commit-queue@webkit.org
  • 23 edits
    5 adds in trunk

Add basic support for getting a ImageBitmapRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=177983

Patch by Sam Weinig <sam@webkit.org> on 2017-10-06
Reviewed by Dean Jackson.

Source/WebCore:

Add initial support for ImageBitmapRenderingContext.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

  • dom/Document.cpp:
  • dom/Document.h:
  • dom/Document.idl:

Add ImageBitmapRenderingContext to RenderingContext variant so it wil be able to
be used with Document.getCSSCanvasContext.

  • html/HTMLCanvasElement.h:
  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::setHeight):
(WebCore::HTMLCanvasElement::setWidth):

Throw an exception if the context is in the placeholder mode (which we
signify via a special PlaceholderRenderingContext) as speced. This can't
currently be hit, as setting a placeholder requires offscreen canvas
support, coming soon.

(WebCore::HTMLCanvasElement::getContext):

Re-work to match the spec's matrix of options, adding in support
for 'bitmaprenderer'/ ImageBitmapRenderingContext type as well as
the placeholder mode.

(WebCore::HTMLCanvasElement::createContext2d):
(WebCore::HTMLCanvasElement::getContext2d):
(WebCore::HTMLCanvasElement::isWebGLType):
(WebCore::HTMLCanvasElement::createContextWebGL):
(WebCore::HTMLCanvasElement::getContextWebGL):
(WebCore::HTMLCanvasElement::createContextWebGPU):
(WebCore::HTMLCanvasElement::getContextWebGPU):
(WebCore::HTMLCanvasElement::isBitmapRendererType):
(WebCore::HTMLCanvasElement::createContextBitmapRenderer):
(WebCore::HTMLCanvasElement::getContextBitmapRenderer):

Split creation out of the get functions so it can be called
by getContext, where we know if the canvas is null or not.

  • html/HTMLCanvasElement.idl:

Add ImageBitmapRenderingContext to RenderingContext variant so it wil be able to
be used with HTMLCanvasElement.getContext.

  • html/canvas/CanvasRenderingContext.h:

(WebCore::CanvasRenderingContext::isBitmapRenderer const):
(WebCore::CanvasRenderingContext::isPlaceholder const):

Add predicates for ImageBitmapRenderingContext and
PlaceholderRenderingContext.

  • html/canvas/ImageBitmapRenderingContext.cpp: Added.

(WebCore::ImageBitmapRenderingContext::ImageBitmapRenderingContext):

  • html/canvas/ImageBitmapRenderingContext.h: Added.
  • html/canvas/ImageBitmapRenderingContext.idl: Added.
  • html/canvas/PlaceholderRenderingContext.cpp: Added.

(WebCore::PlaceholderRenderingContext::PlaceholderRenderingContext):

  • html/canvas/PlaceholderRenderingContext.h: Added.

Add stubbed out implementations for the new contexts.

LayoutTests:

  • js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-elcapitan-wk2/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-sierra-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-sierra/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
  • platform/wpe/js/dom/global-constructors-attributes-expected.txt:

Update test results.

2:08 PM Changeset in webkit [222996] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/canvas/create-context-2d.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=178028

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:02 PM Changeset in webkit [222995] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Netflix playback fails with S7353 error
https://bugs.webkit.org/show_bug.cgi?id=178023

Reviewed by Dean Jackson.

On certain platforms, WebCoreDecompressionSession will fail to produce CVImageBuffers when presented with
encrypted content. On those platforms, the seek() command will fail, because frames at the destination time
cannot be decoded. This occurs for Netflix because the <video> element is not in the DOM at decode time.

Only create a WebCoreDecompressionSession in MediaPlayerPrivateMediaSourceAVFObjC when we have explicitly
been asked to paint into a WebGL canvas.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):

1:14 PM Changeset in webkit [222994] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Skipped http/tests/cache/disk-cache/disk-cache-validation-no-body.html on El Capitan Release.
https://bugs.webkit.org/show_bug.cgi?id=178019

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:10 PM Changeset in webkit [222993] by jiewen_tan@apple.com
  • 8 edits in trunk/Source/WebCore

Replace some stack raw pointers with RefPtrs within WebCore/dom
https://bugs.webkit.org/show_bug.cgi?id=177852
<rdar://problem/34804487>

Reviewed by Ryosuke Niwa.

This is an effort to reduce raw pointer usage in DOM code. In this patch,
stack raw pointers that could be freed during their lifetime because of
event dispatching, layout updating and etc are selected. All selections are
basing on code speculation.

No changes in behaviours.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::addChildNodesToDeletionQueue):
Escalate the RefPtr to where node is first defined.

  • dom/Document.cpp:

(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::updateLayout):
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):
Possible layout updates during their lifetime.
(WebCore::Document::implicitClose):
Possible event dispatching during its lifetime.
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
Possible node removal during their lifetime.
(WebCore::command):
Possible layout updates during its lifetime.

  • dom/DocumentMarkerController.cpp:

(WebCore::DocumentMarkerController::renderedRectsForMarkers):
Possible layout updates during its lifetime.

  • dom/Element.cpp:

(WebCore::Element::removedFrom):

Possible event dispatching during its lifetime.

(WebCore::checkForSiblingStyleChanges):
Possible layout updates during their lifetime.

  • dom/MouseRelatedEvent.cpp:

(WebCore::MouseRelatedEvent::computeRelativePosition):
Possible layout updates during its lifetime.

  • dom/RadioButtonGroups.cpp:

(WebCore::RadioButtonGroup::setCheckedButton):
Possible layout updates during its lifetime.

  • dom/SlotAssignment.cpp:

(WebCore::SlotAssignment::didChangeSlot):
Possible layout updates during its lifetime.

12:54 PM Changeset in webkit [222992] by Dewei Zhu
  • 2 edits in trunk/Websites/perf.webkit.org

Add try-bot button on perf analysis status page.
https://bugs.webkit.org/show_bug.cgi?id=177995

Reviewed by Ryosuke Niwa.

Add 'Create' button on analysis status top-left corner to create trybot analysis task.

  • public/v3/pages/analysis-category-toolbar.js:

(AnalysisCategoryToolbar.cssTemplate):

11:53 AM Changeset in webkit [222991] by wenson_hsieh@apple.com
  • 10 edits in trunk

[iOS] Tweak support for classifying form controls (followup to r222487)
https://bugs.webkit.org/show_bug.cgi?id=177917
<rdar://problem/34820122>

Reviewed by Dean Jackson.

Source/WebKit:

This patch follows up with <http://trac.webkit.org/r222487>. It combines the functionality of two SPI hooks
implemented on WKContentView into a single method that vends a context dictionary, and additionally addresses an
issue with the original implementation, wherein some cached state on WebPageProxy is set upon starting node
assistance, but is never unset when stopping node assistance, nor set anywhere else. See per-method comments for
more detail.

  • UIProcess/WebPageProxy.h:

Remove members m_acceptsAutofilledLoginCredentials and m_representingPageURL from WebPageProxy. This state is
retrieved from the AssistedNodeInformation struct when starting node assistance, but is never reset anywhere
else. Instead of introducing new members to remember this state, we can just use the WKContentView's current
assisted node information.

This also means that programmatically focusing forms (without user gesture) will no longer cause WKContentView
to accept autofilled login credentials, since we bail out of node assistance and don't begin an input session.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView acceptsAutofilledLoginCredentials]): Deleted.
(-[WKContentView representingPageURL]): Deleted.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _autofillContext]):

Merge functionality of the previous two SPI hooks, such that -_autofillContext will return a non-null dictionary
containing the URL of the focused element's document if and only if WKContentView accepts autofilled login
credentials, and there exists a representing page URL.

When the page stops assisting the focused node, we set the AssistedNodeInformation's element type to None, so we
additionally bail and return nil if the element type is None. As an aside, it seems a more reasonable approach to
resetting state upon stopping node assistance is to just completely reset _assistedNodeInformation to its initial
value, i.e. via _assistedNodeInformation = { }. It's not clear whether there are behaviors relying on the fact
that all members but the element type in the content view's assisted node information could be stale, so this
seems worthy of some investigation.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::startAssistingNode):
(WebKit::WebPageProxy::acceptsAutofilledLoginCredentials): Deleted.
(WebKit::WebPageProxy::representingPageURL): Deleted.

Source/WebKitLegacy/mac:

Implement _autofillContext in legacy WebKit, and remove the two previous SPI hooks.

  • DOM/DOMHTMLInputElement.mm:

(-[DOMHTMLInputElement _autofillContext]):
(-[DOMHTMLInputElement acceptsAutofilledLoginCredentials]): Deleted.
(-[DOMHTMLInputElement representingPageURL]): Deleted.

Tools:

Minor cleanup around autofill API tests added in r222487. Additionally, augments some of these API tests to
verify that after blurring the focused element, the content view no longer accepts autofill credentials (see
WebKit ChangeLog for more details). Also augments tests to verify that the URL in the autofill context matches
the document URL.

  • TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:

Remove the USE(APPLE_INTERNAL_SDK) guard for these API tests.

(newUIKeyboardLoginCredentialsSuggestion):

Add a stub implementation of UIKeyboardLoginCredentialsSuggestion. This allows
[UIKeyboardLoginCredentialsSuggestion new] to return a nonnull object, which allows these API tests to verify
that the credential filling codepath works as intended without any additional UIKit changes. Currently, tests
for the value of username and password fields are passing even though the fields are not being populated because
the expected string values are null, and the observed value is an empty string. We instead check the literal
string values here instead of credentialSuggestion's properties, so that tests verifying the behavior of
-insertTextSuggestion: will require username and password inputs to be populated.

(-[TestInputDelegate _webView:focusShouldStartInputSession:]):
(-[AutofillTestView initWithFrame:]):
(-[AutofillTestView _autofillInputView]):
(-[AutofillTestView textInputHasAutofillContext]):
(TestWebKitAPI::TEST):

Add an additional API test to verify that programmatic focus without user interaction (and also without testing
overrides) does not activate autofill.

(createUIKeyboardLoginCredentialsSuggestion): Deleted.
(-[WKWebView _privateTextInput]): Deleted.

  • TestWebKitAPI/ios/UIKitSPI.h:

Minor gardening to remove iOS version >= 11 guards that are now unnecessary. Additionally, add some more private
header imports (with corresponding interface definitions for building and running with the public SDK).

11:47 AM Changeset in webkit [222990] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

RootInlineBox should not hold a raw pointer to RenderObject
https://bugs.webkit.org/show_bug.cgi?id=178018
<rdar://problem/34859256>

Reviewed by Simon Fraser.

Not resetting the line break object could lead to dereferencing a stale renderer.

Covered by existing tests.

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::RootInlineBox):
(WebCore::RootInlineBox::setLineBreakInfo):

  • rendering/RootInlineBox.h:

(WebCore::RootInlineBox::lineBreakObj const):

11:12 AM Changeset in webkit [222989] by commit-queue@webkit.org
  • 2 edits
    4 adds in trunk/Source/WebKit

[WinCairo] Add shared curl files
https://bugs.webkit.org/show_bug.cgi?id=177999

Patch by Yousuke Kimoto <yousuke.kimoto@sony.com> on 2017-10-06
Reviewed by Alex Christensen.

  • PlatformWin.cmake:
  • Shared/Authentication/curl/AuthenticationManagerCurl.cpp: Added.

(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):

  • Shared/curl/WebCoreArgumentCodersCurl.cpp: Added.

(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
(IPC::ArgumentCoder<CertificateInfo>::encode):
(IPC::ArgumentCoder<CertificateInfo>::decode):
(IPC::ArgumentCoder<ResourceError>::encodePlatformData):
(IPC::ArgumentCoder<ResourceError>::decodePlatformData):
(IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
(IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):
(IPC::ArgumentCoder<Credential>::encodePlatformData):
(IPC::ArgumentCoder<Credential>::decodePlatformData):

11:03 AM Changeset in webkit [222988] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Network Tab - Make selection in the table more reliable (mousedown instead of click)
https://bugs.webkit.org/show_bug.cgi?id=177990

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-06
Reviewed by Brian Burg.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.tableCellClicked): Deleted.

  • UserInterface/Views/Table.js:

(WI.Table.prototype._handleMouseDown):
(WI.Table.prototype._handleClick): Deleted.
Switch to mousedown.

10:59 AM October 2017 Meeting edited by mmaxfield@apple.com
(diff)
10:54 AM October 2017 Meeting edited by mmaxfield@apple.com
(diff)
9:59 AM Changeset in webkit [222987] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Removing some dead code in RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=178011

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-06
Reviewed by Alejandro G. Castro.

No change of behavior.
Removing code used by non-libwebrtc WebRTC backends.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::removeTrack):
(WebCore::RTCPeerConnection::completeAddTransceiver):

9:51 AM Changeset in webkit [222986] by dino@apple.com
  • 26 edits
    3 copies
    2 adds in trunk

ImageBitmap API stubs
https://bugs.webkit.org/show_bug.cgi?id=177984
<rdar://problem/34848023>

Patch by Sam and Dean.
Reviewed by Dean and Sam.

Source/WebCore:

Add the IDL for ImageBitmap and ImageBitmapOptions, plus some
stub implementations (complete with all the algorithms from
the HTML specification as comments).

  • CMakeLists.txt: Add the new files.
  • DerivedSources.make: Create the JS bindings for ImageBitmap and ImageBitmapOptions.
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/CallTracerTypes.h:
  • html/ImageBitmap.cpp: Added.

(WebCore::ImageBitmap::create):
(WebCore::ImageBitmap::createPromise):
(WebCore::ImageBitmap::ImageBitmap):
(WebCore::ImageBitmap::~ImageBitmap):
(WebCore::ImageBitmap::width const):
(WebCore::ImageBitmap::height const):
(WebCore::ImageBitmap::close):

  • html/ImageBitmap.h: Added.

(WebCore::ImageBitmap::isDetached const):

  • html/ImageBitmap.idl: Copied from Source/WebCore/html/canvas/CanvasDrawImage.idl.
  • html/ImageBitmapOptions.h: Copied from Source/WebCore/html/canvas/CanvasDrawImage.idl.
  • html/ImageBitmapOptions.idl: Copied from Source/WebCore/html/canvas/CanvasDrawImage.idl.
  • html/canvas/CanvasDrawImage.idl:
  • html/canvas/CanvasFillStrokeStyles.idl:
  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::size):
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::createPattern):

  • html/canvas/CanvasRenderingContext2D.h:
  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::indexForData):
(WebCore::InspectorCanvas::buildAction):
(WebCore::InspectorCanvas::buildArrayForImageBitmap):

  • inspector/InspectorCanvas.h:
  • inspector/RecordingSwizzleTypes.h:

LayoutTests:

New global constructors, so go through the pain of updating all
the platform results :(

  • js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-elcapitan-wk2/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-sierra-wk2/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-sierra/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk2/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
  • platform/wpe/js/dom/global-constructors-attributes-expected.txt:
9:49 AM Changeset in webkit [222985] by Ms2ger@igalia.com
  • 6 edits in trunk/Source/WebCore

Create bindings for WebGL2's versions of texImage2D.
https://bugs.webkit.org/show_bug.cgi?id=178006

Reviewed by Dean Jackson.

No new tests: not much point in adding tests now; this method doesn't
do anything anyway.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::texImage2D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:
  • html/canvas/WebGLRenderingContext.idl:
  • html/canvas/WebGLRenderingContextBase.idl:
9:40 AM Changeset in webkit [222984] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Sandbox rules block PluginProcess using "File Open/Save" dialogs
https://bugs.webkit.org/show_bug.cgi?id=177965
<rdar://problem/33976846>

Reviewed by Alexey Proskuryakov.

Update the PluginProcess sandboxes to allow the same XPC services as
the WebContent process. Also allow access to the openAndSavePanelServices.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
9:37 AM Changeset in webkit [222983] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Improve setting the default / initial sort of a Table
https://bugs.webkit.org/show_bug.cgi?id=177989

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-06
Reviewed by Brian Burg.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.initialLayout):
Set the default / initial sort.

  • UserInterface/Views/Table.js:

(WI.Table):
(WI.Table.prototype.set sortOrder):
(WI.Table.prototype.set sortColumnIdentifier):
During setup we should always update header views.

9:34 AM Changeset in webkit [222982] by fpizlo@apple.com
  • 6 edits
    1 delete in trunk/Source/bmalloc

Use one Scavenger thread for all Heaps
https://bugs.webkit.org/show_bug.cgi?id=174973

Reviewed by JF Bastien.

This combines the scavengers from all Heap instances into a single scavenger. It also combines
the accounting for deciding when to run. Each Heap still controls what it means to scavenge
itself (it's all in Heap::scavenge) but the policy decisions are all controlled by Scavenger.
Because Scavenger is also the only thing that needs an AsyncTask, this removes AsyncTask and
moves all of AsyncTask's logic into Scavenger.

This appears to be a 1% progression on JetStream (with high statistical confidence: p = 0.0049).

  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/AsyncTask.h: Removed.
  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::deallocateSmallLine):
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::tryAllocateLarge):
(bmalloc::Heap::shrinkLarge):
(bmalloc::Heap::deallocateLarge):
(bmalloc::Heap::concurrentScavenge): Deleted.
(bmalloc::Heap::scheduleScavengerIfUnderMemoryPressure): Deleted.
(bmalloc::Heap::scheduleScavenger): Deleted.

  • bmalloc/Heap.h:
  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::run):
(bmalloc::Scavenger::runHoldingLock):
(bmalloc::Scavenger::runSoon):
(bmalloc::Scavenger::runSoonHoldingLock):
(bmalloc::Scavenger::didStartGrowing):
(bmalloc::Scavenger::scheduleIfUnderMemoryPressure):
(bmalloc::Scavenger::scheduleIfUnderMemoryPressureHoldingLock):
(bmalloc::Scavenger::schedule):
(bmalloc::Scavenger::threadEntryPoint):
(bmalloc::Scavenger::threadRunLoop):
(bmalloc::Scavenger::setSelfQOSClass):

  • bmalloc/Scavenger.h:

(bmalloc::Scavenger::willRun):
(bmalloc::Scavenger::willRunSoon):

9:33 AM Changeset in webkit [222981] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Avoid integer overflow in DFGStrengthReduction.cpp
https://bugs.webkit.org/show_bug.cgi?id=177944

Reviewed by Saam Barati.

The check that we won't do integer overflow by negating INT32_MIN was itself an integer overflow.
I think that signed integer overflow is undefined behaviour in C, so I replace it by an explicit check that value != INT32_MIN instead.

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

9:20 AM Changeset in webkit [222980] by beidson@apple.com
  • 29 edits
    1 copy in trunk

Add (entirely incorrect) fetching of ServiceWorker scripts.
https://bugs.webkit.org/show_bug.cgi?id=176179

Reviewed by Andy Estes.

Source/WebCore:

No new tests (Covered by changes to existing tests).

When the Storage process is running the "Update" algorithm and a ServiceWorker script file needs to be fetched, this patch:

  • Messages back to the WebContent process that started the register/update job
  • Executes a FetchLoad in that script context for the script
  • Sends the results back to the Storage process

We don't do anything with the results yet.

Soon.

  • WebCore.xcodeproj/project.pbxproj:
  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::didFail):

  • workers/WorkerScriptLoader.h:

(WebCore::WorkerScriptLoader::error const):

  • workers/WorkerScriptLoaderClient.h:

(WebCore::WorkerScriptLoaderClient::~WorkerScriptLoaderClient):
(WebCore::WorkerScriptLoaderClient::didReceiveResponse): Deleted.
(WebCore::WorkerScriptLoaderClient::notifyFinished): Deleted.

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::startScriptFetchForJob):
(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
(WebCore::ServiceWorkerContainer::jobFailedLoadingScript):

  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerFetchResult.h: Copied from Source/WebCore/workers/service/server/SWClientConnection.h.

(WebCore::ServiceWorkerFetchResult::encode const):
(WebCore::ServiceWorkerFetchResult::decode):

  • workers/service/ServiceWorkerJob.cpp:

(WebCore::ServiceWorkerJob::startScriptFetch):
(WebCore::ServiceWorkerJob::fetchScriptWithContext):
(WebCore::ServiceWorkerJob::didReceiveResponse):
(WebCore::ServiceWorkerJob::notifyFinished):

  • workers/service/ServiceWorkerJob.h:
  • workers/service/ServiceWorkerJobClient.h:
  • workers/service/server/SWClientConnection.cpp:

(WebCore::SWClientConnection::finishedFetchingScript):
(WebCore::SWClientConnection::failedFetchingScript):
(WebCore::SWClientConnection::startScriptFetchForServer):

  • workers/service/server/SWClientConnection.h:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::Connection::finishFetchingScriptInServer):
(WebCore::SWServer::startScriptFetch):
(WebCore::SWServer::scriptFetchFinished):

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::scriptFetchFinished):
(WebCore::SWServerRegistration::runUpdateJob):
(WebCore::SWServerRegistration::startScriptFetchFromMainThread):
(WebCore::SWServerRegistration::startScriptFetchForCurrentJob):

  • workers/service/server/SWServerRegistration.h:

Source/WebKit:

  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::startScriptFetchInClient):

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::finishFetchingScriptInServer):

  • WebProcess/Storage/WebSWClientConnection.h:
  • WebProcess/Storage/WebSWClientConnection.messages.in:

LayoutTests:

  • http/tests/workers/service/basic-register-exceptions-expected.txt:
  • http/tests/workers/service/basic-register-expected.txt:
  • http/tests/workers/service/resources/basic-register-exceptions.js:
  • http/tests/workers/service/resources/basic-register.js:
  • http/tests/workers/service/resources/registration-task-queue-scheduling-1.js:
8:06 AM Changeset in webkit [222979] by Ryan Haddad
  • 4 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html

Unreviewed test gardening.

  • platform/mac-elcapitan-wk2/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-sierra/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
8:01 AM Changeset in webkit [222978] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip editing/pasteboard/data-transfer-items.html on iOS.
https://bugs.webkit.org/show_bug.cgi?id=177961

Unreviewed test gardening.

  • platform/ios/TestExpectations:
6:08 AM Changeset in webkit [222977] by Antti Koivisto
  • 4 edits in trunk

Minor WeakPtr improvements
https://bugs.webkit.org/show_bug.cgi?id=177958

Reviewed by Sam Weinig.

Source/WTF:

  • wtf/WeakPtr.h:

(WTF::WeakPtr::operator bool const):

Make explicit.

(WTF::WeakPtrFactory::createWeakPtr const):
(WTF::makeWeakPtr):

Remove templating from createWeakPtr, makeWeakPtr() is now the
canonical way to make derived-type WeakPtrs.

Tools:

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp:

(TestWebKitAPI::TEST):
(TestWebKitAPI::Base::createWeakPtr): Deleted.

6:05 AM Changeset in webkit [222976] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix parsing of GTK unit tests output in bot configuration.

  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunGtkAPITests.commandComplete): Remove trailing ':' from the regular expression.

4:52 AM WebKitGTK/2.18.x edited by fred.wang@free.fr
(diff)
3:44 AM Changeset in webkit [222975] by zandobersek@gmail.com
  • 5 edits in trunk/Source/WebCore

[Cairo] Create Cairo patterns from Gradient objects on-the-fly
https://bugs.webkit.org/show_bug.cgi?id=177947

Reviewed by Carlos Garcia Campos.

Stop caching cairo_pattern_t objects for a specific global alpha value
in the Gradient class. Instead, create these as required, for whatever
alpha value. This drops some efficiency benefits in exchange for better
Cairo operation isolation, while also matching the same approach that
is used in the Pattern implementation for Cairo.

Introduce the createPlatformGradient() method for Cairo, resuing the
implementation of platformGradient() that's now removed. The
Cairo-specific setPlatformGradientSpaceTransform() method is also
removed since there's no cached cairo_pattern_t object that we can
update. The Cairo-specific m_platformGradientAlpha member float is also
deleted.

Gradient::fill() and prepareCairoContextSource() are the only two places
that need to create a cairo_pattern_t object off of Gradient, so they
are updated accordingly.

No new tests -- no changes in behavior.

  • platform/graphics/Gradient.cpp:

(WebCore::Gradient::setGradientSpaceTransform):
(WebCore::Gradient::setPlatformGradientSpaceTransform): Deleted.

  • platform/graphics/Gradient.h:
  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::platformDestroy):
(WebCore::Gradient::createPlatformGradient):
(WebCore::Gradient::fill):
(WebCore::Gradient::platformGradient): Deleted.
(WebCore::Gradient::setPlatformGradientSpaceTransform): Deleted.

  • platform/graphics/cairo/PlatformContextCairo.cpp:

(WebCore::prepareCairoContextSource):

3:22 AM Changeset in webkit [222974] by Ms2ger@igalia.com
  • 6 edits in trunk/Source/WebCore

Create bindings for WebGL2's versions of compressedTexImage2D.
https://bugs.webkit.org/show_bug.cgi?id=177481

Reviewed by Žan Doberšek.

No new tests: not much point in adding tests now; this method doesn't
do anything anyway.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::compressedTexImage2D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:
  • html/canvas/WebGLRenderingContext.idl:
  • html/canvas/WebGLRenderingContextBase.idl:
3:16 AM Changeset in webkit [222973] by tpopela@redhat.com
  • 2 edits in trunk/LayoutTests

[GTK] 2 text tests failing since r222838
https://bugs.webkit.org/show_bug.cgi?id=177938

Reviewed by Carlos Garcia Campos.

These tests are passing after r222907

  • platform/gtk/TestExpectations:
2:43 AM Changeset in webkit [222972] by eocanha@igalia.com
  • 4 edits in trunk/Source/WebCore

[GStreamer][MSE] Likely race condition causes WTF::Deque to crash on debug
https://bugs.webkit.org/show_bug.cgi?id=177410

Reviewed by Xabier Rodriguez-Calvar.

Deque keeps a chain of iterators which is updated as iterators are
created/destroyed. This can cause problems when iterators are created
from multiple threads as they are now, sometimes without proper
locking because it's not actually needed.

For instance, the lock in PlaybackPipeline::enqueueSample() is not
needed because none of the accesses are actually risky. Locking there
just to make Deque happy would only cause a performance penalty on the
readers working in other threads.

No new tests.

  • platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:

(WebCore::PlaybackPipeline::addSourceBuffer): Use Vector instead of
Deque.
(WebCore::PlaybackPipeline::removeSourceBuffer): Ditto.
(WebCore::PlaybackPipeline::enqueueSample): Remove lock and explain
why it's not needed.

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(webKitMediaSrcFinalize): Use Vector.

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivate.h:

Use Vector.

2:30 AM Changeset in webkit [222971] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

Remove dead code from Pattern
https://bugs.webkit.org/show_bug.cgi?id=177945

Reviewed by Carlos Garcia Campos.

Drop the platormDestroy() and setPlatformPatternSpaceTransform() methods
from the Pattern class -- these were empty implementations, with no port
providing their own. The destructor is defaulted in the implementation
file. The m_pattern member variable is also dropped as it was unused.

No new tests -- no change in behavior.

  • platform/graphics/Pattern.cpp:

(WebCore::Pattern::setPatternSpaceTransform):
(WebCore::Pattern::~Pattern): Deleted.
(WebCore::Pattern::platformDestroy): Deleted.
(WebCore::Pattern::setPlatformPatternSpaceTransform): Deleted.

  • platform/graphics/Pattern.h:
2:01 AM Changeset in webkit [222970] by cturner@igalia.com
  • 2 edits in trunk/Tools

Disable bmalloc when running Valgrind
https://bugs.webkit.org/show_bug.cgi?id=177923

Reviewed by Carlos Alberto Lopez Perez.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort.setup_environ_for_server):

1:52 AM Changeset in webkit [222969] by clopez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK][Clang] Build fix after r222926
https://bugs.webkit.org/show_bug.cgi?id=175384

Unreviewed build fix.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::setStatus):

1:36 AM Changeset in webkit [222968] by zandobersek@gmail.com
  • 2 edits in trunk/Tools

Implement TestController::platformContext() for WPE, returning the
m_context pointer as the GTK+ port does. This fixes the crashes on
the WPE testers.

Rubber-stamped by Carlos Garcia Campos.

  • WebKitTestRunner/wpe/TestControllerWPE.cpp:

(WTR::TestController::platformContext):

12:47 AM Changeset in webkit [222967] by Carlos Garcia Campos
  • 16 edits in trunk

[GTK][WPE] Add API to configure and enable resource load statistics
https://bugs.webkit.org/show_bug.cgi?id=177943

Reviewed by Michael Catanzaro.

Source/WebKit:

Add new WebKitWebsiteDataManager construct only property to set the directory where the persistent stats are
stored, and methods to enable resource load statistics and query whether it's currently enabled. Also add a new
Website data type to be able to remove the persistent stats using WebKitWebsiteDataManager existing API.

  • UIProcess/API/glib/WebKitWebContext.cpp:

(websiteDataStoreConfigurationForWebProcessPoolConfiguration):
(webkitWebContextConstructed):

  • UIProcess/API/glib/WebKitWebsiteData.cpp:

(recordContainsSupportedDataTypes):
(toWebKitWebsiteDataTypes):

  • UIProcess/API/glib/WebKitWebsiteDataManager.cpp:

(webkitWebsiteDataManagerGetProperty):
(webkitWebsiteDataManagerSetProperty):
(webkitWebsiteDataManagerConstructed):
(webkit_website_data_manager_class_init):
(webkitWebsiteDataManagerGetDataStore):
(webkit_website_data_manager_get_resource_load_stats_directory):
(webkit_website_data_manager_set_resource_load_stats_enabled):
(webkit_website_data_manager_get_resource_load_stats_enabled):
(toWebsiteDataTypes):

  • UIProcess/API/gtk/WebKitWebsiteData.h:
  • UIProcess/API/gtk/WebKitWebsiteDataManager.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/wpe/WebKitWebsiteData.h:
  • UIProcess/API/wpe/WebKitWebsiteDataManager.h:

Tools:

Add a command line option to enable intelligent tracking prevention to MiniBrowser and tests cases to check the
new API.

  • MiniBrowser/gtk/main.c:

(main):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:

(serverCallback):
(testWebsiteDataConfiguration):
(testWebsiteDataEphemeral):
(testWebsiteDataResourceLoadStats):
(beforeAll):

  • TestWebKitAPI/glib/WebKitGLib/TestMain.h:

(Test::Test):

  • TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:

(directoryChangedCallback):
(WebViewTest::waitUntilFileExists):

  • TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
12:44 AM Changeset in webkit [222966] by eocanha@igalia.com
  • 2 edits in trunk/Source/WebCore

[MSE][GStreamer] Seek on youtube.com/tv fails after r217185
https://bugs.webkit.org/show_bug.cgi?id=177976

Reviewed by Jer Noble.

Covered by existing tests.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::seekToTime): Only call waitForSeekCompleted()
when the time is not buffered when using GStreamer.

12:43 AM Changeset in webkit [222965] by eocanha@igalia.com
  • 2 edits in trunk/Source/WebCore

[MSE] Dead code in SourceBuffer::appendBufferTimerFired()
https://bugs.webkit.org/show_bug.cgi?id=177951

Reviewed by Jer Noble.

Covered by LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::appendBufferTimerFired): Remove redundant code.

12:30 AM Changeset in webkit [222964] by rniwa@webkit.org
  • 6 edits in trunk/Source/WebCore

Split StaticPasteboard::writeString into writeString and writeStringInCustomData
https://bugs.webkit.org/show_bug.cgi?id=177991

Reviewed by Wenson Hsieh.

Split writeString into the one that writes into the plaform pasteboard natively and the custom pasteboard data like we did
in r222680 for readString and readStringInCustomData.

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::setData):
(WebCore::DataTransfer::setDataFromItemList): Extracted out of setData.

  • dom/DataTransfer.h:
  • dom/DataTransferItemList.cpp:

(WebCore::DataTransferItemList::add):

  • platform/StaticPasteboard.cpp:

(WebCore::updateTypes): Extacted out of writeString.
(WebCore::StaticPasteboard::writeString):
(WebCore::StaticPasteboard::writeStringInCustomData):

  • platform/StaticPasteboard.h:

Oct 5, 2017:

11:52 PM Changeset in webkit [222963] by dino@apple.com
  • 3 edits in trunk

[WebGL] Safari performance is slow due to high MSAA usage
https://bugs.webkit.org/show_bug.cgi?id=177949
<rdar://problem/34835619>

Reviewed by Sam Weinig.

On some hardware, typically integrated GPUs, using MSAA with a sample
count above 4 produces bad performance. Limit the number of samples to
4 universally.

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::reshapeFBOs):

11:48 PM Changeset in webkit [222962] by Carlos Garcia Campos
  • 19 edits
    1 copy
    1 add in trunk

[GTK][WPE] All resource load statistics tests added in r212183 crash in GTK bots, timeout in GTK and WPE bots since r219049
https://bugs.webkit.org/show_bug.cgi?id=168171

Reviewed by Chris Dumez.

Source/WebCore:

Add an implementation of FileMonitor for GLib based ports.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • platform/FileMonitor.cpp:
  • platform/FileMonitor.h:
  • platform/glib/FileMonitorGLib.cpp: Added.

(WebCore::FileMonitor::FileMonitor):
(WebCore::FileMonitor::~FileMonitor):
(WebCore::FileMonitor::fileChangedCallback):
(WebCore::FileMonitor::didChange):

Source/WebKit:

Add C API to handle all resource load statistics requests made by the layout tests.

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetStatisticsLastSeen):
(WKWebsiteDataStoreSetStatisticsPrevalentResource):
(WKWebsiteDataStoreIsStatisticsPrevalentResource):
(WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreSetStatisticsGrandfathered):
(WKWebsiteDataStoreIsStatisticsGrandfathered):
(WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
(WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
(WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
(WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
(WKWebsiteDataStoreSetStatisticsTimeToLiveCookiePartitionFree):
(WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
(WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
(WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
(WKWebsiteDataStoreStatisticsSubmitTelemetry):
(WKWebsiteDataStoreSetStatisticsNotifyPagesWhenDataRecordsWereScanned):
(WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
(WKWebsiteDataStoreSetStatisticsNotifyPagesWhenTelemetryWasCaptured):
(WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval):
(WKWebsiteDataStoreSetStatisticsGrandfatheringTime):
(WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries):
(WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval):
(WKWebsiteDataStoreStatisticsResetToConsistentState):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:

Tools:

Implement all resource load statistics functions in TestController using the C API. Also enable the FileMonitor
unit test. This test requires a platform implementation of Util::run(), so I've added UtilitiesGLib.cpp with an
iplementation common to glib based ports using WTF RunLoop abstraction.

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
  • TestWebKitAPI/glib/UtilitiesGLib.cpp: Copied from Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h.

(TestWebKitAPI::Util::run):
(TestWebKitAPI::Util::spinRunLoop):
(TestWebKitAPI::Util::sleep):

  • TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp:
  • TestWebKitAPI/wpe/PlatformUtilitiesWPE.cpp:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::platformAdjustContext):
(WTR::TestController::setStatisticsLastSeen):
(WTR::TestController::setStatisticsPrevalentResource):
(WTR::ResourceStatisticsCallbackContext::ResourceStatisticsCallbackContext):
(WTR::resourceStatisticsCallback):
(WTR::TestController::isStatisticsPrevalentResource):
(WTR::TestController::setStatisticsHasHadUserInteraction):
(WTR::TestController::isStatisticsHasHadUserInteraction):
(WTR::TestController::setStatisticsGrandfathered):
(WTR::TestController::isStatisticsGrandfathered):
(WTR::TestController::setStatisticsSubframeUnderTopFrameOrigin):
(WTR::TestController::setStatisticsSubresourceUnderTopFrameOrigin):
(WTR::TestController::setStatisticsSubresourceUniqueRedirectTo):
(WTR::TestController::setStatisticsTimeToLiveUserInteraction):
(WTR::TestController::setStatisticsTimeToLiveCookiePartitionFree):
(WTR::TestController::statisticsProcessStatisticsAndDataRecords):
(WTR::TestController::statisticsUpdateCookiePartitioning):
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost):
(WTR::TestController::statisticsSubmitTelemetry):
(WTR::TestController::setStatisticsNotifyPagesWhenDataRecordsWereScanned):
(WTR::TestController::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
(WTR::TestController::setStatisticsNotifyPagesWhenTelemetryWasCaptured):
(WTR::TestController::setStatisticsMinimumTimeBetweenDataRecordsRemoval):
(WTR::TestController::setStatisticsGrandfatheringTime):
(WTR::TestController::setStatisticsMaxStatisticsEntries):
(WTR::TestController::setStatisticsPruneEntriesDownTo):
(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WTR::TestController::statisticsClearThroughWebsiteDataRemovalCallback):
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval):
(WTR::TestController::statisticsResetToConsistentState):

  • WebKitTestRunner/TestController.h:

LayoutTests:

Unskip the tests.

  • platform/wpe/TestExpectations:
  • platform/wpe/TestExpectations:
11:37 PM Changeset in webkit [222961] by dino@apple.com
  • 11 edits in trunk

Lots of missing frames in YouTube360 when fullscreen on MacBook
https://bugs.webkit.org/show_bug.cgi?id=177903
<rdar://problem/33273300>

Reviewed by Sam Weinig.

Source/WebCore:

Our compositing path for WebGL on macOS was too slow, requiring a copy
of the framebuffer into another GL context. Replace this by having
WebGL render into a texture that is backed by an IOSurface, and then
set the WebGLLayer to use the IOSurface as contents.

Covered by the existing WebGL tests.

  • platform/graphics/GraphicsContext3D.h:

(WebCore::GraphicsContext3D::platformTexture const): We no longer use the
framebuffer object outside the class, so change this to return the GL texture
that the framebuffer is rendering in to. It was kind-of strange that it was
named this way originally.
Also make endPaint available on macOS, and add the definitions for
createIOSurfaceBackingStore and updateFramebufferTextureBackingStoreFromLayer.

  • platform/graphics/cocoa/GraphicsContext3DCocoa.mm:

(WebCore::GraphicsContext3D::GraphicsContext3D): Now that we're using an IOSurface,
we're binding to a new attachment point, GL_TEXTURE_RECTANGLE.
(WebCore::GraphicsContext3D::endPaint): This is now being called on macOS and iOS,
so add a comment that explains the extra work that iOS needs to do. At some future
point it would be nice to make this slightly cleaner, so that iOS and macOS are
more similar.
(WebCore::GraphicsContext3D::allocateIOSurfaceBackingStore): New function that calls
into the corresponding WebGLLayer function.
(WebCore::GraphicsContext3D::updateFramebufferTextureBackingStoreFromLayer): Ditto.

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::wipeAlphaChannelFromPixels): Both readPixels and drawing a WebGL context
into another buffer need to fill out the alpha channel if this context was
created without one, otherwise the IOSurface backing store will happily provide
what might be non-zero values.
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): Call the helper above.
(WebCore::GraphicsContext3D::reshapeFBOs): Add more code to call into the macOS-specific
function to use an IOSurface as the framebuffer texture.
(WebCore::GraphicsContext3D::readPixels): Call the helper above.

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(PlatformCALayerCocoa::copyContentsFromLayer): Replace the use of the
deprecated setContentsChanged with reloadValueForKeyPath.

  • platform/graphics/cocoa/WebGLLayer.h: The macOS implementation now

inherits from CALayer directly rather than CAOpenGLLayer. It also adds
a few member variables to handle the IOSurfaces used for triple buffering.

  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer initWithGraphicsContext3D:]): If we were created without an
alpha channel, tell CA that we're an opaque layer. Also set the layer's transform
to identity, so that it calls into the code below to flip the contents.
(-[WebGLLayer setTransform:]): Because an IOSurface is used for the layer contents,
we don't get a chance to flip the drawing the way we do via the drawInContext delegate.
Instead we have to apply a scale(1, -1) transform on top of the layer transform to
make sure the layer is rendered right-way up.
(-[WebGLLayer setAnchorPoint:]): Ditto, except we have to assume the anchor point is
at the bottom of the layer, so flip the Y value.
(-[WebGLLayer display]): Swap between the drawing buffer and the contents buffer, and
then get a new buffer ready for display.
(createAppropriateIOSurface): Helper.
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): Initializes the
IOSurfaces used for drawing buffers.
(-[WebGLLayer bindFramebufferToNextAvailableSurface]): Take the next available IOSurface and
make it the drawing buffer (binding in to WebGL at the same time).
(-[WebGLLayer copyCGLPixelFormatForDisplayMask:]): Deleted.
(-[WebGLLayer copyCGLContextForPixelFormat:]): Deleted.
(-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Deleted.

  • platform/graphics/mac/WebLayer.mm: Remove the definition of reloadValueForKeyPath.

Source/WebCore/PAL:

Add reloadValueForKeyPath to replace setContentsChanged on CALayer.

  • pal/spi/cocoa/QuartzCoreSPI.h:
11:32 PM Changeset in webkit [222960] by commit-queue@webkit.org
  • 34 edits
    3 moves
    2 adds in trunk/Source

Update Source/ThirdParty/woff2 to 22c256bc457777744ba14b7325a6e8e0e7dec91c
https://bugs.webkit.org/show_bug.cgi?id=177994

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-05
Reviewed by Michael Catanzaro.

Source/ThirdParty:

  • woff2/CMakeLists.txt: Also consider the directory for public headers.
  • woff2/README.webkit:
  • woff2/include/woff2/decode.h: Renamed from Source/ThirdParty/woff2/src/woff2_dec.h.
  • woff2/include/woff2/encode.h: Renamed from Source/ThirdParty/woff2/src/woff2_enc.h.

(woff2::WOFF2Params::WOFF2Params):

  • woff2/include/woff2/output.h: Renamed from Source/ThirdParty/woff2/src/woff2_out.h.

(woff2::WOFF2Out::~WOFF2Out):
(woff2::WOFF2StringOut::MaxSize):

  • woff2/src/buffer.h:
  • woff2/src/convert_woff2ttf_*.cc:
  • woff2/src/file.h:
  • woff2/src/font.cc:
  • woff2/src/font.h:
  • woff2/src/glyph.cc:
  • woff2/src/glyph.h:
  • woff2/src/normalize.cc:
  • woff2/src/normalize.h:
  • woff2/src/port.h:
  • woff2/src/round.h:
  • woff2/src/store_bytes.h:
  • woff2/src/table_tags.cc:
  • woff2/src/table_tags.h:
  • woff2/src/transform.cc:
  • woff2/src/transform.h:
  • woff2/src/variable_length.cc:
  • woff2/src/variable_length.h:
  • woff2/src/woff2_common.cc:
  • woff2/src/woff2_common.h:
  • woff2/src/woff2_compress.cc:
  • woff2/src/woff2_dec.cc:
  • woff2/src/woff2_decompress.cc:
  • woff2/src/woff2_enc.cc:
  • woff2/src/woff2_info.cc:
  • woff2/src/woff2_out.cc:
  • woff2/update.sh: Also consider directory for public headers.

Source/WebCore:

No new tests, already covered by existing tests.

  • CMakeLists.txt: Include the directory for public headers instead.
  • platform/graphics/WOFFFileFormat.cpp: Use the public header

woff2/decode.h and do not use the "wOF2" constant from private headers.
(WebCore::isWOFF):
(WebCore::convertWOFFToSfnt):

10:48 PM Changeset in webkit [222959] by Nikita Vasilyev
  • 14 edits
    1 copy
    2 adds in trunk

Web Inspector: Styles Redesign: Add support for keyboard navigation (Tab, Shift-Tab, Enter, Esc)
https://bugs.webkit.org/show_bug.cgi?id=177711

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Enter, Tab, Shift-Tab should commit changes.
Escape should discard changes.

Tab and Enter should navigate forward (focus on the next field).
Shift-Tab should navigate backward (focus on the previous field).
Esc should not change the focus.

When navigating forward from:

  • Selector: Focus on the first property name. If it doesn’t exist, create a blank property.
  • Property name:
    • If property name is blank, discard the property and focus on the next editable field (property name or selector of the next rule).
    • If property is not blank, focus on the value.
  • Property value:
    • If the last value in the rule, create a blank property and focus on its name.
    • If not the last value in the rule, focus on the next editable field (property name or selector of the next rule).

When navigating backward from:

  • Selector: create a blank property on the previous editable rule and focus on its name.
  • Property name:
    • Focus on the rule's selector.
  • Property value:
    • Focus on the property name.
  • UserInterface/Base/Utilities.js:

(Event.prototype.stop):

  • UserInterface/Main.html:

Add new files. Keep one class per file.

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype.remove):
(WI.CSSProperty.prototype.set name):
(WI.CSSProperty.prototype.set rawValue):
(WI.CSSProperty.prototype.get editable):
(WI.CSSProperty.prototype._updateStyleText):
(WI.CSSProperty.prototype._updateOwnerStyleText):
Update indices and ranges of properties following the edited one to prevent data corruption.

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration.prototype.get selectorEditable):
(WI.CSSStyleDeclaration.prototype.set text):
(WI.CSSStyleDeclaration.prototype.newBlankProperty):
(WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
(WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
Implement adding new blank properties.

  • UserInterface/Models/TextRange.js:

(WI.TextRange.prototype.cloneAndModify):
Add an assert to catch negative number errors.

(WI.TextRange.prototype.collapseToEnd):
Add a utility function akin Selection.prototype.collapseToEnd.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WI.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey):
(WI.CSSStyleDeclarationTextEditor.prototype._handleTabKey):
(WI.CSSStyleDeclarationTextEditor.prototype._formattedContent):
Move PrefixWhitespace from a view to a model (WI.CSSStyleDeclaration.PrefixWhitespace),
since it's already used in the model.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:

(.spreadsheet-style-declaration-editor :matches(.name, .value).editing):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get _propertiesToRender):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._isFocused):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
Give SpreadsheetCSSStyleDeclarationEditor a delegate so that it can move focus to a CSS selector, or previous and next CSS rules.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.get propertiesEditor):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.get editable):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorStartEditingRuleSelector):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationEditorStartEditingAdjacentRule):
Give SpreadsheetCSSStyleDeclarationSection a delegate so that it can move focus to previous and next CSS rules.

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingNextRule):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingPreviousRule):
(WI.SpreadsheetRulesStyleDetailsPanel):
Implement focusing on the next and previous CSS rules.

  • UserInterface/Views/SpreadsheetSelectorField.js: Added.

(WI.SpreadsheetSelectorField):
(WI.SpreadsheetSelectorField.prototype.get editing):
(WI.SpreadsheetSelectorField.prototype.startEditing):
(WI.SpreadsheetSelectorField.prototype.stopEditing):
(WI.SpreadsheetSelectorField.prototype._selectText):
(WI.SpreadsheetSelectorField.prototype._handleClick):
(WI.SpreadsheetSelectorField.prototype._handleFocus):
(WI.SpreadsheetSelectorField.prototype._handleBlur):
(WI.SpreadsheetSelectorField.prototype._handleKeyDown):
Move SpreadsheetSelectorField into its own file.

  • UserInterface/Views/SpreadsheetStyleProperty.js: Added.

(WI.SpreadsheetStyleProperty):
(WI.SpreadsheetStyleProperty.prototype.get element):
(WI.SpreadsheetStyleProperty.prototype.get nameTextField):
(WI.SpreadsheetStyleProperty.prototype.get valueTextField):
(WI.SpreadsheetStyleProperty.prototype._remove):
(WI.SpreadsheetStyleProperty.prototype._update):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidChange):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
(WI.SpreadsheetStyleProperty.prototype._handleNameChange):
(WI.SpreadsheetStyleProperty.prototype._handleValueChange):
Move SpreadsheetStyleProperty into its own file.

  • UserInterface/Views/SpreadsheetTextField.js: Added.

(WI.SpreadsheetTextField):
(WI.SpreadsheetTextField.prototype.get element):
(WI.SpreadsheetTextField.prototype.get editing):
(WI.SpreadsheetTextField.prototype.get value):
(WI.SpreadsheetTextField.prototype.set value):
(WI.SpreadsheetTextField.prototype.startEditing):
(WI.SpreadsheetTextField.prototype.stopEditing):
(WI.SpreadsheetTextField.prototype._selectText):
(WI.SpreadsheetTextField.prototype._discardChange):
(WI.SpreadsheetTextField.prototype._handleFocus):
(WI.SpreadsheetTextField.prototype._handleBlur):
(WI.SpreadsheetTextField.prototype._handleKeyDown):
(WI.SpreadsheetTextField.prototype._handleInput):
Introduce SpreadsheetTextField that is used for editing CSS property names and values.

LayoutTests:

Add tests for WI.CSSProperty.prototype.remove.

  • inspector/css/css-property-expected.txt:
  • inspector/css/css-property.html:
10:04 PM Changeset in webkit [222958] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline fast/dom/navigator-detached-no-crash.html.
https://bugs.webkit.org/show_bug.cgi?id=177261

Unreviewed test gardening.

  • fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-elcapitan-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
10:00 PM Changeset in webkit [222957] by Ryan Haddad
  • 10 edits in trunk/Source/WebCore

Unreviewed, rolling out r222951 and r222952.
https://bugs.webkit.org/show_bug.cgi?id=177992

"Broke the iOS build and introduced a webgl LayoutTest
failure." (Requested by ryanhaddad on #webkit).

Reverted changesets:

"Lots of missing frames in YouTube360 when fullscreen on
MacBook"
https://bugs.webkit.org/show_bug.cgi?id=177903
http://trac.webkit.org/changeset/222951

"Lots of missing frames in YouTube360 when fullscreen on
MacBook"
https://bugs.webkit.org/show_bug.cgi?id=177903
http://trac.webkit.org/changeset/222952

Patch by Commit Queue <commit-queue@webkit.org> on 2017-10-05

8:51 PM Changeset in webkit [222956] by rniwa@webkit.org
  • 7 edits
    4 adds in trunk

DataTransfer shouldn't contain text/html when performing Paste and Match Style
https://bugs.webkit.org/show_bug.cgi?id=174165
<rdar://problem/33138027>

Reviewed by Wenson Hsieh.

Source/WebCore:

When performing Paste and Match Style, only expose the plain text by creating a StaticPasteboard with plain text content.

This patch introduces ClipboardEventKind enum class to differentiate regular paste and paste and match style (internally
called as pasteAsPlainText) since both operations use "paste" event.

Tests: editing/pasteboard/data-transfer-get-data-on-paste-as-plain-text-when-custom-pasteboard-data-disabled.html

editing/pasteboard/data-transfer-get-data-on-paste-as-plain-text.html

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::createForCopyAndPaste): Made this function take Pasteboard as an argument.

  • dom/DataTransfer.h:
  • editing/Editor.cpp:

(WebCore::ClipboardEventKind): Added.
(WebCore::eventNameForClipboardEvent): Added.
(WebCore::createDataTransferForClipboardEvent): Added.
(WebCore::dispatchClipboardEvent):
(WebCore::Editor::canDHTMLCut):
(WebCore::Editor::canDHTMLCopy):
(WebCore::Editor::canDHTMLPaste):
(WebCore::Editor::tryDHTMLCopy):
(WebCore::Editor::tryDHTMLCut):
(WebCore::Editor::tryDHTMLPaste): Deleted.
(WebCore::Editor::paste):
(WebCore::Editor::pasteAsPlainText):

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Add "text/html" when public.html UTI is in the pasteboard
even when the custom pasteboard data is disabled. We continue to add public.html in the case some app dependent on
seeing "public.html" in dataTransfer.types.

LayoutTests:

Added regression tests for pasting as plain text.

  • editing/pasteboard/data-transfer-get-data-on-paste-as-plain-text-expected.txt: Added.
  • editing/pasteboard/data-transfer-get-data-on-paste-as-plain-text-when-custom-pasteboard-data-disabled-expected.txt: Added.
  • editing/pasteboard/data-transfer-get-data-on-paste-as-plain-text-when-custom-pasteboard-data-disabled.html: Added.
  • editing/pasteboard/data-transfer-get-data-on-paste-as-plain-text.html: Added.
8:06 PM Changeset in webkit [222955] by timothy_horton@apple.com
  • 3 edits in trunk/Source

Fix the Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=177985

Unreviewed build fix.

  • CMakeLists.txt:
  • PlatformMac.cmake:

After r222917, there's one more piece of WebKitSystemInterface left.
And some missing bits of PaymentRequest.

8:01 PM Changeset in webkit [222954] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

JSC generate unified sources doesn't need to run during installhdrs.
https://bugs.webkit.org/show_bug.cgi?id=177640

Reviewed by Dan Bernstein.

generate unified sources doesn't need to have a xcconfig file
since we don't have any feature defines. Also, remove the plist
because there's no plist for this...

7:41 PM Changeset in webkit [222953] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

RenderTable should not hold section raw pointers
https://bugs.webkit.org/show_bug.cgi?id=177977
<rdar://problem/34846034>

Reviewed by Simon Fraser.

This enables us to remove forced recalcSections calls.

Covered by existing tests.

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::RenderTable):
(WebCore::resetSectionPointerIfNotBefore):
(WebCore::RenderTable::addChild):
(WebCore::RenderTable::recalcSections const):
(WebCore::RenderTable::sectionAbove const):

  • rendering/RenderTable.h:

(WebCore::RenderTable::header const):
(WebCore::RenderTable::footer const):
(WebCore::RenderTable::firstBody const):
(WebCore::RenderTable::topSection const):

7:36 PM Changeset in webkit [222952] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Lots of missing frames in YouTube360 when fullscreen on MacBook
https://bugs.webkit.org/show_bug.cgi?id=177903
<rdar://problem/33273300>

iOS build fix.

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
7:31 PM Changeset in webkit [222951] by dino@apple.com
  • 10 edits in trunk/Source/WebCore

Lots of missing frames in YouTube360 when fullscreen on MacBook
https://bugs.webkit.org/show_bug.cgi?id=177903
<rdar://problem/33273300>

Reviewed by Sam Weinig.

Our compositing path for WebGL on macOS was too slow, requiring a copy
of the framebuffer into another GL context. Replace this by having
WebGL render into a texture that is backed by an IOSurface, and then
set the WebGLLayer to use the IOSurface as contents.

Covered by the existing WebGL tests.

  • platform/graphics/GraphicsContext3D.h:

(WebCore::GraphicsContext3D::platformTexture const): We no longer use the
framebuffer object outside the class, so change this to return the GL texture
that the framebuffer is rendering in to. It was kind-of strange that it was
named this way originally.
Also make endPaint available on macOS, and add the definitions for
createIOSurfaceBackingStore and updateFramebufferTextureBackingStoreFromLayer.

  • platform/graphics/cocoa/GraphicsContext3DCocoa.mm:

(WebCore::GraphicsContext3D::GraphicsContext3D): Now that we're using an IOSurface,
we're binding to a new attachment point, GL_TEXTURE_RECTANGLE.
(WebCore::GraphicsContext3D::endPaint): This is now being called on macOS and iOS,
so add a comment that explains the extra work that iOS needs to do. At some future
point it would be nice to make this slightly cleaner, so that iOS and macOS are
more similar.
(WebCore::GraphicsContext3D::allocateIOSurfaceBackingStore): New function that calls
into the corresponding WebGLLayer function.
(WebCore::GraphicsContext3D::updateFramebufferTextureBackingStoreFromLayer): Ditto.

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::wipeAlphaChannelFromPixels): Both readPixels and drawing a WebGL context
into another buffer need to fill out the alpha channel if this context was
created without one, otherwise the IOSurface backing store will happily provide
what might be non-zero values.
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): Call the helper above.
(WebCore::GraphicsContext3D::reshapeFBOs): Add more code to call into the macOS-specific
function to use an IOSurface as the framebuffer texture.
(WebCore::GraphicsContext3D::readPixels): Call the helper above.

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(PlatformCALayerCocoa::copyContentsFromLayer): Replace the use of the
deprecated setContentsChanged with reloadValueForKeyPath.

  • platform/graphics/cocoa/WebGLLayer.h: The macOS implementation now

inherits from CALayer directly rather than CAOpenGLLayer. It also adds
a few member variables to handle the IOSurfaces used for triple buffering.

  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer initWithGraphicsContext3D:]): If we were created without an
alpha channel, tell CA that we're an opaque layer. Also set the layer's transform
to identity, so that it calls into the code below to flip the contents.
(-[WebGLLayer setTransform:]): Because an IOSurface is used for the layer contents,
we don't get a chance to flip the drawing the way we do via the drawInContext delegate.
Instead we have to apply a scale(1, -1) transform on top of the layer transform to
make sure the layer is rendered right-way up.
(-[WebGLLayer setAnchorPoint:]): Ditto, except we have to assume the anchor point is
at the bottom of the layer, so flip the Y value.
(-[WebGLLayer display]): Swap between the drawing buffer and the contents buffer, and
then get a new buffer ready for display.
(createAppropriateIOSurface): Helper.
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): Initializes the
IOSurfaces used for drawing buffers.
(-[WebGLLayer bindFramebufferToNextAvailableSurface]): Take the next available IOSurface and
make it the drawing buffer (binding in to WebGL at the same time).
(-[WebGLLayer copyCGLPixelFormatForDisplayMask:]): Deleted.
(-[WebGLLayer copyCGLContextForPixelFormat:]): Deleted.
(-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Deleted.

  • platform/graphics/mac/WebLayer.mm: Remove the definition of reloadValueForKeyPath.
6:30 PM Changeset in webkit [222950] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION(r222868): Web Inspector: Timeline ScopeBar Navigation Bar items too large
https://bugs.webkit.org/show_bug.cgi?id=177979

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-05
Reviewed by Matt Baker.

  • UserInterface/Views/ButtonNavigationItem.css:

(.navigation-bar .item.button.text-only):
Make the height of text-only items the size of the text, not 100%.

6:25 PM Changeset in webkit [222949] by mmaxfield@apple.com
  • 7 edits
    2 adds in trunk

Add "display" to FontFace Javascript object
https://bugs.webkit.org/show_bug.cgi?id=175383
<rdar://problem/33813239>

Reviewed by Simon Fraser.

Source/WebCore:

We already have all the necessary infrastructure. Just hook it up to the .idl file!

Test: fast/text/font-loading-font-display.html

  • css/CSSFontFace.h:
  • css/CSSPrimitiveValueMappings.h:
  • css/FontFace.cpp:

(WebCore::FontFace::create):
(WebCore::FontFace::setDisplay):
(WebCore::FontFace::display const):

  • css/FontFace.h:
  • css/FontFace.idl:

LayoutTests:

  • fast/text/font-loading-font-display-expected.txt: Added.
  • fast/text/font-loading-font-display.html: Added.
6:15 PM Changeset in webkit [222948] by Yusuke Suzuki
  • 2 edits in trunk/PerformanceTests

Unreviewed, use std::vector instead of variable length array
https://bugs.webkit.org/show_bug.cgi?id=177856

This is OK because originally this code uses dispatch queue, which
should have allocation inside it too.

  • MallocBench/MallocBench/message.cpp:

(benchmark_message_many):

5:36 PM Changeset in webkit [222947] by keith_miller@apple.com
  • 4 edits in trunk/Source

Unreviewed, tapi builds without optimization so we should have TAPI passes -DRELEASE_WITHOUT_OPTIMIZATIONS.

Source/WebKit:

  • Configurations/Base.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig:
5:13 PM Changeset in webkit [222946] by jer.noble@apple.com
  • 55 edits in trunk

[Cocoa] Enable ENABLE_ENCRYPTED_MEDIA build-time setting
https://bugs.webkit.org/show_bug.cgi?id=177261

Reviewed by Eric Carlson.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Enable ENCRYPTED_MEDIA, and make the changes required for ENABLED_MEDIA and LEGACY_ENABLED_MEDIA
to co-exist while both enabled simultaneously.

  • Configurations/FeatureDefines.xcconfig:
  • Modules/encryptedmedia/legacy/LegacyCDM.cpp:

(WebCore::LegacyCDM::registerCDMFactory):
(WebCore::LegacyCDM::supportsKeySystem):
(WebCore::LegacyCDM::keySystemSupportsMimeType):
(WebCore::LegacyCDM::create):
(WebCore::LegacyCDM::LegacyCDM):
(WebCore::LegacyCDM::~LegacyCDM):
(WebCore::LegacyCDM::supportsMIMEType const):
(WebCore::LegacyCDM::createSession):
(WebCore::LegacyCDM::mediaPlayer const):
(WebCore::CDM::registerCDMFactory): Deleted.
(WebCore::CDM::supportsKeySystem): Deleted.
(WebCore::CDM::keySystemSupportsMimeType): Deleted.
(WebCore::CDM::create): Deleted.
(WebCore::CDM::CDM): Deleted.
(WebCore::CDM::~CDM): Deleted.
(WebCore::CDM::supportsMIMEType const): Deleted.
(WebCore::CDM::createSession): Deleted.
(WebCore::CDM::mediaPlayer const): Deleted.

  • Modules/encryptedmedia/legacy/LegacyCDM.h:

(WebCore::LegacyCDMClient::~LegacyCDMClient):
(WebCore::LegacyCDM::client const):
(WebCore::LegacyCDM::setClient):
(WebCore::CDMClient::~CDMClient): Deleted.
(WebCore::CDM::keySystem const): Deleted.
(WebCore::CDM::client const): Deleted.
(WebCore::CDM::setClient): Deleted.

  • Modules/encryptedmedia/legacy/LegacyCDMPrivate.h:
  • Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp:

(WebCore::LegacyCDMPrivateClearKey::supportsKeySystem):
(WebCore::LegacyCDMPrivateClearKey::supportsKeySystemAndMimeType):
(WebCore::LegacyCDMPrivateClearKey::supportsMIMEType):
(WebCore::LegacyCDMPrivateClearKey::createSession):
(WebCore::CDMPrivateClearKey::supportsKeySystem): Deleted.
(WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Deleted.
(WebCore::CDMPrivateClearKey::supportsMIMEType): Deleted.
(WebCore::CDMPrivateClearKey::createSession): Deleted.

  • Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h:

(WebCore::LegacyCDMPrivateClearKey::LegacyCDMPrivateClearKey):
(WebCore::LegacyCDMPrivateClearKey::~LegacyCDMPrivateClearKey):
(WebCore::CDMPrivateClearKey::CDMPrivateClearKey): Deleted.
(WebCore::CDMPrivateClearKey::~CDMPrivateClearKey): Deleted.

  • Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp:

(WebCore::CDMPrivateMediaPlayer::createSession):

  • Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.h:

(WebCore::CDMPrivateMediaPlayer::CDMPrivateMediaPlayer):
(WebCore::CDMPrivateMediaPlayer::cdm const):

  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:

(WebCore::CDMSessionClearKey::CDMSessionClearKey):

  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:

(WebCore::WebKitMediaKeys::create):
(WebCore::WebKitMediaKeys::WebKitMediaKeys):
(WebCore::WebKitMediaKeys::isTypeSupported):
(WebCore::WebKitMediaKeys::cdmMediaPlayer const):

  • Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/encryptedmedia/CDMFactory.cpp:

(WebCore::CDMFactory::platformRegisterFactories):

  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::ClearKeyState::singleton):
(WebCore::parseJSONObject):
(WebCore::parseLicenseFormat):
(WebCore::parseLicenseReleaseAcknowledgementFormat):
(WebCore::CDMFactoryClearKey::singleton):
(WebCore::containsPersistentLicenseType):
(WebCore::CDMInstanceClearKey::keySystem const):

  • platform/encryptedmedia/clearkey/CDMClearKey.h:
  • platform/graphics/LegacyCDMSession.h:

(WebCore::LegacyCDMSessionClient::~LegacyCDMSessionClient):
(WebCore::CDMSession::type):
(WebCore::CDMSessionClient::~CDMSessionClient): Deleted.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::createSession):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::createSession):

  • platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:

(WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC):
(WebCore::CDMPrivateMediaSourceAVFObjC::cdm const):

  • platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:

(WebCore::CDMPrivateMediaSourceAVFObjC::createSession):

  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

(WebCore::MediaPlayerPrivateAVFoundationCF::createSession):

  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:

(WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession):
(WebCore::CDMSessionAVContentKeySession::update):

  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:

(WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC):
(WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
(WebCore::CDMSessionAVFoundationObjC::playerDidReceiveError):

  • platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:

(WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession):

  • platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
  • platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:

(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createSession):

  • testing/Internals.cpp:

(WebCore::Internals::initializeMockCDM):

  • testing/LegacyMockCDM.cpp:

(WebCore::LegacyMockCDM::supportsKeySystem):
(WebCore::LegacyMockCDM::supportsKeySystemAndMimeType):
(WebCore::LegacyMockCDM::supportsMIMEType):
(WebCore::LegacyMockCDM::createSession):
(WebCore::MockCDMSession::MockCDMSession):
(WebCore::MockCDM::supportsKeySystem): Deleted.
(WebCore::MockCDM::supportsKeySystemAndMimeType): Deleted.
(WebCore::MockCDM::supportsMIMEType): Deleted.
(WebCore::MockCDM::createSession): Deleted.

  • testing/LegacyMockCDM.h:

(WebCore::LegacyMockCDM::LegacyMockCDM):
(WebCore::LegacyMockCDM::~LegacyMockCDM):
(WebCore::MockCDM::MockCDM): Deleted.
(WebCore::MockCDM::~MockCDM): Deleted.

  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMInstance::keySystem const):

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
4:48 PM Changeset in webkit [222945] by fpizlo@apple.com
  • 8 edits in trunk/Source

bmalloc mutex should be adaptive
https://bugs.webkit.org/show_bug.cgi?id=177839

Reviewed by Michael Saboff.

Source/bmalloc:

This pulls the WordLock algorithm into bmalloc, mostly by copy-pasting the code. We need to
copy paste because sometimes we build WTF without bmalloc, so WTF cannot rely on bmalloc for
anything other than malloc.

Reland after fixing ancient WordLock bug: the notify_one has to happen with the lock held
to ensure it doesn't run after that thread has died.

  • bmalloc/Algorithm.h:

(bmalloc::compareExchangeWeak):
(bmalloc::compareExchangeStrong):

  • bmalloc/PerThread.h:
  • bmalloc/StaticMutex.cpp:

(bmalloc::StaticMutex::lockSlow):
(bmalloc::StaticMutex::unlockSlow):
(bmalloc::StaticMutex::lockSlowCase): Deleted.

  • bmalloc/StaticMutex.h:

(bmalloc::StaticMutex::try_lock):
(bmalloc::StaticMutex::isLocked const):
(bmalloc::StaticMutex::init):
(bmalloc::StaticMutex::tryLock):
(bmalloc::StaticMutex::lock):
(bmalloc::StaticMutex::unlock):
(bmalloc::sleep): Deleted.
(bmalloc::waitUntilFalse): Deleted.

Source/WTF:

Add some comments that I thought of while copy-pasting this code.

Reland after fixing ancient WordLock bug: the notify_one has to happen with the lock held
to ensure it doesn't run after that thread has died.

  • wtf/LockAlgorithmInlines.h:
  • wtf/WordLock.cpp:
4:18 PM Changeset in webkit [222944] by achristensen@apple.com
  • 8 edits in trunk

Add ObjC equivalent of WKPageNavigationClient.didChangeBackForwardList
https://bugs.webkit.org/show_bug.cgi?id=177966
<rdar://problem/22387135>

Reviewed by Tim Horton.

Source/WebKit:

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::didChangeBackForwardList):

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):
(WebKit::NavigationState::NavigationClient::didChangeBackForwardList):
(WebKit::NavigationState::NavigationClient::willPerformClientRedirect):
(WebKit::NavigationState::NavigationClient::didCancelClientRedirect):
(WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
(WebKit::NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace):
(WebKit::NavigationState::NavigationClient::processDidTerminate):
(WebKit::NavigationState::NavigationClient::processDidBecomeResponsive):
(WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive):
(WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
(WebKit::NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame):
(WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
(WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
(WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
(WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didChangeBackForwardList):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:

(-[ListItemDelegate _webView:backForwardListItemAdded:removed:]):
(-[ListItemDelegate webView:didFinishNavigation:]):
(TEST):

4:14 PM Changeset in webkit [222943] by bshafiei@apple.com
  • 1 copy in tags/Safari-604.3.5

Tag Safari-604.3.5.

4:14 PM Changeset in webkit [222942] by achristensen@apple.com
  • 5 edits in trunk/Source/WebKit

Add ObjC SPI with userInfo corresponding to WKPageNavigationClient's decidePolicyForNavigationAction, didStartProvisionalNavigation, and didFailNavigation
https://bugs.webkit.org/show_bug.cgi?id=177974
<rdar://problem/22888802>

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::NavigationClient::didStartProvisionalNavigation):
(WebKit::NavigationState::NavigationClient::didFailNavigationWithError):

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):

4:05 PM Changeset in webkit [222941] by wilander@apple.com
  • 42 edits
    1 copy
    2 moves
    3 adds in trunk

Storage Access API: Web process should ask UI process for grant/deny
https://bugs.webkit.org/show_bug.cgi?id=176941
<rdar://problem/34440036>

Reviewed by Chris Dumez and Sam Weinig.

Source/WebCore:

Tests: http/tests/storageAccess/request-and-grant-storage-access-cross-origin-non-sandboxed-iframe.html

http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction.html
http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-without-user-interaction.html

This patch changes Document::requestStorageAccess() so that it
calls the ChromeClient instead of the ResourceLoadObserver to
request storage access on behalf of the iframe.
The patch also changes how the promise is used, from returning
a boolean to either resolving or rejecting to signal grant/deny
access respectively.

  • dom/Document.cpp:

(WebCore::Document::requestStorageAccess):

  • dom/Document.idl:
  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::registerStorageAccess): Deleted.

  • loader/ResourceLoadObserver.h:
  • page/ChromeClient.h:

Source/WebKit:

This patch adds infrastructure to let WebCore::Document call
WebKit::WebResourceLoadStatisticsStore and ask for storage
access on behalf of an iframe. The communication goes through
the ChromeClient since we might want to add a native prompt.
From the ChromeClient it continues to the WebPage which
messages the WebPageProxy. The WebPageProxy calls the
WebsiteDataStore which owns the WebResourceLoadStatisticsStore.
A uint64_t is used to match the right callback with the boolean
result.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestStorageAccess):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):

  • UIProcess/WebResourceLoadStatisticsStore.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::requestStorageAccess):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::requestStorageAccess):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::nextRequestStorageAccessContextId):
(WebKit::WebPage::requestStorageAccess):
(WebKit::WebPage::storageAccessResponse):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

LayoutTests:

The iframes now communicate the results back to the top frame through postMessage.
Also, denied access results in a rejected promise which is handled in these
changed test cases.

  • http/tests/storageAccess/request-and-deny-storage-access-cross-origin-iframe-expected.txt:
  • http/tests/storageAccess/request-and-deny-storage-access-cross-origin-iframe.html:
  • http/tests/storageAccess/request-and-deny-storage-access-cross-origin-sandboxed-iframe-expected.txt:
  • http/tests/storageAccess/request-and-deny-storage-access-cross-origin-sandboxed-iframe.html:
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-iframe-expected.txt: Removed.
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-iframe.html: Removed.

Renamed to request-and-grant-storage-access-cross-origin-non-sandboxed-iframe.html.

  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-non-sandboxed-iframe-expected.txt: Added.
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-non-sandboxed-iframe.html: Added.

See comment above on renaming.

  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-expected.txt:
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-expected.txt: Added.
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction.html: Added.
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-without-user-interaction-expected.txt: Added.
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-without-user-interaction.html: Added.

Two new test cases added for the new logic in WebKit::WebResourceLoadStatisticsStore.

  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe.html:
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-nested-iframe-expected.txt:
  • http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-nested-iframe.html:
  • http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-with-unique-origin-expected.txt:
  • http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-with-unique-origin.html:
  • http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-without-allow-token-expected.txt:
  • http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-without-allow-token.html:
  • http/tests/storageAccess/request-storage-access-same-origin-iframe-expected.txt:
  • http/tests/storageAccess/request-storage-access-same-origin-iframe.html:
  • http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe-expected.txt:
  • http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe-without-allow-token-expected.txt:
  • http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe-without-allow-token.html:
  • http/tests/storageAccess/request-storage-access-same-origin-sandboxed-iframe.html:
  • http/tests/storageAccess/request-storage-access-top-frame-expected.txt:
  • http/tests/storageAccess/request-storage-access-top-frame.html:
  • http/tests/storageAccess/resources/request-storage-access-iframe.html:
  • platform/mac-wk2/TestExpectations:

Added the new tests as [ Pass ].

4:02 PM Changeset in webkit [222940] by BJ Burg
  • 2 edits in trunk/Source/WebCore

Web Inspector: EventLoop::cycle() should not send nil NSEvents
https://bugs.webkit.org/show_bug.cgi?id=177971
<rdar://problem/20387399>

Reviewed by Joseph Pecoraro.

It is possible for the next matching event to be nil.
WebKit clients don't expect to be sent a nil NSEvent, so add a null check here.

  • platform/mac/EventLoopMac.mm:

(WebCore::EventLoop::cycle):

3:52 PM Changeset in webkit [222939] by Ryan Haddad
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r222929.

Caused assertion failures during LayoutTests.

Reverted changeset:

"Only add prototypes to the PrototypeMap if they're not
already present"
https://bugs.webkit.org/show_bug.cgi?id=177952
http://trac.webkit.org/changeset/222929

3:43 PM Changeset in webkit [222938] by Chris Dumez
  • 21 edits in trunk/Source

Drop unused parameters for CookiesStrategy::cookiesEnabled()
https://bugs.webkit.org/show_bug.cgi?id=177957

Reviewed by Alex Christensen.

Source/WebCore:

  • loader/CookieJar.cpp:

(WebCore::cookiesEnabled):

  • platform/CookiesStrategy.h:
  • platform/network/PlatformCookieJar.h:
  • platform/network/cf/CookieJarCFNet.cpp:

(WebCore::cookiesEnabled):

  • platform/network/curl/CookieJarCurl.cpp:

(WebCore::CookieJarCurlFileSystem::cookiesEnabled):
(WebCore::cookiesEnabled):

  • platform/network/curl/CookieJarCurl.h:
  • platform/network/mac/CookieJarMac.mm:

(WebCore::cookiesEnabled):

  • platform/network/soup/CookieJarSoup.cpp:

(WebCore::cookiesEnabled):

Source/WebKit:

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::cookiesEnabled):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::cookiesEnabled):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebPlatformStrategies.cpp:

(WebPlatformStrategies::cookiesEnabled):

  • WebCoreSupport/WebPlatformStrategies.h:
3:41 PM Changeset in webkit [222937] by Megan Gardner
  • 3 edits in trunk/Tools

check-webkit-style erroneously requires a space between the carrot and brace in obj-c blocks.
https://bugs.webkit.org/show_bug.cgi?id=177897

Reviewed by Dan Bernstein and Jonathan Bedard.

Remove the check for a space between and {,
as this is valid and expected Obj-C. Now check to make sure there is
no space at all between
and {, and also that there is a space between
the end of an argument list and the {.

  • Scripts/webkitpy/style/checkers/cpp.py:

(regex_for_lambdas_and_blocks):

3:40 PM Changeset in webkit [222936] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

RenderListItem should not hold raw pointers to RenderListMarker.
https://bugs.webkit.org/show_bug.cgi?id=177968
<rdar://problem/34842943>

Reviewed by Antti Koivisto.

Now we don't need to unregister the marker from the list item explicitly.

Covered by existing tests.

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::willBeDestroyed):
(WebCore::RenderListItem::positionListMarker):

  • rendering/RenderListItem.h:
  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::willBeDestroyed):

  • style/RenderTreeUpdaterListItem.cpp:

(WebCore::RenderTreeUpdater::ListItem::updateMarker):

3:32 PM Changeset in webkit [222935] by Megan Gardner
  • 2 edits in trunk/Websites/webkit.org

Update Webkit Style webpage to include Obj-C blocks
https://bugs.webkit.org/show_bug.cgi?id=177906

Reviewed by Tim Horton.

  • code-style.md:
2:54 PM Changeset in webkit [222934] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

RenderSVGRoot should check the renderers inside its visualOverflowRect for hit testing if the overflow is visible
https://bugs.webkit.org/show_bug.cgi?id=177953
<rdar://problem/34788389>

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

Source/WebCore:

Test: svg/hittest/svg-visual-overflow-rect.html

If an SVGElement is positioned outside the rectangle of the root element,
it can still be drawn if the root element has "overflow: visible" applied.
But since SVGElement can be drawn in this case, it should be accessible
through nodeAtPoint() which is used for hit testing.

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::nodeAtPoint):

LayoutTests:

  • svg/hittest/svg-visual-overflow-rect-expected.html: Added.
  • svg/hittest/svg-visual-overflow-rect.html: Added.
2:31 PM Changeset in webkit [222933] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Mark 4 fast/text layout tests as flaky on Windows.
https://bugs.webkit.org/show_bug.cgi?id=177964

Unreviewed test gardening.

  • platform/win/TestExpectations:
2:14 PM Changeset in webkit [222932] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

RenderButton should not hold raw pointers to its direct children.
https://bugs.webkit.org/show_bug.cgi?id=177960
<rdar://problem/34840807>

Reviewed by Antti Koivisto.

The correct way of destroying a renderer is to call ::removeFromParentAndDestroy().

Covered by existing tests.

  • rendering/RenderButton.cpp:

(WebCore::RenderButton::RenderButton):
(WebCore::RenderButton::addChild):
(WebCore::RenderButton::takeChild):
(WebCore::RenderButton::updateAnonymousChildStyle const):
(WebCore::RenderButton::setText):
(WebCore::RenderButton::text const):

  • rendering/RenderButton.h:
2:07 PM Changeset in webkit [222931] by n_wang@apple.com
  • 3 edits in trunk/LayoutTests

AX: [iOS] Layout Test accessibility/ios-simulator/video-elements-ios.html is failing
https://bugs.webkit.org/show_bug.cgi?id=177954
<rdar://problem/34838094>

We should do the isIgnored check instead of the null check.

Reviewed by Chris Fleizach.

  • accessibility/ios-simulator/video-elements-ios-expected.txt:
  • accessibility/ios-simulator/video-elements-ios.html:
1:39 PM Changeset in webkit [222930] by clopez@igalia.com
  • 6 edits in trunk

Generate a compile error if release is built without compiler optimizations
https://bugs.webkit.org/show_bug.cgi?id=177665

Reviewed by Brian Burg.

.:

Default to RelWithDebInfo if CMAKE_BUILD_TYPE is unset.

  • CMakeLists.txt:

Source/JavaScriptCore:

Pass -DRELEASE_WITHOUT_OPTIMIZATIONS to testair.cpp and testb3.cpp because
this files are compiled with -O0 for build speed reasons after r195639.

Source/WTF:

For GCC and Clang, generate an error at build time that will alert
the developer that she is trying to build Release without any compiler
optimization. A build time error is much better than an unexpected
"oh, WebKit is really slow ..." situation later.

If this was intended, then we tell the developer that she can continue
by just setting -DRELEASE_WITHOUT_OPTIMIZATIONS in the list of build
flags.

The intention of this patch is to ensure that nobody builds Release
without enabling compiler optimization by mistake.

  • wtf/Compiler.h:
12:58 PM Changeset in webkit [222929] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Only add prototypes to the PrototypeMap if they're not already present
https://bugs.webkit.org/show_bug.cgi?id=177952

Reviewed by Michael Saboff and JF Bastien.

With poly proto, we need to call PrototypeMap::add more frequently since we don't
know if the prototype is already in the map or not based solely on Structure.
PrototypeMap::add was calling WeakMap::set unconditionally, which would unconditionally
allocate a Weak handle. Allocating a Weak handle is expensive. It's at least 8x more
expensive than just checking if the prototype is in the map prior to adding it. This
patch makes the change to only add the prototype if it's not already in the map. To
do this, I've added a WeakMap::add API that just forwards into HashMap's add API.
This allows us to both only do a single hash table lookup and also to allocate only
a single Weak handle when necessary.

  • runtime/PrototypeMapInlines.h:

(JSC::PrototypeMap::addPrototype):

  • runtime/WeakGCMap.h:

(JSC::WeakGCMap::add):

12:12 PM Changeset in webkit [222928] by ddkilzer@apple.com
  • 4 edits in trunk/Source

Bug 177893: Disable -Wcast-qual for new clang compiler in Apple ports
<https://webkit.org/b/177893>
<rdar://problem/33667497>

Reviewed by Tim Horton.

Source/WebCore:

  • Configurations/Base.xcconfig:

(WARNING_CFLAGS): Remvoe -Wcast-qual until we can provide a safe
cast function that lets us re-enable the warning.

Source/WTF:

  • wtf/RetainPtr.h:

(WTF::RetainPtr::fromStorageType const): Disable warnings for
-Wcast-qual until we can provide a safe cast function that lets
us re-enable the warning.

12:09 PM Changeset in webkit [222927] by timothy_horton@apple.com
  • 5 edits in trunk

Make progress toward properly-formed XPC services in the Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=177918

Reviewed by Alex Christensen.

.:

  • Source/cmake/WebKitMacros.cmake:

Add a macro wrapper around 'ln'.

Source/WebKit:

  • CMakeLists.txt:
  • PlatformMac.cmake:

Turn on the storage process on Mac, and fix its build.
Move XPC services to Versions/A/XPCServices and add the toplevel
XPCServices as a symlink of that.
Run the XPC services' Info.plists through configure_file, and substitute
the important variables (most critically the bundle identifier).
Factor out the service setup so we don't keep duplicating it as it
gets more complicated.

12:02 PM Changeset in webkit [222926] by mmaxfield@apple.com
  • 18 edits
    12 adds
    6 deletes in trunk

Implement font-display loading behaviors
https://bugs.webkit.org/show_bug.cgi?id=175384
<rdar://problem/33813243>

Reviewed by Darin Adler.

Source/WebCore:

The font-display descriptors works off of the following model of font loading:

  1. When a font loads, the @font-face enters the first phase, called the "block period." Here,

text using this @font-face is rendered as invisible using a fallback font for metrics. If the
file finishes loading during this period, it is swapped in (visibly).

  1. When the first phase is over, the @font-face enters the second phase, called the "swap

period." Here, text using this @font-face is rendered visibly using a fallback font. If the
file finishes loading during this period, it is swapped in.

  1. When the second phase is over, the @font-face enters the third phase, called the "failure

period." Here, text using this @font-face is rendered visibly using a fallback font. If the
file finishes loading during this period, it is not swapped in (but it does live in the
network cache for subsequent page loads). This phase lasts forever.

The font-display descriptor changes the duration of these phases. For example, our default
font loading behavior can be achieved by making the first phase 3 seconds long and making the
second phase infinitely long (so the third phase is never reached).

Luckily, our CSSFontFace class already has states which correspond to each phase listed above:
Loading, TimedOut, and Failure. This patch migrates our existing 3-second timer to have logic
to correctly set the timeout duration based on the value of the font-display descriptor and
the current status(). This occurs inside CSSFontFace::setStatus().

This has implications for testing. Previously, our tests for the font loading behavior had a
single boolean that describes whether or not font loads should immediately jump to the "swap
period". Clearly, this is insufficient for testing all aspects of the font-display descriptor.
Instead, this patch deletes this existing infrastructure and instead creates three more fake
values of font-display (achieved in tests by using window.internals). These fake values make
fonts immediately jump into a particular state and stay there forever (so the timeout values
are, for example, [0, infinity, infinity] to test the swap period). This works because
CSSFontFace is smart enough to synchronously move between states that have a 0 timeout, so
there is no race between these timers and font loads.

We also need to test the behavior when a file downloads and when a file hasn't been loaded
yet (and the @font-face is in a particular state). Therefore, this patch adds another bool
which indicates whether the font subsystem should totally ignore font load events. This means
that a font will successfully download (and DOMContentLoaded will be fired, because that
uses the loading subsystem), but the font subsystem will plug its ears and ignore the load.
This means we can test the invisibility of text during the "block period" because DRT will
see that the page load has completed, but the font subsystem will pretend like the font is
still loading and draw invisibly.

Therefore, there are 6 tests: a test to test each of the 3 states an @font-face block may be
in, times 2 for whether or not we are ignoring font loads. These are more comprehensive than
the existing font loading tests which used internals.settings.setWebFontsAlwaysFallBack(),
so I deleted those tests in favor of these new ones.

Tests: fast/text/loading-block-finish.html

fast/text/loading-block-nofinish.html
fast/text/loading-failure-finish.html
fast/text/loading-failure-nofinish.html
fast/text/loading-swap-finish.html
fast/text/loading-swap-nofinish.html

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::setLoadingBehavior):
(WebCore::CSSFontFace::fontLoadEventOccurred): Remove old testing infrastructure.
(WebCore::CSSFontFace::timeoutFired): Previously, the timer was only used for going
from Loading -> TimedOut. Now, we have to ask the status() to figure out which
state transition we should be performing.
(WebCore::CSSFontFace::allSourcesFailed const): A Failed state needs to return true
here, even if some of the sources successfully downloaded.
(WebCore::CSSFontFace::setStatus): The logic to figure out how long to set the timer
for. Also, if the timer value is 0, synchronously recurse to change the status instead
of setting a 0-delay timer.
(WebCore::CSSFontFace::fontLoaded): Remove old testing infrastructure.
(WebCore::CSSFontFace::fontTimeoutIndex const): Implement new testing infrastructure.
(WebCore::CSSFontFace::shouldIgnoreFontLoadCompletions const): Ditto.
(WebCore::CSSFontFace::pump): See comment. Also, we're allowed to be in the Failure
state in more scenarios now, so relax some of our ASSERT()s.
(WebCore::CSSFontFace::font): Ditto.
(WebCore::CSSFontFace::webFontsShouldAlwaysFallBack const): Deleted.

  • css/CSSFontFace.h: Migrate to new testing infrastructure.
  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::CSSFontFaceSource): Implement new testing infrastructure.
(WebCore::CSSFontFaceSource::shouldIgnoreFontLoadCompletions const): Ditto.
(WebCore::CSSFontFaceSource::fontLoaded): Ditto.

  • css/CSSFontFaceSource.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::beginLoadingFontSoon): Remove old testing infrastructure.

  • css/CSSSegmentedFontFace.cpp: It's possible to get different values out of

CSSFontFace::font() in successive calls during the same runloop. FontRanges will
include a raw pointer to one of the values, so all the values need to be kept alive.

  • page/Settings.cpp: Migrate to new testing infrastructure.

(WebCore::Settings::Settings):
(WebCore::Settings::setFontTimeoutIndex):
(WebCore::Settings::setShouldIgnoreFontLoadCompletions):
(WebCore::Settings::setWebFontsAlwaysFallBack): Deleted.

  • page/Settings.h: Ditto.

(WebCore::Settings::fontTimeoutIndex const):
(WebCore::Settings::shouldIgnoreFontLoadCompletions const):
(WebCore::Settings::webFontsAlwaysFallBack const): Deleted.

  • testing/InternalSettings.cpp: Ditto.

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setFontTimeoutIndex):
(WebCore::InternalSettings::setShouldIgnoreFontLoadCompletions):
(WebCore::InternalSettings::setWebFontsAlwaysFallBack): Deleted.

  • testing/InternalSettings.h: Ditto.
  • testing/InternalSettings.idl: Ditto.

LayoutTests:

Delete the tests using the old testing infrastructure and replace them
with tests that use the new testing infrastructure.

  • fast/text/font-loading-system-fallback-expected.html: Removed.
  • fast/text/font-loading-system-fallback.html: Removed.
  • fast/text/loading-block-finish-expected.html: Added.
  • fast/text/loading-block-finish.html: Added.
  • fast/text/loading-block-nofinish-expected.html: Added.
  • fast/text/loading-block-nofinish.html: Added.
  • fast/text/loading-failure-finish-expected.html: Added.
  • fast/text/loading-failure-finish.html: Added.
  • fast/text/loading-failure-nofinish-expected.html: Added.
  • fast/text/loading-failure-nofinish.html: Added.
  • fast/text/loading-swap-finish-expected.html: Added.
  • fast/text/loading-swap-finish.html: Added.
  • fast/text/loading-swap-nofinish-expected.html: Added.
  • fast/text/loading-swap-nofinish.html: Added.
  • fast/text/web-font-load-fallback-during-loading-2-expected.html: Removed.
  • fast/text/web-font-load-fallback-during-loading-2.html: Removed.
  • fast/text/web-font-load-fallback-during-loading-expected.html: Removed.
  • fast/text/web-font-load-fallback-during-loading.html: Removed.
  • platform/gtk/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/win/TestExpectations:
11:59 AM Changeset in webkit [222925] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Disable probe OSR exit on 32-bit until it's fixed.

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

11:57 AM Changeset in webkit [222924] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Layout Test media/modern-media-controls/scrubber-support/scrubber-support-drag.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=174682

Patch by Antoine Quint <Antoine Quint> on 2017-10-05
Reviewed by Dean Jackson.

This test could fail since we would start it before the time control was fully sized and only
the scrubber had bounds, but not the elapsed time label. We have to wait on both being fully
sized before starting the test and only then it is reliable.

  • media/modern-media-controls/scrubber-support/scrubber-support-drag.html:
  • platform/mac/TestExpectations:
11:51 AM Changeset in webkit [222923] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Layout Test media/modern-media-controls/scrubber-support/scrubber-support-click.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=177930

Patch by Antoine Quint <Antoine Quint> on 2017-10-05
Reviewed by Dean Jackson.

In cases where this test failed, it actually worked as expected but the "timeupdate" event would be fired
twice, most likely because it was registered twice. We now use an asynchronous expectation to run the test
which should only register the event listener once and make the test more reliable.

  • media/modern-media-controls/scrubber-support/scrubber-support-click-expected.txt:
  • media/modern-media-controls/scrubber-support/scrubber-support-click.html:
11:48 AM Changeset in webkit [222922] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

RenderMathMLFenced should not hold a raw pointer to RenderMathMLFencedOperator
https://bugs.webkit.org/show_bug.cgi?id=177950
<rdar://problem/34837002>

Reviewed by Antti Koivisto.

Even though RenderMathMLFencedOperator is a child renderer, it's lifetime is not explicitly managed by
RenderMathMLFenced.

Covered by existing test cases.

  • rendering/mathml/RenderMathMLFenced.cpp:

(WebCore::RenderMathMLFenced::RenderMathMLFenced):
(WebCore::RenderMathMLFenced::makeFences):
(WebCore::RenderMathMLFenced::addChild):

  • rendering/mathml/RenderMathMLFenced.h:
11:47 AM Changeset in webkit [222921] by aestes@apple.com
  • 19 edits
    13 copies
    1 move
    5 adds in trunk

[Payment Request] Add a payment method that supports Apple Pay
https://bugs.webkit.org/show_bug.cgi?id=177850

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-abort-method.https-expected.txt:
  • web-platform-tests/payment-request/payment-request-show-method.https-expected.txt:

Source/WebCore:

This patch implements a payment method dictionary and a payment handler for Apple Pay.

It reuses existing Apple Pay code by:

  1. Moving shared properties from ApplePayPaymentRequest to ApplePayRequestBase and having ApplePayPaymentRequest inherit from ApplePayRequestBase.
  2. Creating an ApplePayRequest dictionary that inherits from ApplePayRequestBase and adds PaymentRequest-specific properties (right now that's just the version property).
  3. Moving validation logic from ApplePaySession into various places that can be reused by PaymentRequest and ApplePayPaymentHandler.
  4. Storing currency values for both ApplePaySession and PaymentRequest in Strings rather than integers representing whole cents, since PaymentRequest supports high-precision currency values.

This patch does not implement any event handling for merchant validation, payment method
changes, or shipping address/option changes. That will be handled in a follow-on.

Test: http/tests/ssl/applepay/PaymentRequest.html

  • DerivedSources.make:
  • Modules/applepay/ApplePayContactField.cpp: Added.

(WebCore::convertAndValidate): Moved from ApplePaySession.cpp.

  • Modules/applepay/ApplePayContactField.h: Added.
  • Modules/applepay/ApplePayContactField.idl: Added.
  • Modules/applepay/ApplePayMerchantCapability.cpp: Added.

(WebCore::convertAndValidate): Moved from ApplePaySession.cpp.

  • Modules/applepay/ApplePayMerchantCapability.h: Added.
  • Modules/applepay/ApplePayMerchantCapability.idl: Added.
  • Modules/applepay/ApplePayPaymentRequest.h: Moved fields shared with ApplePayRequest into ApplePayRequestBase.
  • Modules/applepay/ApplePayPaymentRequest.idl: Ditto.
  • Modules/applepay/ApplePayRequestBase.cpp: Added.

(WebCore::convertAndValidate): Moved from ApplePaySession.cpp.

  • Modules/applepay/ApplePayRequestBase.h: Added.
  • Modules/applepay/ApplePayRequestBase.idl: Added.
  • Modules/applepay/ApplePaySession.cpp:

(WebCore::validateAmount): Renamed from parseAmount.
(WebCore::convertAndValidateTotal):
(WebCore::convertAndValidate):
(WebCore::parseDigit): Deleted.
(WebCore::parseAmount): Renamed to validateAmount.

  • Modules/applepay/ApplePaySessionPaymentRequest.h: Changed amount from an int64_t to a String.
  • Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:

(WebCore::convert):

  • Modules/applepay/PaymentRequestValidator.mm: Renamed from Source/WebCore/Modules/applepay/PaymentRequestValidator.cpp.

(WebCore::PaymentRequestValidator::validateTotal): Used NSDecimalNumber to validate amounts.
(WebCore::validateShippingMethod): Ditto.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: Added.

(WebCore::ApplePayPaymentHandler::handlesIdentifier): Added. Returns true if identifier is a URL with host "apple.com" and path "/apple-pay".
(WebCore::ApplePayPaymentHandler::ApplePayPaymentHandler):
(WebCore::convert): Added. Converts PaymentRequest types to ApplePaySessionPaymentRequest types.
(WebCore::ApplePayPaymentHandler::convertData): Added. JSON-parses data into an ApplePayRequest,
then uses that along with the PaymentRequest to construct and validate an ApplePaySessionPaymentRequest.
(WebCore::ApplePayPaymentHandler::show): Added a FIXME.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.h: Added.
  • Modules/applepay/paymentrequest/ApplePayRequest.h: Added.
  • Modules/applepay/paymentrequest/ApplePayRequest.idl: Added. Inherits from ApplePayRequestBase and adds a required version property.
  • Modules/paymentrequest/PaymentHandler.cpp: Added.

(WebCore::PaymentHandler::create): Returns a PaymentHandler subclass based on the payment method identifier.
(WebCore::PaymentHandler::~PaymentHandler):

  • Modules/paymentrequest/PaymentHandler.h: Added.
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::convertAndValidatePaymentMethodIdentifier): Added.
(WebCore::PaymentRequest::show): Removed an unnecessary call to RunLoop::dispatch().
Created a PaymentHandler for each payment method and called show() on the first available PaymentHandler.
(WebCore::PaymentRequest::abort): Removed an unnecessary call to RunLoop::dispatch().
(WebCore::PaymentRequest::canMakePayment): Ditto.
(WebCore::PaymentRequest::finishShowing): Deleted.

  • Modules/paymentrequest/PaymentRequest.h:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(toShippingMethod): Converted the NSDecimalNumber amount to a string rather than an integer.
(WebKit::toDecimalNumber): used -decimalNumberWithString:locale: rather than
-initWithMantissa:exponent:isNegative: to create an NSDecimalNumber.
(WebKit::toPKPaymentSummaryItem):
(WebKit::toPKShippingMethod):

LayoutTests:

  • http/tests/ssl/applepay/PaymentRequest.https-expected.txt: Added.
  • http/tests/ssl/applepay/PaymentRequest.https.html: Added.
  • platform/mac-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
10:59 AM Changeset in webkit [222920] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Move more multicolumn render tree mutation code to RenderTreeUpdater::MultiColumn
https://bugs.webkit.org/show_bug.cgi?id=177942

Reviewed by Zalan Bujtas.

  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::RenderMultiColumnFlow):

Use std::unique_ptr for the spanner map for safe owenership transfer.

(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
(WebCore::RenderMultiColumnFlow::handleSpannerRemoval):
(WebCore::RenderMultiColumnFlow::fragmentedFlowRelativeWillBeRemoved):
(WebCore::RenderMultiColumnFlow::populate): Deleted.
(WebCore::RenderMultiColumnFlow::evacuateAndDestroy): Deleted.

This code moves to RenderTreeUpdater::MultiColumn.

  • rendering/RenderMultiColumnFlow.h:
  • style/RenderTreeUpdaterMultiColumn.cpp:

(WebCore::RenderTreeUpdater::MultiColumn::update):
(WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeUpdater::MultiColumn::destroyFragmentedFlow):

Use Hyatt's preferred 'fragmented flow' terminology.

  • style/RenderTreeUpdaterMultiColumn.h:
10:58 AM Changeset in webkit [222919] by Matt Lewis
  • 8 edits in trunk/Source

Unreviewed, rolling out r222893.

This caused multiple API failures.

Reverted changeset:

"bmalloc mutex should be adaptive"
https://bugs.webkit.org/show_bug.cgi?id=177839
http://trac.webkit.org/changeset/222893

10:50 AM Changeset in webkit [222918] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Run WebKit2 C API tests in GTK+ bots again after the last WebKit2 -> WebKit rename.

  • Scripts/run-gtk-tests:

(TestRunner):
(TestRunner._run_test):

10:43 AM Changeset in webkit [222917] by Darin Adler
  • 13 edits
    7 deletes in trunk

Remove additional WebKitSystemInterface remnants
https://bugs.webkit.org/show_bug.cgi?id=177948

Reviewed by Andy Estes.

Source/WebCore:

  • PlatformMac.cmake: Remove logic to select and link an appropriate

WebKitSystemInterface library.

  • html/shadow/MediaControlElementTypes.h: Remove comment about matching

WebKitSystemInterface.h, now obsolete.

  • rendering/RenderMediaControls.cpp: Wrap whole file in a single conditional

to make it clear that it's only used at all in this one particular case.
(wkHitTestMediaUIPart): Deleted.
(wkMeasureMediaUIPart): Deleted.
(wkDrawMediaUIPart): Deleted.
(wkDrawMediaSliderTrack): Deleted.
(WebCore::determineState): Deleted.
(WebCore::getUnzoomedRectAndAdjustCurrentContext): Deleted.
(WebCore::RenderMediaControls::adjustMediaSliderThumbSize): Call the
WKMeasureMediaUIPart instead of through an inline function to rename it.
(WebCore::RenderMediaControls::paintMediaControlsPart): Deleted.

  • rendering/RenderMediaControls.h: Wrap whole file in a single conditional

to make it clear that it's only used at all in this one particular case.
Removed unneeded includes, forward declarations, and function declaration.

  • rendering/RenderThemeMac.mm: Removed include of RenderMediaControls.h.

Source/WebKitLegacy:

  • PlatformMac.cmake: Removed reference to deleted file WebSystemInterface.mm.

Tools:

  • DumpRenderTree/PlatformMac.cmake: Removed code to link the

WebKitSystemInterface library. Left in code that points to
the WebKitLibraries directory, but maybe that can be removed by
someone who is more certain it's no longer needed.

  • Scripts/copy-webkitlibraries-to-product-directory: Removed code

to copy and delete WebKitSystemInterface libraries and headers.

  • WebKitTestRunner/PlatformMac.cmake: Removed code to link the

WebKitSystemInterface library. Left in code that points to
the WebKitLibraries directory, but maybe that can be removed by
someone who is more certain it's no longer needed.

WebKitLibraries:

  • libWebKitSystemInterfaceElCapitan.a: Removed.
  • libWebKitSystemInterfaceIOSDevice10.a: Removed.
  • libWebKitSystemInterfaceIOSDevice11.a: Removed.
  • libWebKitSystemInterfaceIOSSimulator10.a: Removed.
  • libWebKitSystemInterfaceIOSSimulator11.a: Removed.
  • libWebKitSystemInterfaceOSX10.12.a: Removed.
  • libWebKitSystemInterfaceOSX10.13.a: Removed.
10:40 AM Changeset in webkit [222916] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Remove redundant LayoutStateDisabler from RenderTreeUpdaterFirstLetter
https://bugs.webkit.org/show_bug.cgi?id=177946

Reviewed by Simon Fraser.

First letter is updated prior to layout.

Covered by existing tests.

  • style/RenderTreeUpdaterFirstLetter.cpp:

(WebCore::updateFirstLetterStyle):

10:31 AM Changeset in webkit [222915] by aestes@apple.com
  • 5 edits
    1 add in trunk/Source/WebCore

[Payment Request] Factor out ApplePaySession's interface to PaymentCoordinator into a base class
https://bugs.webkit.org/show_bug.cgi?id=177904

Reviewed by Daniel Bates.

In a follow-on patch, something other than ApplePaySession will need to be the
PaymentCoordinator's active session during PaymentRequest sessions.

To support this, this patch factors out the ApplePaySession functions called by
PaymentCoordinator into a new base class called PaymentSession.

  • Modules/applepay/ApplePaySession.h:
  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::beginPaymentSession):

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentSession.h: Added.

(WebCore::PaymentSession::~PaymentSession):

  • WebCore.xcodeproj/project.pbxproj:
10:18 AM Changeset in webkit [222914] by sbarati@apple.com
  • 2 edits in trunk/Tools

Unreviewed. Try to make debug type profiler tests stop timing out.

  • Scripts/run-jsc-stress-tests:
10:11 AM Changeset in webkit [222913] by matthew_hanson@apple.com
  • 14 edits
    1 delete in branches/safari-604-branch

Revert r222431. rdar://problem/34826998

10:11 AM Changeset in webkit [222912] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604-branch/Tools

Revert r222453. rdar://problem/34826998

9:09 AM WebKitGTK/2.18.x edited by Michael Catanzaro
(diff)
7:04 AM Changeset in webkit [222911] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

Move multicolumn flow clear to RenderTreeUpdater
https://bugs.webkit.org/show_bug.cgi?id=177898
<rdar://problem/34820157>

Reviewed by Antti Koivisto.

There are 2 cases when we need to clear the the multicolumn flow from its container.

  1. When the column renderer is not need anymore due to style change (evacuateAndDestroy).

During the subtree reparenting (moving back the descendants to the original position),
if we still had the multicolumn set on the RenderBlockFlow, RenderBlockFlow::addChild() would
put the children back under the column. -> Move the clear call to the RenderTreeUpdater.

  1. When the column is detached from the tree/destroyed (willBeRemoveFromTree).

Since it does not trigger reparenting, we don't need to clear the column immediately.
We call clear to avoid accessing state column renderer. -> Use WeakPtr to
manage lifetime instead.

Covered by existing tests.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::setMultiColumnFlow):
(WebCore::RenderBlockFlow::clearMultiColumnFlow):

  • rendering/RenderBlockFlow.h:
  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
(WebCore::RenderMultiColumnFlow::willBeRemovedFromTree):

  • style/RenderTreeUpdaterMultiColumn.cpp:

(WebCore::RenderTreeUpdater::MultiColumn::update):
(WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):

7:00 AM Changeset in webkit [222910] by magomez@igalia.com
  • 5 edits in trunk/Source/WebCore

[GTK][WPE] GIFImageDecoder never clears decoded frames even when told to do so
https://bugs.webkit.org/show_bug.cgi?id=177864

Reviewed by Carlos Garcia Campos.

Fix GIFImageDecoder::clearFrameBufferCache() so it really deletes decoded buffers, and modify
GIFImageDecoder to be able to decode frames that are not requested in the expected order.

Covered by existent tests.

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::findFirstRequiredFrameToDecode):
(WebCore::GIFImageDecoder::frameBufferAtIndex):
(WebCore::GIFImageDecoder::clearFrameBufferCache):

  • platform/image-decoders/gif/GIFImageDecoder.h:
  • platform/image-decoders/gif/GIFImageReader.cpp:

(GIFImageReader::decode):

  • platform/image-decoders/gif/GIFImageReader.h:

(GIFImageReader::frameContext const):

6:31 AM Changeset in webkit [222909] by magomez@igalia.com
  • 3 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations and rebaseline tests failing at r222905.

  • platform/gtk/TestExpectations:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
3:49 AM Changeset in webkit [222908] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WinCairo] Fix build after Bug 167956
https://bugs.webkit.org/show_bug.cgi?id=177921

Patch by Fujii Hironori <Fujii Hironori> on 2017-10-05
Reviewed by Carlos Garcia Campos.

FontCascade::fontForCombiningCharacterSequence wasn't defined for
WinCairo port. It should be defined if !USE(HARFBUZZ).

No new tests because there is no behavior change.

  • platform/graphics/FontCascade.cpp: Use !USE(HARFBUZZ) instead of !USE(CAIRO).
2:32 AM Changeset in webkit [222907] by fred.wang@free.fr
  • 8 edits
    1 add
    1 delete in trunk

Remove Brotli from Source/ThirdParty
https://bugs.webkit.org/show_bug.cgi?id=177804

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-03
Reviewed by Michael Catanzaro.

.:

  • Source/CMakeLists.txt: Do not build ThirdParty/brotli anymore.
  • Source/cmake/FindBrotliDec.cmake: Added. New cmake module to find Brotli via PkgConfig.
  • Source/cmake/OptionsGTK.cmake: Expose USE_WOFF2 as a public option and use find_package

to look for brotli.

Source/ThirdParty:

  • brotli/CMakeLists.txt: Removed.
  • brotli/LICENSE: Removed.
  • brotli/README.webkit: Removed.
  • brotli/common/constants.h: Removed.
  • brotli/common/dictionary.bin: Removed.
  • brotli/common/dictionary.c: Removed.
  • brotli/common/dictionary.h: Removed.
  • brotli/common/version.h: Removed.
  • brotli/dec/bit_reader.c: Removed.
  • brotli/dec/bit_reader.h: Removed.
  • brotli/dec/context.h: Removed.
  • brotli/dec/decode.c: Removed.
  • brotli/dec/huffman.c: Removed.
  • brotli/dec/huffman.h: Removed.
  • brotli/dec/port.h: Removed.
  • brotli/dec/prefix.h: Removed.
  • brotli/dec/state.c: Removed.
  • brotli/dec/state.h: Removed.
  • brotli/dec/transform.h: Removed.
  • brotli/include/brotli/decode.h: Removed.
  • brotli/include/brotli/encode.h: Removed.
  • brotli/include/brotli/port.h: Removed.
  • brotli/include/brotli/types.h: Removed.
  • brotli/update.sh: Removed.
  • woff2/CMakeLists.txt: Use Brotli's include and library paths found by CMake.

Tools:

  • gtk/jhbuild.modules: Build brotli 1.0.1 from the official github repository.
  • Scripts/webkitpy/style/checker.py: Remove brotli.
2:28 AM Changeset in webkit [222906] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

Align BitmapImage::LargeAnimationCutoff to a megabyte value
https://bugs.webkit.org/show_bug.cgi?id=177924

Reviewed by Carlos Garcia Campos.

  • platform/graphics/BitmapImage.h: Fix the 1014 multiplier used to calculate

the LargeAnimationCutoff value. It was most likely a typo.

2:04 AM Changeset in webkit [222905] by zandobersek@gmail.com
  • 2 edits
    4 adds in trunk/LayoutTests

Unreviewed WPE gardening.

Enable the http/tests/ layout tests in general, but skip the directories
that contain failing tests that still have to be cataloged.

  • platform/wpe/TestExpectations:
  • platform/wpe/http: Added.
  • platform/wpe/http/wpt: Added.
  • platform/wpe/http/wpt/resource-timing: Added.
  • platform/wpe/http/wpt/resource-timing/rt-initiatorType-media-expected.txt: Added.
1:28 AM WebKitGTK/TrackingMemoryErrors edited by cturner@igalia.com
Mention that Malloc=1 is needed to succeed with Valgrind (diff)
1:24 AM WebKitGTK/Debugging edited by cturner@igalia.com
(diff)
1:06 AM Changeset in webkit [222904] by wenson_hsieh@apple.com
  • 4 edits in trunk/Source/WebCore

Address post-review feedback following r222885
https://bugs.webkit.org/show_bug.cgi?id=177853
<rdar://problem/34807346>

Reviewed by Ryosuke Niwa and Dan Bates.

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::updateFileList):
(WebCore::DataTransfer::types const):
(WebCore::DataTransfer::filesFromPasteboardAndItemList const):

  • dom/DataTransferItem.h:

(WebCore::DataTransferItem::file):
(WebCore::DataTransferItem::file const): Deleted.

  • dom/DataTransferItemList.cpp:

(WebCore::DataTransferItemList::add):
(WebCore::DataTransferItemList::remove):

When removing a data transfer item, capture it in a Ref for the scope of remove(), so that it won't be destroyed
immediately after removing from the item list.

12:55 AM WebKitGTK/2.18.x edited by Michael Catanzaro
(diff)
12:54 AM Changeset in webkit [222903] by fred.wang@free.fr
  • 28 edits
    15 adds
    5 deletes in trunk/Source/ThirdParty

Upgrade Brotli to version 1.0.1 and WOFF2 to latest upstream
https://bugs.webkit.org/show_bug.cgi?id=177768

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-05
Reviewed by Michael Catanzaro.

  • brotli/CMakeLists.txt:
  • brotli/README.webkit:
  • brotli/common/constants.h: Added.
  • brotli/common/dictionary.bin: Added.
  • brotli/common/dictionary.c: Added.
  • brotli/common/dictionary.h: Added.
  • brotli/common/version.h: Added.
  • brotli/dec/Makefile: Removed.
  • brotli/dec/bit_reader.c:
  • brotli/dec/bit_reader.h:
  • brotli/dec/context.h:
  • brotli/dec/decode.c:
  • brotli/dec/decode.h: Removed.
  • brotli/dec/dictionary.c: Removed.
  • brotli/dec/dictionary.h: Removed.
  • brotli/dec/huffman.c:
  • brotli/dec/huffman.h:
  • brotli/dec/port.h:

(BrotliDump):
(BrotliRBit):

  • brotli/dec/prefix.h:
  • brotli/dec/state.c:
  • brotli/dec/state.h:
  • brotli/dec/transform.h:
  • brotli/dec/types.h: Removed.
  • brotli/include/brotli/decode.h: Added.
  • brotli/include/brotli/encode.h: Added.
  • brotli/include/brotli/port.h: Added.
  • brotli/include/brotli/types.h: Added.
  • brotli/update.sh:
  • woff2/CMakeLists.txt:
  • woff2/README.webkit:
  • woff2/src/buffer.h:

(woff2::Buffer::Buffer):
(woff2::Buffer::Read):

  • woff2/src/convert_woff2ttf_*.cc: Added.
  • woff2/src/font.cc:
  • woff2/src/glyph.cc:
  • woff2/src/normalize.cc:
  • woff2/src/port.h:
  • woff2/src/store_bytes.h:

(woff2::Store16):

  • woff2/src/variable_length.cc:
  • woff2/src/woff2_common.cc:
  • woff2/src/woff2_dec.cc:
  • woff2/src/woff2_decompress.cc:
  • woff2/src/woff2_enc.cc:
  • woff2/src/woff2_info.cc: Added.
12:44 AM Changeset in webkit [222902] by commit-queue@webkit.org
  • 10 edits
    2 copies in trunk/Source

Make LibWebRTCProvider port agnostic
https://bugs.webkit.org/show_bug.cgi?id=177747

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-05
Reviewed by Alex Christensen & Alex Garcia.

Source/WebCore:

No change of behavior.

LibWebRTCProvider had some Mac/iOS specific members that are now
moved to LibWebRTCProviderCocoa.
This consists in the codec factories that are VideoToolBox specific.
Introducing LibWebRTCProvider::create to allow different port implementations of LibWebRTCProvider.

  • WebCore.xcodeproj/project.pbxproj:
  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::overlayPage):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::LibWebRTCProvider::create):
(WebCore::LibWebRTCProvider::factory):
(WebCore::LibWebRTCProvider::createPeerConnectionFactory):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:
  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

(WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
(WebCore::LibWebRTCProviderCocoa::createEncoderFactory):
(WebCore::LibWebRTCProviderCocoa::setActive):

  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::dataChanged):

Source/WebKit:

  • WebProcess/Network/webrtc/LibWebRTCProvider.h: Making sure Mac/iOS provider creates the codec factories.

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

12:38 AM Changeset in webkit [222901] by sbarati@apple.com
  • 11 edits
    1 add in trunk

Make sure all prototypes under poly proto get added into the VM's prototype map
https://bugs.webkit.org/show_bug.cgi?id=177909

Reviewed by Keith Miller.

JSTests:

  • stress/poly-proto-prototype-map-having-a-bad-time.js: Added.

(assert):
(foo.C):
(foo):
(set x):

Source/JavaScriptCore:

This is an invariant of prototypes that I broke when doing poly proto. This patch fixes it.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/BytecodeList.json:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGOperations.cpp:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/JSCInlines.h:
  • runtime/PrototypeMap.cpp:

(JSC::PrototypeMap::addPrototype): Deleted.

  • runtime/PrototypeMap.h:
  • runtime/PrototypeMapInlines.h:

(JSC::PrototypeMap::isPrototype const):
(JSC::PrototypeMap::addPrototype):

12:05 AM Changeset in webkit [222900] by Yusuke Suzuki
  • 17 edits
    1 copy
    4 adds in trunk

[Linux] Port MallocBench
https://bugs.webkit.org/show_bug.cgi?id=177856

Reviewed by Filip Pizlo.

.:

  • CMakeLists.txt:

PerformanceTests:

We would like to optimize locking in bmalloc in Linux by using futex APIs. So we should have
the way to ensure this actually improves / does not regress the performance.

This patch ports MallocBench to Linux to measure/ensure the effect of bmalloc patch in Linux.

While we replace the dispatch serial queue in message.cpp, we still use libdispatch in Benchmark.cpp
since we do not have priority mechanism in C++11 threading implementation.

We also extend run-malloc-benchmarks to accept cmake style layout of build product directory.
And we also support building MallocBench in CMake environment including CMake Mac ports.
Currently, we do not support Windows yet.

Based on the measurement, we can say the following observation. glibc's malloc performance is not
so bad. While bmalloc shows 3.8x (in geomean) performance improvement, bmalloc in Linux shows 2.0x
improvement. Since both numbers in bmalloc are similar, we can think that bmalloc's optimization is
actually working in Linux too. And even though glibc's malloc perofmrnace is not so bad, bmalloc
still offers performance improvement.

  • CMakeLists.txt: Added.
  • MallocBench/CMakeLists.txt: Added.
  • MallocBench/MallocBench.xcodeproj/project.pbxproj:
  • MallocBench/MallocBench/Benchmark.cpp:

(Benchmark::Benchmark):
(Benchmark::runOnce):
(Benchmark::currentMemoryBytes): Deleted.

  • MallocBench/MallocBench/Benchmark.h:

(Benchmark::Memory::Memory): Deleted.
(Benchmark::Memory::operator-): Deleted.

  • MallocBench/MallocBench/CMakeLists.txt: Added.
  • MallocBench/MallocBench/CPUCount.cpp:

(cpuCount):

  • MallocBench/MallocBench/Interpreter.cpp:

(Interpreter::doMallocOp):

  • MallocBench/MallocBench/Memory.cpp: Added.

(currentMemoryBytes):

  • MallocBench/MallocBench/Memory.h: Copied from PerformanceTests/MallocBench/MallocBench/CPUCount.cpp.

(Memory::Memory):
(Memory::operator-):

  • MallocBench/MallocBench/balloon.cpp:

(benchmark_balloon):

  • MallocBench/MallocBench/mbmalloc.cpp:
  • MallocBench/MallocBench/message.cpp:

(WorkQueue::WorkQueue):
(WorkQueue::~WorkQueue):
(WorkQueue::dispatchAsync):
(WorkQueue::dispatchSync):
(benchmark_message_one):
(benchmark_message_many):

  • MallocBench/MallocBench/nimlang.cpp:

(benchmark_nimlang):

  • MallocBench/MallocBench/stress.cpp:

(SizeStream::next):

  • MallocBench/MallocBench/stress_aligned.cpp:
  • MallocBench/run-malloc-benchmarks:

Source/bmalloc:

  • CMakeLists.txt:
Note: See TracTimeline for information about the timeline view.