Timeline
Jan 3, 2017:
- 11:52 PM Changeset in webkit [210271] by
-
- 5 edits in trunk
WorkQueueGeneric's platformInvalidate() can deadlock when called on the RunLoop's thread
https://bugs.webkit.org/show_bug.cgi?id=166645
Reviewed by Carlos Garcia Campos.
Source/WTF:
WorkQueue can be destroyed on its invoking thread itself.
The scenario is the following.
- Create WorkQueue (in thread A).
- Dispatch a task (in thread A, dispatching a task to thread B).
- Deref in thread A.
- The task is executed in thread B.
- Deref in thread B.
- The WorkQueue is destroyed, calling platformInvalidate in thread B.
In that case, if platformInvalidate waits thread B's termination, it causes deadlock.
We do not need to wait the thread termination.
- wtf/WorkQueue.h:
- wtf/generic/WorkQueueGeneric.cpp:
(WorkQueue::platformInitialize):
(WorkQueue::platformInvalidate):
Tools:
- TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
(TestWebKitAPI::TEST):
- 10:41 PM Changeset in webkit [210270] by
-
- 5 edits in tags/Safari-603.1.18.1/Source
Versioning.
- 10:38 PM Changeset in webkit [210269] by
-
- 1 copy in tags/Safari-603.1.18.1
New tag.
- 7:52 PM Changeset in webkit [210268] by
-
- 2 edits1 copy2 moves1 add1 delete in trunk/Tools
Place all the Cocoa WebCore API tests in the same directory
https://bugs.webkit.org/show_bug.cgi?id=166673
Reviewed by Michael Catanzaro.
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WebCore/cocoa/SerializedCryptoKeyWrap.mm: Renamed from Tools/TestWebKitAPI/Tests/WebCore/SerializedCryptoKeyWrap.mm.
- TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm: Renamed from Tools/TestWebKitAPI/Tests/Cocoa/URLExtras.mm.
- TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm: Renamed from Tools/TestWebKitAPI/Tests/WebCore/WebCoreNSURLSession.mm.
- 7:39 PM Changeset in webkit [210267] by
-
- 10 edits4 adds in trunk
label element with tabindex >= 0 is not focusable
https://bugs.webkit.org/show_bug.cgi?id=102780
<rdar://problem/29796608>
Reviewed by Darin Adler.
Source/WebCore:
Fixed the bug by removing the override for HTMLLabelElement::isFocusable which always returned false.
This is a behavior from r5532 but it doesn't match the latest HTML specification or that of Chrome
and Firefox.
Also fixed an existing bug in HTMLLabelElement::focus and HTMLLegendElement::focus which focused
the associated form control when there is one even if the element itself is focusable. Without this fix,
traversing from control with shift+tab would break since focusing the label would move the focus back
to the input element inside the label element.
Finally, fixed a bug in HTMLLegendElement::focus that we can call inFocus without updating layout first.
The fix was inspired by https://chromium.googlesource.com/chromium/src/+/085ad8697b1be50c4f93e296797a25a43a79bcfb
Test: fast/events/focus-label-legend-elements-with-tabindex.html
- html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::focus):
(WebCore::HTMLLabelElement::isFocusable): Deleted.
- html/HTMLLabelElement.h:
- html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::focus):
LayoutTests:
Added a regression test for traversing label and legend elements by tabbing.
A native merge of the blink fix would have regressed this for the label element
while the bug in the legend element had always existed.
Also added a regression test for focusing label and legend elements with tabindex.
We should be able to focus either element. New behavior matches that of Chrome.
Firefox moves the focus to the label element like we used to before this patch.
Also merge the test fix from https://chromium.googlesource.com/chromium/src/+/085ad8697b1be50c4f93e296797a25a43a79bcfb
- fast/events/focus-label-legend-elements-expected.txt: Added.
- fast/events/focus-label-legend-elements-with-tab-expected.txt: Added.
- fast/events/focus-label-legend-elements-with-tab.html: Added.
- fast/events/focus-label-legend-elements.html: Added.
- fast/events/resources/tabindex-focus-blur-all-frame1.html:
- fast/events/resources/tabindex-focus-blur-all-frame2.html:
- fast/events/resources/tabindex-focus-blur-all.js:
- fast/events/tabindex-focus-blur-all-expected.txt:
- platform/ios-simulator-wk2/TestExpectations:
- 7:13 PM Changeset in webkit [210266] by
-
- 30 edits4 adds in trunk
NSSpellChecker's recordResponse isn't called for unseen automatic corrections
https://bugs.webkit.org/show_bug.cgi?id=166450
<rdar://problem/29447824>
Reviewed by Darin Adler.
Source/WebCore:
Test: editing/mac/spelling/accept-unseen-candidate-records-acceptance.html
- editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::recordAutocorrectionResponse):
(WebCore::AlternativeTextController::recordAutocorrectionResponseReversed): Deleted.
- editing/AlternativeTextController.h:
Add recordAutocorrectionResponse, which takes a AutocorrectionResponseType, instead of having
a function specifically for reverted autocorrections. Also, get rid of the unnecessary indirection
of the private overload of recordAutocorrectionResponseReversed, since there's only one caller.
- editing/Editor.cpp:
(WebCore::Editor::markAndReplaceFor):
Call recordAutocorrectionResponse with Accepted when performing an auto-autocorrection.
(WebCore::Editor::changeBackToReplacedString):
Adopt recordAutocorrectionResponse.
- page/AlternativeTextClient.h:
Add an "AutocorrectionAccepted" response type.
Source/WebKit/mac:
- WebCoreSupport/CorrectionPanel.h:
- WebCoreSupport/CorrectionPanel.mm:
(CorrectionPanel::recordAutocorrectionResponse):
(CorrectionPanel::handleAcceptedReplacement):
- WebCoreSupport/WebAlternativeTextClient.mm:
(toCorrectionResponse):
(WebAlternativeTextClient::recordAutocorrectionResponse):
Funnel all calls to recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:
through recordAutocorrectionResponse, for debugging's sake.
Drop the NSView parameter because we don't need it, just the tag.
Convert the new AutocorrectionResponseType value to its corresponding
NSCorrectionResponse value.
Source/WebKit2:
- UIProcess/mac/CorrectionPanel.h:
- UIProcess/mac/CorrectionPanel.mm:
(WebKit::CorrectionPanel::recordAutocorrectionResponse):
(WebKit::CorrectionPanel::handleAcceptedReplacement):
Funnel all calls to recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:
through recordAutocorrectionResponse, for debugging's sake.
Drop the NSView parameter because we don't need it, just the tag.
- UIProcess/mac/PageClientImpl.mm:
(WebKit::toCorrectionResponse):
(WebKit::PageClientImpl::recordAutocorrectionResponse):
Convert the new AutocorrectionResponseType value to its corresponding
NSCorrectionResponse value.
Tools:
- DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
- DumpRenderTree/TestRunner.cpp:
(TestRunner::staticFunctions):
- DumpRenderTree/mac/TestRunnerMac.mm:
(setSpellCheckerLoggingEnabledCallback):
- DumpRenderTree/win/TestRunnerWin.cpp:
(setSpellCheckerLoggingEnabledCallback):
- DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting):
- DumpRenderTree/mac/DumpRenderTreeSpellChecker.h: Added.
- DumpRenderTree/mac/DumpRenderTreeSpellChecker.mm: Added.
(stringForCorrectionResponse):
(drt_NSSpellChecker_recordResponseToCorrection):
(swizzleNSSpellCheckerMethodsIfNeeded):
(setSpellCheckerLoggingEnabled):
Add a new testRunner method, setSpellCheckerLoggingEnabled, which, when
set to true, logs to stdout (which ends up in the test result) whenever
NSSpellChecker recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:
is called, and then calls the original method. It is reset to false between tests.
LayoutTests:
- editing/editing.js:
(runEditingTest):
(runEditingTestWithCallbackLogging):
Add a way to run an editing test without enabling noisy editing callback logging.
- editing/mac/spelling/accept-unseen-candidate-records-acceptance-expected.txt: Added.
- editing/mac/spelling/accept-unseen-candidate-records-acceptance.html: Added.
Add a test that ensures that we correctly inform NSSpellChecker of an
accepted unseen correction.
- platform/mac-wk2/TestExpectations:
Disable the test because spelling tests don't work in WebKit2 at all.
- 7:07 PM Changeset in webkit [210265] by
-
- 4 edits2 adds in trunk
AX: Focus should jump into modal dialogs when one appears
https://bugs.webkit.org/show_bug.cgi?id=166670
Reviewed by Chris Fleizach.
Source/WebCore:
Added a timer to let focus jump into a modal dialog if the web
author didn't handle the focus movement.
Test: accessibility/mac/aria-modal-auto-focus.html
- accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::~AXObjectCache):
(WebCore::firstFocusableChild):
(WebCore::AXObjectCache::focusAriaModalNode):
(WebCore::AXObjectCache::focusAriaModalNodeTimerFired):
(WebCore::AXObjectCache::handleAriaModalChange):
- accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::focusAriaModalNode):
LayoutTests:
- accessibility/mac/aria-modal-auto-focus-expected.txt: Added.
- accessibility/mac/aria-modal-auto-focus.html: Added.
- 6:10 PM Changeset in webkit [210264] by
-
- 2 edits in tags/Safari-604.1.1.2/Source/WebCore
Merged r210248. rdar://problem/29782862
- 6:09 PM Changeset in webkit [210263] by
-
- 5 edits in tags/Safari-604.1.1.2/Source
Versioning.
- 6:03 PM Changeset in webkit [210262] by
-
- 1 copy in tags/Safari-604.1.1.2
New tag.
- 5:32 PM Changeset in webkit [210261] by
-
- 3 edits2 adds in trunk
Web Inspector: WrappedPromise constructor should behave like the Promise constructor
https://bugs.webkit.org/show_bug.cgi?id=166523
Reviewed by Joseph Pecoraro.
Source/WebInspectorUI:
- UserInterface/Models/WrappedPromise.js:
(WebInspector.WrappedPromise):
- Return the result of 'work' from the inner promise
so WrappedPromise.promise can be chained.
- Provide shim resolve, reject callbacks as parameters.
(WebInspector.WrappedPromise.prototype.get settled): Added.
Tells whether we already resolved or rejected the promise.
(WebInspector.WrappedPromise.prototype.resolve):
(WebInspector.WrappedPromise.prototype.reject):
Throw an error if already settled and update the flag.
LayoutTests:
- inspector/unit-tests/wrapped-promise-expected.txt: Added.
- inspector/unit-tests/wrapped-promise.html: Added.
- 5:26 PM Changeset in webkit [210260] by
-
- 3 edits in trunk/Source/WebInspectorUI
Web Inspector: color picker should feature an editable CSS value
https://bugs.webkit.org/show_bug.cgi?id=124356
Patch by Devin Rousso <Devin Rousso> on 2017-01-03
Reviewed by Brian Burg.
- UserInterface/Views/ColorPicker.css:
(.color-picker):
(.color-picker > .color-inputs):
(.color-picker > .color-inputs > div):
(.color-picker > .color-inputs > div[hidden]):
(.color-picker > .color-inputs input):
- UserInterface/Views/ColorPicker.js:
(WebInspector.ColorPicker.createColorInput):
(WebInspector.ColorPicker):
(WebInspector.ColorPicker.prototype.set color):
(WebInspector.ColorPicker.prototype.sliderValueDidChange):
(WebInspector.ColorPicker.prototype._updateColor):
(WebInspector.ColorPicker.prototype._showColorComponentInputs.updateColorInput):
(WebInspector.ColorPicker.prototype._showColorComponentInputs):
(WebInspector.ColorPicker.prototype._handleColorInputInput):
Add an input element (with a label for the component name and its units) for each component
as part of the current color format (e.g. R, G, B, A). If any of these inputs are changed
then the color is also changed and the "ColorChanged" event is fired.
- 5:14 PM Changeset in webkit [210259] by
-
- 2 edits in trunk/Source/JavaScriptCore
REGRESSION (r210244): Release JSC Stress test failure: wasm.yaml/wasm/js-api/wasm-to-wasm.js.default-wasm
https://bugs.webkit.org/show_bug.cgi?id=166669
<rdar://problem/29856455>
Reviewed by Saam Barati.
Bug #165282 added wasm -> wasm calls, but caused crashes in
release builds because the pinned registers are also callee-saved
and were being clobbered. B3 didn't see itself clobbering them
when no memory was used, and therefore omitted a restore.
This was causing the C++ code in callWebAssemblyFunction to crash
because $r12 was 0, and it expected it to have its value prior to
the call.
- wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::createJSToWasmWrapper):
- 4:36 PM Changeset in webkit [210258] by
-
- 3 edits1 move in trunk/Source/WebCore
Rename SharedBufferMac.mm to SharedBufferCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=166666
Reviewed by Tim Horton.
- PlatformMac.cmake:
- WebCore.xcodeproj/project.pbxproj:
- platform/cocoa/SharedBufferCocoa.mm: Renamed from Source/WebCore/platform/mac/SharedBufferMac.mm.
- 4:33 PM Changeset in webkit [210257] by
-
- 7 edits in trunk/Source/WebCore
Re-implement ExceptionOr on top of WTF::Expected
https://bugs.webkit.org/show_bug.cgi?id=166668
Patch by Sam Weinig <sam@webkit.org> on 2017-01-03
Reviewed by Alex Christensen.
As a first step towards using WTF::Expected instead of ExceptionOr,
use Expected as an implementation detail, rather than Variant/std::optional.
- crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
- crypto/algorithms/CryptoAlgorithmHMAC.cpp:
- crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
- crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
- crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
Add missing #include of Variant.h
- dom/ExceptionOr.h:
(WebCore::ExceptionOr<ReturnType>::ExceptionOr):
(WebCore::ExceptionOr<ReturnType>::hasException):
(WebCore::ExceptionOr<ReturnType>::releaseException):
(WebCore::ExceptionOr<ReturnType>::releaseReturnValue):
(WebCore::ExceptionOr<void>::ExceptionOr):
(WebCore::ExceptionOr<void>::hasException):
(WebCore::ExceptionOr<void>::releaseException):
Re-implement on top of Expected.
- 4:26 PM Changeset in webkit [210256] by
-
- 5 edits in branches/safari-602-branch/Source
Versioning.
- 4:22 PM Changeset in webkit [210255] by
-
- 1 copy in tags/Safari-602.4.5
New tag.
- 4:04 PM WebKitGTK/2.14.x edited by
- (diff)
- 3:51 PM Changeset in webkit [210254] by
-
- 9 edits6 adds in trunk
Make setting Event's cancelBubble to false a no-op
https://bugs.webkit.org/show_bug.cgi?id=166018
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
Merge https://github.com/w3c/web-platform-tests/pull/4304 to extend / fix
test coverage.
- web-platform-tests/dom/events/Event-cancelBubble-expected.txt: Added.
- web-platform-tests/dom/events/Event-cancelBubble.html: Added.
- web-platform-tests/dom/events/Event-dispatch-bubble-canceled-expected.txt: Added.
- web-platform-tests/dom/events/Event-dispatch-bubble-canceled.html: Added.
- web-platform-tests/dom/events/Event-dispatch-multiple-cancelBubble-expected.txt: Added.
- web-platform-tests/dom/events/Event-dispatch-multiple-cancelBubble.html: Added.
- web-platform-tests/dom/events/Event-initEvent.html:
- web-platform-tests/dom/events/Event-propagation-expected.txt:
- web-platform-tests/dom/events/Event-propagation.html:
- web-platform-tests/dom/events/w3c-import.log:
Source/WebCore:
Align behavior of Event.cancelBubble with the latest DOM specification:
Setting it to true sets the 'stop propagation' flag to true and setting
it to false is now a no-op.
Tests: imported/w3c/web-platform-tests/dom/events/Event-cancelBubble.html
imported/w3c/web-platform-tests/dom/events/Event-dispatch-bubble-canceled.html
imported/w3c/web-platform-tests/dom/events/Event-dispatch-multiple-cancelBubble.html
- Modules/indexeddb/IDBEventDispatcher.cpp:
(WebCore::IDBEventDispatcher::dispatch):
- dom/Event.h:
(WebCore::Event::cancelBubble):
(WebCore::Event::setCancelBubble):
- dom/EventDispatcher.cpp:
(WebCore::dispatchEventInDOM):
- 3:18 PM Changeset in webkit [210253] by
-
- 4 edits in trunk
Make WTF::Expected support Ref template parameters
https://bugs.webkit.org/show_bug.cgi?id=166662
Reviewed by Alex Christensen.
Source/WTF:
Tests: Added to TestWebKitAPI/Expected.cpp
- wtf/Expected.h:
(WTF::UnexpectedType::value):
Add overloads based on this value type to allow getting at the value
as an rvalue for moving the error into the Expected.
(WTF::Expected::Expected):
Add overload that takes an ErrorType/UnexpectedType<ErrorType> as an rvalue.
(WTF::Expected::swap):
Move the temporary value/error rather than copying.
Tools:
- TestWebKitAPI/Tests/WTF/Expected.cpp:
(TestWebKitAPI::TEST):
Add tests for using Ref with Expected.
- 3:06 PM Changeset in webkit [210252] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: "Invalid Characters" setting does the opposite of the checkbox
https://bugs.webkit.org/show_bug.cgi?id=166664
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-03
Reviewed by Brian Burg.
- UserInterface/Views/CodeMirrorOverrides.css:
(.CodeMirror .cm-invalidchar):
(.show-invalid-characters .CodeMirror .cm-invalidchar):
Hide invalid characters by default, and show them with the show class.
- 2:31 PM Changeset in webkit [210251] by
-
- 5 edits in trunk
Web Inspector: Address failures under LayoutTests/inspector/debugger/stepping
https://bugs.webkit.org/show_bug.cgi?id=166300
Reviewed by Brian Burg.
Source/JavaScriptCore:
- debugger/Debugger.cpp:
(JSC::Debugger::continueProgram):
When continuing, clear states that would have had us pause again.
- inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::didBecomeIdle):
When resuming after becoming idle, be sure to clear Debugger state.
LayoutTests:
- inspector/debugger/stepping/stepping-classes-expected.txt:
Rebaseline these results to new column values.
- 2:31 PM Changeset in webkit [210250] by
-
- 4 edits in trunk
Web Inspector: Fix Content Flow Container Regions Computed Style section
https://bugs.webkit.org/show_bug.cgi?id=166294
Reviewed by Brian Burg.
Source/WebInspectorUI:
- UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes):
(WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.domNodeResolved):
(WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.remoteObjectPropertiesAvailable):
(WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo):
(WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.backendFunction.getComputedProperty): Deleted.
(WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.backendFunction.getContentFlowName): Deleted.
Update this to use Array.from() to convert the NodeList to an Array, and then
use the already available RemoteObject's size property instead of getting the
"length" property from the Array.
LayoutTests:
- inspector/dom/content-flow-list.html:
Update the domTree across navigations. Also dynamically add the flows to
ensure we get the events.
- 2:12 PM Changeset in webkit [210249] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: opening Test.html in a normal browser window doesn't log errors to console
https://bugs.webkit.org/show_bug.cgi?id=166570
Reviewed by Joseph Pecoraro.
Early syntax errors in the test harness should be logged to the page console since they are easier to
debug in a normal browser using Web Inspector. But, the checks to revert to normal console don't work.
- UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness.prototype.reportUncaughtException):
Add a helper to encapsulate the meaning of checking this._shouldResendResults.
This flag is always true until the test page injects its initializers into the
inspector page, which will never happen when we view Test.html outside of the test harness.
- 2:03 PM Changeset in webkit [210248] by
-
- 2 edits in trunk/Source/WebCore
Check for the existence of AVSampleBufferAudioRenderer.h before redeclaring AVSampleBufferAudioRenderer
https://bugs.webkit.org/show_bug.cgi?id=166421
<rdar://problem/29782862>
Reviewed by Dan Bernstein.
Follow up after r210099; fix the has_include directive to include the framework and fix the #import inside #if.
- platform/spi/mac/AVFoundationSPI.h:
- 12:53 PM Changeset in webkit [210247] by
-
- 2 edits in trunk/Source/WebKit2
Another attempt to fix the Apple Sierra Release 32-bit Build following <https://trac.webkit.org/changeset/210075>
(https://bugs.webkit.org/show_bug.cgi?id=166367)
Guard more code in WebViewImpl::handleRequestedCandidates() inside HAVE(TOUCH_BAR).
Remove unused local variable weakThis.
- UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::handleRequestedCandidates):
- 12:46 PM Changeset in webkit [210246] by
-
- 2 edits in trunk/Source/WebCore
REGRESSION(r210226): fast/history/back-from-page-with-focused-iframe.html crashes under GuardMalloc
<https://webkit.org/b/166657>
<rdar://problem/29848806>
Reviewed by Antti Koivisto.
The problem was that tearDownRenderers() would cause commit Widget hierarchy updates
before returning, which is just before Document clears its m_renderView pointer.
This led to an awkward callback into Page::setActivityState() which ended up trying
to clear the selection inside a partially dead render tree.
Fix this by adding a WidgetHierarchyUpdatesSuspensionScope to Document::destroyRenderTree()
which ensures that Widget updates don't happen until after Document::m_renderView is cleared.
- dom/Document.cpp:
(WebCore::Document::destroyRenderTree):
- 12:32 PM Changeset in webkit [210245] by
-
- 2 edits in trunk/Source/WebKit2
Attempt to fix the Apple Sierra Release 32-bit Build following <https://trac.webkit.org/changeset/210075>
(https://bugs.webkit.org/show_bug.cgi?id=166367)
Add HAVE(TOUCH_BAR)-guard around code that messages candidateListTouchBarItem() as
candidateListTouchBarItem() is only defined when building with Touch Bar support.
Also added an inline comment to help demarcate the code when building without Touch Bar
support. We should look to clean up WebViewImpl.mm including extracting out the Touch
Bar code to another file or better demarcating it so as to improve the hackability of
this code and prevent breaking the build when building without Touch Bar support.
- UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::handleRequestedCandidates):
- 12:24 PM Changeset in webkit [210244] by
-
- 8 edits4 adds in trunk
WebAssembly JS API: check and test in-call / out-call values
https://bugs.webkit.org/show_bug.cgi?id=164876
<rdar://problem/29844107>
Reviewed by Saam Barati.
JSTests:
- wasm.yaml:
- wasm/assert.js: add an assert for NaN comparison
- wasm/fuzz/export-function.js: Added. Generate random wasm export
signatures, and call them with random parameters.
(const.paramExporter):
(const.setBuffer):
(const.types.generate):
(generate):
- wasm/js-api/export-arity.js: Added.
(const.paramExporter): Test that mismatched arities when JS calls
wasm follow the defined semantics: i32 is 0, f32 / f64 are NaN.
https://github.com/WebAssembly/design/blob/master/JS.md#exported-function-exotic-objects
- wasm/js-api/export-void-is-undef.js: Added. Test that "void"
wasm functions return "undefined" in JS.
Source/JavaScriptCore:
- wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToJs): fix the wasm -> JS call coercions for f32 /
f64 which the assotiated tests inadvertently tripped on: the
previous code wasn't correctly performing JSValue boxing for
"double" values. This change is slightly involved because it
requires two scratch registers to materialize the
DoubleEncodeOffsetvalue. This change therefore reorganizes the
code to first generate traps, then handle all integers (freeing
all GPRs), and then all the floating-point values.
- wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction): Implement the defined semantics
for mismatched arities when JS calls wasm:
https://github.com/WebAssembly/design/blob/master/JS.md#exported-function-exotic-objects
- i32 is 0, f32 / f64 are NaN.
- wasm functions which return "void" are "undefined" in JS.
- 11:30 AM Changeset in webkit [210243] by
-
- 3 edits6 copies in branches/safari-602-branch
Merged r210112. rdar://problem/29756651
- 11:21 AM Changeset in webkit [210242] by
-
- 5 edits3 copies in branches/safari-602-branch
Merged r210122. rdar://problem/29775002
- 11:14 AM Changeset in webkit [210241] by
-
- 3 edits2 copies in branches/safari-602-branch
Merged r210120. rdar://problem/29789131
- 10:53 AM Changeset in webkit [210240] by
-
- 3 edits in trunk/Source/WebCore
Placeholder style mechanism leaks CSSFontSelector for first Document styled.
<https://webkit.org/b/166652>
Reviewed by Antti Koivisto.
The placeholder style is used when we're resolving style for a non-rendered
element, or any element before stylesheets have loaded.
An old optimization had us reusing the same style each time, which meant that
since it was initialized with a font selector the first time, it kept that
font selector alive forever.
As we have to clone the style anyway, fix this by just making a new style
each time, using the current document's font selector.
- style/StyleTreeResolver.cpp:
(WebCore::Style::makePlaceholderStyle):
(WebCore::Style::TreeResolver::TreeResolver):
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::ensurePlaceholderStyle): Deleted.
(WebCore::Style::isPlaceholderStyle): Deleted.
- style/StyleTreeResolver.h:
- 7:02 AM Changeset in webkit [210239] by
-
- 5 edits8 adds in trunk
A floating element within <li> overlaps with the marker
https://bugs.webkit.org/show_bug.cgi?id=166528
Reviewed by Zalan Bujtas.
Source/WebCore:
Merged from Blink (patch by trobhogan@gmail.com):
https://crrev.com/c896e79e5ba348d7ed87438cd3a19d0176f3036d
https://crbug.com/548616
Establish a list marker's offset before floats have been added to its line.
Computing the offset for a list marker after the rest of the objects on the line
it is on have been laid out, means it will avoid floats it ought not to.
Instead, compute the offset when laying out the marker and cache it for use later.
Tests: fast/lists/list-marker-before-float-nested-rtl.html
fast/lists/list-marker-before-float-nested.html
fast/lists/list-marker-before-float-rtl.html
fast/lists/list-marker-before-float.html
- rendering/RenderListItem.cpp:
(WebCore::RenderListItem::positionListMarker):
- rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::RenderListMarker):
(WebCore::RenderListMarker::layout):
- rendering/RenderListMarker.h:
LayoutTests:
- fast/lists/list-marker-before-float-expected.html: Added.
- fast/lists/list-marker-before-float-nested-expected.html: Added.
- fast/lists/list-marker-before-float-nested-rtl-expected.html: Added.
- fast/lists/list-marker-before-float-nested-rtl.html: Added.
- fast/lists/list-marker-before-float-nested.html: Added.
- fast/lists/list-marker-before-float-rtl-expected.html: Added.
- fast/lists/list-marker-before-float-rtl.html: Added.
- fast/lists/list-marker-before-float.html: Added.
- 3:59 AM Changeset in webkit [210238] by
-
- 8 edits4 adds in trunk
[GTK] Expose WebKitSecurityOrigin API
https://bugs.webkit.org/show_bug.cgi?id=166632
Source/WebKit2:
Patch by Michael Catanzaro <Michael Catanzaro> and Carlos Garcia Campos <cgarcia@igalia.com> on 2017-01-03
Reviewed by Carlos Garcia Campos.
This API will be useful to have for various purposes, such as setting initial notification
permissions.
- PlatformGTK.cmake:
- UIProcess/API/gtk/WebKitAutocleanups.h:
- UIProcess/API/gtk/WebKitSecurityOrigin.cpp: Added.
(_WebKitSecurityOrigin::_WebKitSecurityOrigin):
(webkitSecurityOriginCreate):
(webkit_security_origin_new):
(webkit_security_origin_new_for_uri):
(webkit_security_origin_ref):
(webkit_security_origin_unref):
(webkit_security_origin_get_protocol):
(webkit_security_origin_get_host):
(webkit_security_origin_get_port):
(webkit_security_origin_is_opaque):
(webkit_security_origin_to_string):
- UIProcess/API/gtk/WebKitSecurityOrigin.h: Added.
- UIProcess/API/gtk/WebKitSecurityOriginPrivate.h: Added.
- UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
- UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
- UIProcess/API/gtk/webkit2.h:
Tools:
Reviewed by Carlos Garcia Campos.
- TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:
- TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSecurityOrigin.cpp: Added.
(testSecurityOriginBasicConstructor):
(testSecurityOriginURIConstructor):
(testSecurityOriginDefaultPort):
(testSecurityOriginFileURI):
(testSecurityOriginDataURI):
(beforeAll):
(afterAll):
- 2:24 AM Changeset in webkit [210237] by
-
- 2 edits in trunk/Source/JavaScriptCore
[Win] jsc.exe sometimes never exits.
https://bugs.webkit.org/show_bug.cgi?id=158073
Reviewed by Darin Adler.
On Windows the thread specific destructor is also called when the main thread is exiting.
This may lead to the main thread waiting forever for the machine thread lock when exiting,
if the sampling profiler thread was terminated by the system while holding the machine
thread lock.
- heap/MachineStackMarker.cpp:
(JSC::MachineThreads::removeThread):
- 2:05 AM Changeset in webkit [210236] by
-
- 2 edits in trunk/Source/WebCore
[Win] Some xmlhttprequest tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=166638
Reviewed by Darin Adler.
The tests are failing because the request timeout is set to zero.
When the timeout is set to zero, we should use the default timeout.
- platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
- 1:08 AM Changeset in webkit [210235] by
-
- 2 edits in trunk/Source/WebKit2
[SOUP] Load options allowStoredCredentials = DoNotAllowStoredCredentials with clientCredentialPolicy = MayAskClientForCredentials doesn't work
https://bugs.webkit.org/show_bug.cgi?id=164471
Reviewed by Michael Catanzaro.
When DoNotAllowStoredCredentials is used we disable the SoupAuthManager feature for the message, but that
disables all HTTP authentication, causing the load to always fail with Authorization required even when
clientCredentialPolicy allows to ask the user for credentials. The problem is that even if we don't use the
WebCore credentials for that request, libsoup will always use its internal cache of SoupAuth if we enable the
SoupAuthManager feature. Libsoup 2.57.1 has new API to disable the use of cached credentials for a particular
message, adding the new message flag SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE.
- NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::createRequest): Set SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE flag to disable cached
credentials for the message if libsoup >= 2.57.1 is used.
- 1:04 AM Changeset in webkit [210234] by
-
- 8 edits in trunk
[GTK] HTTP auth layout tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=158919
Reviewed by Michael Catanzaro.
Source/WebKit2:
Implement NetworkSession::clearCredentials() for soup using the new libsoup API when available.
- NetworkProcess/soup/NetworkSessionSoup.cpp:
(WebKit::NetworkSessionSoup::clearCredentials):
- NetworkProcess/soup/NetworkSessionSoup.h:
Tools:
- gtk/jhbuild.modules: Update libsoup to version 2.57.1.
- gtk/jhbuildrc: Stop passing --enable-introspection unconditionally to all modules. We don't really need
introspection for the dependencies in the internal build, and it makes newer libsoup build fail because of
missing valac in the bots.
LayoutTests:
Unskip tests that should pass now.
- platform/gtk/TestExpectations:
- 12:14 AM Changeset in webkit [210233] by
-
- 2 edits in trunk/Tools
REGRESSION(r173753): [GTK] Source/WebKit is distributed in tarballs
https://bugs.webkit.org/show_bug.cgi?id=165797
Reviewed by Michael Catanzaro.
Move directory ruleset after all exclude rules of Source rulset.
- gtk/manifest.txt.in:
- 12:14 AM Changeset in webkit [210232] by
-
- 28 edits3 deletes in trunk/Source
Remove sh4 specific code from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=166640
Reviewed by Filip Pizlo.
Source/JavaScriptCore:
sh4-specific code does not compile for a while (r189884 at least).
As nobody seems to have interest in this architecture anymore, let's
remove this dead code and thus ease the burden for JSC maintainers.
- CMakeLists.txt:
- JavaScriptCore.xcodeproj/project.pbxproj:
- assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::Jump::Jump):
(JSC::AbstractMacroAssembler::Jump::link):
- assembler/MacroAssembler.h:
- assembler/MacroAssemblerSH4.h: Removed.
- assembler/MaxFrameExtentForSlowPathCall.h:
- assembler/SH4Assembler.h: Removed.
- bytecode/DOMJITAccessCasePatchpointParams.cpp:
(JSC::SlowPathCallGeneratorWithArguments::generateImpl):
- dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
- jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::debugCall):
- jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
(JSC::CCallHelpers::prepareForTailCallSlow):
- jit/CallFrameShuffler.cpp:
(JSC::CallFrameShuffler::prepareForTailCall):
- jit/ExecutableAllocator.h:
- jit/FPRInfo.h:
- jit/GPRInfo.h:
- jit/JITInlines.h:
(JSC::JIT::callOperation):
- jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
- jit/JITOperations.cpp:
- jit/RegisterSet.cpp:
(JSC::RegisterSet::llintBaselineCalleeSaveRegisters):
(JSC::RegisterSet::dfgCalleeSaveRegisters):
- jit/ThunkGenerators.cpp:
(JSC::nativeForGenerator):
- llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
- llint/LLIntOfflineAsmConfig.h:
- llint/LowLevelInterpreter.asm:
- llint/LowLevelInterpreter32_64.asm:
- offlineasm/backends.rb:
- offlineasm/instructions.rb:
- offlineasm/sh4.rb: Removed.
- yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::generateEnter):
(JSC::Yarr::YarrGenerator::generateReturn):
Source/WTF:
- wtf/Platform.h:
Jan 2, 2017:
- 6:56 PM Changeset in webkit [210231] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed, follow-up fix for r210227
https://bugs.webkit.org/show_bug.cgi?id=166586
Suggested in the above bug.
- bindings/scripts/StaticString.pm:
(GenerateStrings):
- 6:40 PM Changeset in webkit [210230] by
-
- 5 edits in trunk
Leverage Substring to create new AtomicStringImpl for StaticStringImpl and SymbolImpl
https://bugs.webkit.org/show_bug.cgi?id=166636
Reviewed by Darin Adler.
Source/WTF:
Previously we always create the full atomic string if we need to create the same string
based on the given value. For example, when generating AtomicStringImpl from the SymbolImpl,
we need to create a new AtomicStringImpl since SymbolImpl never becomesisAtomic() == true.
But it is costly.
This patch leverages the substring system of StringImpl. Instead of allocating the completely
duplicate string, we create a substring StringImpl that shares the same content with the
base string.
- wtf/text/AtomicStringImpl.cpp:
(WTF::stringTable):
(WTF::addToStringTable):
(WTF::addSubstring):
(WTF::AtomicStringImpl::addSlowCase):
(WTF::AtomicStringImpl::remove):
(WTF::AtomicStringImpl::lookUpSlowCase):
- wtf/text/StringImpl.h:
(WTF::StringImpl::StaticStringImpl::operator StringImpl&):
Tools:
- TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
- 5:57 PM Changeset in webkit [210229] by
-
- 41 edits1 copy2 adds in trunk
WebAssembly: handle and optimize wasm export → wasm import calls
https://bugs.webkit.org/show_bug.cgi?id=165282
Reviewed by Saam Barati.
JSTests:
- wasm/Builder.js: Add a Proxy to Builder.js, which intercepts
unknown property lookups. This creates way better error messages
on typos than 'undefined is not a function', which happens
semi-frequently as I typo opcode names (and which one is a typo is
hard to find because we chain builders).
(const._isValidValue):
(get target):
(const._importFunctionContinuation):
(const._importMemoryContinuation):
(const._importTableContinuation):
(const._exportFunctionContinuation):
(export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
(export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
- wasm/LowLevelBinary.js: Add limited support for var{u}int64 (only the 32-bit values)
(export.default.LowLevelBinary.prototype.varint32):
(export.default.LowLevelBinary.prototype.varuint64):
(export.default.LowLevelBinary.prototype.varint64):
- wasm/function-tests/exceptions.js: update error message
- wasm/function-tests/trap-load.js: update error message
- wasm/function-tests/trap-store.js: update error message
- wasm/js-api/wasm-to-wasm-bad-signature.js: Added. Test a bunch of bad wasm->wasm import signatures
(const.makeImportee.signature.switch):
(BadSignatureDropStartParams):
- wasm/js-api/wasm-to-wasm.js: Added. Test 64-bit wasm->wasm import calls
(const.callerModule):
(const.calleeModule):
(WasmToWasm):
Source/JavaScriptCore:
- Add a new JSType for WebAssemblyFunction, and use it when creating its structure. This will is used to quickly detect from wasm whether the import call is to another wasm module, or whether it's to JS.
- Generate two stubs from the import stub generator: one for wasm->JS and one for wasm -> wasm. This is done at Module time. Which is called will only be known at Instance time, once we've received the import object. We want to avoid codegen at Instance time, so having both around is great.
- Restore the WebAssembly global state (VM top Instance, and pinned registers) after call / call_indirect, and in the JS->wasm entry stub.
- Pinned registers are now a global thing, not per-Memory, because the wasm -> wasm stubs are generated at Module time where we don't really have enough information to do the right thing (doing so would generate too much code).
- CMakeLists.txt:
- JavaScriptCore.xcodeproj/project.pbxproj:
- runtime/JSType.h: add WebAssemblyFunctionType as a JSType
- wasm/WasmB3IRGenerator.cpp: significantly rework how calls which
could be external work, and how we save / restore global state:
VM's top Instance, and pinned registers
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::getMemoryBaseAndSize):
(JSC::Wasm::restoreWebAssemblyGlobalState):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):
- wasm/WasmB3IRGenerator.h:
- wasm/WasmBinding.cpp:
(JSC::Wasm::materializeImportJSCell):
(JSC::Wasm::wasmToJS):
(JSC::Wasm::wasmToWasm): the main goal of this patch was adding this function
(JSC::Wasm::exitStubGenerator):
- wasm/WasmBinding.h:
- wasm/WasmFormat.h: Get rid of much of the function index space:
we already have all of its information elsewhere, and as-is it
provides no extra efficiency.
(JSC::Wasm::ModuleInformation::functionIndexSpaceSize):
(JSC::Wasm::ModuleInformation::isImportedFunctionFromFunctionIndexSpace):
(JSC::Wasm::ModuleInformation::signatureIndexFromFunctionIndexSpace):
- wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::FunctionParser):
- wasm/WasmMemory.cpp: Add some logging.
(JSC::Wasm::Memory::dump): this was nice when debugging
(JSC::Wasm::Memory::makeString):
(JSC::Wasm::Memory::Memory):
(JSC::Wasm::Memory::~Memory):
(JSC::Wasm::Memory::grow):
- wasm/WasmMemory.h: don't use extra indirection, it wasn't
needed. Reorder some of the fields which are looked up at runtime
so they're more cache-friendly.
(JSC::Wasm::Memory::Memory):
(JSC::Wasm::Memory::mode):
(JSC::Wasm::Memory::offsetOfSize):
- wasm/WasmMemoryInformation.cpp: Pinned registers are now a
global thing for all of JSC, not a per-Memory thing
anymore. wasm->wasm calls are more complex otherwise: they have to
figure out how to bridge between the caller and callee's
special-snowflake pinning.
(JSC::Wasm::PinnedRegisterInfo::get):
(JSC::Wasm::PinnedRegisterInfo::PinnedRegisterInfo):
(JSC::Wasm::MemoryInformation::MemoryInformation):
- wasm/WasmMemoryInformation.h:
- wasm/WasmModuleParser.cpp:
- wasm/WasmModuleParser.h:
- wasm/WasmPageCount.cpp: Copied from Source/JavaScriptCore/wasm/WasmBinding.h.
(JSC::Wasm::PageCount::dump): nice for debugging
- wasm/WasmPageCount.h:
- wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::parseAndValidateModule):
(JSC::Wasm::Plan::run):
- wasm/WasmPlan.h:
(JSC::Wasm::Plan::takeWasmExitStubs):
- wasm/WasmSignature.cpp:
(JSC::Wasm::Signature::toString):
(JSC::Wasm::Signature::dump):
- wasm/WasmSignature.h:
- wasm/WasmValidate.cpp:
(JSC::Wasm::validateFunction):
- wasm/WasmValidate.h:
- wasm/js/JSWebAssemblyInstance.h:
(JSC::JSWebAssemblyInstance::offsetOfTable):
(JSC::JSWebAssemblyInstance::offsetOfImportFunctions):
(JSC::JSWebAssemblyInstance::offsetOfImportFunction):
- wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::create):
(JSC::JSWebAssemblyMemory::JSWebAssemblyMemory):
(JSC::JSWebAssemblyMemory::buffer):
(JSC::JSWebAssemblyMemory::grow):
- wasm/js/JSWebAssemblyMemory.h:
(JSC::JSWebAssemblyMemory::memory):
(JSC::JSWebAssemblyMemory::offsetOfMemory):
(JSC::JSWebAssemblyMemory::offsetOfSize):
- wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::create):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
- wasm/js/JSWebAssemblyModule.h:
(JSC::JSWebAssemblyModule::signatureIndexFromFunctionIndexSpace):
(JSC::JSWebAssemblyModule::functionImportCount):
- wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::createStructure):
(JSC::WebAssemblyFunction::WebAssemblyFunction):
(JSC::WebAssemblyFunction::finishCreation):
- wasm/js/WebAssemblyFunction.h:
(JSC::WebAssemblyFunction::wasmEntrypoint):
(JSC::WebAssemblyFunction::offsetOfInstance):
(JSC::WebAssemblyFunction::offsetOfWasmEntryPointCode):
- wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance): always start with a dummy
memory, so wasm->wasm calls don't need to null-check
- wasm/js/WebAssemblyMemoryConstructor.cpp:
(JSC::constructJSWebAssemblyMemory):
- wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::WebAssemblyModuleConstructor::createModule):
- wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):
- wasm/js/WebAssemblyModuleRecord.h:
- 4:32 PM Changeset in webkit [210228] by
-
- 4 edits1 add in trunk
WebAssembly: Some loads don't take into account the offset
https://bugs.webkit.org/show_bug.cgi?id=166616
<rdar://problem/29841541>
Reviewed by Keith Miller.
JSTests:
- wasm/function-tests/load-offset.js: Added.
Source/JavaScriptCore:
- wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::emitLoadOp):
- 1:22 PM Changeset in webkit [210227] by
-
- 8 edits in trunk/Source
Use StaticStringImpl instead of StaticASCIILiteral
https://bugs.webkit.org/show_bug.cgi?id=166586
Reviewed by Darin Adler.
Source/WebCore:
- bindings/scripts/StaticString.pm:
(GenerateStrings):
Source/WTF:
It is more handy way to define static StringImpl. It calculates the length
and hash value by using the constexpr constructor and function. So we do
not need to calculate these things in Perl script.
And it allows us to use StaticStringImpl in the hand written C++ code.
Previously, we need to calculate the length and hash value by hand if we
would like to use StaticASCIILiteral in the hand written C++ code, and it
meant that we cannot use it at all in the hand written C++ code.
- wtf/text/AtomicStringImpl.cpp:
(WTF::AtomicStringImpl::addSlowCase):
(WTF::AtomicStringImpl::lookUpSlowCase):
- wtf/text/AtomicStringImpl.h:
- wtf/text/StringImpl.h:
- wtf/text/SymbolImpl.h:
- wtf/text/UniquedStringImpl.h:
- 1:20 PM WebInspectorCodingStyleGuide edited by
- (diff)
- 1:16 PM Changeset in webkit [210226] by
-
- 8 edits in trunk/Source/WebCore
Drop the render tree for documents in the page cache.
<https://webkit.org/b/121798>
Reviewed by Antti Koivisto.
To save memory and reduce complexity, have documents tear down their render tree
when entering the page cache. I've wanted to do this for a long time and it seems
like we can actually do it now.
This patch will enable a number of clean-ups since it's no longer valid for renderers
to exist while the document is in page cache.
- dom/Document.cpp:
(WebCore::Document::destroyRenderTree): Remove assertion that we're not in the page cache
since we will now be tearing down render trees right as they enter the page cache.
- dom/PageCache.cpp:
(WebCore::destroyRenderTree):
(WebCore::PageCache::addIfCacheable): Tear down the render tree right before setting
the in-cache flag. The render tree is destroyed in bottom-up order to ensure that the
main frame renderers die last.
- history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
- page/FrameView.h:
- page/FrameView.cpp:
(WebCore::FrameView::didRestoreFromPageCache): Update the scollable area set after restoring
a frame from the page cache. This dirties the scrolling tree, which was covered by tests.
- page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::setNeedsStyleRecalc):
- page/animation/AnimationController.cpp:
(WebCore::AnimationController::cancelAnimations): Make these no-ops if called
while the render tree is being torn down. This fixes some assertion failures
on layout tests and avoids pointless style invalidation.
- 8:41 AM Changeset in webkit [210225] by
-
- 2 edits in trunk/Tools
[GTK] WebCore/CSSParser unit test is not being built
https://bugs.webkit.org/show_bug.cgi?id=166492
Reviewed by Michael Catanzaro.
This test was introduced in r175930, but we were not building
it on GTK+ port since r176015.
This patch marks the test to be built again on GTK+.
JFTR, the test is passing right now.
- TestWebKitAPI/PlatformGTK.cmake: Add CSSParser.cpp test file and use
ADD_WHOLE_ARCHIVE_TO_LIBRARIES to avoid linking errors.
- 7:36 AM Changeset in webkit [210224] by
-
- 9 edits in trunk/Source
Discard media controls JS/CSS caches under memory pressure.
<https://webkit.org/b/166639>
Reviewed by Antti Koivisto.
Source/WebCore:
Add a RenderTheme::purgeCaches() virtual and teach the iOS and macOS implementations
to drop their cached media controls JS/CSS strings there. The strings are only cleared
if nothing else is referencing them, which gives us a decent "weak cache" behavior.
This sheds ~300kB memory on iOS with the current media controls.
- page/MemoryRelease.cpp:
(WebCore::releaseNoncriticalMemory):
- rendering/RenderTheme.h:
(WebCore::RenderTheme::purgeCaches):
- rendering/RenderThemeIOS.h:
- rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::purgeCaches):
- rendering/RenderThemeMac.h:
- rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::purgeCaches):
Source/WTF:
- wtf/text/WTFString.h:
(WTF::String::clearImplIfNotShared): Add a helper for clearing a String if the underlying
StringImpl is not referenced by anyone else.
- 5:54 AM Changeset in webkit [210223] by
-
- 2 edits in trunk/Source/WebCore
[GTK] Since the memory pressure relief has been activated, my disk has a high usage and the desktop stalls
https://bugs.webkit.org/show_bug.cgi?id=164052
Reviewed by Michael Catanzaro.
Check how much memory is freed by the memory pressure handler and wait for a long time if we didn't free that
much.
- platform/linux/MemoryPressureHandlerLinux.cpp:
(WebCore::MemoryPressureHandler::EventFDPoller::EventFDPoller):
- 1:02 AM Changeset in webkit [210222] by
-
- 9 edits2 adds in trunk
AX: Expose block quote level to iOS API
https://bugs.webkit.org/show_bug.cgi?id=166629
<rdar://problem/29834793>
Reviewed by Darin Adler.
Source/WebCore:
Expose the blockquote level to iOS Accessbility API.
Change the return type of blockquote level to unsigned.
Test: accessibility/ios-simulator/blockquote-level.html
- accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::blockquoteLevel):
- accessibility/AccessibilityObject.h:
- accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityBlockquoteLevel]):
- accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Tools:
- DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::numberAttributeValue):
- WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::numberAttributeValue):
LayoutTests:
- accessibility/ios-simulator/blockquote-level-expected.txt: Added.
- accessibility/ios-simulator/blockquote-level.html: Added.