Timeline
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:
Oct 6, 2017:
- 9:15 PM Changeset in webkit [223018] by
-
- 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
-
- 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
-
- 6 edits18 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
-
- 21 edits4 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
-
- 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
-
- 5 edits2 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.
- platform/mac-wk2/TestExpectations: Mark the test as a failure due to <https://bugs.webkit.org/show_bug.cgi?id=105616>.
- 5:09 PM Changeset in webkit [223012] by
-
- 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
-
- 16 edits2 copies5 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 14 edits3 copies1 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
-
- 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
-
- 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
-
- 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
-
- 100 edits2 moves13 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
-
- 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
-
- 7 edits in branches/safari-604-branch/Source
Versioning.
- 2:41 PM Changeset in webkit [222999] by
-
- 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
-
- 7 edits in trunk/Source
Versioning.
- 2:29 PM Changeset in webkit [222997] by
-
- 23 edits5 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 2 edits4 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
-
- 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
- (diff)
- 10:54 AM October 2017 Meeting edited by
- (diff)
- 9:59 AM Changeset in webkit [222987] by
-
- 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
-
- 26 edits3 copies2 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
-
- 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
-
- 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
-
- 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
-
- 6 edits1 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
-
- 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
-
- 29 edits1 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
-
- 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
-
- 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
-
- 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
-
- 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
- (diff)
- 3:44 AM Changeset in webkit [222975] by
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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: