Timeline
Oct 8, 2017:
- 9:08 PM Changeset in webkit [223041] by
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 11 edits4 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
-
- 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
-
- 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
-
- 10 edits2 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
-
- 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
-
- 5 edits1 copy1 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
-
- 3 edits2 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
-
- 36 edits1 add1 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 6 edits6 adds in trunk
asyncshould 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
-
- 15 edits1 copy5 adds2 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
-
- 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
-
- 1 edit in trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Try to fix the Apple Internal SDK builds after r223014.
- NetworkProcess/cocoa/NetworkSessionCocoa.mm: