Timeline



Jan 3, 2017:

11:52 PM Changeset in webkit [210271] by Yusuke Suzuki
  • 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.

  1. Create WorkQueue (in thread A).
  2. Dispatch a task (in thread A, dispatching a task to thread B).
  3. Deref in thread A.
  4. The task is executed in thread B.
  5. Deref in thread B.
  6. 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 bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.18.1/Source

Versioning.

10:38 PM Changeset in webkit [210269] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.18.1

New tag.

7:52 PM Changeset in webkit [210268] by aestes@apple.com
  • 2 edits
    1 copy
    2 moves
    1 add
    1 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 rniwa@webkit.org
  • 10 edits
    4 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 timothy_horton@apple.com
  • 30 edits
    4 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 n_wang@apple.com
  • 4 edits
    2 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 bshafiei@apple.com
  • 2 edits in tags/Safari-604.1.1.2/Source/WebCore

Merged r210248. rdar://problem/29782862

6:09 PM Changeset in webkit [210263] by bshafiei@apple.com
  • 5 edits in tags/Safari-604.1.1.2/Source

Versioning.

6:03 PM Changeset in webkit [210262] by bshafiei@apple.com
  • 1 copy in tags/Safari-604.1.1.2

New tag.

5:32 PM Changeset in webkit [210261] by BJ Burg
  • 3 edits
    2 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 commit-queue@webkit.org
  • 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 jfbastien@apple.com
  • 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 aestes@apple.com
  • 3 edits
    1 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 commit-queue@webkit.org
  • 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 bshafiei@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

4:22 PM Changeset in webkit [210255] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.4.5

New tag.

4:04 PM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
3:51 PM Changeset in webkit [210254] by Chris Dumez
  • 9 edits
    6 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 weinig@apple.com
  • 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 commit-queue@webkit.org
  • 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 Joseph Pecoraro
  • 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 Joseph Pecoraro
  • 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 BJ Burg
  • 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 jer.noble@apple.com
  • 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 dbates@webkit.org
  • 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 akling@apple.com
  • 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 dbates@webkit.org
  • 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 jfbastien@apple.com
  • 8 edits
    4 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
DoubleEncodeOffset value. 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 bshafiei@apple.com
  • 3 edits
    6 copies in branches/safari-602-branch

Merged r210112. rdar://problem/29756651

11:21 AM Changeset in webkit [210242] by bshafiei@apple.com
  • 5 edits
    3 copies in branches/safari-602-branch

Merged r210122. rdar://problem/29775002

11:14 AM Changeset in webkit [210241] by bshafiei@apple.com
  • 3 edits
    2 copies in branches/safari-602-branch

Merged r210120. rdar://problem/29789131

10:53 AM Changeset in webkit [210240] by akling@apple.com
  • 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 clopez@igalia.com
  • 5 edits
    8 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 Michael Catanzaro
  • 8 edits
    4 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 pvollan@apple.com
  • 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 pvollan@apple.com
  • 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 Carlos Garcia Campos
  • 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 Carlos Garcia Campos
  • 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 Carlos Garcia Campos
  • 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 Julien Brianceau
  • 28 edits
    3 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 Yusuke Suzuki
  • 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 Yusuke Suzuki
  • 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 becomes isAtomic() == 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 jfbastien@apple.com
  • 41 edits
    1 copy
    2 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 sbarati@apple.com
  • 4 edits
    1 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 Yusuke Suzuki
  • 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 BJ Burg
(diff)
1:16 PM Changeset in webkit [210226] by akling@apple.com
  • 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 Manuel Rego Casasnovas
  • 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 akling@apple.com
  • 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 Carlos Garcia Campos
  • 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 Chris Fleizach
  • 9 edits
    2 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.

Jan 1, 2017:

12:23 PM Changeset in webkit [210221] by jeffm@apple.com
  • 19 edits in trunk

Update user-visible copyright strings to include 2017
https://bugs.webkit.org/show_bug.cgi?id=166278

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

  • Info.plist:

Source/WebCore:

  • Info.plist:

Source/WebKit/mac:

  • Info.plist:

Source/WebKit2:

  • DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist:
  • Info.plist:
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist:
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
  • PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist:
  • PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
  • WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist:
  • WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
  • WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:

WebKitLibraries:

  • win/tools/scripts/COPYRIGHT-END-YEAR:
8:46 AM Changeset in webkit [210220] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

GraphicsContextCairo: setMiterLimit() is missing the DisplayListRecorder diversion
https://bugs.webkit.org/show_bug.cgi?id=166539

Reviewed by Michael Catanzaro.

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::setMiterLimit): Call the setMiterLimit() method on the
m_displayListRecorder object when the GraphicsContext object is in recording mode.

8:15 AM Changeset in webkit [210219] by zandobersek@gmail.com
  • 4 edits in trunk/Source/WebCore

Clean up GraphicsContext3D forward declarations, header inclusion
https://bugs.webkit.org/show_bug.cgi?id=166537

Reviewed by Alex Christensen.

Remove two unnecessary GraphicsContext3D forward declarations from the
EmptyClients and ChromeClient header files, and remove the unnecessary
GraphicsContext3D.h header inclusion from RenderLayerBacking.

No changes in behavior.

  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • rendering/RenderLayerBacking.cpp:

Dec 31, 2016:

4:48 PM Changeset in webkit [210218] by Michael Catanzaro
  • 7 edits
    1 add in trunk

SecurityOrigin::create triplet constructor does not canonicalize port
https://bugs.webkit.org/show_bug.cgi?id=166624

Reviewed by Daniel Bates.

Source/WebCore:

It is currently possible to create two different unequal SecurityOrigin objects that
represent the same security origin. The SecurityOrigin create functions that take URL and
String parameters convert the port to nullopt if it is the default port for the protocol,
but the separate protocol/host/port constructor doesn't. Change it to parallel the other
constructors.

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::create):

  • page/SecurityOrigin.h: Export isSameOriginAs for use by tests.

Tools:

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWin.cmake:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp: Added.

(TestWebKitAPI::SecurityOriginTest::SetUp):
(TestWebKitAPI::TEST_F):

1:57 AM Changeset in webkit [210217] by Darin Adler
  • 31 edits
    1 delete in trunk/Source/WebCore

Remove setDOMException and a few custom bindings
https://bugs.webkit.org/show_bug.cgi?id=166002

Reviewed by Sam Weinig.

  • CMakeLists.txt: Removed JSFileReaderCustom.cpp.
  • WebCore.xcodeproj/project.pbxproj: Removed JSFileReaderCustom.cpp.
  • bindings/js/CallbackFunction.cpp:

(WebCore::checkFunctionOnlyCallback): Use throwTypeMismatchError instead
of calling setDOMException with TYPE_MISMATCH_ERR.

  • bindings/js/JSBindingsAllInOne.cpp: Removed JSFileReaderCustom.cpp.
  • bindings/js/JSCSSStyleDeclarationCustom.cpp:

(WebCore::JSCSSStyleDeclaration::putDelegate): Pass a throw scope in to
propagateException.

  • bindings/js/JSCryptoAlgorithmDictionary.cpp:

(WebCore::JSCryptoAlgorithmDictionary::parseAlgorithmIdentifier):
Renamed from getAlgorithmIdentifier. Got rid of bool return value, instead
use a conventional return value and conventional JavaScript exception
handling. Added a ThrowScope argument.
(WebCore::optionalHashAlgorithm): Added. Returns an optional hash algorithm.
Also makes the same changes as above, conventional exception handling and
ThrowScope argument.
(WebCore::requiredHashAlgorithm): Added. Like the above but throws an
exception if the algorithm is omitted.
(WebCore::getHashAlgorithm): Deleted. Replaced by the two functions above.
(WebCore::createAesCbcParams): Updated for above changes.
(WebCore::createHmacParams): Ditto.
(WebCore::createHmacKeyParams): Ditto.
(WebCore::createRsaKeyGenParams): Ditto.
(WebCore::createRsaOaepParams): Ditto.
(WebCore::createRsaSsaParams): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Added
a ThrowScope argument, and changed to use throwNotSupportedError instead
of setDOMException with NOT_SUPPORTED_ERROR.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Ditto.

  • bindings/js/JSCryptoAlgorithmDictionary.h: Updated for the above changes.
  • bindings/js/JSCryptoOperationData.cpp:

(WebCore::cryptoOperationDataFromJSValue): Got rid of bool return value and
instead use a conventional return value and conventional JS exception handling.
Added a ThrowScope argument.

  • bindings/js/JSCryptoOperationData.h: Updated for the above.
  • bindings/js/JSCustomXPathNSResolver.cpp:

(WebCore::JSCustomXPathNSResolver::create): Use ExceptionOr.
(WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver): Take a VM&
rather than an ExecState*.

  • bindings/js/JSCustomXPathNSResolver.h: Updated for the changes above.

Also marked class final and fixed indentation.

  • bindings/js/JSDOMBinding.cpp:

(WebCore::createDOMException): Updated comment.
(WebCore::throwDOMException): Deleted.
(WebCore::propagateException): Deleted non-inline overload that does not take
a throw scope, now that all callers pass a throw scope.
(WebCore::setDOMExceptionSlow): Deleted.
(WebCore::setDOMException): Deleted.
(WebCore::throwNotSupportedError): Added.
(WebCore::throwDOMSyntaxError): Added.
(WebCore::throwDataCloneError): Added.
(WebCore::throwIndexSizeError): Added.
(WebCore::throwTypeMismatchError): Added.

  • bindings/js/JSDOMBinding.h: Updated for the additions and removals

above. Also grouped the standard DOM exception throwing functions separately
from the special ones for getters and setters, and sorted them alphabetically.

  • bindings/js/JSDataCueCustom.cpp:

(WebCore::createJSDataCue): Added, helper function for the below.
(WebCore::constructJSDataCue): Tightened and tweaked a bit.

  • bindings/js/JSFileReaderCustom.cpp: Removed.
  • bindings/js/JSHTMLOptionsCollectionCustom.cpp:

(WebCore::JSHTMLOptionsCollection::setLength): Use throwIndexSizeError instead
of setDOMException with INDEX_SIZE_ERR.

  • bindings/js/JSHTMLSelectElementCustom.cpp:

(WebCore::selectElementIndexSetter): Use throwTypeMismatchError instead of
setDOMExceptoin with TYPEMISMATCH_ERR.

  • bindings/js/JSIDBRequestCustom.cpp:

(WebCore::JSIDBRequest::result): Pass a throw scope in to
propagateException.

  • bindings/js/JSSQLResultSetRowListCustom.cpp:

(WebCore::JSSQLResultSetRowList::item): Use throwTypeMismatchError and
throwIndexSizeError instead of setDOMException with TYPE_MISMATCH_ERR and
INDEX_ERR. This required adding a throw scope.

  • bindings/js/JSSQLTransactionCustom.cpp:

(WebCore::JSSQLTransaction::executeSql): Use throwDOMSyntaxError and
throwTypeMismatchError instead of setDOMException with SYNTAX_ERR and
TYPE_MISMATCH_ERR.

  • bindings/js/JSStorageCustom.cpp:

(WebCore::JSStorage::nameGetter): Pass a throw scope in to
propagateException.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters): Use throwNotSupportedError
instead of setDOMException with NOT_SUPPORTED_ERR.
(WebCore::createAlgorithm): Deleted.
(WebCore::supportExportKeyThrow): Added ThrowScope argument and use
throwNotSupportedError instead of setDOMException with NOT_SUPPORTED_ERR.
(WebCore::jsSubtleCryptoFunctionEncryptPromise): Updated for above changes,
throwing a not supported exception at this level rather than in a helper.
(WebCore::jsSubtleCryptoFunctionDecryptPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionSignPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionVerifyPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionDigestPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionGenerateKeyPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionImportKeyPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionExportKeyPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionWrapKeyPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionUnwrapKeyPromise): Ditto.

  • bindings/js/JSWebKitSubtleCryptoCustom.cpp:

(WebCore::createAlgorithmFromJSValue): Got rid of bool return value and
instead use a conventional return value and conventional JS exception handling.
Added a ThrowScope argument.
(WebCore::cryptoKeyFormatFromJSValue): Ditto.
(WebCore::cryptoKeyUsagesFromJSValue): Ditto.
(WebCore::JSWebKitSubtleCrypto::encrypt): Updated for above changes.
(WebCore::JSWebKitSubtleCrypto::decrypt): Ditto.
(WebCore::JSWebKitSubtleCrypto::sign): Ditto.
(WebCore::JSWebKitSubtleCrypto::verify): Ditto.
(WebCore::JSWebKitSubtleCrypto::digest): Ditto.
(WebCore::JSWebKitSubtleCrypto::generateKey): Ditto.
(WebCore::JSWebKitSubtleCrypto::importKey): Ditto.
(WebCore::JSWebKitSubtleCrypto::exportKey): Ditto.
(WebCore::JSWebKitSubtleCrypto::wrapKey): Ditto.
(WebCore::JSWebKitSubtleCrypto::unwrapKey): Ditto.

  • bindings/js/JSXMLHttpRequestCustom.cpp:

(WebCore::JSXMLHttpRequest::send): Pass a throw scope in to
propagateException.
(WebCore::JSXMLHttpRequest::responseText): Ditto.

  • bindings/js/JSXPathNSResolverCustom.cpp:

(WebCore::JSXPathNSResolver::toWrapped): Updated since
JSCustomXPathNSResolver::create now uses ExceptionOr.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::maybeThrowExceptionIfSerializationFailed): Updated to take
a reference instead of a pointer. Fixed the handling of success to be
simpler; no need to check the code twice. Use throwDataCloneError instead
of setDOMException with DATA_CLONE_ERR.
(WebCore::SerializedScriptValue::create): Updated for above.
(WebCore::SerializedScriptValue::deserialize): Ditto.

  • bindings/js/StructuredClone.cpp:

(WebCore::structuredCloneArrayBuffer): Use throwDataCloneError instead of
setDOMException with DATA_CLONE_ERR.
(WebCore::structuredCloneArrayBufferView): Ditto.

  • crypto/CryptoAlgorithmParametersDeprecated.h: Removed unneeded empty

constructor.

  • crypto/parameters/CryptoAlgorithmHmacKeyParamsDeprecated.h: Ditto,

moving initialization to where the data member is defined.

  • crypto/parameters/CryptoAlgorithmRsaKeyGenParamsDeprecated.h: Ditto.
  • crypto/parameters/CryptoAlgorithmRsaOaepParamsDeprecated.h: Ditto.
  • fileapi/FileReader.cpp:

(WebCore::FileReader::result): Added. Returns a combination of optional
and variant that matches what the ID specifies. Moved the code from the
two following functions in here.
(WebCore::FileReader::arrayBufferResult): Deleted.
(WebCore::FileReader::stringResult): Deleted.

  • fileapi/FileReader.h: Updated for the above.
  • fileapi/FileReader.idl: Removed [Custom] from the result attribute and

declared it with the type mentioned in the specification, a nullable union.

1:51 AM Changeset in webkit [210216] by Darin Adler
  • 94 edits
    1 delete in trunk

Remove PassRefPtr use from the "dom" directory, related cleanup
https://bugs.webkit.org/show_bug.cgi?id=166569

Reviewed by Alex Christensen.

Source/WebCore:

  • CMakeLists.txt: Removed DocumentMarker.cpp.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • bindings/js/JSPopStateEventCustom.cpp:

(WebCore::JSPopStateEvent::state): Pass ExecState by reference.

  • dom/CharacterData.cpp:

(WebCore::CharacterData::dispatchModifiedEvent): Use auto.

  • dom/DOMAllInOne.cpp: Removed DocumentMarker.cpp.
  • dom/DOMNamedFlowCollection.cpp:

(WebCore::DOMNamedFlowCollection::DOMNamedFlowCollection): Updated to take
ownership of the passed in vector.
(WebCore::DOMNamedFlowCollection::create): Moved here from header.
(WebCore::DOMNamedFlowCollection::~DOMNamedFlowCollection): Moved here so we
don't need to include "WebKitNamedFlow.h" in the header.
(WebCore::DOMNamedFlowCollection::item): Rewrote to use Vector.
(WebCore::DOMNamedFlowCollection::namedItem): Rewrote to use a HashSet that
we build from the Vector. Uses a set of hash functions defined right here.
Note that the privor version of this class had incorrect use of ListHashSet
with safeToCompareToEmptyOrDeleted inaccurately set to true.
(WebCore::DOMNamedFlowCollection::supportedPropertyNames): Added this.
Old version just had an empty placeholder.

  • dom/DOMNamedFlowCollection.h: Changed to no longer use ListHashSet, not

the right data structure for this. Removed incorrect use of "long" and
made some other simplifications.

  • dom/DOMNamedFlowCollection.idl: Changed return types of item and namedItem

to accurately reflect the fact that they return null when the index or name
not found in the collection.

  • dom/DataTransfer.h: Remove indentation. Remove unimplemented

incorrect declarations of items for ENABLE(DATA_TRANSFER_ITEMS).
Will be added back when someone implements that feature, or perhaps
ENABLE(DATA_TRANSFER_ITEMS) should be entirely removed for now?

  • dom/DataTransferItem.h: Changed return type for getAsFile to

RefPtr. Again, part of ENABLE(DATA_TRANSFER_ITEMS), so dead code for now.

  • dom/Document.cpp:

(WebCore::canonicalizedTitle): Removed incorrect comment claiming we
convert control characters to spaces. Simplified logic, removing two
extra loops. Changed to work on just a String rather than StringWithDirection.
(WebCore::Document::updateTitle): Updated to call the function above.
Also updated since StringWithDirection is now a struct instead of a class.
Call displayBuffer on the encoding directly instead of calling a member
function named displayBufferModifiedByEncoding.
(WebCore::Document::updateTitleFromTitleElement): Updated since
StringWithDirection is now a struct.
(WebCore::Document::setTitle): Removed code that unnecessarily calls
updateTitle twice; once indirectly by calling setTextContent on the
title elmeent and once by directly calling updateTitle.
(WebCore::Document::setWindowAttributeEventListener): Take a RefPtr&&.
(WebCore::Document::statePopped): Take a Ref&&.
(WebCore::Document::displayStringModifiedByEncoding): Deleted unused overload.
(WebCore::Document::displayBufferModifiedByEncodingInternal): Deleted.
(WebCore::Document::requestAnimationFrame): Take a Ref&&.

  • dom/Document.h: Updated for changes above. Also changed the title function

to return a const String& to slightly cut down on reference count churn.
(WebCore::Document::displayBufferModifiedByEncoding): Deleted.

  • dom/DocumentMarker.cpp: Removed.
  • dom/DocumentMarker.h: Reworked the DocumentMarker class to use a variant

instead of a separate reference counted DocumentMarkerDetails object.

  • dom/DocumentMarkerController.cpp:

(WebCore::DocumentMarkerController::addMarkerToNode): Changed argument
type to DocumentMarker::Data&&.
(DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
clearDetails -> clearData
(DocumentMarkerController::showMarkers): activeMatch -> isActiveMatch

  • dom/DocumentMarkerController.h: Updated for the above.
  • dom/DocumentParser.h: Fixed incorrect reference to PassRefPtr in a comment.
  • dom/Element.cpp:

(WebCore::Element::willModifyAttribute): Use auto.

  • dom/Event.cpp:

(WebCore::Event::isDragEvent): Deleted. Unused.
(WebCore::Event::cloneFor): Deleted. Unused function left over from the
start of an implementation of seamless frames.

  • dom/Event.h: Updated for the above.
  • dom/EventContext.cpp: Tweaked blank lines.
  • dom/EventContext.h: Removed unnecessary includes and forward declarations.

Changed setRelatedTarget to take a raw pointer instead of PassRefPtr since
callers aren't passing ownership. Moved TouchEventContext::touchList body
out of the class definition since it's a bit long. Deleted unused
toTouchEventContext functions. FIxed incorrect comment.

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::initMessageEvent): Removed unused overload.

  • dom/MessageEvent.h: Updated for above. Also changed the

dataAsSerializedScriptValue function to return a raw pointer instead of
PassRefPtr since it is not passing ownership.

  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::create): Use raw pointer instead of PassRefPtr for
data transfer and related target arguments.
(WebCore::MouseEvent::MouseEvent): Ditto. Also use IntPoint instead of
separate ints for the various X/Y pairs.
(WebCore::MouseEvent::initMouseEvent): Take a raw pointer for event target.
(WebCore::MouseEvent::isDragEvent): Reformatted, sorted alphabetically,
added comment about why this function probably needs to go.
(WebCore::adjustedClientX): Deleted.
(WebCore::adjustedClientY): Deleted.
(WebCore::MouseEvent::cloneFor): Deleted.

  • dom/MouseEvent.h: Updated for the above. Also made more functions private

and final and initialized more of the data members.

  • dom/MutationEvent.cpp:

(WebCore::MutationEvent::MutationEvent): Pass related node as a raw pointer.
(WebCore::MutationEvent::initMutationEvent): Ditto.

  • dom/MutationEvent.h: Updated for the above. Fixed indentation. Removed

unnecessary explicit destructor; default generated one is fine. Initialize
m_attrChange in the class definition.

  • dom/MutationObserver.cpp:

(WebCore::MutationObserver::observe): Pass reference.
(WebCore::MutationObserver::disconnect): Call unregisterMutationObserver
directly instead of calling unregisterAndDelete.

  • dom/MutationObserverInterestGroup.cpp:

(WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
Take an rvalue reference to the HashMap and use move.
(WebCore::MutationObserverInterestGroup::createIfNeeded): Updated to call
registeredMutationObservers.

  • dom/MutationObserverInterestGroup.h: Updated for the above.
  • dom/MutationObserverRegistration.cpp:

(WebCore::MutationObserverRegistration::MutationObserverRegistration):
Take a reference to the observer instead of PassRefPtr. Also take a
refererence to the node rather than a pointer.
(WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
Updated to use references instead of pointers.
(WebCore::MutationObserverRegistration::clearTransientRegistrations): Ditto.
(WebCore::MutationObserverRegistration::unregisterAndDelete): Deleted.
(WebCore::MutationObserverRegistration::shouldReceiveMutationFrom): Ditto.
(WebCore::MutationObserverRegistration::addRegistrationNodesToSet): Ditto.

  • dom/MutationObserverRegistration.h: Updated for above changes. Also added

a node member function. Changed m_observer to a Ref and m_node to a reference.
Removed the NodeHashSet typedef.

  • dom/NamedFlowCollection.cpp:

(WebCore::NamedFlowCollection::createCSSOMSnapshot): Pass a vector of Ref
instead of a vector of raw pointers and pass it as an rvalue reference so
it can be taken over by the named flow collection wrapper.

  • dom/Node.cpp:

(WebCore::Node::mutationObserverRegistry): Use auto and nullptr.
(WebCore::Node::transientMutationObserverRegistry): Ditto.
(WebCore::collectMatchingObserversForMutation): Use references instead of pointers.
(WebCore::Node::registeredMutationObservers): Changed to return a map instead of
filling one in and renamed to remove "get" from name.
(WebCore::Node::registerMutationObserver): Use references instead of pointers.
(WebCore::Node::unregisterMutationObserver): Ditto.
(WebCore::Node::registerTransientMutationObserver): Ditto.
(WebCore::Node::unregisterTransientMutationObserver): Ditto.
(WebCore::Node::notifyMutationObserversNodeWillDetach): Ditto.

  • dom/Node.h: Updated for the above.
  • dom/PopStateEvent.cpp:

(WebCore::PopStateEvent::PopStateEvent): Use RefPtr&& instead of PassRefPtr.
(WebCore::PopStateEvent::create): Use a raw pointer instead of PassRefPtr.
(WebCore::PopStateEvent::trySerializeState): Take a reference to ExecState.

  • dom/PopStateEvent.h: Updated for the above.
  • dom/Position.cpp:

(WebCore::Position::Position): Take a raw pointer instead of PassRefPtr.
(WebCore::Position::moveToPosition): Ditto.

  • dom/Position.h: Updated for the above, also changed createLegacyEditingPosition

in the same way and got rid of the LegacyEditingPosition class.

  • dom/Range.cpp:

(WebCore::Range::Range): Changed startContainer and endContainer to RefPtr<Node>&&.
Later this needs to be changed more, but for now this keeps code changes to a minimum.
(WebCore::Range::create): Changed startContainer and endContainer to Node*.

  • dom/Range.h: Updated for the above.
  • dom/ScopedEventQueue.cpp:

(WebCore::ScopedEventQueue::dispatchEvent): Removed a comment that talks about
PassRefPtr, and simplified the code since the comment is no longer valid.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::PendingException::PendingException):
Take a RefPtr&& instead of a PassRefPtr.
(WebCore::ScriptExecutionContext::ScriptExecutionContext): Moved initialization
of all the data members up to the class definition.
(WebCore::ScriptExecutionContext::sanitizeScriptError): Use ASCIILiteral.
(WebCore::ScriptExecutionContext::reportException): Use WTFMove when passing
arguments to the PendingException constructor and using a value from the
PendingException just before destroying it.

  • dom/ScriptExecutionContext.h: Changed addTimeout to take a reference rather

than a PassRefPtr to the timer. Callers were not passing ownership. Also
initialize all the data members here in the class definition.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::registerCallback): Take a Ref&&.

  • dom/ScriptedAnimationController.h: Updated for the above.
  • dom/SimulatedClick.cpp:

(WebCore::SimulatedMouseEvent::SimulatedMouseEvent): Updated since MouseEvent
constructor arguments changed to use IntPoint.

  • dom/WheelEvent.cpp:

(WebCore::WheelEvent::WheelEvent): Ditto. Also removed some unneeded initializers
now that the header does more.
(WebCore::WheelEvent::initWheelEvent): Tweaed style a bit.
(WebCore::WheelEvent::initWebKitWheelEvent): Deleted. Moved to the header since it's
just an inline that forwards to initWheelEvent.

  • dom/WheelEvent.h: Updated for the above.
  • dom/make_event_factory.pl:

(generateImplementation): Use RefPtr instead of PassRefPtr. A couple other tweaks.

  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::respondToMarkerAtEndOfWord): Use the data
insetad of details.
(WebCore::AlternativeTextController::removeDictationAlternativesForMarker):
Ditto, also changed to take reference instead of pointer.
(WebCore::AlternativeTextController::dictationAlternativesForMarker): Ditto.
(WebCore::AlternativeTextController::applyDictationAlternative): Ditto.

  • editing/AlternativeTextController.h: Updated for the above.
  • editing/ApplyBlockElementCommand.cpp:

(WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
Updated since Position now takes a raw pointer.

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::joinChildTextNodes): Ditto.

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::replaceSelectedTextInNode): Ditto.
(WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Ditto.

  • editing/DictationCommand.cpp:

(WebCore::DictationMarkerSupplier::addMarkersToTextNode): Updated to use the
DictationData struct.

  • editing/Editor.cpp:

(WebCore::Editor::updateMarkersForWordsAffectedByEditing): Pass a reference.
(WebCore::Editor::dictationAlternativesForMarker): Take a reference.

  • editing/Editor.h: Updated for the above.
  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::performOverwrite): Updated since Position now takes
a raw pointer.
(WebCore::InsertTextCommand::doApply): Ditto.
(WebCore::InsertTextCommand::insertTab): Ditto.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition): Ditto.

  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::computedTextWithDirection): Updated since
StringWithDirection is now a struct.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::submitForm): Use Ref&& for the form submission.
(WebCore::FrameLoader::receivedFirstData): Updated for change to StringWithDirection.
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::didBeginDocument): Pass a reference.
(WebCore::FrameLoader::loadURLIntoChildFrame): Pass a Ref to loadArchive.
(WebCore::FrameLoader::loadArchive): Take a Ref&& for the archive.
(WebCore::FrameLoader::loadInSameDocument): Take a raw pointer for the
serialized script value state object. No one was passing ownership.
But pass it along to statePopped as a Ref since we need to pass ownership
of the null value, at least for now.
(WebCore::FrameLoader::loadFrameRequest): Take a raw pointer for form state.
No one was passing ownership.
(WebCore::FrameLoader::loadURL): Ditto.
(WebCore::FrameLoader::load): Ditto.
(WebCore::FrameLoader::loadWithNavigationAction): Ditto.
(WebCore::FrameLoader::loadWithDocumentLoader): Ditto.
(WebCore::FrameLoader::loadPostRequest): Ditto.
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto.
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Ditto.

  • loader/FrameLoader.h: Updated for the above and to remove an unneeded forward

declaration of StringWithDirection, which is not used here.

  • loader/FrameLoaderClient.h: Updated forward declaration of StringWithDirection.

Also sorted the others and removed unneeded conditionals.

  • loader/HistoryController.cpp:

(WebCore::HistoryController::setCurrentItemTitle): Updated to use struct.
(WebCore::HistoryController::initializeItem): Ditto.

  • loader/HistoryController.h: Updated forward declaration of StringWithDirection.
  • loader/PolicyCallback.cpp:

(WebCore::PolicyCallback::PolicyCallback): Deleted. Default works fine.
(WebCore::PolicyCallback::~PolicyCallback): Ditto.
(WebCore::PolicyCallback::set): Take a raw pointer to form state.

  • loader/PolicyCallback.h: Use raw pointer for form state.
  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::checkNavigationPolicy): Take a raw pointer for form state.
(WebCore::PolicyChecker::checkNewWindowPolicy): Ditto.

  • loader/PolicyChecker.h: Updated for the above.
  • page/DOMTimer.cpp:

(WebCore::DOMTimer::DOMTimer): Pass reference to addTimeout function.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::requestAnimationFrame): Use Ref&& for callback.
(WebCore::DOMWindow::webkitRequestAnimationFrame): Ditto.
(WebCore::DOMWindow::cancelAnimationFrame): Tweak coding style.

  • page/DOMWindow.h: Updated for the above.
  • platform/PlatformWheelEvent.h: Use pragma once. Tweaked header indentation.

Simplified constructors by initializing data members.

  • platform/text/StringWithDirection.h: Use pragma once. Use struct instead of class.
  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::dictationAlternatives): Pass a reference.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paintTextMatchMarker): activeMatch -> isActiveMatch

Source/WebKit/ios:

  • WebView/WebPDFViewIOS.mm:

(-[WebPDFView _checkPDFTitle]): Use aggregate-style syntax for StringWithDirection.
Not needed now, but useful later if we ever can get rid of the explicit constructors.

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchDidReceiveTitle): Updated to use struct.
(WebFrameLoaderClient::updateGlobalHistory): Ditto.
(WebFrameLoaderClient::setTitle): Ditto.
(WebFrameLoaderClient::transitionToCommittedForNewPage): Ditto.

  • WebView/WebFrame.mm:

(-[WebFrame _dispatchDidReceiveTitle:]): Use aggregate-style syntax for StringWithDirection.
Not needed now, but useful later if we ever can get rid of the explicit constructors.
(-[WebFrame loadArchive:]): Pass a reference to loadArchive.

  • WebView/WebHTMLRepresentation.mm:

(-[WebHTMLRepresentation title]): Updated to use struct.

Source/WebKit/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::dispatchDidReceiveTitle): Updated since StringWithDirection::title
is now a data member, not a function member.
(WebFrameLoaderClient::updateGlobalHistory): Ditto.
(WebFrameLoaderClient::setTitle): Ditto.

  • WebDataSource.cpp:

(WebDataSource::pageTitle): Ditto.

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle): Updated to use struct.
(WebKit::WebFrameLoaderClient::updateGlobalHistory): Ditto.
(WebKit::WebFrameLoaderClient::setTitle): Ditto.

LayoutTests:

  • fast/dom/title-text-property-2-expected.txt:
  • http/tests/globalhistory/history-delegate-basic-title-expected.txt:

Updated expected results for progression where we no longer send duplicate updates
of the title when setting the title property on a document.

  • fast/regions/cssom/webkit-named-flow-collection-expected.txt:
  • fast/regions/cssom/webkit-named-flow-collection.html:

Added test cases cover property names in the named flow collection.
Specifically, check both Object.keys for just the indices, and also
Object.getOwnPropertyNames for including the names of the flows.

1:17 AM Changeset in webkit [210215] by Darin Adler
  • 16 edits in trunk/Source/WebCore

Remove PassRefPtr use from the "css" directory, related cleanup
https://bugs.webkit.org/show_bug.cgi?id=166628

Reviewed by Alex Christensen.

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcBinaryOperation::create): Take RefPtr&& instead of PassRefPtr.
Also added some checks for null. Code here is really inconsistent about null;
probably should change from RefPtr to Ref at some point.
(WebCore::CSSCalcBinaryOperation::createSimplified): Ditto.
(WebCore::CSSCalcBinaryOperation::CSSCalcBinaryOperation): Take Ref&& instead
of PassRefPtr.

  • css/CSSCrossfadeValue.cpp:

(WebCore::subimageKnownToBeOpaque): Take a reference instead of a pointer.
(WebCore::CSSCrossfadeValue::SubimageObserver::SubimageObserver): Moved here
from the header, and renamed.
(WebCore::CSSCrossfadeValue::SubimageObserver::imageChanged): Ditto.
(WebCore::CSSCrossfadeValue::CSSCrossfadeValue): Moved here from the header.
(WebCore::CSSCrossfadeValue::create): Ditto.
(WebCore::CSSCrossfadeValue::~CSSCrossfadeValue): Updated for data member name change.
(WebCore::CSSCrossfadeValue::fixedSize): Take a reference. Also rewrote size math to
take advantage of FloatSize multiplication and addition operators.
(WebCore::CSSCrossfadeValue::knownToBeOpaque): Take a reference.
(WebCore::CSSCrossfadeValue::loadSubimages): Set m_subimagesAreReady rather than
calling setReady on the subimage observer.
(WebCore::CSSCrossfadeValue::image): Return a raw pointer rather than a RefPtr.
Take a reference instead of a pointer.
(WebCore::CSSCrossfadeValue::crossfadeChanged): Removed unused rect argument.
Rewrote to use modern for loop.

  • css/CSSCrossfadeValue.h: Updated for above changes.
  • css/CSSGradientValue.cpp:

(WebCore::createGradient): Added. Helper so the function below can use Ref rather
than RefPtr, and it's also nice to factor out this "poor man's virtual function".
(WebCore::CSSGradientValue::image): Take a reference rather than a pointer.
(WebCore::clone): Added. Helper like createGradient above.
(WebCore::CSSGradientValue::gradientWithStylesResolved): Take a reference rather
than a pointer. Simplified by using the helper above.
(WebCore::CSSGradientValue::knownToBeOpaque): Removed unused argument. Rewrote to
use a modern for loop.

  • css/CSSGradientValue.h: Updated for above changes.
  • css/CSSImageGeneratorValue.cpp: Moved the CachedGeneratedImage class in here

from the header. Also changed it to use const and Ref.
(WebCore::CSSImageGeneratorValue::addClient): Take a reference rather than a pointer.
(WebCore::CSSImageGeneratorValue::removeClient): Ditto.
(WebCore::CSSImageGeneratorValue::cachedImageForSize): Updated since image now returns
a reference rather than a pointer.
(WebCore::CSSImageGeneratorValue::saveCachedImageForSize): Take a reference rather
than PassRefPtr.
(WebCore::CSSImageGeneratorValue::image): Take a reference rather than a pointer.
(WebCore::CSSImageGeneratorValue::fixedSize): Ditto.
(WebCore::CSSImageGeneratorValue::knownToBeOpaque): Ditto.

  • css/CSSImageGeneratorValue.h: Updated for above changes.
  • css/CSSValuePool.cpp:

(WebCore::CSSValuePool::createFontFaceValue): Return a RefPtr rather than PassRefPtr.

  • css/CSSValuePool.h: Updated for the above.
  • css/StyleBuilderConverter.h: Change convertStyleImage and convertShapeValue to

return RefPtr instead of PassRefPtr.

  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyValueContent): Since gradientWithStylesResolved
returns a Ref now, no need to dereference it any more. This also removes reference
count churn since we are now passing a Ref temporary to a Ref&&.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::styleImage): Ditto.

  • platform/graphics/GradientImage.cpp:

(WebCore::GradientImage::GradientImage): Pass generator as a reference rather than
as a PassRefPtr.
(WebCore::GradientImage::draw): Updated since m_gradient is now a Ref rather than
a RefPtr.
(WebCore::GradientImage::drawPattern): Ditto.

  • platform/graphics/GradientImage.h: Updated for the above changes. Make things

private rather than protected since this class is final.

  • rendering/style/StyleGeneratedImage.cpp:

(WebCore::StyleGeneratedImage::imageSize): Pass renderer as a reference. Later, we
should change the interface to this function, too.
(WebCore::StyleGeneratedImage::addClient): Ditto.
(WebCore::StyleGeneratedImage::removeClient): Ditto.
(WebCore::StyleGeneratedImage::image): Ditto.
(WebCore::StyleGeneratedImage::knownToBeOpaque): Ditto.

Dec 30, 2016:

5:28 PM Changeset in webkit [210214] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

[GTK] German translation update
https://bugs.webkit.org/show_bug.cgi?id=152228

Patch by Bernd Homuth <dev@hmt.im> on 2016-12-30
Rubber-stamped by Michael Catanzaro.

  • de.po:
8:16 AM Changeset in webkit [210213] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[EFL] fix buffer over-read in RenderThemeEfl::mediaControlsStyleSheet()
https://bugs.webkit.org/show_bug.cgi?id=166622

Patch by Olivier Blin <Olivier Blin> on 2016-12-30
Reviewed by Gyuyoung Kim.

This has been detected by a charactersAreAllASCII() assert failure.
Initially in WebKitForWayland (WPE), but the code was likely borrowed from EFL.

This is because ASCIILiteral() is wrongly used in mediaControlsStyleSheet().
mediaControlsBaseUserAgentStyleSheet is a char array, not a null-terminated string.
It is thus incorrect to use StringImpl::createFromLiteral() that calls
strlen() to get the string length.

The String::ConstructFromLiteral constructor can not be used, since it
skips the last character.

  • rendering/RenderThemeEfl.cpp:

(WebCore::RenderThemeEfl::mediaControlsStyleSheet):
Explicitely pass the size to the String constructor.

6:00 AM Changeset in webkit [210212] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

Unreviewed, rolling out r210206.
https://bugs.webkit.org/show_bug.cgi?id=166621

Crashes on macOS PLT (Requested by kling on #webkit).

Reverted changeset:

"Drop the render tree for documents in the page cache."
https://bugs.webkit.org/show_bug.cgi?id=121798
http://trac.webkit.org/changeset/210206

2:53 AM Changeset in webkit [210211] by svillar@igalia.com
  • 4 edits
    4 adds in trunk

[css-grid] Isolate instrinsic size computation from layout
https://bugs.webkit.org/show_bug.cgi?id=166530

Reviewed by Darin Adler.

Source/WebCore:

This is the last patch of the items placement data refactoring. By using a different Grid
instance in computeIntrinsicLogicalWidths we effectively isolate the intrinsic size
computation from the layout. They are now using different data structures so they don't
interfere each other.

This also means that we no longer reuse the placement of items done in the intrinsic size
computation. That shouldn't be a big issue once we make m_grid persistent on RenderGrid.

Last but not least, this patch finally removes the ugly const_cast's we had in
computeIntrinsicLogicalWidths() as we no longer modify the internal state of RenderGrid.

Tests: fast/css-grid-layout/grid-auto-repeat-intrinsic.html

fast/css-grid-layout/grid-change-intrinsic-size-with-auto-repeat-tracks.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Use a new instance of Grid.
(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat): Fixed a missing m_grid -> grid
rename.
(WebCore::RenderGrid::placeItemsOnGrid): Constify it. It nows repositions the items if the
number of auto repeat tracks has changed.

  • rendering/RenderGrid.h:

LayoutTests:

  • fast/css-grid-layout/grid-auto-repeat-intrinsic-expected.txt: Added.
  • fast/css-grid-layout/grid-auto-repeat-intrinsic.html: Added.
  • fast/css-grid-layout/grid-change-intrinsic-size-with-auto-repeat-tracks-expected.txt: Added.
  • fast/css-grid-layout/grid-change-intrinsic-size-with-auto-repeat-tracks.html: Added.
2:09 AM Changeset in webkit [210210] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r210180 - Ensure NetworkProcess is ready before whitelisting TLS certificates
https://bugs.webkit.org/show_bug.cgi?id=162962

Patch by Emanuele Aina <Emanuele Aina> on 2016-12-27
Reviewed by Alex Christensen.

If the API user tries to whitelist TLS certificates before any web
view has been created, the action will be ignored because the
NetworkProcess hasn't been fired up yet.

For example, the snippet below using the GTK+ API does not work,
unless the whitelisting is moved after the web view creation:

webkit_web_context_allow_tls_certificate_for_host(webkit_web_context_get_default(), crt, host);
webView = webkit_web_view_new();

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost): Ensure
that the NetworkProcess has been already fired up when adding
certificates, so they can be whitelisted before the first web view is
instantiated.

2:07 AM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
2:06 AM Changeset in webkit [210209] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.14

Merge r210207 - [GTK] Improve user agent construction
https://bugs.webkit.org/show_bug.cgi?id=142074

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Using the macOS quirk rather than the Chrome quirk for Google domains was a mistake: it
broke Hangouts in a different way than the Chrome quirk, and also prevents use of the nice
Earth mode on Google Maps. Google is making it really hard to develop a sane quirk.
Eventually I settled on the combination of two quirks: (1) Firefox browser, and (2) Linux
x86_64 platform. See the bug for full discussion on why these quirks are the best way to
make Google domains work properly in WebKit. This is an extremely sad state of affairs, but
I'm confident it is the best option. Note this effectively includes a rollout of r210168.

Also, fix a bug that caused an extra space to be inserted in the middle of the user agent.

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle):
(WebCore::urlRequiresFirefoxBrowser):
(WebCore::urlRequiresMacintoshPlatform):
(WebCore::urlRequiresLinuxDesktopPlatform):
(WebCore::UserAgentQuirks::quirksForURL):
(WebCore::UserAgentQuirks::stringForQuirk):
(WebCore::UserAgentQuirks::firefoxRevisionString):

  • platform/UserAgentQuirks.h:
  • platform/gtk/UserAgentGtk.cpp:

(WebCore::buildUserAgentString):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasFirefoxBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasLinuxPlatformQuirk):
(TestWebKitAPI::assertUserAgentForURLHasMacPlatformQuirk):
(TestWebKitAPI::TEST):

1:39 AM Changeset in webkit [210208] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.14/Source/JavaScriptCore

Merge r208018 - JSFunction::put() should not allow caching of lazily reified properties.
https://bugs.webkit.org/show_bug.cgi?id=164081

Reviewed by Geoffrey Garen.

It is incorrect for JSFunction::put() to return PutPropertySlots that indicates
that its lazily reified properties (e.g. .caller, and .arguments) are cacheable.
The reason for this is:

  1. Currently, a cacheable put may only consist of the following types of put operations:
    1. putting a new property at an offset in the object storage.
    2. changing the value of an existing property at an offset in the object storage.
    3. invoking the setter for a property at an offset in the object storage.

Returning a PutPropertySlot that indicates the property is cacheable means that
the property put must be one of the above operations.

For lazily reified properties, JSFunction::put() implements complex conditional
behavior that is different than the set of cacheable put operations above.
Hence, it should not claim that the property put is cacheable.

  1. Cacheable puts are cached on the original structure of the object before the put operation.

Reifying a lazy property will trigger a structure transition. Even though
subsequent puts to such a property may be cacheable after the structure
transition, it is incorrect to indicate that the property put is cacheable
because the caching is on the original structure, not the new transitioned
structure.

Also fixed some missing exception checks.

  • jit/JITOperations.cpp:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::put):
(JSC::JSFunction::reifyLazyPropertyIfNeeded):
(JSC::JSFunction::reifyBoundNameIfNeeded):

  • runtime/JSFunction.h:
1:02 AM Changeset in webkit [210207] by Michael Catanzaro
  • 6 edits in trunk

[GTK] Improve user agent construction
https://bugs.webkit.org/show_bug.cgi?id=142074

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Using the macOS quirk rather than the Chrome quirk for Google domains was a mistake: it
broke Hangouts in a different way than the Chrome quirk, and also prevents use of the nice
Earth mode on Google Maps. Google is making it really hard to develop a sane quirk.
Eventually I settled on the combination of two quirks: (1) Firefox browser, and (2) Linux
x86_64 platform. See the bug for full discussion on why these quirks are the best way to
make Google domains work properly in WebKit. This is an extremely sad state of affairs, but
I'm confident it is the best option. Note this effectively includes a rollout of r210168.

Also, fix a bug that caused an extra space to be inserted in the middle of the user agent.

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle):
(WebCore::urlRequiresFirefoxBrowser):
(WebCore::urlRequiresMacintoshPlatform):
(WebCore::urlRequiresLinuxDesktopPlatform):
(WebCore::UserAgentQuirks::quirksForURL):
(WebCore::UserAgentQuirks::stringForQuirk):
(WebCore::UserAgentQuirks::firefoxRevisionString):

  • platform/UserAgentQuirks.h:
  • platform/gtk/UserAgentGtk.cpp:

(WebCore::buildUserAgentString):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasFirefoxBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasLinuxPlatformQuirk):
(TestWebKitAPI::assertUserAgentForURLHasMacPlatformQuirk):
(TestWebKitAPI::TEST):

12:54 AM Changeset in webkit [210206] by akling@apple.com
  • 6 edits in trunk/Source/WebCore

Drop the render tree for documents in the page cache.
<https://webkit.org/b/121798>

Reviewed by Darin Adler.

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.

(WebCore::Document::setPageCacheState): Tear down the render tree right before setting
the in-cache flag. From now on, there should not exist render objects for documents in
the page cache.

  • 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): Make this a no-op if the render tree is being
torn down. This fixes assertions firing on animation tests.

Note: See TracTimeline for information about the timeline view.