Timeline



Dec 20, 2016:

11:48 PM Changeset in webkit [210056] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[Cairo] Conditional jump or move depends on uninitialised value(s)
https://bugs.webkit.org/show_bug.cgi?id=166058

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-12-20
Reviewed by Michael Catanzaro.

Initialize x and y members of cairo_glyph_t struct before passing it to cairo_glyph_path.

  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::CairoGlyphToPathTranslator::path):

11:07 PM Changeset in webkit [210055] by bshafiei@apple.com
  • 9 edits
    2 copies in branches/safari-603-branch

Merged r210031. rdar://problem/29693817

8:44 PM Changeset in webkit [210054] by mmaxfield@apple.com
  • 5 edits
    1 move
    2 adds in trunk

Skia lighter wght variation looks bolder than regular
https://bugs.webkit.org/show_bug.cgi?id=165948

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/text/variations/default-value.html

This patch inspects the font's information regarding variations. It uses this information
to work around a bug in CoreText where default variation values were not getting applied.
This workaround is placed behind a version check and the macro name
"WORKAROUND_CORETEXT_VARIATIONS_DEFAULT_VALUE_BUG" so we know to delete it whenever
possible. It also uses the minimum and maximum supported values for the axis to clamp our
variation values to the closest supported point, which is in line with a recent edit to
the fonts spec:
https://github.com/w3c/csswg-drafts/commit/52b802ac38619286a30662dceb71b8a29fa72f42
This clamping behavior also revealed another bug in CoreText, which was worked around
behind another version check and macro name WORKAROUND_CORETEXT_VARIATIONS_EXTENTS_BUG so
we know to delete it whenever possible.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::defaultVariationValues):
(WebCore::preparePlatformFont):

LayoutTests:

  • fast/text/variations/default-value-expected.html: Added.
  • fast/text/variations/default-value.html: Added.
  • fast/text/variations/outofbounds-expected-mismatch.html: Renamed from LayoutTests/fast/text/variations/outofbounds-expected.html.
  • fast/text/variations/outofbounds.html:
  • platform/ios-simulator/TestExpectations:
8:29 PM Changeset in webkit [210053] by commit-queue@webkit.org
  • 4 edits in trunk/Source

Fix undefined behavior caused by macro expansion producing 'defined'
https://bugs.webkit.org/show_bug.cgi?id=166047

Patch by Taras Tsugrii <ttsugrii@fb.com> on 2016-12-20
Reviewed by Darin Adler.

Source/JavaScriptCore:

  • API/JSBase.h:

Source/WebKit2:

  • Shared/API/Cocoa/WKFoundation.h:
8:04 PM Changeset in webkit [210052] by keith_miller@apple.com
  • 6 edits
    1 add in trunk

Add support for global
https://bugs.webkit.org/show_bug.cgi?id=165171

Reviewed by Filip Pizlo.

JSTests:

  • stress/global.js: Added.

Source/JavaScriptCore:

This patch adds spport for the global property on the global object.
The global property spec is in stage three and is quite simple.
For reference: http://tc39.github.io/proposal-global/

  • runtime/JSGlobalObject.cpp:

LayoutTests:

Fix getOwnPropertyDescriptor test.

  • js/resources/getOwnPropertyDescriptor.js:
6:29 PM Changeset in webkit [210051] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Remove a duplicate reference to ScrollingMomentumCalculatorMac.h in the Xcode project

Rubber-stamped by Sam Weinig.

  • WebCore.xcodeproj/project.pbxproj:
6:17 PM Changeset in webkit [210050] by Simon Fraser
  • 2 edits in trunk/Tools

REGRESSION: API test failure: WKWebView.EvaluateJavaScriptBlockCrash
https://bugs.webkit.org/show_bug.cgi?id=166031

Reviewed by Tim Horton.

Add an @autoreleasepool around the code that allocates then clears the WKWebView,
to ensure that the view is destroyed before the callback fires.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewEvaluateJavaScript.mm:
6:06 PM Changeset in webkit [210049] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Remove a duplicate reference to ScrollingMomentumCalculatorMac.mm in the Xcode project

Rubber-stamped by Sam Weinig.

  • WebCore.xcodeproj/project.pbxproj:
5:10 PM Changeset in webkit [210048] by commit-queue@webkit.org
  • 9 edits in trunk/Tools

Throw Exception when test doesn't clean up HID Events properly
https://bugs.webkit.org/show_bug.cgi?id=166271

Patch by Megan Gardner <Megan Gardner> on 2016-12-20
Reviewed by Simon Fraser.

Add in a check when UIScriptController is deleted to make sure that the HID event
callback dictionary is empty. If it is not, and a HID event is hit, this will cause
the program to crash without any good information. Crashes are race-y, and will still
happen with malformed test, but the information will be much more helpful.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::checkForClean):

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::~UIScriptContext):

  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::checkForClean):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/ios/HIDEventGenerator.h:
  • WebKitTestRunner/ios/HIDEventGenerator.mm:

(-[HIDEventGenerator checkHIDCallbacksClear]):

  • WebKitTestRunner/ios/TestControllerIOS.mm:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::checkForClean):

4:29 PM Changeset in webkit [210047] by sbarati@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

WebAssembly: We should compile wasm functions in parallel
https://bugs.webkit.org/show_bug.cgi?id=165993

Reviewed by Keith Miller.

This patch adds a very simple parallel compiler for Wasm code.
This patch speeds up compiling the Unity headless benchmark by
slightly more than 4x on my MBP. To make this safe, I perform
all linking on the main thread. I also had to change some code
inside Wasmb3IRGenerator to be thread safe.

  • b3/air/AirCustom.h:

(JSC::B3::Air::WasmBoundsCheckCustom::generate):

  • b3/air/AirGenerationContext.h:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::emitExceptionCheck):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConvention::setupFrameInPrologue):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::parseAndValidateModule):
(JSC::Wasm::Plan::run):

  • wasm/WasmPlan.h:
4:15 PM Changeset in webkit [210046] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Window resize causes TimelineOverview graph elements to be repositioned
https://bugs.webkit.org/show_bug.cgi?id=160207
<rdar://problem/27553228>

Reviewed by Brian Burg.

TimelineRuler does not always update its divider positions when the start
time changes while the end time remains the same. The check that determines
whether the first or last divider positions have changed before doing a
layout uses the ruler end time instead of calculating the last divider's
position, and would falsely determine no change was needed.

  • UserInterface/Views/TimelineRuler.js:

(WebInspector.TimelineRuler.prototype.set startTime):
(WebInspector.TimelineRuler.prototype.set secondsPerPixel):
Clear cached divider data on zoom or scroll, forcing dividers to be recalculated.
(WebInspector.TimelineRuler.prototype.layout):
Calculate accurate divider count and last divider time.

3:53 PM Changeset in webkit [210045] by achristensen@apple.com
  • 8 edits in trunk

Remove initEvent quirk
https://bugs.webkit.org/show_bug.cgi?id=166284

Reviewed by Dan Bernstein.

LayoutTests/imported/w3c:

  • web-platform-tests/dom/interfaces-expected.txt:

We regress conformance, but a change has been proposed to the spec. Hopefully this will be a temporary regression.

Source/WebCore:

We added this quirk in r207908 and expanded it in r209946 and r210034.
Many web compatibility issues have been found, which leads us to believe that many more exist.
This reverts the behavior to match how it was before r203848.
This change was proposed to the spec in https://github.com/whatwg/dom/issues/387

  • dom/Event.cpp:

(WebCore::Event::initEventForBindings): Deleted.

  • dom/Event.h:
  • dom/Event.idl:
  • platform/RuntimeApplicationChecks.h:
  • platform/RuntimeApplicationChecks.mm:

(WebCore::IOSApplication::isBaiduNuomi): Deleted.
(WebCore::IOSApplication::isAutoNaviAMap): Deleted.
(WebCore::IOSApplication::isFlipboard): Deleted.

3:42 PM Changeset in webkit [210044] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

INDIE_UI: fix cmake build
https://bugs.webkit.org/show_bug.cgi?id=166288

Patch by JF Bastien <jfbastien@apple.com> on 2016-12-20
Reviewed by Mark Lam.

Bug #165881 didn't remove a file from cmake.

  • PlatformMac.cmake:
3:34 PM Changeset in webkit [210043] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix clean Windows build after r210029
https://bugs.webkit.org/show_bug.cgi?id=165881

  • DerivedSources.cpp:
3:32 PM Changeset in webkit [210042] by Brent Fulgham
  • 21 edits in trunk/Source

Address some style problems found by static analysis
https://bugs.webkit.org/show_bug.cgi?id=165975

Reviewed by Alex Christensen.

Source/JavaScriptCore:

Correct the const-correctness of functions that are implemented using stricter
const declarations.

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorHeapAgent.cpp:
  • inspector/agents/InspectorHeapAgent.h:
  • inspector/agents/InspectorRuntimeAgent.h:
  • inspector/agents/InspectorScriptProfilerAgent.cpp:
  • inspector/agents/InspectorScriptProfilerAgent.h:
  • inspector/scripts/codegen/cpp_generator.py:

(cpp_type_for_unchecked_formal_in_parameter): Update to match const declarations of
implementation files.

  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:

Rebaselined results for "const Ptr* const" syntax.

Source/WebCore:

Correct the const-correctness of functions that are implemented using stricter
const declarations.

Avoid passing large ANGLE data structures through the ANGLEWebKitBridge methods.

  • inspector/InspectorCSSAgent.h: Declare the method overrides properly to match

the stricter const declarations in the implementation files.

  • inspector/InspectorDOMAgent.h: Ditto.
  • inspector/InspectorPageAgent.h: Ditto.
  • inspector/InspectorTimelineAgent.h: Ditto.
  • inspector/PageDebuggerAgent.h: Ditto.
  • platform/graphics/ANGLEWebKitBridge.cpp:

(WebCore::ANGLEWebKitBridge::setResources): Pass by const reference.

  • platform/graphics/ANGLEWebKitBridge.h:

(WebCore::ANGLEWebKitBridge::getResources): Return a const reference.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::selectSettings): Use a lambda that takes
a const reference, rather than copying the maps while searching.

Source/WebKit2:

Avoid passing large ANGLE data structures through the ANGLEWebKitBridge methods.

  • Shared/WebBackForwardListItem.cpp:

(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::WebBackForwardListItem):

  • Shared/WebBackForwardListItem.h:
3:32 PM Changeset in webkit [210041] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

[iOS WK2] Switching or closing a tab leads to all-white tab content if the status bar is double height
https://bugs.webkit.org/show_bug.cgi?id=166286
rdar://problem/29593525

Reviewed by Tim Horton.

A double-height status bar triggers view resize while snapshotting in the background,
which also triggers calls to _endAnimatedResize on tab resume. However, it was possible
for _endAnimatedResize to re-enter via synchronizeDynamicViewportUpdate()/didCommitLayerTree(),
causing us to use a nil _resizeAnimationView for scale computations, thus setting a zero
scale on the WKContentView.

Fix by checking _dynamicViewportUpdateMode again after the call to synchronizeDynamicViewportUpdate(),
and do a belt-and-braces check for a nil _resizeAnimationView.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _endAnimatedResize]):

3:31 PM Changeset in webkit [210040] by timothy_horton@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Remove an ANGLE Markdown file from the ANGLE target
https://bugs.webkit.org/show_bug.cgi?id=166279

Reviewed by Alex Christensen.

  • ANGLE.xcodeproj/project.pbxproj:

We don't need to build this, it's not source code.

3:07 PM Changeset in webkit [210039] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html for mac-wk1.

Unreviewed test gardening.

  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
2:16 PM Changeset in webkit [210038] by jfbastien@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

WebAssembly: construct 32-bit encodedJSValue properly
https://bugs.webkit.org/show_bug.cgi?id=166199

Reviewed by Mark Lam.

Constructing an encodedJSValue using { } yields the wrong value
on 32-bit platforms. WebAssembly doesn't currently target 32-bit
platforms, but we may as well get it right.

  • wasm/JSWebAssembly.cpp:

(JSC::webAssemblyCompileFunc):
(JSC::webAssemblyValidateFunc):

  • wasm/js/JSWebAssemblyHelpers.h:

(JSC::toNonWrappingUint32):

  • wasm/js/WebAssemblyCompileErrorConstructor.cpp:

(JSC::constructJSWebAssemblyCompileError):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::constructJSWebAssemblyMemory):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:

(JSC::constructJSWebAssemblyRuntimeError):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::constructJSWebAssemblyTable):

  • wasm/js/WebAssemblyTablePrototype.cpp:

(JSC::webAssemblyTableProtoFuncLength):
(JSC::webAssemblyTableProtoFuncGrow):
(JSC::webAssemblyTableProtoFuncGet):
(JSC::webAssemblyTableProtoFuncSet):

2:16 PM Changeset in webkit [210037] by weinig@apple.com
  • 3 edits in trunk/Source/WebCore

[WebIDL] Remove custom binding for WorkerGlobalScope::importScripts
https://bugs.webkit.org/show_bug.cgi?id=166243

Reviewed by Alex Christensen.

  • bindings/js/JSWorkerGlobalScopeCustom.cpp:

(WebCore::JSWorkerGlobalScope::importScripts): Deleted.

  • workers/WorkerGlobalScope.idl:

Import scripts can now be trivially generated.

1:57 PM Changeset in webkit [210036] by Wenson Hsieh
  • 2 edits in trunk/Source/WebInspectorUI

Update keyword completions in the inspector for the new scroll snapping CSS properties
https://bugs.webkit.org/show_bug.cgi?id=166235

Reviewed by Joseph Pecoraro.

The CSS keyword completions for the scroll snapping properties need to be updated for the latest version of the spec.

  • UserInterface/Models/CSSKeywordCompletions.js:
1:47 PM Changeset in webkit [210035] by Alan Bujtas
  • 5 edits
    2 adds in trunk

SVG elements should inherit the root's flow thread state.
https://bugs.webkit.org/show_bug.cgi?id=166173
rdar://problem/29704862

Reviewed by Simon Fraser.

Source/WebCore:

When the <svg> is not part of the multicolumn context (out of flow positioning), its descendants should not be in the flow either.

Test: fast/multicol/svg-inside-multicolumn.html

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::computedFlowThreadState):

  • rendering/RenderObject.h:

(WebCore::RenderObject::isProgress):
(WebCore::RenderObject::isRenderSVGBlock):

  • rendering/svg/RenderSVGBlock.h:

LayoutTests:

  • fast/multicol/svg-inside-multicolumn-expected.txt: Added.
  • fast/multicol/svg-inside-multicolumn.html: Added.
1:41 PM Changeset in webkit [210034] by achristensen@apple.com
  • 4 edits in trunk/Source/WebCore

Fix yet another app that uses initEvent with fewer than 3 parameters
https://bugs.webkit.org/show_bug.cgi?id=166257
<rdar://problem/29420268>

Reviewed by Sam Weinig.

  • dom/Event.cpp:

(WebCore::Event::initEventForBindings):

  • platform/RuntimeApplicationChecks.h:
  • platform/RuntimeApplicationChecks.mm:

(WebCore::IOSApplication::isAutoNaviAMap):
AutoNavi amap has content that uses initEvent with one parameter. This quirk is needed here, too.

1:41 PM Changeset in webkit [210033] by Joseph Pecoraro
  • 6 edits in trunk

Web Inspector: Console could be made useful for very simple await expressions
https://bugs.webkit.org/show_bug.cgi?id=165681
<rdar://problem/29755339>

Reviewed by Brian Burg.

Source/WebInspectorUI:

Normally await expressions are only allowed inside of async functions.
They make dealing with async operations easy, but can't be used directly
in Web Inspector's console without making your own async function wrapper.

This change allows simple await expressions to be run in the console.
The supported syntaxes are (simple expression with optional assignment):

await <expr>
x = await <expr>
let x = await <expr>

Web Inspector's console will automatically wrap this in an async
function and report the resulting value or exception. For instance
in the last example above:

let x;
(async function() {

try {

x = await <expr>;
console.info("%o", x);

} catch (e) {

console.error(e);

}

})();
undefined

This way users can get the convenience of await in the Console.
This also gives users a nice way of extracting a value out of
a Promise without writing their own handlers.

  • UserInterface/Controllers/RuntimeManager.js:

(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
(WebInspector.RuntimeManager.prototype._tryApplyAwaitConvenience):
Wrap simple await expressions into a function that will log the result.

LayoutTests:

  • inspector/controller/runtime-controller-expected.txt:
  • inspector/controller/runtime-controller.html:

Test the "await expression" convenience of RuntimeManager.

1:41 PM Changeset in webkit [210032] by Joseph Pecoraro
  • 20 edits in trunk/Source/WebInspectorUI

Web Inspector: Update CodeMirror to support async/await keyword and other ES2017 features
https://bugs.webkit.org/show_bug.cgi?id=165677

Rubber-stamped by Brian Burg.

Update CodeMirror from version 5.5.1 to 5.21.1. Highlights include:

  • Syntax highlighting for ES2017 features (async/await)
  • Syntax highlighting improvements for some ES6 features (new.target)
  • Syntax highlighting for CSS4 #rrggbbaa and #rgba colors

As well as a number of smaller bug fixes.

Had to add a few semicolons to codemirror.js so that our minifier
didn't choke in a few places due to ASI behavior.

  • Scripts/update-codemirror-resources.rb:
  • UserInterface/External/CodeMirror/LICENSE:
  • UserInterface/External/CodeMirror/clojure.js:
  • UserInterface/External/CodeMirror/closebrackets.js:
  • UserInterface/External/CodeMirror/codemirror.css:
  • UserInterface/External/CodeMirror/codemirror.js:
  • UserInterface/External/CodeMirror/coffeescript.js:
  • UserInterface/External/CodeMirror/comment.js:
  • UserInterface/External/CodeMirror/css.js:
  • UserInterface/External/CodeMirror/htmlmixed.js:
  • UserInterface/External/CodeMirror/javascript.js:
  • UserInterface/External/CodeMirror/livescript.js:
  • UserInterface/External/CodeMirror/matchbrackets.js:
  • UserInterface/External/CodeMirror/overlay.js:
  • UserInterface/External/CodeMirror/placeholder.js:
  • UserInterface/External/CodeMirror/runmode.js:
  • UserInterface/External/CodeMirror/sql.js:
  • UserInterface/External/CodeMirror/sublime.js:
  • UserInterface/External/CodeMirror/xml.js:
1:18 PM Changeset in webkit [210031] by aestes@apple.com
  • 9 edits
    2 adds in trunk

[Cocoa] REGRESSION (r209558): Calling decisionHandler multiple times in webView:decidePolicyForNavigationAction:decisionHandler: leads to a crash
https://bugs.webkit.org/show_bug.cgi?id=165992
Source/WebKit2:

<rdar://problem/29693817>

Reviewed by Brady Eidson.

r209558 added additional move semantics to the decisionHandler block passed to
-webView:decidePolicyForNavigationAction:decisionHandler:, resulting in a null pointer
dereference in clients that call the decisionHandler block more than once.

None of the completion handlers we expose in the WebKit API are intended to be called more
than once, and we ASSERT in CompletionHandlerCallChecker::didCallCompletionHandler() that
this doesn't happen.

This change strenghtens that protection by returning immediately in completion handlers
called more than once. And in programs linked on or after WebKit 603.1.17, an NSException is
thrown if a completion handler is called a second time, like we do for completion handlers
that are never called.

New API test: WebKit2.DuplicateCompletionHandlerCalls

  • Shared/Cocoa/CompletionHandlerCallChecker.h: Declared completionHandlerHasBeenCalled().
  • Shared/Cocoa/CompletionHandlerCallChecker.mm:

(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall): Added. Returns true if the
program is linked on or after
LibraryVersion::FirstWithExceptionsForDuplicateCompletionHandlerCalls.
(WebKit::CompletionHandlerCallChecker::completionHandlerHasBeenCalled): Added. Returns
whether or not the completion handler has been called. If it has, and
shouldThrowExceptionForDuplicateCompletionHandlerCall() returns true, throws an
NSInternalInconsistencyException.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setInputDelegate:]): Added an early return if the completion handler has
already been called.

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): Ditto.
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse): Ditto.
(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge): Ditto.

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::runJavaScriptAlert): Ditto.
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm): Ditto.
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt): Ditto.
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota): Ditto.
(WebKit::UIDelegate::UIClient::runOpenPanel): Ditto.
(WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota): Ditto.

  • UIProcess/Cocoa/VersionChecks.h: Added

FirstWithExceptionsForDuplicateCompletionHandlerCalls with the version number for 603.1.17.

Tools:

Reviewed by Brady Eidson.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/DuplicateCompletionHandlerCalls.mm: Added.

(expectException):
(-[DuplicateCompletionHandlerCallsDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[DuplicateCompletionHandlerCallsDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(-[DuplicateCompletionHandlerCallsDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[DuplicateCompletionHandlerCallsDelegate webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[DuplicateCompletionHandlerCallsDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):
(-[DuplicateCompletionHandlerCallsDelegate _webView:decideDatabaseQuotaForSecurityOrigin:currentQuota:currentOriginUsage:currentDatabaseUsage:expectedUsage:decisionHandler:]):
(-[DuplicateCompletionHandlerCallsDelegate _webView:willSubmitFormValues:userObject:submissionHandler:]):
(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/duplicate-completion-handler-calls.html: Added.
1:14 PM Changeset in webkit [210030] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html for mac-elcapitan after r210024.

Unreviewed test gardening.

  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
12:37 PM Changeset in webkit [210029] by dino@apple.com
  • 26 edits
    7 deletes in trunk

Remove INDIE_UI
https://bugs.webkit.org/show_bug.cgi?id=165881
<rdar://problem/29672532>

Reviewed by Simon Fraser.

The Indie UI work has been discontinued.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • Modules/indieui/UIRequestEvent.cpp: Removed.
  • Modules/indieui/UIRequestEvent.h: Removed.
  • Modules/indieui/UIRequestEvent.idl: Removed.
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Element.cpp:

(WebCore::Element::setUIActions): Deleted.
(WebCore::Element::UIActions): Deleted.

  • dom/Element.h:
  • dom/Element.idl:
  • dom/EventNames.in:
  • dom/Node.cpp:

(WebCore::Node::dispatchUIRequestEvent): Deleted.

  • dom/Node.h:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • fast/custom-elements/reactions-for-indieui-expected.txt: Removed.
  • fast/custom-elements/reactions-for-indieui.html: Removed.
  • indieui/uiactions-expected.txt: Removed.
  • indieui/uiactions.html: Removed.
  • js/dom/dom-static-property-for-in-iteration-expected.txt:
  • js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
12:20 PM Changeset in webkit [210028] by jfbastien@apple.com
  • 17 edits
    5 copies
    1 add in trunk

WebAssembly API: implement WebAssembly.LinkError
https://bugs.webkit.org/show_bug.cgi?id=165805
<rdar://problem/29747874>

JSTests:

Reviewed by Mark lam.

Update all exception sites which now throw WebAssembly.LinkError.

  • wasm/js-api/element-data.js:
  • wasm/js-api/element.js:

(assert.throws):

  • wasm/js-api/global-error.js:

(new.Number):

  • wasm/js-api/table.js:

(assert.throws):
(new.WebAssembly.Table):

  • wasm/js-api/test_Data.js:
  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

  • wasm/js-api/test_memory.js:

(test):
(test.testMemImportError): Deleted.

Source/JavaScriptCore:

Reviewed by Mark Lam.

As described here: https://github.com/WebAssembly/design/pull/901
Some TypeError and RangeError are now converted to WebAssembly.LinkError.

  • CMakeLists.txt: add files
  • DerivedSources.make: add autoget .lut.h files
  • JavaScriptCore.xcodeproj/project.pbxproj: add files
  • builtins/BuiltinNames.h: new name LinkError
  • runtime/JSGlobalObject.h: auto-register LinkError using existing macro magic
  • wasm/JSWebAssembly.h: make the new includes available
  • wasm/js/JSWebAssemblyLinkError.cpp: Copied from Source/JavaScriptCore/wasm/JSWebAssemblyCompileError.cpp.

(JSC::JSWebAssemblyLinkError::create):
(JSC::JSWebAssemblyLinkError::JSWebAssemblyLinkError):
(JSC::createWebAssemblyLinkError):

  • wasm/js/JSWebAssemblyLinkError.h: Copied from Source/JavaScriptCore/wasm/JSWebAssemblyCompileError.h.

(JSC::JSWebAssemblyLinkError::create):

  • wasm/js/WebAssemblyInstanceConstructor.cpp: update as per spec change

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyLinkErrorConstructor.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyCompileErrorConstructor.cpp.

(JSC::constructJSWebAssemblyLinkError):
(JSC::callJSWebAssemblyLinkError):
(JSC::WebAssemblyLinkErrorConstructor::create):
(JSC::WebAssemblyLinkErrorConstructor::createStructure):
(JSC::WebAssemblyLinkErrorConstructor::finishCreation):
(JSC::WebAssemblyLinkErrorConstructor::WebAssemblyLinkErrorConstructor):
(JSC::WebAssemblyLinkErrorConstructor::getConstructData):
(JSC::WebAssemblyLinkErrorConstructor::getCallData):

  • wasm/js/WebAssemblyLinkErrorConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyCompileErrorConstructor.h.
  • wasm/js/WebAssemblyLinkErrorPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyCompileErrorPrototypr.cpp.

(JSC::WebAssemblyLinkErrorPrototype::create):
(JSC::WebAssemblyLinkErrorPrototype::createStructure):
(JSC::WebAssemblyLinkErrorPrototype::finishCreation):
(JSC::WebAssemblyLinkErrorPrototype::WebAssemblyLinkErrorPrototype):

  • wasm/js/WebAssemblyLinkErrorPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyCompileErrorPrototypr.h.
  • wasm/js/WebAssemblyModuleRecord.cpp: update as per spec change

(JSC::dataSegmentFail):
(JSC::WebAssemblyModuleRecord::evaluate):

11:43 AM Changeset in webkit [210027] by commit-queue@webkit.org
  • 7 edits in trunk

[Readable Streams API] Implement readableByteStreamControllerCallPullIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=166022

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-12-20
Reviewed by Youenn Fablet.

Source/WebCore:

Implemented readableByteStreamControllerCallPullIfNeeded(). This function is
in particular called when a new ReadableByteStreamController is created; hence,
ReadableByteStreamController constructor has been updated.

Added 3 tests to check behaviour in case of success/failure of the start and pull functions
associated to the underlyingByteSource.

  • Modules/streams/ReadableByteStreamInternals.js:

(privateInitializeReadableByteStreamController): Updated handling of underlyingByteSource
start function (especially with call to readableByteStreamControllerCallPullIfNeeded).
(isReadableStreamBYOBReader): Added.
(readableStreamHasBYOBReader): Added.
(readableStreamHasDefaultReader): Added.
(readableByteStreamControllerCallPullIfNeeded): Added.

  • Modules/streams/ReadableStreamInternals.js:

(privateInitializeReadableStreamDefaultController): Added missing asserts.

  • bindings/js/WebCoreBuiltinNames.h: Added readIntoRequests.

LayoutTests:

Added 3 tests to check behaviour in case of success/failure of the start and pull functions
associated to the underlyingByteSource.

  • streams/readable-byte-stream-controller-expected.txt: Added expectations for new tests.
  • streams/readable-byte-stream-controller.js: Added 3 new tests.
10:54 AM Changeset in webkit [210026] by jfbastien@apple.com
  • 25 edits
    3 adds in trunk

WebAssembly: unique function signatures
https://bugs.webkit.org/show_bug.cgi?id=165957
<rdar://problem/29735737>

Reviewed by Saam Barati.

JSTests:

  • wasm/function-tests/table-basic.js: FIXME is now addressed,

though instance to instance calls still need work which bug
#165282 will address
(i.assert.eq.foo):

  • wasm/js-api/unique-signature.js: Added.

(CallIndirectWithDuplicateSignatures):

Source/JavaScriptCore:

Signatures in a Module's Type section can be duplicated, we
therefore need to unique them so that call_indirect only needs to
do a single integer compare to check that a callee's Signature is
the same as the Signature declared at the call site. Without
uniquing we'd either trap when duplicate Signatures are used, or
we'd need to do multiple comparisons. This patch makes that narrow
usecase function correctly.

There's further complication when calling from wasm to
wasm, in which case the Signatures must also match. Such
cross-instance calls will be improved in bug #165282, but this
patch sets the groundwork for it:

  • Signatures are now owned by SignatureInformation which lives on VM, and is shared by all Modules.
  • When parsing a Module, a Signature is created for every Type entry, and then uniqued by SignatureInformation's adopt method. Duplicate Signatures are dropped and the previous SignatureIndex is returned, new Signatures are adopted and a new SignatureIndex is created.
  • The SignatureIndex values are monotonic. 0 is used to represent invalid indices, which trap. This can only occur through Table.
  • SignatureInformation is used while generating code to map a SignatureIndex back to the Signature* when return / argument information is needed. This is a simple lookup into a Vector. It isn't used at runtime.
  • These Signatures live forever on VM because the bookkeeping likely isn't worth it. We may want to empty things out if all Modules die, this is tracked in bug #166037.
  • We can further improve things by bit-packing SignatureIndex with Code*, which is tracked by bug #165511.
  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/VM.h: wasm signatures are uniqued here, but aren't accessed frequently (only during parsing) so indirection is fine
  • wasm/WasmB3IRGenerator.cpp: use SignatureIndex instead of Signature* when appropriate, and when still using Signature* do so with its new API

(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::importStubGenerator): use SignatureIndex

  • wasm/WasmBinding.h:
  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConvention::loadArguments):

  • wasm/WasmFormat.cpp: drive-by move of alloc/free functions to the implementation file, allows the .h file to drop an FastMalloc.h

(JSC::Wasm::Segment::create):
(JSC::Wasm::Segment::destroy):
(JSC::Wasm::Segment::createPtr):

  • wasm/WasmFormat.h: move Signature to its own file

(JSC::Wasm::CallableFunction::CallableFunction):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::FunctionParser):

  • wasm/WasmModuleParser.cpp:
  • wasm/WasmModuleParser.h:

(JSC::Wasm::ModuleParser::ModuleParser):

  • wasm/WasmParser.h:

(JSC::Wasm::Parser<SuccessType>::Parser):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::parseAndValidateModule):
(JSC::Wasm::Plan::run):

  • wasm/WasmSignature.cpp: Added.

(JSC::Wasm::Signature::dump):
(JSC::Wasm::Signature::hash):
(JSC::Wasm::Signature::create):
(JSC::Wasm::Signature::createInvalid):
(JSC::Wasm::Signature::destroy):
(JSC::Wasm::SignatureInformation::~SignatureInformation):
(JSC::Wasm::SignatureInformation::adopt):
(JSC::Wasm::SignatureInformation::get):

  • wasm/WasmSignature.h: Added.

(JSC::Wasm::Signature::Signature):
(JSC::Wasm::Signature::storage):
(JSC::Wasm::Signature::allocatedSize):
(JSC::Wasm::Signature::returnType):
(JSC::Wasm::Signature::returnCount):
(JSC::Wasm::Signature::argumentCount):
(JSC::Wasm::Signature::argument):
(JSC::Wasm::Signature::operator==):
(JSC::Wasm::SignatureHash::empty):
(JSC::Wasm::SignatureHash::deleted):
(JSC::Wasm::SignatureHash::SignatureHash):
(JSC::Wasm::SignatureHash::operator==):
(JSC::Wasm::SignatureHash::equal):
(JSC::Wasm::SignatureHash::hash):
(JSC::Wasm::SignatureHash::isHashTableDeletedValue):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::validateFunction):

  • wasm/WasmValidate.h:
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::create):

  • wasm/js/JSWebAssemblyModule.h:

(JSC::JSWebAssemblyModule::signatureForFunctionIndexSpace):

  • wasm/js/JSWebAssemblyTable.cpp:

(JSC::JSWebAssemblyTable::JSWebAssemblyTable):
(JSC::JSWebAssemblyTable::clearFunction):
(JSC::JSWebAssemblyTable::setFunction):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::call):
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::WebAssemblyFunction):
(JSC::WebAssemblyFunction::finishCreation):

  • wasm/js/WebAssemblyFunction.h:

(JSC::WebAssemblyFunction::signatureIndex):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):

10:52 AM Changeset in webkit [210025] by weinig@apple.com
  • 22 edits
    1 delete in trunk

[DataCue] Un-prefix DataCue and remove custom bindings
https://bugs.webkit.org/show_bug.cgi?id=166087

Reviewed by Eric Carlson.

Source/WebCore:

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSDataCueCustom.cpp: Removed.

Remove JSDataCueCustom.cpp

  • bindings/js/JSTextTrackCueCustom.cpp:

(WebCore::toJSNewlyCreated):
Remove out of date comment.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorDefinition):
Update constructor generation code to use JSDOMConvert.

  • html/track/DataCue.cpp:

(WebCore::DataCue::DataCue):
(WebCore::DataCue::~DataCue):
(WebCore::DataCue::data):
(WebCore::DataCue::setData):
(WebCore::DataCue::cueContentsMatch):
(WebCore::DataCue::value):
(WebCore::DataCue::setValue):
(WebCore::DataCue::valueOrNull):

  • html/track/DataCue.h:
  • html/track/DataCue.idl:
  • platform/SerializedPlatformRepresentation.h:

Remove DATACUE_VALUE define from web exposed classes, so the interface can
be the same on all platforms. Platforms that don't support DATACUE_VALUE will
just never have any value. Also remove custom annotations.

LayoutTests:

  • media/track/track-datacue-value-expected.txt:
  • media/track/track-datacue-value.html:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:

Update tests for unprefixed DataCue.

10:44 AM Changeset in webkit [210024] by Wenson Hsieh
  • 65 edits
    5 moves
    13 adds
    18 deletes in trunk

Implement the updated port/area-based Scroll Snap Module Level 1 Spec
https://bugs.webkit.org/show_bug.cgi?id=165317
<rdar://problem/29490956>

Reviewed by Dean Jackson.

Source/WebCore:

Implements the changes drafted in the latest iteration of the Scroll Snap Module Level 1 spec, which uses a
snap-area and snap-port-based method for determining snap positions in a scroll snapping container.
Additionally, removes the now-obsolete and prefixed implementation of the scroll snap spec and refactors all
affected layout tests to use the new CSS properties. Also adds new layout tests covering some behaviors detailed
in the new version of the spec, such as scroll snapping with transformed child elements.

See below for more detailed descriptions of the changes.

Tests: css3/scroll-snap/scroll-snap-2d-change-axis-type.html

css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html
css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin.html
css3/scroll-snap/scroll-snap-children-with-transforms.html
css3/scroll-snap/scroll-snap-positions-mainframe.html
css3/scroll-snap/scroll-snap-positions-overflow-resize.html
css3/scroll-snap/scroll-snap-positions.html
css3/scroll-snap/scroll-snap-style-changed-align.html
css3/scroll-snap/scroll-snap-with-scroll-padding.html

  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSCalculationValue.cpp:

(WebCore::hasDoubleValue):

Removed use of length repeat.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForScrollSnapType):
(WebCore::valueForScrollSnapAlignment):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::scrollSnapDestination): Deleted.
(WebCore::scrollSnapPoints): Deleted.
(WebCore::scrollSnapCoordinates): Deleted.

Removed helper functions used to create CSS values for scroll snap coordinates and destination, and added
helpers for computed scroll snap type (a combination of axis and strictness values) as well as scroll snap align
(an alignment value per axis).

  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):

Removed usages of the length repeat type, since repeat(*) is no longer being used anywhere.

  • css/CSSPrimitiveValue.h:
  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ScrollSnapStrictness):
(WebCore::CSSPrimitiveValue::operator ScrollSnapAxis):
(WebCore::CSSPrimitiveValue::operator ScrollSnapAxisAlignType):
(WebCore::CSSPrimitiveValue::operator ScrollSnapType): Deleted.

Added CSSPrimitiveValue mappings to ScrollSnapAxisAlignType, ScrollSnapStrictness, and ScrollSnapAxis. Removed
the old ScrollSnapType mapping.

  • css/CSSProperties.json:

Replaced the old scroll snap CSS properties with the new ones. Note that scroll-snap-margin and scroll-padding
have 4 shorthands each, for the individual top/bottom/left/right values.

  • css/CSSValueKeywords.in:

Added CSS keywords {x, y}, which are necessary to support the new scroll snapping properties.

  • css/LengthRepeat.h: Removed.

Removed LengthRepeat entirely. This represented the repeat(<length>) CSS value, which was only used for the
scroll-snap-points-x and scroll-snap-points-y values.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertScrollSnapType):
(WebCore::StyleBuilderConverter::convertScrollSnapAlign):
(WebCore::StyleBuilderConverter::parseSnapCoordinate): Deleted.
(WebCore::StyleBuilderConverter::convertScrollSnapPoints): Deleted.
(WebCore::StyleBuilderConverter::convertSnapCoordinatePair): Deleted.
(WebCore::StyleBuilderConverter::convertScrollSnapCoordinates): Deleted.

Added helper functions to convert scroll snap type and scroll snap alignment from parsed CSS values to their
primary representation in WebCore as ScrollSnapType and ScrollSnapAlign. These methods assume that the given
CSS values have successfully cleared the parsing step and are represented as CSSValueLists or length 1 or 2.

  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Deleted.
(WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Deleted.
(WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Deleted.
(WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Deleted.

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::asText):

Adds support for the scroll-snap-margin and scroll-padding.

  • css/parser/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue):
(WebCore::CSSParser::parseValue):
(WebCore::isScrollSnapAxisAlign):
(WebCore::isScrollSnapStrictness):
(WebCore::CSSParser::parseScrollSnapAlign):
(WebCore::CSSParser::parseScrollSnapType):
(WebCore::CSSParser::parseNonElementSnapPoints): Deleted.
(WebCore::CSSParser::parseScrollSnapPositions): Deleted.
(WebCore::CSSParser::parseScrollSnapDestination): Deleted.
(WebCore::CSSParser::parseScrollSnapCoordinate): Deleted.

  • css/parser/CSSParser.h:

Removed references to LengthRepeat, and added support for parsing new scroll snapping properties. Scroll snap
margin and scroll padding, along with their shorthands, are parsed using the same helper functions as normal
margin and padding. For type and align, I added new helper functions that build up lists of 1 or 2
CSSPrimitiveValues for each of the properties.

Parsing scroll-snap-align is straightforward -- we either have one or two values in the set {none, start,
center, end}. For scroll-snap-type, we allow a single axis value {x, y, inline, block, both}, or a single
strictness value {none, proximity, mandatory}, or an axis value followed by a non-'none' strictness (i.e. either
proximity or mandatory).

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • css/parser/CSSParserValues.cpp:

(WebCore::CSSParserValue::createCSSValue):

Removed references to LengthRepeat.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):
(WebCore::consumeSnapPointCoordinateList): Deleted.
(WebCore::consumeScrollSnapCoordinate): Deleted.
(WebCore::consumeScrollSnapDestination): Deleted.
(WebCore::consumeScrollSnapPoints): Deleted.
(WebCore::consumeScrollSnapAlign):
(WebCore::consumeScrollSnapType):
(WebCore::CSSPropertyParser::parseSingleValue):

Added parsing for the longhand properties of scroll-snap-margin and scroll-padding, which use the existing
consumeLength and consumeLengthOrPercent helpers, respectively. Removed code for parsing scroll snap
coordinates, destinations and points. Added parsing logic for align and type.

  • page/scrolling/AxisScrollSnapOffsets.cpp:

(WebCore::computeScrollSnapPortOrAreaRect):
(WebCore::computeScrollSnapAlignOffset):
(WebCore::snapOffsetsToString):
(WebCore::snapPortOrAreaToString):
(WebCore::updateSnapOffsetsForScrollableArea):
(WebCore::appendChildSnapOffsets): Deleted.
(WebCore::destinationOffsetForViewSize): Deleted.
(WebCore::updateFromStyle): Deleted.
(WebCore::styleUsesElements): Deleted.

Overhauled updateSnapOffsetsForScrollableArea to work with the new scroll snapping model. In the new way of
computing scroll snap offsets, we:

Compute the scroll container's scroll snap port, which is the padding box inset by the scroll padding
For each child with snap positions (i.e. scroll-snap-align is not none on both axes)

Compute the child's scroll snap area, which is the bounding box of the transformed border box

If the container snaps along the horizontal axis and the snap area contributes a horizontal snap offset:

Emit the distance from the alignment offset in the horizontal of the snap port to the corresponding offset
in the snap area as a snap position.

If the container snaps along the vertical axis and the snap area contributes a vertical snap offset:

Emit the distance from the alignment offset in the vertical of the snap port to the corresponding offset
in the snap area as a snap position.

For the snap offsets in each axis, if there is at least one snap offset:

Clamp the offsets to the min and max scroll offsets
Ensure that the offsets are sorted and do not contain duplicated offsets

  • platform/cocoa/ScrollController.mm:

(WebCore::ScrollController::updateScrollSnapState):

Clear out the ScrollController's snap offsets and state along an axis when its ScrollableArea no longer has snap
offsets in that axis.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleWillChange):
(WebCore::RenderBox::willBeRemovedFromTree):

  • rendering/RenderLayerModelObject.cpp:

(WebCore::scrollSnapContainerRequiresUpdateForStyleUpdate):
(WebCore::RenderLayerModelObject::styleDidChange):

  • rendering/RenderView.cpp:

(WebCore::RenderView::registerBoxWithScrollSnapPositions):
(WebCore::RenderView::unregisterBoxWithScrollSnapPositions):
(WebCore::RenderView::registerBoxWithScrollSnapCoordinates): Deleted.
(WebCore::RenderView::unregisterBoxWithScrollSnapCoordinates): Deleted.

  • rendering/RenderView.h:

Tweaked the scroll snap child registration logic. registerBoxWithScrollSnapCoordinates is renamed to
unregisterBoxWithScrollSnapPositions, since the notion of scroll snap coordinates no longer exists, and instead
of checking if the list of scroll snap coordinates is empty for the absence of scroll positions, we instead
check for a computed scroll snap align that is not none on both axes.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::initialScrollSnapType):
(WebCore::RenderStyle::initialScrollSnapAlign):
(WebCore::RenderStyle::scrollSnapArea):
(WebCore::RenderStyle::scrollSnapPort):
(WebCore::RenderStyle::scrollSnapType):
(WebCore::RenderStyle::scrollPadding):
(WebCore::RenderStyle::scrollPaddingTop):
(WebCore::RenderStyle::scrollPaddingBottom):
(WebCore::RenderStyle::scrollPaddingLeft):
(WebCore::RenderStyle::scrollPaddingRight):
(WebCore::RenderStyle::scrollSnapAlign):
(WebCore::RenderStyle::scrollSnapMargin):
(WebCore::RenderStyle::scrollSnapMarginTop):
(WebCore::RenderStyle::scrollSnapMarginBottom):
(WebCore::RenderStyle::scrollSnapMarginLeft):
(WebCore::RenderStyle::scrollSnapMarginRight):
(WebCore::RenderStyle::setScrollSnapType):
(WebCore::RenderStyle::setScrollPaddingTop):
(WebCore::RenderStyle::setScrollPaddingBottom):
(WebCore::RenderStyle::setScrollPaddingLeft):
(WebCore::RenderStyle::setScrollPaddingRight):
(WebCore::RenderStyle::setScrollSnapAlign):
(WebCore::RenderStyle::setScrollSnapMarginTop):
(WebCore::RenderStyle::setScrollSnapMarginBottom):
(WebCore::RenderStyle::setScrollSnapMarginLeft):
(WebCore::RenderStyle::setScrollSnapMarginRight):
(WebCore::RenderStyle::initialScrollSnapDestination): Deleted.
(WebCore::RenderStyle::initialScrollSnapCoordinates): Deleted.
(WebCore::RenderStyle::scrollSnapPointsX): Deleted.
(WebCore::RenderStyle::scrollSnapPointsY): Deleted.
(WebCore::RenderStyle::scrollSnapDestination): Deleted.
(WebCore::RenderStyle::scrollSnapCoordinates): Deleted.
(WebCore::RenderStyle::setScrollSnapPointsX): Deleted.
(WebCore::RenderStyle::setScrollSnapPointsY): Deleted.
(WebCore::RenderStyle::setScrollSnapDestination): Deleted.
(WebCore::RenderStyle::setScrollSnapCoordinates): Deleted.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialScrollSnapMargin):
(WebCore::RenderStyle::initialScrollPadding):
(WebCore::RenderStyle::scrollSnapType): Deleted.
(WebCore::RenderStyle::setScrollSnapType): Deleted.
(WebCore::RenderStyle::initialScrollSnapType): Deleted.
(WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
(WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.

Added boilerplate code for returning various new scroll snap style properties, and removed similar code for
handling the old scroll snap properties.

  • rendering/style/RenderStyleConstants.h:

Added three new enum classes:

  • ScrollSnapStrictness represents the strictness of scroll snapping along one or both axes
  • ScrollSnapAxis designates the axes along which scroll snapping should occur
  • ScrollSnapAxisAlignType indicates which offsets along the x or y axes of the snap port and snap area should be used to compute the snap position emitted by a snap area.
  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):

  • rendering/style/StyleRareNonInheritedData.h:

Replaces the StyleScrollSnapPoints object (which, confusingly, was in charge of storing both the scroll
container's and child elements' scroll snap styles) with StyleScrollSnapPort and StyleScrollSnapArea objects,
which keep track of the style properties on the scroll container and the child element, respectively.

  • rendering/style/StyleScrollSnapPoints.h:

(WebCore::operator==):
(WebCore::StyleScrollSnapPort::copy):
(WebCore::StyleScrollSnapPort::StyleScrollSnapPort):
(WebCore::StyleScrollSnapArea::copy):
(WebCore::StyleScrollSnapArea::StyleScrollSnapArea):

  • rendering/style/StyleScrollSnapping.h: Added.

(WebCore::operator!=):
(WebCore::StyleScrollSnapPort::create):
(WebCore::StyleScrollSnapArea::create):
(WebCore::StyleScrollSnapArea::hasSnapPosition):

Overhauled StyleScrollSnapPoints, breaking the logic here into two classes: StyleScrollSnapPort for the scroll
container, handling the properties scroll-snap-type and scroll-padding and StyleScrollSnapArea for child
elements, handling the properties scroll-snap-align and scroll-snap-margin. The ScrollSnapType itself is
composed of an axis value and a strictness, while a ScrollSnapAlign keeps track of the alignment modes in each
axis. By default, these are initialized to {Both, None} and {None, None}, respectively. The rest of the logic is
boilerplate code for comparing these style objects to one another and copying style representations.

  • testing/Internals.cpp:

(WebCore::Internals::scrollSnapOffsets):

Perform a layout on the document if needed before returning the list of computed snap offsets. The absence of
this layout pass was causing some layout tests in css3/scroll-snap/ to flake when testing that programmatic
changes to the scroll snap style properties change the computed snap offsets.

Source/WebKit2:

Remove unused code for adopting scroll snapping in the PDF plugin.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::didCalculateSizes):

LayoutTests:

Refactors layout tests to use the new scroll snapping properties, removing any tests that only made sense in the
context of the old version of scroll snapping and adding new ones to cover behaviors that the existing tests do
not verify. See per-method descriptions for more details. In most cases, the old way of specifying scroll
snapping via repeat(<container width or length>) or a coordinate at (0, 0) on each child has been replaced with
scroll-snap-type: (x|y|both) mandatory; on the container and scroll-snap-align: start on each child element.
If a test below does not have an accompanying description, then this is the only change applied to it, and the
behavior it is testing is still relevant in the new scroll snapping model.

  • css3/scroll-snap/improper-snap-points-crash-expected.txt: Removed.
  • css3/scroll-snap/improper-snap-points-crash.html: Removed.

This test is no longer valid in the new scroll snapping model, since there is no way to specify both repeating
points along an axis and child elements with scroll snap coordinates.

  • css3/scroll-snap/nested-elements-expected.txt:
  • css3/scroll-snap/nested-elements.html:
  • css3/scroll-snap/resources/iframe-content.html:
  • css3/scroll-snap/scroll-snap-2d-change-axis-type-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-2d-change-axis-type.html: Added.

New layout test to check that changing the scroll-snap-type from one to both axes updates the computed snap
offsets in the container to have offsets from both axes.

  • css3/scroll-snap/scroll-snap-2d-offsets-computed-independently-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html: Added.

New layout test to check that snap offsets are computed independently on each axis. In a 3x3 grid of child
elements with the child elements along the diagonal having scroll-snap-aligns of end, center and start
in order from top left to bottom right, we should observe the same effect as having each child emit snap
positions in both axes.

  • css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin.html: Added.

New layout test to check that specifying a scroll-snap-margin correctly insets the scroll snap area of a child
element, and that changing the scroll-snap-margin via script also changes the computed scroll snap offsets.

  • css3/scroll-snap/scroll-snap-children-with-transforms-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-children-with-transforms.html: Added.

New layout test to check that when computing the scroll snap areas of child elements, we take transforms into
account and use the bounding box of the transformed border box of the child element. Also verifies that we apply
the scroll offset _after_ the transform, so that scrolling the container and then recomputing snap offsets when
child elements are transformed does not result in different snap offsets.

  • css3/scroll-snap/scroll-snap-coordinate-expected.txt: Removed.
  • css3/scroll-snap/scroll-snap-coordinate.html: Removed.

Renamed to scroll-snap-position.html, since the notion of scroll snap coordinates no longer exists.

  • css3/scroll-snap/scroll-snap-desination-lock-up-expected.txt: Removed.
  • css3/scroll-snap/scroll-snap-desination-lock-up.html: Removed.

This test is no longer relevant in the new scroll snapping model. This is because the logic for computing scroll
snap offsets in AxisScrollSnapOffsets no longer has an opportunity to loop infinitely while trying to fill a
scrollable axis with snap offsets, since repeating snap points have been removed.

  • css3/scroll-snap/scroll-snap-elements-container-larger-than-children.html:
  • css3/scroll-snap/scroll-snap-inherit-expected.txt:
  • css3/scroll-snap/scroll-snap-inherit.html:

Updated to test the new scroll snap properties.

  • css3/scroll-snap/scroll-snap-initial-expected.txt:
  • css3/scroll-snap/scroll-snap-initial.html:

Updated to test the new scroll snap properties.

  • css3/scroll-snap/scroll-snap-mismatch.html:
  • css3/scroll-snap/scroll-snap-negative-repeat-expected.txt: Removed.
  • css3/scroll-snap/scroll-snap-negative-repeat.html: Removed.

Removed, since negative repeating scroll snap offsets are (thankfully) no longer possible in the new scroll
snapping model.

  • css3/scroll-snap/scroll-snap-offsets-expected.txt:
  • css3/scroll-snap/scroll-snap-offsets.html:

Augmented to mix in various alignment values among the scroll snap child elements as well as various levels of
nesting.

  • css3/scroll-snap/scroll-snap-position-values-expected.txt: Removed.
  • css3/scroll-snap/scroll-snap-position-values.html: Removed.

The behaviors tested here are covered by other similar tests: scroll-snap-initial and scroll-snap-inherit.

  • css3/scroll-snap/scroll-snap-positions-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-positions-mainframe-expected.txt: Renamed from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-mainframe-expected.txt.
  • css3/scroll-snap/scroll-snap-positions-mainframe.html: Renamed from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-mainframe.html.
  • css3/scroll-snap/scroll-snap-positions-overflow-resize-expected.txt: Renamed from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize-expected.txt.
  • css3/scroll-snap/scroll-snap-positions-overflow-resize.html: Renamed from LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html.
  • css3/scroll-snap/scroll-snap-positions.html: Added.

Renamed these existing tests to not use the term scroll-snap-coordinate. The semantics of these tests are
still the same, only using different values of scroll-snap-align instead of -webkit-scroll-snap-coordinate.

  • css3/scroll-snap/scroll-snap-property-computed-style-expected.txt:
  • css3/scroll-snap/scroll-snap-property-computed-style.js:
  • css3/scroll-snap/scroll-snap-property-parsing-expected.txt:
  • css3/scroll-snap/scroll-snap-property-parsing.js:
  • css3/scroll-snap/scroll-snap-style-changed-align-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-style-changed-align.html: Renamed from LayoutTests/css3/scroll-snap/scroll-snap-style-changed-coordinates.html.
  • css3/scroll-snap/scroll-snap-style-changed-coordinates-expected.txt: Removed.
  • css3/scroll-snap/scroll-snap-style-changed-repeat-expected.txt: Removed.
  • css3/scroll-snap/scroll-snap-style-changed-repeat.html: Removed.

No longer relevant, since repeating scroll snap offsets are no longer in the spec.

  • css3/scroll-snap/scroll-snap-subpixel-repeat-expected.txt: Removed.
  • css3/scroll-snap/scroll-snap-subpixel-repeat.html: Removed.

No longer relevant, since repeating scroll snap offsets are no longer in the spec.

  • css3/scroll-snap/scroll-snap-with-scroll-padding-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-with-scroll-padding.html: Added.

New layout test to check that specifying scroll padding on a scroll container correctly outsets the scroll snap
port, and that changing scroll padding via script also changes the computed snap offsets.

  • platform/mac-wk2/TestExpectations:

Removed tiled-drawing/scrolling/latched-div-with-scroll-snap.html from the list of failing tests.

  • tiled-drawing/scrolling/latched-div-with-scroll-snap-expected.txt:
  • tiled-drawing/scrolling/latched-div-with-scroll-snap.html:

This test was failing 100% of the time due to the momentum portion of the scrolling phase being invoked after
scroll snapping has ended. This has been rewritten to perform the following steps:

  1. Scroll the top div with momentum and verify that the scroll 'glided' to the red box.
  2. Scroll the top div without momentum and verify that the scroll snaps back to the red box.
  3. Repeat (1) and (2), but for the bottom div. The same thing should occur.
  • tiled-drawing/scrolling/scroll-snap/resources/horizontal-mainframe.html:
  • tiled-drawing/scrolling/scroll-snap/resources/vertical-mainframe.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-destination-lock-up-expected.txt: Removed.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-destination-lock-up.html: Removed.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-scrolling-jumps-to-top.html:

All of the tests here were updated to use the new scroll-snap-* properties instead of the old versions. The
semantics of these tests have not changed.

10:26 AM Changeset in webkit [210023] by Konstantin Tokarev
  • 35 edits in trunk/Source/JavaScriptCore

Modernize for loops in JSC
https://bugs.webkit.org/show_bug.cgi?id=166060

Reviewed by Yusuke Suzuki.

  • API/JSCallbackObject.h:

(JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::CodeBlock::stronglyVisitWeakReferences):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::getArrayProfile):
(JSC::CodeBlock::tallyFrequentExitSites):
(JSC::CodeBlock::nameForRegister):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ObjectPatternNode::bindValue):

  • debugger/Debugger.cpp:

(JSC::Debugger::applyBreakpoints):

  • dfg/DFGCPSRethreadingPhase.cpp:

(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):

  • dfg/DFGClobberSet.cpp:

(JSC::DFG::ClobberSet::setOf):

  • dfg/DFGDesiredIdentifiers.cpp:

(JSC::DFG::DesiredIdentifiers::reallyAdd):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::visitChildren):

  • dfg/DFGIntegerCheckCombiningPhase.cpp:

(JSC::DFG::IntegerCheckCombiningPhase::handleBlock):

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGLICMPhase.cpp:

(JSC::DFG::LICMPhase::run):

  • dfg/DFGMaximalFlushInsertionPhase.cpp:

(JSC::DFG::MaximalFlushInsertionPhase::treatRootBlock):

  • dfg/DFGPutStackSinkingPhase.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::linkBranches):

  • dfg/DFGStructureRegistrationPhase.cpp:

(JSC::DFG::StructureRegistrationPhase::run):

  • dfg/DFGTypeCheckHoistingPhase.cpp:

(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):

  • dfg/DFGValidate.cpp:
  • dfg/DFGVirtualRegisterAllocationPhase.cpp:

(JSC::DFG::VirtualRegisterAllocationPhase::run):

  • heap/HeapVerifier.cpp:

(JSC::trimDeadObjectsFromList):
(JSC::HeapVerifier::trimDeadObjects):

  • heap/LiveObjectList.cpp:

(JSC::LiveObjectList::findObject):

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::isPagedOut):

  • inspector/ScriptCallStack.cpp:

(Inspector::ScriptCallStack::firstNonNativeCallFrame):

  • jit/JIT.cpp:

(JSC::JIT::link):

  • parser/VariableEnvironment.cpp:

(JSC::VariableEnvironment::markAllVariablesAsCaptured):
(JSC::VariableEnvironment::hasCapturedVariables):

  • runtime/FunctionHasExecutedCache.cpp:

(JSC::FunctionHasExecutedCache::hasExecutedAtOffset):
(JSC::FunctionHasExecutedCache::getFunctionRanges):

  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::visitChildren):

  • runtime/TypeProfiler.cpp:

(JSC::TypeProfiler::findLocation):

  • runtime/TypeSet.cpp:

(JSC::TypeSet::addTypeInformation):
(JSC::TypeSet::dumpTypes):

  • runtime/VM.cpp:

(JSC::VM::gatherConservativeRoots):

  • runtime/WeakMapData.cpp:

(JSC::WeakMapData::DeadKeyCleaner::visitWeakReferences):
(JSC::WeakMapData::DeadKeyCleaner::finalizeUnconditionally):

  • tools/ProfileTreeNode.h:

(JSC::ProfileTreeNode::dumpInternal):

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::ByteCompiler::emitDisjunction):

9:25 AM Changeset in webkit [210022] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Fix memory leak in malformed test
https://bugs.webkit.org/show_bug.cgi?id=165917

Patch by Megan Gardner <Megan Gardner> on 2016-12-20
Reviewed by Alexey Proskuryakov.

Navigation caused 'onload' to be called twice, causing test harness to have extraneous
HID callback around after script controller was dismantled. Loading in body will eliminate
double load, and also prevent other race conditions where the body doesn't load fast enough.

  • http/tests/quicklook/hide-referer-on-navigation.html:
4:27 AM Changeset in webkit [210021] by dino@apple.com
  • 5 edits in trunk/Source/WebCore

Use ENABLE() in place of ENABLE_CSS_SELECTORS_LEVEL4
https://bugs.webkit.org/show_bug.cgi?id=166043
<rdar://problems/29743655>

Reviewed by Alex Christensen.

This doesn't compile unless the ENABLE_CSS_SELECTORS_LEVEL4 is defined.

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::matchRecursively):

  • css/SelectorFilter.cpp:

(WebCore::SelectorFilter::collectIdentifierHashes):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::isOnlyPseudoClassFunction):
(WebCore::CSSSelectorParser::consumePseudo):
(WebCore::CSSSelectorParser::consumeCombinator):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):

3:42 AM Changeset in webkit [210020] by Yusuke Suzuki
  • 3 edits in trunk/Source/WebCore

Unreviewed, attempt to fix Windows Debug build part 2
https://bugs.webkit.org/show_bug.cgi?id=166035

Ensured that this patch passes the build on the GTK port.

  • rendering/RenderElement.cpp:
  • rendering/RenderElement.h:
3:24 AM Changeset in webkit [210019] by Konstantin Tokarev
  • 2 edits in trunk/Source/JavaScriptCore

cpuid() requires <intrin.h> to be included
https://bugs.webkit.org/show_bug.cgi?id=166051

Reviewed by Yusuke Suzuki.

  • assembler/MacroAssemblerX86Common.h:
2:50 AM Changeset in webkit [210018] by Yusuke Suzuki
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix Windows Debug build
https://bugs.webkit.org/show_bug.cgi?id=166035

The size of SameSizeAsRenderElement should be in sync with sizeof(RenderElement).

  • rendering/RenderElement.cpp:
2:24 AM Changeset in webkit [210017] by nael.ouedraogo@crf.canon.fr
  • 7 edits in trunk

WebRTC: RTCPeerConnection constructor argument should be optional
https://bugs.webkit.org/show_bug.cgi?id=164057

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Update expectation of RTCPeerConnection constructor tests.

  • web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:

Source/WebCore:

Modify RTCPeerConnection JSBuiltin constructor to allow RTCPeerConfiguration
argument to be optional.

Update existing tests.

  • Modules/mediastream/RTCPeerConnection.js:

(initializeRTCPeerConnection):

LayoutTests:

Remove tests since they are duplicated with WPT tests.

  • fast/mediastream/RTCPeerConnection-expected.txt:
  • fast/mediastream/RTCPeerConnection.html:
12:32 AM Changeset in webkit [210016] by Yusuke Suzuki
  • 29 edits
    1 add in trunk

[ES6] Enable ES6 Modules
https://bugs.webkit.org/show_bug.cgi?id=165849

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • features.json:

Source/WebCore:

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::determineScriptType):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

  • page/Settings.in:

Source/WebKit/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences es6ModulesEnabled]): Deleted.
(-[WebPreferences setES6ModulesEnabled:]): Deleted.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit/win:

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::setES6ModulesEnabled): Deleted.
(WebPreferences::es6ModulesEnabled): Deleted.

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Source/WebKit2:

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetES6ModulesEnabled): Deleted.
(WKPreferencesGetES6ModulesEnabled): Deleted.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setES6ModulesEnabled): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

Dec 19, 2016:

9:23 PM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
9:02 PM WebKitGTK/2.14.x edited by Michael Catanzaro
Reorder chronologically (diff)
9:01 PM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
8:53 PM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
8:52 PM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
8:49 PM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
8:32 PM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
8:19 PM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
7:14 PM Changeset in webkit [210015] by bshafiei@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

7:09 PM Changeset in webkit [210014] by bshafiei@apple.com
  • 5 edits in trunk/Source

Versioning.

6:54 PM Changeset in webkit [210013] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.17

New tag.

6:31 PM Changeset in webkit [210012] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/fetch/fetching-same-resource-with-diffferent-options.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=166025

Unreviewed test gardening.

  • platform/mac/TestExpectations:
6:05 PM Changeset in webkit [210011] by bshafiei@apple.com
  • 8 edits
    2 deletes in branches/safari-603-branch

Merged r210010. rdar://problem/29745006

6:03 PM Changeset in webkit [210010] by mark.lam@apple.com
  • 8 edits
    2 deletes in trunk

Rolling out r209974 and r209952. They break some websites in mysterious ways. Step 2: Rollout r209952.
https://bugs.webkit.org/show_bug.cgi?id=166049

Not reviewed.

JSTests:

  • stress/deeply-nested-finallys.js: Removed.
  • stress/test-finally.js: Removed.

Source/JavaScriptCore:

  • bytecode/HandlerInfo.h:

(JSC::HandlerInfoBase::typeName):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitReturn):
(JSC::BytecodeGenerator::pushFinallyControlFlowScope):
(JSC::BytecodeGenerator::pushIteratorCloseControlFlowScope):
(JSC::BytecodeGenerator::popFinallyControlFlowScope):
(JSC::BytecodeGenerator::popIteratorCloseControlFlowScope):
(JSC::BytecodeGenerator::emitComplexPopScopes):
(JSC::BytecodeGenerator::emitPopScopes):
(JSC::BytecodeGenerator::pushTry):
(JSC::BytecodeGenerator::popTryAndEmitCatch):
(JSC::BytecodeGenerator::labelScopeDepth):
(JSC::BytecodeGenerator::pushLocalControlFlowScope):
(JSC::BytecodeGenerator::popLocalControlFlowScope):
(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::emitYield):
(JSC::BytecodeGenerator::emitDelegateYield):
(JSC::BytecodeGenerator::popTry): Deleted.
(JSC::BytecodeGenerator::emitCatch): Deleted.
(JSC::BytecodeGenerator::restoreScopeRegister): Deleted.
(JSC::BytecodeGenerator::labelScopeDepthToLexicalScopeIndex): Deleted.
(JSC::BytecodeGenerator::emitIsNumber): Deleted.
(JSC::BytecodeGenerator::emitJumpViaFinallyIfNeeded): Deleted.
(JSC::BytecodeGenerator::emitReturnViaFinallyIfNeeded): Deleted.
(JSC::BytecodeGenerator::emitFinallyCompletion): Deleted.
(JSC::BytecodeGenerator::allocateFinallyRegisters): Deleted.
(JSC::BytecodeGenerator::releaseFinallyRegisters): Deleted.
(JSC::BytecodeGenerator::emitCompareFinallyActionAndJumpIf): Deleted.

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::isInFinallyBlock):
(JSC::FinallyJump::FinallyJump): Deleted.
(JSC::FinallyContext::FinallyContext): Deleted.
(JSC::FinallyContext::outerContext): Deleted.
(JSC::FinallyContext::finallyLabel): Deleted.
(JSC::FinallyContext::depth): Deleted.
(JSC::FinallyContext::numberOfBreaksOrContinues): Deleted.
(JSC::FinallyContext::incNumberOfBreaksOrContinues): Deleted.
(JSC::FinallyContext::handlesReturns): Deleted.
(JSC::FinallyContext::setHandlesReturns): Deleted.
(JSC::FinallyContext::registerJump): Deleted.
(JSC::FinallyContext::numberOfJumps): Deleted.
(JSC::FinallyContext::jumps): Deleted.
(JSC::ControlFlowScope::ControlFlowScope): Deleted.
(JSC::ControlFlowScope::isLabelScope): Deleted.
(JSC::ControlFlowScope::isFinallyScope): Deleted.
(JSC::BytecodeGenerator::currentLexicalScopeIndex): Deleted.
(JSC::BytecodeGenerator::FinallyRegistersScope::FinallyRegistersScope): Deleted.
(JSC::BytecodeGenerator::FinallyRegistersScope::~FinallyRegistersScope): Deleted.
(JSC::BytecodeGenerator::finallyActionRegister): Deleted.
(JSC::BytecodeGenerator::finallyReturnValueRegister): Deleted.
(JSC::BytecodeGenerator::emitSetFinallyActionToNormalCompletion): Deleted.
(JSC::BytecodeGenerator::emitSetFinallyActionToReturnCompletion): Deleted.
(JSC::BytecodeGenerator::emitSetFinallyActionToJumpID): Deleted.
(JSC::BytecodeGenerator::emitSetFinallyReturnValueRegister): Deleted.
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNormalCompletion): Deleted.
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotJump): Deleted.
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsReturnCompletion): Deleted.
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotReturnCompletion): Deleted.
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotThrowCompletion): Deleted.
(JSC::BytecodeGenerator::emitJumpIfCompletionTypeIsThrow): Deleted.
(JSC::BytecodeGenerator::bytecodeOffsetToJumpID): Deleted.

  • bytecompiler/NodesCodegen.cpp:

(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::TryNode::emitBytecode):

Source/WTF:

  • wtf/SegmentedVector.h:

(WTF::SegmentedVector::last):
(WTF::SegmentedVector::first): Deleted.
(WTF::SegmentedVector::takeLast): Deleted.

6:01 PM Changeset in webkit [210009] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Address some assertions and uncaught exceptions seen using Inspector
https://bugs.webkit.org/show_bug.cgi?id=166048

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-19
Reviewed by Matt Baker.

  • UserInterface/Controllers/CodeMirrorEditingController.js:

(WebInspector.CodeMirrorEditingController.prototype.presentHoverMenu):
(WebInspector.CodeMirrorEditingController.prototype.dismissHoverMenu):
classList throws an exception when given an empty string. Avoid those cases.

  • UserInterface/Controllers/CodeMirrorTokenTrackingController.js:

(WebInspector.CodeMirrorTokenTrackingController.prototype._startTracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype._stopTracking):
Seen this assert frequently for a while, existing code handles it gracefully.

  • UserInterface/Workers/Formatter/EsprimaFormatter.js:

(EsprimaFormatter.prototype._handleTokenAtNode):
We correctly handle these tokens but they were not in the list of expected tokens.

5:55 PM Changeset in webkit [210008] by bshafiei@apple.com
  • 4 edits in branches/safari-603-branch/Source/JavaScriptCore

Merged r210007. rdar://problem/29745006

5:48 PM Changeset in webkit [210007] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Rolling out r209974 and r209952. They break some websites in mysterious ways. Step 1: Rollout r209974.
https://bugs.webkit.org/show_bug.cgi?id=166049

Not reviewed.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::emitJumpViaFinallyIfNeeded):
(JSC::BytecodeGenerator::emitReturnViaFinallyIfNeeded):
(JSC::BytecodeGenerator::emitFinallyCompletion):
(JSC::BytecodeGenerator::allocateFinallyRegisters):
(JSC::BytecodeGenerator::releaseFinallyRegisters):
(JSC::BytecodeGenerator::emitCompareFinallyActionAndJumpIf):
(JSC::BytecodeGenerator::allocateCompletionRecordRegisters): Deleted.
(JSC::BytecodeGenerator::releaseCompletionRecordRegisters): Deleted.
(JSC::BytecodeGenerator::emitJumpIfCompletionType): Deleted.

  • bytecompiler/BytecodeGenerator.h:

(JSC::FinallyJump::FinallyJump):
(JSC::FinallyContext::registerJump):
(JSC::BytecodeGenerator::FinallyRegistersScope::FinallyRegistersScope):
(JSC::BytecodeGenerator::FinallyRegistersScope::~FinallyRegistersScope):
(JSC::BytecodeGenerator::finallyActionRegister):
(JSC::BytecodeGenerator::finallyReturnValueRegister):
(JSC::BytecodeGenerator::emitSetFinallyActionToNormalCompletion):
(JSC::BytecodeGenerator::emitSetFinallyActionToReturnCompletion):
(JSC::BytecodeGenerator::emitSetFinallyActionToJumpID):
(JSC::BytecodeGenerator::emitSetFinallyReturnValueRegister):
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNormalCompletion):
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotJump):
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsReturnCompletion):
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotReturnCompletion):
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotThrowCompletion):
(JSC::BytecodeGenerator::emitJumpIfCompletionTypeIsThrow):
(JSC::BytecodeGenerator::bytecodeOffsetToJumpID):
(JSC::bytecodeOffsetToJumpID): Deleted.
(JSC::BytecodeGenerator::CompletionRecordScope::CompletionRecordScope): Deleted.
(JSC::BytecodeGenerator::CompletionRecordScope::~CompletionRecordScope): Deleted.
(JSC::BytecodeGenerator::completionTypeRegister): Deleted.
(JSC::BytecodeGenerator::completionValueRegister): Deleted.
(JSC::BytecodeGenerator::emitSetCompletionType): Deleted.
(JSC::BytecodeGenerator::emitSetCompletionValue): Deleted.

  • bytecompiler/NodesCodegen.cpp:

(JSC::TryNode::emitBytecode):

5:18 PM Changeset in webkit [210006] by weinig@apple.com
  • 9 edits
    2 deletes in trunk/Source/WebCore

Remove a few trivial custom bindings
https://bugs.webkit.org/show_bug.cgi?id=165999

Reviewed by Simon Fraser.

  • CMakeLists.txt:
  • bindings/js/JSBindingsAllInOne.cpp:

Remove files.

  • WebCore.xcodeproj/project.pbxproj:

Move custom bindings that only exist for GC or wrapping reasons
to their own group, so we can focus on the ones with custom functions.

  • bindings/js/JSDataTransferCustom.cpp: Removed.
  • bindings/js/JSTrackEventCustom.cpp: Removed.
  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::types):
Remove incorrect comment and use a more concise empty initialization syntax.

  • dom/DataTransfer.idl:

Update IDL to remove [Custom] annotation and match spec better.

  • html/track/TrackEvent.cpp:

(WebCore::convertToTrackEventTrack):
(WebCore::TrackEvent::TrackEvent):

  • html/track/TrackEvent.h:

Switch to store the Track in a Variant to make the binding easier.

  • html/track/TrackEvent.idl:

Remove [CustomGetter] annotation.

4:37 PM Changeset in webkit [210005] by Keith Rollin
  • 2 edits in trunk/Source/WebKit2

Fix unwanted deletion of record/replay files
https://bugs.webkit.org/show_bug.cgi?id=166040

Reviewed by Alex Christensen.

As part of some refactoring, the objects that create the meta files
that are part of the record/replay cache would get deleted. They were
always getting opened in "write" mode", which would truncate the
files. Fix this so that the files are opened in the right modes for
record, replay, and neither.

  • NetworkProcess/capture/NetworkCaptureManager.cpp:

(WebKit::NetworkCapture::Manager::initialize):

4:34 PM Changeset in webkit [210004] by bshafiei@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebCore

Build fix for rdar://problem/29737358.

4:23 PM Changeset in webkit [210003] by Ryan Haddad
  • 7 edits in trunk/Tools

Repurpose bots and clean up dashboard.
https://bugs.webkit.org/show_bug.cgi?id=166045

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:

(BubbleQueueServer):

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:

(table.queue-grid tr.platform.mac-os-x-yosemite img.logo): Deleted.

4:01 PM Changeset in webkit [210002] by bshafiei@apple.com
  • 4 edits
    2 copies in branches/safari-602-branch

Merged r209990. rdar://problem/29737358

3:41 PM Changeset in webkit [210001] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

Do not position detached list item marker.
https://bugs.webkit.org/show_bug.cgi?id=166035
<rdar://problem/29175235>

Reviewed by Simon Fraser.

In certain (non-reproducible) cases, the list item marker can get detached from the tree
during layout and when in RenderListItem::positionListMarker() we dereference the marker's parent, we crash.
In addition to the null check, this patch adds an ASSERTION to catch such cases early on.

Unable to reproduce.

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::moveChildTo):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::removeChildInternal):

  • rendering/RenderElement.h:
  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::layout):
(WebCore::RenderListItem::positionListMarker):

  • rendering/RenderListItem.h:
  • rendering/RenderListMarker.h:
3:39 PM Changeset in webkit [210000] by dino@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Another feature toggle for rdar://problem/29466493.

2016-12-19 Dean Jackson <dino@apple.com>

Enable Gamepad by default.

  • Shared/WebPreferencesDefinitions.h:
3:36 PM Changeset in webkit [209999] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/inspector/network/fetch-network-data.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=166038

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:45 PM Changeset in webkit [209998] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Web Inspector: Assertion seen in InspectorDebuggerAgent::refAsyncCallData with Inspector open
https://bugs.webkit.org/show_bug.cgi?id=166034
<rdar://problem/29554366>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-19
Reviewed by Brian Burg.

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::refAsyncCallData):
Remove assertion. This assert can happen if the currently executing callback
was just explicitly cancelled by script. Existing code already handles if
no async data was found for the given identifier.

2:06 PM Changeset in webkit [209997] by barraclough@apple.com
  • 5 edits in trunk/Source

[CSS Parser] Enable CSS Deferred Parsing
https://bugs.webkit.org/show_bug.cgi?id=165869

Unreviewed rollout – looks like this regressed performance.

Source/WebCore:

  • css/parser/CSSParserMode.h:
  • page/Settings.in:

Source/WebKit2:

  • Shared/WebPreferencesDefinitions.h:
1:59 PM Changeset in webkit [209996] by Ryan Haddad
  • 2 edits
    1 copy in trunk/LayoutTests

Rebaseline fast/text/emoji.html for macOS.

Unreviewed test gardening.

  • platform/mac-elcapitan/fast/text/emoji-expected.txt: Copied from LayoutTests/platform/mac/fast/text/emoji-expected.txt.
  • platform/mac/fast/text/emoji-expected.txt:
1:27 PM Changeset in webkit [209995] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

REGRESSION: Crash in com.apple.WebKit:IPC::Connection::platformCanSendOutgoingMessages() const + 0
https://bugs.webkit.org/show_bug.cgi?id=165817
rdar://problem/29626731

Reviewed by Dan Bernstein.

If the receive right is invalidated before we send the message, the kernel won't be able to create a send right,
and we'll crash due to mach_msg returning MACH_SEND_INVALID_RIGHT.

Fix this by immediately creating a send right, and passing MACH_MSG_TYPE_MOVE_SEND to the attachment constructor.

  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::openFrontendConnection):

12:46 PM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
12:45 PM WebKitGTK/2.14.x edited by Michael Catanzaro
Remove bug #164052, nothing ready there yet (diff)
12:35 PM WebKitGTK/2.14.x edited by Michael Catanzaro
Remove "MemoryPressureHandler shouldn't know how to release WebCore … (diff)
12:33 PM Changeset in webkit [209994] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

Unreviewed, mark fixed-element-on-bottom-with-keyboard.html as skip for OpenSource iOS WK2
https://bugs.webkit.org/show_bug.cgi?id=166027

This test should have been disabled on OpenSource bots due to the lack of touch handling.

  • platform/ios-simulator-wk2/TestExpectations:
12:28 PM Changeset in webkit [209993] by commit-queue@webkit.org
  • 1 edit
    7 adds in trunk/LayoutTests

Add a few Worker loading tests that don't seem to be explicitly handled
https://bugs.webkit.org/show_bug.cgi?id=165870

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-19
Reviewed by Daniel Bates.

The tests already pass as expected, but adding specific tests
for specific expected behavior with Worker script loads.

  • http/tests/security/contentSecurityPolicy/worker-redirect-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/worker-redirect-allowed.html: Added.
  • http/tests/security/resources/worker-message-pass.js: Added.
  • http/tests/security/worker-cross-origin-expected.txt: Added.
  • http/tests/security/worker-cross-origin.html: Added.
  • http/tests/security/worker-same-origin-expected.txt: Added.
  • http/tests/security/worker-same-origin.html: Added.
12:18 PM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
11:34 AM Changeset in webkit [209992] by dino@apple.com
  • 14 edits in branches/safari-603-branch

Merge another patch for rdar://problem/29466493.

2016-12-19 Dean Jackson <dino@apple.com>

Disable some features on the safari-603-branch.
<rdar://problem/29466493>

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • css/SelectorChecker.cpp: (WebCore::SelectorChecker::matchRecursively):
  • css/SelectorFilter.cpp: (WebCore::SelectorFilter::collectIdentifierHashes):
  • css/parser/CSSSelectorParser.cpp: (WebCore::isOnlyPseudoClassFunction): (WebCore::CSSSelectorParser::consumePseudo): (WebCore::CSSSelectorParser::consumeCombinator):
  • cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
11:30 AM EnvironmentVariables edited by clopez@igalia.com
(diff)
11:12 AM Changeset in webkit [209991] by Michael Catanzaro
  • 2 edits in trunk/Tools

[CMake] TestWebKitAPIBase links to itself
https://bugs.webkit.org/show_bug.cgi?id=165985

Reviewed by Alex Christensen.

Fix CMake warning about a target linking to itself, which makes no sense.

  • TestWebKitAPI/CMakeLists.txt:
11:05 AM Changeset in webkit [209990] by Brent Fulgham
  • 4 edits
    2 adds in trunk

Side effects while restting form elements
https://bugs.webkit.org/show_bug.cgi?id=165959
<rdar://problem/29705967>

Reviewed by Anders Carlsson.

Source/WebCore:

JavaScript logic can run while resetting FormElement objects. This can
lead to unintended side-effets and other unwanted behavior. We should
protect these elements during the reset.

Test: fast/html/form-mutate.html

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::HTMLFormElement): Switch to C++11 initialization.
(WebCore::HTMLFormElement::reset): Protect elements until the reset
operation is finished.
(WebCore::HTMLFormElement::resetAssociatedFormControlElements): Added to share
code with 'resumeFromDocument'.
(WebCore::HTMLFormElement::resumeFromDocument): Protect elements until the
reset operation is finished.

LayoutTests:

  • fast/html/form-mutate-expected.txt: Added.
  • fast/html/form-mutate.html: Added.
10:18 AM Changeset in webkit [209989] by zandobersek@gmail.com
  • 4 edits in trunk/Source/WebCore

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

There's intent to support persistent-usage-record (Requested
by zdobersek on #webkit).

Reverted changeset:

"[EME] Remove MediaKeySessionType::persistent-usage-record"
https://bugs.webkit.org/show_bug.cgi?id=166012
http://trac.webkit.org/changeset/209983

Patch by Commit Queue <commit-queue@webkit.org> on 2016-12-19

10:01 AM Changeset in webkit [209988] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Move custom files / callback objects into their respective groups.

Rubber-stamped by Simon Fraser.

  • WebCore.xcodeproj/project.pbxproj:
9:53 AM Changeset in webkit [209987] by weinig@apple.com
  • 7 edits
    2 deletes in trunk/Source/WebCore

[WebIDL] Remove custom binding for the named Image constructor
https://bugs.webkit.org/show_bug.cgi?id=166023

Reviewed by Alex Christensen.

  • bindings/js/JSBindingsAllInOne.cpp:
  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:

Remove JSImageConstructor.

  • bindings/js/JSImageConstructor.cpp: Removed.
  • bindings/js/JSImageConstructor.h: Removed.


  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::image): Deleted.

  • page/DOMWindow.idl:

Remove custom getter for the constructor.

  • html/HTMLImageElement.idl:

Add NamedConstructor annotation.

9:37 AM Changeset in webkit [209986] by Antti Koivisto
  • 14 edits in trunk/Source/WebCore

Remove RenderObject::requiresForcedStyleRecalcPropagation
https://bugs.webkit.org/show_bug.cgi?id=166021

Reviewed by Andreas Kling.

It is not called. It also makes no sense architecturally.

  • html/shadow/mac/ImageControlsButtonElementMac.cpp:
  • html/shadow/mac/ImageControlsRootElementMac.cpp:
  • rendering/RenderButton.h:
  • rendering/RenderFileUploadControl.h:
  • rendering/RenderListItem.h:
  • rendering/RenderMedia.h:
  • rendering/RenderMenuList.h:
  • rendering/RenderMeter.h:
  • rendering/RenderObject.h:

(WebCore::RenderObject::requiresForcedStyleRecalcPropagation): Deleted.

  • rendering/RenderProgress.h:
  • rendering/RenderSlider.h:
  • rendering/RenderTextControl.h:
  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateElementRenderer):

This is the only call site. Combination

update.change == Style::NoChange && parent().styleChange == Style::Force

is impossible ('Force' inherits) so requiresForcedStyleRecalcPropagation doesn't ever even get called.

9:31 AM Changeset in webkit [209985] by bshafiei@apple.com
  • 13 edits in branches/safari-603-branch

Merge patch for rdar://problem/29466493.

9:11 AM Changeset in webkit [209984] by bshafiei@apple.com
  • 1 copy in branches/safari-603-branch

New Branch.

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

[EME] Remove MediaKeySessionType::persistent-usage-record
https://bugs.webkit.org/show_bug.cgi?id=166012

Reviewed by Xabier Rodriguez-Calvar.

Remove the "persistent-usage-record" value from the MediaKeySessionType.
This was removed from the spec as an at-risk feature.
https://github.com/w3c/encrypted-media/issues/353

No non-imported tests need to be updated. This is still present in the
tests imported from the W3C's web-platform-tests repository, but the
tests haven't yet been updated upstream.

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::isPersistentType):

  • Modules/encryptedmedia/MediaKeySessionType.h:
  • Modules/encryptedmedia/MediaKeySessionType.idl:
7:41 AM Changeset in webkit [209982] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] GLXBadFBConfig error when creating an OpenGL context
https://bugs.webkit.org/show_bug.cgi?id=165200

Reviewed by Carlos Garcia Campos.

glXCreateContextAttribsARB causes a GLXBadFBConfig X error when it's not able to provide the
OpenGL version >= 3.2 we are requesting. Due to this, the app crashes instead of falling back to
the legacy path.
The patch modifies GLX context creation using a XErrorTrapper, so the first time a context is created
we don't crash if OpenGL >= 3.2 is not available.
If the gotten context is not valid, we fall back to whatever version glXCreateContextAttribsARB is
able to provide.
The legacy glXCreateContext is only used if the GLX_ARB_create_context extension is not available.

Covered by existent tests.

  • platform/graphics/glx/GLContextGLX.cpp:

(WebCore::tryCreateGLXARBContext):
(WebCore::GLContextGLX::createWindowContext):
(WebCore::GLContextGLX::createPbufferContext):

5:02 AM Changeset in webkit [209981] by Michael Catanzaro
  • 3 edits in trunk/Tools

[GTK] GtkDoc build should be quieter
https://bugs.webkit.org/show_bug.cgi?id=165994

Reviewed by Carlos Garcia Campos.

Make it not print by default.

  • gtk/generate-gtkdoc:

(get_generator_for_config):
(generate_doc):

  • gtk/gtkdoc.py:

(GTKDoc._run_command):
(GTKDoc._copy_doc_files_to_output_dir):

12:19 AM Changeset in webkit [209980] by sbarati@apple.com
  • 4 edits
    2 copies in trunk/JSTests

WebAssembly: Make running Wasm tests take less time by reducing some tests' iteration count and by splitting some tests into different files
https://bugs.webkit.org/show_bug.cgi?id=166017

Reviewed by Yusuke Suzuki.

  • wasm/function-tests/trap-load-2.js: Added.

(assert):
(wasmFrameCountFromError):
(continuation):
(i.catch):

  • wasm/function-tests/trap-load.js:

(assert.continuation): Deleted.

  • wasm/function-tests/trap-store-2.js: Added.

(import.Builder.from.string_appeared_here.assert):
(continuation):
(i.catch):

  • wasm/function-tests/trap-store.js:

(assert.continuation): Deleted.
(assert): Deleted.

  • wasm/js-api/test_memory.js:

(test):

Dec 18, 2016:

11:22 PM Changeset in webkit [209979] by sbarati@apple.com
  • 9 edits
    2 adds in trunk

WebAssembly: Implement the WebAssembly.compile and WebAssembly.validate
https://bugs.webkit.org/show_bug.cgi?id=165936

Reviewed by Mark Lam.

JSTests:

  • wasm/js-api/Module-compile.js: Added.

(async.testPromiseAPI):

  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

  • wasm/js-api/validate.js: Added.

(assert.truthy.WebAssembly.validate.builder.WebAssembly):

Source/JavaScriptCore:

The APIs are documented here:

  • wasm/JSWebAssembly.cpp:

(JSC::webAssemblyCompileFunc):
(JSC::webAssemblyValidateFunc):
(JSC::JSWebAssembly::finishCreation):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::parseAndValidateModule):
(JSC::Wasm::Plan::run):

  • wasm/WasmPlan.h:
  • wasm/js/JSWebAssemblyHelpers.h:

(JSC::getWasmBufferFromValue):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):
(JSC::callJSWebAssemblyModule):
(JSC::WebAssemblyModuleConstructor::createModule):

  • wasm/js/WebAssemblyModuleConstructor.h:
10:29 PM Changeset in webkit [209978] by bshafiei@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

5:40 PM Changeset in webkit [209977] by beidson@apple.com
  • 10 edits in trunk/Source/WebCore

IndexedDB 2.0: Prefetch cursor records in the server.
https://bugs.webkit.org/show_bug.cgi?id=166014

Reviewed by Andy Estes.

No new tests (Covered by existing LayoutTests and PerformanceTests).

This patch implements the followng:
1 - After a backing store cursor completes a fetch in the server, it will schedule the next fetch

even before the client requests one. It will do this up to a limited number of prefetches.

2 - Once a client request to advance the cursor comes in, we'll work our way through prefetched

records instead of reading anything from disk, which might then cause us to continue prefetch.

3 - If any changes to the object store occur, it will throw away all previously fetched records

(There's room for future improvement here)

  • Modules/indexeddb/server/IDBBackingStore.h:
  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::postDatabaseTask):

  • Modules/indexeddb/server/MemoryIDBBackingStore.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
(WebCore::IDBServer::SQLiteIDBBackingStore::prefetchCursor):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/server/SQLiteIDBCursor.cpp:

(WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
(WebCore::IDBServer::SQLiteIDBCursor::prefetch):
(WebCore::IDBServer::SQLiteIDBCursor::advance):

  • Modules/indexeddb/server/SQLiteIDBCursor.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
(WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
(WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
5:14 PM Changeset in webkit [209976] by Wenson Hsieh
  • 7 edits
    2 adds in trunk

Changing text direction fires input events with null inputTypes and no data
https://bugs.webkit.org/show_bug.cgi?id=166007
<rdar://problem/29557205>

Reviewed by Sam Weinig.

Source/WebCore:

Adds support for the "formatSetInlineTextDirection" input type, triggered when using the context menu on Mac in
an editable area (for both plain and rich text cases) to change paragraph direction. To do this, we add cases
for EditActionSetWritingDirection in inputTypeNameForEditingAction and inputEventDataForEditingStyleAndAction.

When changing text direction for a plaintext editable element, we have logic in Editor::setBaseWritingDirection
that sets the focused element's dir attribute to the requested value (ltr or rtl). We add similar hooks here to
dispatch input events and handle preventing default.

Test: fast/events/before-input-events-prevent-text-direction.html

  • editing/EditCommand.cpp:

(WebCore::inputTypeNameForEditingAction):

Handle the EditActionSetWritingDirection case.

  • editing/Editor.cpp:

(WebCore::inputEventDataForEditingStyleAndAction):
(WebCore::Editor::applyParagraphStyle):

Include input event data when dispatching an input event here.

(WebCore::Editor::setBaseWritingDirection):

  • testing/Internals.cpp:

(WebCore::Internals::setBaseWritingDirection):

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

Introduce an internal testing support hook for setting base writing direction (the same codepath taken when
using the context menu to change paragraph direction). Currently, using testRunner.execCommand creates and
applies style with an additional unicode-bidi attribute, and appears to also be intentionally disabled for
plaintext editable elements.

LayoutTests:

Verifies that changing text direction causes beforeinput and input events with appropriate inputType and data to
be dispatched, and that preventing this beforeinput event causes no change in text direction.

  • fast/events/before-input-events-prevent-text-direction-expected.txt: Added.
  • fast/events/before-input-events-prevent-text-direction.html: Added.
1:09 PM Changeset in webkit [209975] by Simon Fraser
  • 12 edits in trunk

Expose a way for MiniBrowser to simulate header and footer banners
https://bugs.webkit.org/show_bug.cgi?id=166005

Reviewed by Wenson Hsieh.

Source/WebKit2:

Expose testing SPI that allows a client to simulate the presence of header
and footer banners. These are simply plumbed through to set FrameView's
m_headerHeight and m_footerHeight.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setHeaderBannerHeightForTesting:]):
(-[WKWebView _setFooterBannerHeightForTesting:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setHeaderBannerHeightForTesting):
(WebKit::WebPageProxy::setFooterBannerHeightForTesting):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setHeaderBannerHeightForTesting):
(WebKit::WebPage::setFooterBannerHeightForTesting):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Add a MiniBrowser menu item and setting to toggle adding space for header and footer
banners. This only works in WebKit2.

We need to reset these on each navigation, since newly created FrameViews
don't re-fetch the header and footer height stored on Page.

Also fix the signature of webView:didFinishNavigation: to follow API changes,
as well as fixing webViewWebContentProcessDidTerminate:

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleReserveSpaceForBanners:]):
(-[SettingsController isSpaceReservedForBanners]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController didChangeSettings]):
(-[WK2BrowserWindowController webView:didFinishNavigation:]):
(-[WK2BrowserWindowController webViewWebContentProcessDidTerminate:]):
(-[WK2BrowserWindowController webView:didFinishLoadingNavigation:]): Deleted.
(-[WK2BrowserWindowController _webViewWebProcessDidCrash:]): Deleted.

11:04 AM Changeset in webkit [209974] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Rename finallyActionRegister to completionTypeRegister and only store int JSValues in it.
https://bugs.webkit.org/show_bug.cgi?id=165979

Reviewed by Saam Barati.

This patch makes it so that we only store int JSValues in the finallyActionRegister
thereby making type prediction on this register more successful for JITs. In so
doing, we are able to get some additional benefits:

  1. Renamed the following: FinallyRegistersScope => CompletionRecordScope finallyActionRegister => completionTypeRegister finallyReturnValueRegister => completionValueRegister

These new names are more in line with the ES spec, which describes these
values as the completion record and its type and value properties.
https://tc39.github.io/ecma262/#sec-completion-record-specification-type

  1. We now think of the Break and Continue jumpIDs as encodings of CompletionType (in our implementation of completion type). As a result, we only need one of each of the emitter methods for getting, setting, and compare-and-jump on the completion type. The code using these methods also reads much clearer now.
  1. Finally blocks' op_catch should now always pop the caught Exception object into the completionValueRegister instead of the completionTypeRegister (formerly finallyActionRegister).

Also removed the restoreScopeRegister() call in the IteratorClose catch block
because that is an implementation specific synthesized catch block, and we
can guarantee that it never needs to resolve any symbols from the scope. Hence,
there is no need to restore the scope register.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::emitJumpViaFinallyIfNeeded):
(JSC::BytecodeGenerator::emitReturnViaFinallyIfNeeded):
(JSC::BytecodeGenerator::emitFinallyCompletion):
(JSC::BytecodeGenerator::allocateCompletionRecordRegisters):
(JSC::BytecodeGenerator::releaseCompletionRecordRegisters):
(JSC::BytecodeGenerator::emitJumpIfCompletionType):
(JSC::BytecodeGenerator::allocateFinallyRegisters): Deleted.
(JSC::BytecodeGenerator::releaseFinallyRegisters): Deleted.
(JSC::BytecodeGenerator::emitCompareFinallyActionAndJumpIf): Deleted.

  • bytecompiler/BytecodeGenerator.h:

(JSC::bytecodeOffsetToJumpID):
(JSC::FinallyJump::FinallyJump):
(JSC::FinallyContext::registerJump):
(JSC::BytecodeGenerator::CompletionRecordScope::CompletionRecordScope):
(JSC::BytecodeGenerator::CompletionRecordScope::~CompletionRecordScope):
(JSC::BytecodeGenerator::completionTypeRegister):
(JSC::BytecodeGenerator::completionValueRegister):
(JSC::BytecodeGenerator::emitSetCompletionType):
(JSC::BytecodeGenerator::emitSetCompletionValue):
(JSC::BytecodeGenerator::FinallyRegistersScope::FinallyRegistersScope): Deleted.
(JSC::BytecodeGenerator::FinallyRegistersScope::~FinallyRegistersScope): Deleted.
(JSC::BytecodeGenerator::finallyActionRegister): Deleted.
(JSC::BytecodeGenerator::finallyReturnValueRegister): Deleted.
(JSC::BytecodeGenerator::emitSetFinallyActionToNormalCompletion): Deleted.
(JSC::BytecodeGenerator::emitSetFinallyActionToReturnCompletion): Deleted.
(JSC::BytecodeGenerator::emitSetFinallyActionToJumpID): Deleted.
(JSC::BytecodeGenerator::emitSetFinallyReturnValueRegister): Deleted.
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNormalCompletion): Deleted.
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotJump): Deleted.
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsReturnCompletion): Deleted.
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotReturnCompletion): Deleted.
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotThrowCompletion): Deleted.
(JSC::BytecodeGenerator::emitJumpIfCompletionTypeIsThrow): Deleted.
(JSC::BytecodeGenerator::bytecodeOffsetToJumpID): Deleted.

  • bytecompiler/NodesCodegen.cpp:

(JSC::TryNode::emitBytecode):

9:26 AM Changeset in webkit [209973] by Simon Fraser
  • 6 edits in trunk/LayoutTests

Rebaseline these tests after r209967, since they are now affected by status bar height.

  • fast/viewport/ios/ipad/width-is-device-width-expected.txt:
  • fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt:
  • fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt:
  • fast/viewport/ios/width-is-device-width-overflowing-expected.txt:
  • fast/viewport/ios/width-is-device-width-overflowing-no-shrink-to-fit-expected.txt:
12:11 AM Changeset in webkit [209972] by Simon Fraser
  • 8 edits in trunk/Tools

Fix iOS test results after r209967.

Subtracting out the status bar height was erroneously happening for all tests,
not just for flexible viewport tests.

Fix by plumbing WebViewSizingMode through resizeTo() and setWindowFrame().

  • WebKitTestRunner/PlatformWebView.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

  • WebKitTestRunner/efl/PlatformWebViewEfl.cpp:

(WTR::PlatformWebView::resizeTo):
(WTR::PlatformWebView::setWindowFrame):

  • WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:

(WTR::PlatformWebView::resizeTo):
(WTR::PlatformWebView::setWindowFrame):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::resizeTo):
(WTR::PlatformWebView::setWindowFrame):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformConfigureViewForTest):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::resizeTo):
(WTR::PlatformWebView::setWindowFrame):

12:11 AM Changeset in webkit [209971] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Build fix: linking WebCore was failing: you can't export inline functions.

  • css/DeprecatedCSSOMPrimitiveValue.cpp:

(WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType):
(WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue):

  • css/DeprecatedCSSOMPrimitiveValue.h:

(WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType): Deleted.
(WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue): Deleted.
(WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue): Deleted.
(WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue): Deleted.
(WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue): Deleted.

Dec 17, 2016:

10:07 PM Changeset in webkit [209970] by jh718.park@samsung.com
  • 4 edits in trunk

[EFL] bump EFL version to 1.18.4
https://bugs.webkit.org/show_bug.cgi?id=166004

Reviewed by Gyuyoung Kim.

.:

  • Source/cmake/OptionsEfl.cmake: Use efl-1.18.4 instead of 1.18.1.

Tools:

  • efl/jhbuild.modules: Use efl-1.18.4 instead of 1.18.1.
12:08 PM Changeset in webkit [209969] by hyatt@apple.com
  • 52 edits
    6 moves
    9 adds in trunk/Source

[CSS Values] Make separate wrapper classes for the deprecated CSS Values OM
https://bugs.webkit.org/show_bug.cgi?id=165968

Reviewed by Andreas Kling.

Source/WebCore:

This patch changes the CSS OM for values to use distinct wrapper
classes instead of cloning the existing classes. By actually wrapping
values instead of cloning, we are freed up to change our CSS value hierarchy
however we'd like (such as changing to match the new CSS Values OM that
is coming soon).

All of the CSS Values wrapper classes are prefixed with "DeprecatedCSSOM"
to reflect our desire (ultimately) to remove this API from our tree. We're
the only ones that support it, and it's not used on the Web, but it is part
of the WebKitLegacy API and might be used internally.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/DOMWrapperWorld.h:
  • bindings/js/JSCSSStyleDeclarationCustom.cpp:

(WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):

  • bindings/js/JSCSSValueCustom.cpp:

(WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
(WebCore::JSDeprecatedCSSOMValueOwner::finalize):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots): Deleted.
(WebCore::JSCSSValueOwner::finalize): Deleted.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

  • css/CSSComputedStyleDeclaration.h:
  • css/CSSGridLineNamesValue.cpp:

(WebCore::CSSGridLineNamesValue::cloneForCSSOM): Deleted.

  • css/CSSGridLineNamesValue.h:
  • css/CSSImageSetValue.cpp:

(WebCore::CSSImageSetValue::cloneForCSSOM): Deleted.

  • css/CSSImageSetValue.h:
  • css/CSSImageValue.cpp:

(WebCore::CSSImageValue::createDeprecatedCSSOMWrapper):
(WebCore::CSSImageValue::cloneForCSSOM): Deleted.

  • css/CSSImageValue.h:
  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::createDeprecatedCSSOMPrimitiveWrapper):
(WebCore::CSSPrimitiveValue::cloneForCSSOM): Deleted.

  • css/CSSPrimitiveValue.h:
  • css/CSSPrimitiveValue.idl: Removed.
  • css/CSSStyleDeclaration.h:
  • css/CSSStyleDeclaration.idl:
  • css/CSSValue.cpp:

(WebCore::CSSValue::traverseSubresources):
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::createDeprecatedCSSOMWrapper):
(): Deleted.
(WebCore::CSSValue::cloneForCSSOM): Deleted.

  • css/CSSValue.h:

(WebCore::CSSValue::CSSValue):
(WebCore::CSSValue::setCssText): Deleted.
(WebCore::CSSValue::isCSSOMSafe): Deleted.
(WebCore::CSSValue::isSubtypeExposedToCSSOM): Deleted.

  • css/CSSValue.idl: Removed.
  • css/CSSValueList.cpp:

(WebCore::CSSValueList::cloneForCSSOM): Deleted.

  • css/CSSValueList.h:

(WebCore::CSSValueList::separator):

  • css/CSSValueList.idl: Removed.
  • css/Counter.h:
  • css/Counter.idl: Removed.
  • css/DeprecatedCSSOMCounter.h: Added.
  • css/DeprecatedCSSOMCounter.idl: Copied from Source/WebCore/css/Counter.idl.
  • css/DeprecatedCSSOMPrimitiveValue.cpp: Added.

(WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue):

  • css/DeprecatedCSSOMPrimitiveValue.h: Added.

(WebCore::DeprecatedCSSOMPrimitiveValue::create):
(WebCore::DeprecatedCSSOMPrimitiveValue::equals):
(WebCore::DeprecatedCSSOMPrimitiveValue::cssValueType):
(WebCore::DeprecatedCSSOMPrimitiveValue::cssText):
(WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType):
(WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::stringValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::DeprecatedCSSOMPrimitiveValue):

  • css/DeprecatedCSSOMPrimitiveValue.idl: Copied from Source/WebCore/css/CSSPrimitiveValue.idl.
  • css/DeprecatedCSSOMRGBColor.h: Added.
  • css/DeprecatedCSSOMRGBColor.idl: Copied from Source/WebCore/css/RGBColor.idl.
  • css/DeprecatedCSSOMRect.h: Added.
  • css/DeprecatedCSSOMRect.idl: Copied from Source/WebCore/css/Rect.idl.
  • css/DeprecatedCSSOMValue.cpp: Added.

(WebCore::compareCSSOMValues):
(WebCore::DeprecatedCSSOMValue::equals):
(WebCore::DeprecatedCSSOMValue::destroy):
(WebCore::DeprecatedCSSOMValue::cssValueType):
(WebCore::DeprecatedCSSOMValue::cssText):

  • css/DeprecatedCSSOMValue.h: Added.

(WebCore::DeprecatedCSSOMValue::deref):
(WebCore::DeprecatedCSSOMValue::setCssText):
(WebCore::DeprecatedCSSOMValue::operator==):
(WebCore::DeprecatedCSSOMValue::isComplexValue):
(WebCore::DeprecatedCSSOMValue::isPrimitiveValue):
(WebCore::DeprecatedCSSOMValue::isValueList):
(WebCore::DeprecatedCSSOMValue::classType):
(WebCore::DeprecatedCSSOMValue::DeprecatedCSSOMValue):
(WebCore::DeprecatedCSSOMValue::~DeprecatedCSSOMValue):
(WebCore::DeprecatedCSSOMComplexValue::create):
(WebCore::DeprecatedCSSOMComplexValue::equals):
(WebCore::DeprecatedCSSOMComplexValue::cssText):
(WebCore::DeprecatedCSSOMComplexValue::cssValueType):
(WebCore::DeprecatedCSSOMComplexValue::DeprecatedCSSOMComplexValue):

  • css/DeprecatedCSSOMValue.idl: Copied from Source/WebCore/css/CSSValue.idl.
  • css/DeprecatedCSSOMValueList.cpp: Added.

(WebCore::DeprecatedCSSOMValueList::equals):
(WebCore::DeprecatedCSSOMValueList::cssText):

  • css/DeprecatedCSSOMValueList.h: Added.

(WebCore::DeprecatedCSSOMValueList::create):
(WebCore::DeprecatedCSSOMValueList::cssValueType):
(WebCore::DeprecatedCSSOMValueList::length):
(WebCore::DeprecatedCSSOMValueList::item):
(WebCore::DeprecatedCSSOMValueList::DeprecatedCSSOMValueList):

  • css/DeprecatedCSSOMValueList.idl: Copied from Source/WebCore/css/CSSValueList.idl.
  • css/LengthRepeat.h:
  • css/PropertySetCSSStyleDeclaration.cpp:

(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
(WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM):
(WebCore::StyleRuleCSSStyleDeclaration::didMutate):
(WebCore::InlineCSSStyleDeclaration::didMutate):
(WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM): Deleted.

  • css/PropertySetCSSStyleDeclaration.h:
  • css/RGBColor.cpp:

(WebCore::RGBColor::red): Deleted.
(WebCore::RGBColor::green): Deleted.
(WebCore::RGBColor::blue): Deleted.
(WebCore::RGBColor::alpha): Deleted.

  • css/RGBColor.h:
  • css/RGBColor.idl: Removed.
  • css/Rect.h:

(WebCore::RectBase::RectBase):

  • css/Rect.idl: Removed.
  • svg/SVGElement.cpp:

(WebCore::SVGElement::getPresentationAttribute):

  • svg/SVGElement.h:
  • svg/SVGElement.idl:

Source/WebKit/mac:

  • DOM/DOMCSS.mm:

(kitClass):

  • DOM/DOMCSSPrimitiveValue.mm:

(-[DOMCSSPrimitiveValue getCounterValue]):
(-[DOMCSSPrimitiveValue getRectValue]):
(kit):

  • DOM/DOMCSSPrimitiveValueInternal.h:
  • DOM/DOMCSSStyleDeclaration.mm:
  • DOM/DOMCSSValue.mm:

(kit):

  • DOM/DOMCSSValueInternal.h:
  • DOM/DOMCSSValueList.mm:
  • DOM/DOMCounter.mm:

(kit):

  • DOM/DOMCounterInternal.h:
  • DOM/DOMRGBColor.mm:

(kit):

  • DOM/DOMRGBColorInternal.h:
  • DOM/DOMRect.mm:

(kit):

  • DOM/DOMRectInternal.h:
  • DOM/DOMUtility.mm:

(createDOMWrapper):

Source/WebKit2:

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:

(WebKit::kit):
(WebKit::core):
(WebKit::wrapCSSValue):
(webkit_dom_css_value_constructor):
(webkit_dom_css_value_get_css_text):
(webkit_dom_css_value_set_css_text):
(webkit_dom_css_value_get_css_value_type):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValuePrivate.h:
11:32 AM Changeset in webkit [209968] by Philippe Normand
  • 9 edits
    3 deletes in trunk

Unreviewed, rollout r209860 OWR player shouldn't be selected for
normal video playback

Source/WebCore:

  • platform/GStreamer.cmake:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:

(WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
(WebCore::MediaPlayerPrivateGStreamerOwr::play):
(WebCore::MediaPlayerPrivateGStreamerOwr::pause):
(WebCore::MediaPlayerPrivateGStreamerOwr::load):
(WebCore::MediaPlayerPrivateGStreamerOwr::stop):
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded):
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
(WebCore::MediaPlayerPrivateGStreamerOwr::setSize):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
  • platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:

(WebCore::MediaEndpointOwr::createMutedRemoteSource):

  • platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Removed.
  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):

  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Removed.
  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
  • platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Removed.

LayoutTests:

  • platform/gtk/TestExpectations:
11:18 AM Changeset in webkit [209967] by Wenson Hsieh
  • 46 edits
    2 adds in trunk

Visual viewports: bottom fixed elements disappear behind the keyboard
https://bugs.webkit.org/show_bug.cgi?id=165983
<rdar://problem/29409852>

Reviewed by Simon Fraser.

Source/WebKit2:

Accounts for input view bounds in WebPageProxy::computeCustomFixedPositionRect. To do this, we introduce and
pass unobscuredContentRectRespectingInputViewBounds along with the regular unobscuredContentRect (which does not
respect the obscuring keyboard rect). This unobscuredContentRectRespectingInputViewBounds is then used when
computing the origin of the updated layout viewport rect (and also, when we are _not_ below minimum scale),

Additionally, the size is computed using the (unconstrained) unobscured rect. This is because we previously
would use the document-constrained version of the unobscured rect, which caused the layout viewport to shrink
when approaching the max scroll extents of the document while the keyboard is up, since the unobscured rect
would spill out of the document rect. However, using this unconstrained rect's size also means that if the user
rubber-bands out of the document rect, we would end up pushing the layout viewport rect out of the document,
with no way of adjusting it back in without the user scrolling to push the layout viewport into back document
bounds. To address this, we move the layout rect to be within document bounds after computing its size and
location.

Added a new layout test: fast/visual-viewport/ios/fixed-element-on-bottom-with-keyboard.html, and also tweaked
fixed-caret-position-after-scroll.html to cover these changes.

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::unobscuredContentRectRespectingInputViewBounds):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _updateContentRectsWithState:]):
(-[WKWebView _inputViewBounds]):

Returns the current bounds of the input view. For testing purposes.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::unobscuredContentRectRespectingInputViewBounds):

  • UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):

  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _computeUnobscuredContentRectRespectingInputViewBounds:unobscuredContentRect:inputViewBounds:scale:]):

Helper to compute the unobscured rect, accounting for the bounds of the current input view.

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _didCommitLayerTree:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::computeCustomFixedPositionRect):

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

Tools:

Add support for UIScriptController.inputViewBounds, which UI-side scripts may use to fetch the bounding rect of
the keyboard when it is up.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::inputViewBounds):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::inputViewBounds):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::viewRectForWindowRect):

Previously, we accounted for the status bar height by translating the entire web view down by the height of the
status bar. However, we did not shrink the height of the web view itself, which means that for tests which
involve scrolling past the end of the document, the bottom strip of the web view is out of bounds of the window.

(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::setWindowFrame):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::inputViewBounds):

LayoutTests:

Tweaked fixed-caret-position-after-scroll.html to account for the keyboard height, and also added a new layout
test, fixed-element-on-bottom-with-keyboard.html, which checks that the layout viewport does not change before
and after showing the keyboard, and that scrolling past the end of the document does not bump the layout
viewport past document bounds.

The rest of the changes here involve rebaselining existing tests to account for the height of the web view no
longer being equal to the height of the window.

  • editing/caret/ios/absolute-caret-position-after-scroll-expected.txt:
  • editing/caret/ios/absolute-caret-position-after-scroll.html:
  • editing/caret/ios/fixed-caret-position-after-scroll-expected.txt:
  • editing/caret/ios/fixed-caret-position-after-scroll.html:
  • editing/selection/ios/absolute-selection-after-scroll.html:
  • editing/selection/ios/fixed-selection-after-scroll.html:
  • fast/events/ios/keyboard-scrolling-distance-expected.txt:
  • fast/events/ios/keyboard-should-not-trigger-resize-expected.txt:
  • fast/events/ios/viewport-zooms-from-element-to-initial-scale-expected.txt:
  • fast/forms/ios/accessory-bar-navigation-expected.txt:
  • fast/forms/ios/focus-input-in-fixed-expected.txt:
  • fast/forms/ios/focus-input-in-iframe-expected.txt:
  • fast/forms/ios/focus-input-via-button-expected.txt:
  • fast/forms/ios/focus-input-via-button-no-scaling-expected.txt:
  • fast/forms/ios/focus-long-textarea-expected.txt:
  • fast/forms/ios/zoom-after-input-tap-expected.txt:
  • fast/forms/ios/zoom-after-input-tap-wide-input-expected.txt:
  • fast/scrolling/ios/subpixel-overflow-scrolling-with-ancestor-expected.txt:
  • fast/viewport/ios/width-is-device-width-expected.txt:
  • fast/visual-viewport/ios/fixed-element-on-bottom-with-keyboard-expected.txt: Added.
  • fast/visual-viewport/ios/fixed-element-on-bottom-with-keyboard.html: Added.
  • fast/visual-viewport/ios/zoomed-focus-in-fixed-expected.txt:
  • platform/ios-simulator/fast/scrolling/ios/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.txt:
  • platform/ios-simulator/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt:
  • platform/ios-simulator/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt:
  • platform/ios-simulator/fast/scrolling/ios/scrolling-content-clip-to-viewport-expected.txt:
  • platform/ios-simulator/fast/scrolling/ios/touch-stacking-expected.txt:
  • scrollingcoordinator/ios/non-stable-viewport-scroll-expected.txt:
  • scrollingcoordinator/ios/ui-scrolling-tree-expected.txt:
10:44 AM Changeset in webkit [209966] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebAssembly: WasmB3IRGenerator uses WarmAny as a ValueRep but expects the incoming value to be a register
https://bugs.webkit.org/show_bug.cgi?id=165989

Reviewed by Mark Lam.

The input should be constrained to a register to match what
the patchpoint code expects.

  • wasm/WasmB3IRGenerator.cpp:
10:13 AM Changeset in webkit [209965] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

warning: the compiler can assume that the address of 'thisObject' will always evaluate to 'true' [-Waddress] in WebCore::JSHTMLDocument::getOwnPropertySlot
https://bugs.webkit.org/show_bug.cgi?id=165987

Reviewed by Mark Lam.

Work around the warning by passing the JSObject pointer this function receives directly to
ASSERT_GC_OBJECT_INHERITS, instead of casting it to a reference and then taking the address
of that, to avoid the -Waddress warning.

  • bindings/js/JSHTMLDocumentCustom.cpp:

(WebCore::JSHTMLDocument::getOwnPropertySlot):

9:18 AM Changeset in webkit [209964] by jer.noble@apple.com
  • 21 edits
    11 adds
    1 delete in trunk

Add implementation for navigator.requestMediaKeySystemAccess()
https://bugs.webkit.org/show_bug.cgi?id=165850

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/encrypted-media/mock-navigator-requestMediaKeySystemAccess.html

Add an implementation of NavigatorEME::requestMediaKeySystemAccess() as well as the CDM
object on which it depends.

  • Modules/encryptedmedia/CDM.cpp: Added.

(WebCore::cdmFactories):
(WebCore::createCDMPrivateForKeySystem):
(WebCore::CDM::registerCDMFactory):
(WebCore::CDM::unregisterCDMFactory):
(WebCore::CDM::supportsKeySystem):
(WebCore::CDM::create):
(WebCore::CDM::CDM):
(WebCore::CDM::getSupportedConfiguration):
(WebCore::CDM::doSupportedConfigurationStep):
(WebCore::CDM::isPersistentType):
(WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):
(WebCore::CDM::getConsentStatus):

  • Modules/encryptedmedia/CDM.h: Added.

(WebCore::CDMFactory::~CDMFactory):
(WebCore::CDM::keySystem):
(WebCore::CDM::createWeakPtr):

  • Modules/encryptedmedia/CDMPrivate.h: Added.

(WebCore::CDMPrivate::~CDMPrivate):

  • Modules/encryptedmedia/NavigatorEME.cpp:

(WebCore::NavigatorEME::requestMediaKeySystemAccess):
(WebCore::tryNextSupportedConfiguration):

  • Modules/encryptedmedia/NavigatorEME.h:
  • Modules/encryptedmedia/NavigatorEME.idl:

To aid in testing, a new Internals object is added, MockCDMFactory, which can be
controlled by LayoutTests to change the behavior of the Mock objects it creates.

  • testing/Internals.cpp:

(WebCore::Internals::registerMockCDM):

  • testing/Internals.h:
  • testing/Internals.idl:
  • testing/MockCDMFactory.cpp: Added.

(WebCore::MockCDMFactory::MockCDMFactory):
(WebCore::MockCDMFactory::~MockCDMFactory):
(WebCore::MockCDMFactory::unregister):
(WebCore::MockCDMFactory::supportsKeySystem):
(WebCore::MockCDMFactory::createCDM):
(WebCore::MockCDM::MockCDM):
(WebCore::MockCDM::supportsInitDataType):
(WebCore::MockCDM::supportsConfiguration):
(WebCore::MockCDM::supportsConfigurationWithRestrictions):
(WebCore::MockCDM::supportsSessionTypeWithConfiguration):
(WebCore::MockCDM::supportsRobustness):
(WebCore::MockCDM::distinctiveIdentifiersRequirement):
(WebCore::MockCDM::persistentStateRequirement):
(WebCore::MockCDM::distinctiveIdentifiersAreUniquePerOriginAndClearable):

  • testing/MockCDMFactory.h: Added.

(WebCore::MockCDMFactory::create):
(WebCore::MockCDMFactory::supportedDataTypes):
(WebCore::MockCDMFactory::setSupportedDataTypes):
(WebCore::MockCDMFactory::supportedRobustness):
(WebCore::MockCDMFactory::setSupportedRobustness):
(WebCore::MockCDMFactory::distinctiveIdentifiersRequirement):
(WebCore::MockCDMFactory::setDistinctiveIdentifiersRequirement):
(WebCore::MockCDMFactory::persistentStateRequirement):
(WebCore::MockCDMFactory::setPersistentStateRequirement):

  • testing/MockCDMFactory.idl: Added.

Move the MediaKeySessionType definition out of the MediaKeys.idl file and into its own.
Move the MediaKeysRequiriment definition out of the MediaKeySystemConfiguration.idl file
and into its own. Generally fix up the .idl files so that they properly work with their
implementation files.

  • Modules/encryptedmedia/MediaKeySessionType.idl: Added.
  • Modules/encryptedmedia/MediaKeySystemAccess.cpp:

(WebCore::MediaKeySystemAccess::create):
(WebCore::MediaKeySystemAccess::MediaKeySystemAccess):
(WebCore::MediaKeySystemAccess::keySystem): Deleted.
(WebCore::MediaKeySystemAccess::getConfiguration): Deleted.

  • Modules/encryptedmedia/MediaKeySystemAccess.h:

(WebCore::MediaKeySystemAccess::keySystem):
(WebCore::MediaKeySystemAccess::getConfiguration):
(WebCore::MediaKeySystemAccess::create): Deleted.

  • Modules/encryptedmedia/MediaKeySystemAccess.idl:
  • Modules/encryptedmedia/MediaKeySystemConfiguration.h:
  • Modules/encryptedmedia/MediaKeySystemConfiguration.idl:
  • Modules/encryptedmedia/MediaKeySystemMediaCapability.idl:
  • Modules/encryptedmedia/MediaKeys.idl:
  • Modules/encryptedmedia/MediaKeysRequirement.idl: Added.
  • Modules/encryptedmedia/MediaKeysRestrictions.h: Added.
  • bindings/js/JSMediaKeySystemAccessCustom.cpp: Removed.

As some of these enums are referenced in the Internals project, they need to be exported
from WebCore correctly. Teach the code generator how to export the symbols generated by
enums.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateEnumerationHeaderContent):

Add new files to the project.

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

LayoutTests:

  • media/encrypted-media/mock-navigator-requestMediaKeySystemAccess-expected.txt: Added.
  • media/encrypted-media/mock-navigator-requestMediaKeySystemAccess.html: Added.
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
9:14 AM Changeset in webkit [209963] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebAssembly: Change a RELEASE_ASSERT_NOT_REACHED to a jit.breakpoint() for now to allow us to run some wasm benchmarks
https://bugs.webkit.org/show_bug.cgi?id=165990

Reviewed by Mark Lam.

  • wasm/WasmBinding.cpp:

(JSC::Wasm::importStubGenerator):

8:42 AM Changeset in webkit [209962] by Darin Adler
  • 4 edits
    2 deletes in trunk/Source/WebCore

Remove WebCore::Dictionary, which is now unused
https://bugs.webkit.org/show_bug.cgi?id=165988

Reviewed by Andreas Kling.

  • CMakeLists.txt: Removed the files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • bindings/js/Dictionary.cpp: Removed.
  • bindings/js/Dictionary.h: Removed.
  • bindings/js/JSBindingsAllInOne.cpp: Removed include of Dictionary.cpp.
2:33 AM Changeset in webkit [209961] by commit-queue@webkit.org
  • 3 edits
    5 adds in trunk

Cloned CachedResource should not have an empty response
https://bugs.webkit.org/show_bug.cgi?id=165947

Patch by Youenn Fablet <youenn@apple.com> on 2016-12-17
Reviewed by Sam Weinig.

Source/WebCore:

Test: http/tests/loading/reusing-cached-stylesheet-from-different-domain.html

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::setBodyDataFrom): Copying the response to the cloned resource.
Even though the issue is appearing for stylesheets only, it is safer to do that for all cloned ressources.

LayoutTests:

This new test is working as follow:

  • A first frame is loaded. As part of it, it will load an absolute URL CSS stylesheet that contains a relative URL to import a CSS stylesheet.

This second stylesheet will make the background as green.

  • Once done, a second frame is loaded (same HTML but from a different domain) with the same absolute URL CSS stylesheet.

The relative URL stylesheet should use the absolute URL of the CSS stylesheet as base.
If it is using the frame as base, the loaded CSS will change background to red.

  • http/tests/loading/resources/cached-stylesheet-from-different-domain-frame.css.php: Added.
  • http/tests/loading/resources/cached-stylesheet-from-different-domain-frame.html: Added.
  • http/tests/loading/resources/imported-stylesheet-varying-according-domain.css.php: Added.
  • http/tests/loading/reusing-cached-stylesheet-from-different-domain-expected.html: Added.
  • http/tests/loading/reusing-cached-stylesheet-from-different-domain.html: Added.

Dec 16, 2016:

11:29 PM Changeset in webkit [209960] by beidson@apple.com
  • 3 edits in trunk/Source/WebCore

IndexedDB: Refactor SQLiteIDBCursor to prepare for cursor prefetching.
https://bugs.webkit.org/show_bug.cgi?id=165978

Reviewed by Alex Christensen.

No new tests (Refactor, no behavior change).

In preparation for cursor prefetching, we need to shift the cursor off of keeping "the current record"
and onto keeping "a deque of fetched records", the first of which is "the current record".

This patch does just that, but with no behavior change; The deque only ever holds 0 or 1 records.

  • Modules/indexeddb/server/SQLiteIDBCursor.cpp:

(WebCore::IDBServer::SQLiteIDBCursor::currentData):
(WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
(WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
(WebCore::IDBServer::SQLiteIDBCursor::prefetch):
(WebCore::IDBServer::SQLiteIDBCursor::advance):
(WebCore::IDBServer::SQLiteIDBCursor::fetch):
(WebCore::IDBServer::SQLiteIDBCursor::fetchNextRecord):
(WebCore::IDBServer::SQLiteIDBCursor::markAsErrored):
(WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
(WebCore::IDBServer::SQLiteIDBCursor::iterate):
(WebCore::IDBServer::SQLiteIDBCursor::currentKey):
(WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
(WebCore::IDBServer::SQLiteIDBCursor::currentValue):
(WebCore::IDBServer::SQLiteIDBCursor::didComplete):
(WebCore::IDBServer::SQLiteIDBCursor::didError):
(WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID):
(WebCore::IDBServer::SQLiteIDBCursor::advanceUnique): Deleted.
(WebCore::IDBServer::SQLiteIDBCursor::advanceOnce): Deleted.
(WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce): Deleted.

  • Modules/indexeddb/server/SQLiteIDBCursor.h:

(WebCore::IDBServer::SQLiteIDBCursor::SQLiteCursorRecord::isTerminalRecord):
(WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID): Deleted.
(WebCore::IDBServer::SQLiteIDBCursor::currentKey): Deleted.
(WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey): Deleted.
(WebCore::IDBServer::SQLiteIDBCursor::currentValue): Deleted.
(WebCore::IDBServer::SQLiteIDBCursor::didComplete): Deleted.
(WebCore::IDBServer::SQLiteIDBCursor::didError): Deleted.

10:42 PM Changeset in webkit [209959] by Darin Adler
  • 21 edits
    4 copies
    4 deletes in trunk

Remove all custom bindings from media streams, using dictionaries instead
https://bugs.webkit.org/show_bug.cgi?id=165943

Reviewed by Sam Weinig.

Source/WebCore:

  • CMakeLists.txt: Added and removed files.
  • DerivedSources.make: Ditto.
  • Modules/mediastream/DoubleRange.h: Added. Moved dictionary here so it can be shared

by both MediaStreamTrack and MediaTrackSupportedConstraints.

  • Modules/mediastream/DoubleRange.idl: Ditto.
  • Modules/mediastream/LongRange.h: Ditto.
  • Modules/mediastream/LongRange.idl: Ditto.
  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::getSupportedConstraints): Changed to return a struct instead
of a reference counted object.

  • Modules/mediastream/MediaDevices.h: Updated for the above.
  • Modules/mediastream/MediaDevices.idl: Added a conditional on the dictionary in this

file; not needed because the conditional on the interface automatically affects the
entire fiel, but for now the style seems to be to put these on all the dictionaries.

  • Modules/mediastream/MediaSourceSettings.cpp: Removed.
  • Modules/mediastream/MediaSourceSettings.h: Removed.
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::getSettings): Changed to return a struct instead of a
reference counted object.
(WebCore::capabilityDoubleRange): Added. Helper for getCapabilities.
(WebCore::capabilityIntRange): Ditto.
(WebCore::capabilityStringVector): Ditto.
(WebCore::capabilityBooleanVector): Ditto.
(WebCore::MediaStreamTrack::getCapabilities): Changed to return a struct instead
of a reference counted object.

  • Modules/mediastream/MediaStreamTrack.h: Updated for the above changes. Also

defined the structs here in the class.

  • Modules/mediastream/MediaStreamTrack.idl: Defined the two dictionaries here and

changed the functions to return them and not use [Custom] any more.

  • Modules/mediastream/MediaTrackConstraints.h: Moved DoubleRange and LongRange out

of this file and into their own headers. Also removed the currently unimplemented
latency and channelCount; there are FIXME comments in the IDL file about eventually
adding these to match the specification.

  • Modules/mediastream/MediaTrackConstraints.idl: Added conditionals, and removed

the unimplemented latency and channelCount.
style of marking everything consistently.

  • Modules/mediastream/MediaTrackSupportedConstraints.h: Replaced this class with

a struct.

  • Modules/mediastream/MediaTrackSupportedConstraints.idl: Replaced this interface

with a dictionary.

  • WebCore.xcodeproj/project.pbxproj: Added and removed files.
  • bindings/js/JSMediaStreamTrackCustom.cpp: Removed.
  • bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp: Removed.
  • platform/mediastream/MediaStreamTrackPrivate.cpp: Removed include of the

MediaSourceSettings.h header.

  • platform/mediastream/MediaStreamTrackPrivate.h: Removed forward declaration of

the MediaSourceSettings class.

LayoutTests:

  • fast/mediastream/MediaDevices-getSupportedConstraints-expected.txt: Updated since the

properties in the dictionaries are now in alphabetical order and because of the test change.

  • fast/mediastream/MediaDevices-getSupportedConstraints.html: Updated to expect some true

and some false rather than some true and some missing.

  • fast/mediastream/MediaStreamTrack-getCapabilities-expected.txt: Updated since the

properties in the dictionaries are now in alphabetical order.

  • fast/mediastream/MediaStreamTrack-getSettings-expected.txt: Ditto.
9:05 PM Changeset in webkit [209958] by commit-queue@webkit.org
  • 5 edits in trunk/Source

JSContext Inspector: Avoid some possible exceptions inspecting a JSContext
https://bugs.webkit.org/show_bug.cgi?id=165986
<rdar://problem/29551379>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-16
Reviewed by Matt Baker.

Source/JavaScriptCore:

  • inspector/InjectedScriptSource.js:

(InjectedScript.prototype.processProperties):
Prefer String.prototype.endsWith now that it is available.

(InjectedScript.prototype._describe):
Prefer Function.prototype.toString for converting functions to String.
Previously we were doing String(f) which would to Symbol.toPrimitive
conversion which seems unnecessary here.

Source/WebInspectorUI:

  • UserInterface/Base/Main.js:

There will not be a main frame if we are debugging a JSContext.
In those cases do not change the title.

  • UserInterface/Views/ResourceSidebarPanel.js:

(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
There may not be a parent folder in JavaScript inspection. In that case
ScriptTreeElements are added to the Top Level, not folders.

8:04 PM Changeset in webkit [209957] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk

Deleting a character converted from pinyin after an image causes a Safari crash
https://bugs.webkit.org/show_bug.cgi?id=165839
Source/WebKit2:

Reviewed by Darin Adler.

The crash was caused by the payload of the IPC not being decoded correctly when the encoded attributed string
contains a NSTextAttachment but send<> would still gladly send it to the UIProcess.

Fixed it by omitting the image as done in r176412 since encoding NSFileWrapper, etc... would require
quite a bit of work, and IME doesn't really need to see the image in its attributed string.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::attributedSubstringForCharacterRangeAsync): Fixed the bug.

Tools:

<rdar://problem/27951933>

Reviewed by Wenson Hsieh.

Add a WebKit API test to call attributedSubstringForProposedRange on a WKWebView
while the proposed range contains an image. This should not cause a WebProcess to crash
or send an invalid message to the UIProcess.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/chinese-character-with-image.html: Added.
  • TestWebKitAPI/Tests/WebKit2/mac/AttributedSubstringForProposedRangeWithImage.mm: Added.

(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::processDidCrash):
(TestWebKitAPI::invalidMessageFunction):
(TestWebKitAPI::WebKit2.AttributedSubstringForProposedRangeWithImage):

7:32 PM Changeset in webkit [209956] by Michael Catanzaro
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix GCC 6 build failure after r209952

Return false, not nullptr, in function returning bool.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitJumpViaFinallyIfNeeded):

7:19 PM Changeset in webkit [209955] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebAssembly: We still have some incorrect parsing productions inside unreachable code
https://bugs.webkit.org/show_bug.cgi?id=165981

Reviewed by Keith Miller.

This hardens our parsing for CallIndirect and Loop/Block/If to be exactly like their reachable variant.

It also fixes a more nefarious bug in which we were decoding an extra varuint32
for Br/BrIf inside unreachable code.

  • wasm/WasmFunctionParser.h:
6:41 PM Changeset in webkit [209954] by fpizlo@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

CellState should have members with accurate names
https://bugs.webkit.org/show_bug.cgi?id=165969

Reviewed by Mark Lam.

This once again renames the members in CellState. I wanted to convey the following
pieces of information in the names:

  • What does the state mean for Generational GC?
  • What does the state mean for Concurrent GC?
  • Does the state guarantee what it means, or is there some contingency?


The names I came up with are:

PossiblyOldOrBlack: An object in this state may be old, or may be black, depending on

other things. If the mark bit is set then the object is either black or being
blackened as we speak. It's going to survive the GC, so it will be old, but may be
new now. In between GCs, objects in this state are definitely old. If the mark bit
is not set, then the object is actually old and white.


DefinitelyNewAndWhite: The object was just allocated so it is white (not marked) and

new.


DefinitelyGrey: The object is definitely grey - it will be rescanned in the future. It

may be new or old depending on other things.

  • heap/CellState.h:
  • heap/Heap.cpp:

(JSC::Heap::addToRememberedSet):
(JSC::Heap::writeBarrierSlowPath):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendJSCellOrAuxiliary):
(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
(JSC::SlotVisitor::appendToMarkStack):
(JSC::SlotVisitor::visitChildren):

  • runtime/JSCellInlines.h:

(JSC::JSCell::JSCell):

  • runtime/StructureIDBlob.h:

(JSC::StructureIDBlob::StructureIDBlob):

5:07 PM Changeset in webkit [209953] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

B3::DoubleToFloatReduction will accidentally convince itself it converted a Phi from Double to Float and then convert uses of that Phi into a use of FloatToDouble(@Phi)
https://bugs.webkit.org/show_bug.cgi?id=165946

Reviewed by Keith Miller.

This was happening because the phase will convert some Phi nodes
from Double to Float. However, one place that did this conversion
forgot to first check if the Phi was already a Float. If it's already
a Float, a later part of the phase will be buggy if the phase claims that it has
converted it from Double->Float. The reason is that at the end of the
phase, we'll look for all uses of former Double Phi nodes and make them
be a use of ConvertFloatToDouble on the Phi, instead of a use of the Phi itself.
This is clearly wrong if the Phi were Float to begin with (and
therefore, the uses were Float uses to begin with).

  • b3/B3ReduceDoubleToFloat.cpp:
  • b3/testb3.cpp:

(JSC::B3::testReduceFloatToDoubleValidates):
(JSC::B3::run):

5:06 PM Changeset in webkit [209952] by mark.lam@apple.com
  • 8 edits
    2 adds in trunk

JSTests:
De-duplicate finally blocks.
https://bugs.webkit.org/show_bug.cgi?id=160168

Reviewed by Keith Miller.

  • stress/deeply-nested-finallys.js: Added.
  • Tests many levels of finally nesting. This causes the old code to hang (and crashes eventually) while trying to generate bytecode for the exponentially duplicated finally blocks. The new code completes this test almost instantly.
  • stress/test-finally.js: Added.
  • Tests control flow through various permutations of finally blocks.

Source/JavaScriptCore:
De-duplicate finally blocks.
https://bugs.webkit.org/show_bug.cgi?id=160168

Reviewed by Keith Miller.

JS execution can arrive at a finally block when there are abrupt completions from
its try or catch block. The abrupt completion types include Break,
Continue, Return, and Throw. The non-abrupt completion type is called Normal
(i.e. the case of a try block falling through to the finally block).

Previously, we enable each of these paths for abrupt completion (except for Throw)
to run the finally block code by duplicating the finally block code at each of
the sites that trigger those completions. This patch fixes the implementation so
that each of these abrupt completions will set a finallyActionRegister (plus a
finallyReturnValueRegister for CompletionType::Return) and then jump to the
relevant finally blocks, and continue to thread through subsequent outer finally
blocks until execution reaches the outermost finally block that the completion
type dictates. We no longer duplicate the finally block code.

The implementation details:

  1. We allocate a pair of finallyActionRegister and finallyReturnValueRegister just before entering the outermost try-catch-finally scope.

On allocating the registers, we set them to the empty JSValue. This serves
to set the completion type to CompletionType::Normal (see (2) below).

  1. The finallyActionRegister serves 2 purpose:
    1. indicates the CompletionType that triggered entry into the finally block.

This is how we encode the completion type in the finallyActionRegister:

  1. CompletionType::Normal
    • finallyActionRegister is set to the empty JSValue.
  2. CompletionType::Break
    • finallyActionRegister is set to the int jumpID for the site of the break statement.
  3. CompletionType::Continue
    • finallyActionRegister is set to the int jumpID for the site of the continue statement.
  4. CompletionType::Return
    • finallyActionRegister is set to CompletionType::Return as an int JSValue.
    • finallyReturnValueRegister is set to the value to be returned.
  5. CompletionType::Throw
    • finallyActionRegister is set to the exception object that was caught by the finally block.

Hence, if the finallyActionRegister can either be:

  1. empty i.e. we're handling CompletionType::Normal.
  2. an int JSValue i.e. we're handling CompletionType::Break, Continue, or Return.
  3. an object i.e. we're handling CompletionType::Throw.
  1. stores the exception caught in the finally block if we're handing CompletionType::Throw.
  1. Each finally block will have 2 entries:
    1. the entry via throw.
    2. the normal entry.

The entry via throw is recorded in the codeBlock's exception table, and can
only be jumped to by the VM's exception handling mechanism.

The normal entry is recorded in a FinallyContext (at bytecode generation time
only) and is jumped to when we want enter the finally block due any of the
other CompletionTypes.

  1. CompletionType::Normal ====================== We encounter this when falling through from a try or catch block to the finally block.


For the try block case, since finallyActionRegister is set to Normal by default,
there's nothing more that needs to be done.

For the catch block case, since we entered the catch block with an exception,
finallyActionRegister may be set to Throw. We'll need to set it to Normal
before jumping to the finally block's normal entry.

CompletionType::Break
=====================
When we emit bytecode for the BreakNode, we check if we have any FinallyContexts
that we need to service before jumping to the breakTarget. If we do, then:

  1. we'll register a jumpID along with the breakTarget with the outermost FinallyContext.
  2. we'll also increment the numberOfBreaksOrContinues count in each FinallyContext from the innermost to the outermost.
  3. instead of emitting bytecode to jump to the breakTarget, we:
    1. emit bytecode to set finallyActionRegister to the jumpID.
    2. emit bytecode to jump to the normal entry of the innermost finally block.

Each finally block will take care of cascading to the next outer finally block
as needed (see (5) below).

CompletionType::Continue
========================
Since continues and breaks work the same way (i.e. with a jump), we handle this
exactly the same way as CompletionType::Break, except that we use the
continueTarget instead of the breakTarget.

CompletionType::Return
======================
When we emit bytecode for the ReturnNode, we check if we have any FinallyContexts
at all on the m_controlFlowScopeStack.

If so, then instead of emitting op_ret, we:

  1. emit bytecode to set finallyActionRegister to the CompletionType::Return.
  2. emit bytecode to move the return value into finallyReturnValueRegister.
  3. emit bytecode to jump to the normal entry of the innermost finally block.

Each finally block will take care of cascading to the next outer finally block
as needed (see (5) below).

CompletionType::Throw
======================
The op_catch of a finally block will always store the caught exception object
in the finallyActionRegister. This means we're handling CompletionType::Throw
(see (2) above).

  1. What happens in each finally block? ================================== Only the finally block's entry via throw will have an op_catch that catches the pending exception (and stores it in the finallyActionRegister). This throw entry then falls through to the normal entry.

The finally block's normal entry will restore the scope of the finally block
and proceed to execute its code.

At the end of the finally block (see emitFinallyCompletion()), the finally
block will check the finallyActionRegister for each completion type in the
following order:


  1. CompletionType::Normal: jump to the code after the finally block as designated by a normalCompletion label.
  1. CompletionType::Break and Continue: If the FinallyContext for this block has registered FinallyJumps, we'll check for the jumpIDs against the finallyActionRegister. If the jumpID matches, jump to the corresponding jumpTarget.

If no jumpIDs match but the FinallyContext's numberOfBreaksOrContinues is
greater than the number of registered FinallyJumps, then this means that
we have a Break or Continue that needs to be handled by an outer finally
block. In that case, jump to the outer finally block's normal entry.


  1. CompletionType::Return: If this finally block is not the outermost and finallyActionRegister contains CompletionType::Return, then jump to the outer finally block's normal entry.

Otherwise, if this finally block is the outermost and finallyActionRegister
contains CompletionType::Return, then execute op_ret and return the value
in finallyReturnValueRegister.

  1. CompletionType::Throw: If we're not handling any of the above cases, then just throw the finallyActionRegister which contains the exception to re-throw.
  1. restoreScopeRegister()


Since the needed scope objects are always stored in a local, we can restore
the scope register by simply moving from that local instead of going through
op_get_parent_scope.

  1. m_controlFlowScopeStack needs to be a SegmentedVector instead of a Vector. This makes it easier to keep a pointer to the FinallyContext on that stack, and not have to worry about the vector being realloc'ed due to resizing.

Performance appears to be neutral both on ES6SampleBench (run via cli) and the
JSC benchmarks.

Relevant spec references:
https://tc39.github.io/ecma262/#sec-completion-record-specification-type
https://tc39.github.io/ecma262/#sec-try-statement-runtime-semantics-evaluation

  • bytecode/HandlerInfo.h:

(JSC::HandlerInfoBase::typeName):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitReturn):
(JSC::BytecodeGenerator::pushFinallyControlFlowScope):
(JSC::BytecodeGenerator::popFinallyControlFlowScope):
(JSC::BytecodeGenerator::allocateAndEmitScope):
(JSC::BytecodeGenerator::pushTry):
(JSC::BytecodeGenerator::popTry):
(JSC::BytecodeGenerator::emitCatch):
(JSC::BytecodeGenerator::restoreScopeRegister):
(JSC::BytecodeGenerator::labelScopeDepthToLexicalScopeIndex):
(JSC::BytecodeGenerator::labelScopeDepth):
(JSC::BytecodeGenerator::pushLocalControlFlowScope):
(JSC::BytecodeGenerator::popLocalControlFlowScope):
(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::emitIsNumber):
(JSC::BytecodeGenerator::emitYield):
(JSC::BytecodeGenerator::emitDelegateYield):
(JSC::BytecodeGenerator::emitJumpViaFinallyIfNeeded):
(JSC::BytecodeGenerator::emitReturnViaFinallyIfNeeded):
(JSC::BytecodeGenerator::emitFinallyCompletion):
(JSC::BytecodeGenerator::allocateFinallyRegisters):
(JSC::BytecodeGenerator::releaseFinallyRegisters):
(JSC::BytecodeGenerator::emitCompareFinallyActionAndJumpIf):
(JSC::BytecodeGenerator::pushIteratorCloseControlFlowScope): Deleted.
(JSC::BytecodeGenerator::popIteratorCloseControlFlowScope): Deleted.
(JSC::BytecodeGenerator::emitComplexPopScopes): Deleted.
(JSC::BytecodeGenerator::emitPopScopes): Deleted.
(JSC::BytecodeGenerator::popTryAndEmitCatch): Deleted.

  • bytecompiler/BytecodeGenerator.h:

(JSC::FinallyJump::FinallyJump):
(JSC::FinallyContext::FinallyContext):
(JSC::FinallyContext::outerContext):
(JSC::FinallyContext::finallyLabel):
(JSC::FinallyContext::depth):
(JSC::FinallyContext::numberOfBreaksOrContinues):
(JSC::FinallyContext::incNumberOfBreaksOrContinues):
(JSC::FinallyContext::handlesReturns):
(JSC::FinallyContext::setHandlesReturns):
(JSC::FinallyContext::registerJump):
(JSC::FinallyContext::numberOfJumps):
(JSC::FinallyContext::jumps):
(JSC::ControlFlowScope::ControlFlowScope):
(JSC::ControlFlowScope::isLabelScope):
(JSC::ControlFlowScope::isFinallyScope):
(JSC::BytecodeGenerator::currentLexicalScopeIndex):
(JSC::BytecodeGenerator::FinallyRegistersScope::FinallyRegistersScope):
(JSC::BytecodeGenerator::FinallyRegistersScope::~FinallyRegistersScope):
(JSC::BytecodeGenerator::finallyActionRegister):
(JSC::BytecodeGenerator::finallyReturnValueRegister):
(JSC::BytecodeGenerator::emitSetFinallyActionToNormalCompletion):
(JSC::BytecodeGenerator::emitSetFinallyActionToReturnCompletion):
(JSC::BytecodeGenerator::emitSetFinallyActionToJumpID):
(JSC::BytecodeGenerator::emitSetFinallyReturnValueRegister):
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNormalCompletion):
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotJump):
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsReturnCompletion):
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotReturnCompletion):
(JSC::BytecodeGenerator::emitJumpIfFinallyActionIsNotThrowCompletion):
(JSC::BytecodeGenerator::emitJumpIfCompletionTypeIsThrow):
(JSC::BytecodeGenerator::bytecodeOffsetToJumpID):
(JSC::BytecodeGenerator::isInFinallyBlock): Deleted.

  • bytecompiler/NodesCodegen.cpp:

(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::TryNode::emitBytecode):

Source/WTF:
Add predecessor info to dumps from JSC_dumpBytecodeLivenessResults=true.
https://bugs.webkit.org/show_bug.cgi?id=165958

Reviewed by Keith Miller.

Added some methods to bring SegmentedVector closer to parity with Vector.

  • wtf/SegmentedVector.h:

(WTF::SegmentedVector::first):
(WTF::SegmentedVector::last):
(WTF::SegmentedVector::takeLast):

4:48 PM Changeset in webkit [209951] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Possible nullptr dereference when applying pagination to viewport
https://bugs.webkit.org/show_bug.cgi?id=165926

Reviewed by Simon Fraser.

Static analysis found a code path where a null dereference could occur.

  • page/FrameView.cpp:

(WebCore::FrameView::applyPaginationToViewport):

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

New tag.

3:59 PM Changeset in webkit [209949] by weinig@apple.com
  • 3 edits in trunk/LayoutTests

Fix failing test.

  • http/tests/ssl/applepay/ApplePaySession-expected.txt:
  • http/tests/ssl/applepay/ApplePaySession.html:

Update results to match latest IDL.

3:51 PM Changeset in webkit [209948] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Fix the Windows build.

Unreviewed build fix.

  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
3:32 PM Changeset in webkit [209947] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Yet another attempt to fix the Windows build after r209936.

Unreviewed build fix.

  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
3:24 PM Changeset in webkit [209946] by achristensen@apple.com
  • 4 edits in trunk/Source/WebCore

Use initEvent quirk added in r207908 for Flipboard
https://bugs.webkit.org/show_bug.cgi?id=165974
<rdar://problem/28264190>

Reviewed by Chris Dumez.

  • dom/Event.cpp:

(WebCore::Event::initEventForBindings):

  • platform/RuntimeApplicationChecks.h:
  • platform/RuntimeApplicationChecks.mm:

(WebCore::IOSApplication::isFlipboard):
Flipboard also has JavaScript content that calls initEvent with not enough arguments.

3:17 PM Changeset in webkit [209945] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[iOS] Align HTML from validation popover style with Copy/Paste callout bar
https://bugs.webkit.org/show_bug.cgi?id=165973
<rdar://problem/29336638>

Reviewed by Simon Fraser.

Tweak font size and padding of the HTML from validation popover to
match the style of the Copy/Paste callout bar on iOS.

  • platform/ios/ValidationBubbleIOS.mm:

(WebCore::ValidationBubble::ValidationBubble):

3:12 PM Changeset in webkit [209944] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Another attempt to fix the Windows build after r209936.

Unreviewed build fix.

  • CMakeLists.txt:
3:10 PM Changeset in webkit [209943] by aestes@apple.com
  • 22 edits
    5 adds in trunk

Add a setting to suppress keyboard input during provisional navigation
https://bugs.webkit.org/show_bug.cgi?id=165830

Reviewed by Brent Fulgham.

Source/WebCore:

Added a setting that suppresses keyboard input during provisional navigation. When the
setting is enabled, DOM propogation of keyboard input events (KeyboardEvents,
CompositionEvents, InputEvents, and some TextEvents) is suppressed, and text insertion is
disabled in the editor.

Non-editing default event handling still occurs, for instance keyboard scrolling, access
keys, and focus navigation.

Test: http/tests/navigation/keyboard-events-during-provisional-navigation.html

  • dom/CompositionEvent.h: Added a type trait specialization.
  • dom/EventDispatcher.cpp:

(WebCore::shouldSuppressEventDispatchInDOM): Added. Returns true if the event is trusted,
FrameLoader::shouldSuppressKeyboardInput() returns true, and the event is a
CompositionEvent, InputEvent, KeyboardEvent, or keyboard/composition TextEvent.
(WebCore::EventDispatcher::dispatchEvent): Called stopPropogation() on the event if
shouldSuppressEventDispatchInDOM() returns true.

  • dom/InputEvent.h: Removed the inline no-op destructor so that DataTransfer does not need

to be a complete type in every translation unit that includes this header. Added a type
trait specialization.

  • dom/TextEvent.h: Added isKeyboard() to determine if m_inputType is TextEventInputKeyboard.
  • editing/Editor.cpp:

(WebCore::Editor::shouldInsertText): Returned false if
FrameLoader::shouldSuppressKeyboardInput() returns true and the action is
EditorInsertActionTyped.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::shouldSuppressKeyboardInput): Added. Returns true if
Settings::shouldSuppressKeyboardInputDuringProvisionalNavigation() returns true and the
state is FrameStateProvisional.

  • loader/FrameLoader.h: Declared shouldSuppressKeyboardInput().
  • page/EventHandler.h: Exported accessKeyModifiers().
  • page/Settings.in: Defined shouldSuppressKeyboardInputDuringProvisionalNavigation with an

initial value of false.

  • testing/Internals.cpp:

(WebCore::Internals::accessKeyModifiers): Added. Returns a vector of strings representing
the access key modifiers.

  • testing/Internals.h: Declared accessKeyModifiers().
  • testing/Internals.idl: Exposed accessKeyModifiers() on the internals object.

Source/WebKit2:

  • Shared/WebPreferencesDefinitions.h: Defined

shouldSuppressKeyboardDOMEventsDuringProvisionalNavigation.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetShouldSuppressKeyboardInputDuringProvisionalNavigation): Added.
(WKPreferencesGetShouldSuppressKeyboardInputDuringProvisionalNavigation): Added.

  • UIProcess/API/C/WKPreferencesRefPrivate.h: Declared a getter and setter for the new

preference.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _shouldSuppressKeyboardInputDuringProvisionalNavigation]): Added.
(-[WKPreferences _setShouldSuppressKeyboardInputDuringProvisionalNavigation:]): Added.

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h: Declared a property for the new preference.
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences): Mapped the new preference to its corresponding
WebCore::Setting.

LayoutTests:

  • http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt: Added.
  • http/tests/navigation/keyboard-events-during-provisional-navigation.html: Added.
  • http/tests/navigation/resources/keyboard-events-after-navigation.html: Added.
  • http/tests/navigation/resources/keyboard-events-test.js: Added.

(runTest.eventHandler):
(runTest):

  • http/tests/navigation/resources/never-respond.php: Added.
  • platform/ios-simulator/TestExpectations:
3:03 PM Changeset in webkit [209942] by beidson@apple.com
  • 3 edits in trunk/Source/WebCore

More SQLiteIDBCursor refactoring.
https://bugs.webkit.org/show_bug.cgi?id=165956

Reviewed by Tim Horton.

No new tests (No behavior change).

This is a simple patch that encapsulates the current state of the cursor in one structure
which will allow for storing multiple-such states in the future (to support prefetching).

  • Modules/indexeddb/server/SQLiteIDBCursor.cpp:

(WebCore::IDBServer::SQLiteIDBCursor::currentData):
(WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
(WebCore::IDBServer::SQLiteIDBCursor::advance):
(WebCore::IDBServer::SQLiteIDBCursor::advanceUnique):
(WebCore::IDBServer::SQLiteIDBCursor::markAsErrored):
(WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
(WebCore::IDBServer::SQLiteIDBCursor::iterate):

  • Modules/indexeddb/server/SQLiteIDBCursor.h:

(WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID):
(WebCore::IDBServer::SQLiteIDBCursor::currentKey):
(WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
(WebCore::IDBServer::SQLiteIDBCursor::currentValue):
(WebCore::IDBServer::SQLiteIDBCursor::didComplete):
(WebCore::IDBServer::SQLiteIDBCursor::didError):

3:00 PM Changeset in webkit [209941] by Chris Dumez
  • 5 edits
    3 adds in trunk

HTML form validation bubble should be dismissed on navigation
https://bugs.webkit.org/show_bug.cgi?id=165960
<rdar://problem/29668086>

Reviewed by Simon Fraser.

Source/WebKit/mac:

Dismiss HTML form validation bubble on top-level navigation on Mac WK1.

  • WebView/WebView.mm:

(-[WebView _didStartProvisionalLoadForFrame:]):

Source/WebKit2:

Dismiss HTML form validation bubble on top-level navigation on WK2.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):

LayoutTests:

Add layout test coverage.

  • http/tests/navigation/navigation-dismisses-validation-bubbles-expected.txt: Added.
  • http/tests/navigation/navigation-dismisses-validation-bubbles.html: Added.
  • http/tests/navigation/resources/check-validation-bubble-not-visible.html: Added.
2:33 PM Changeset in webkit [209940] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Follow-up build fix after r209936; also rename MockCDM -> LegacyMockCDM in
CMakeLists.txt.

  • CMakeLists.txt:
2:29 PM Changeset in webkit [209939] by weinig@apple.com
  • 7 edits
    2 deletes in trunk/Source/WebCore

[Bindings] Remove use of Dictionary/ArrayValue in CDMSessionClearKey
https://bugs.webkit.org/show_bug.cgi?id=165961

Reviewed by Darin Adler.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:

Remove ArrayValue.h/cpp

  • bindings/js/ArrayValue.cpp: Removed.
  • bindings/js/ArrayValue.h: Removed.
  • bindings/js/Dictionary.cpp:
  • bindings/js/Dictionary.h:

Remove support for ArrayValue.

  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:

(WebCore::CDMSessionClearKey::update):
Replace use of Dictionary/ArrayValue with direct JSObject functions. This
should really be replaced with a JSON parser that does not require round
tripping through JavaScript objects.

2:26 PM Changeset in webkit [209938] by msaboff@apple.com
  • 3 edits in trunk/Source/WTF

REGRESSION: HipChat and Mail sometimes hang beneath JSC::Heap::lastChanceToFinalize()
https://bugs.webkit.org/show_bug.cgi?id=165962

Reviewed by Filip Pizlo.

There is an inherent race in Condition::waitFor() where the timeout can happen just before
a notify from another thread.

Fixed this by adding a condition variable and flag to each AutomaticThread. The flag
is used to signify to a notifying thread that the thread is waiting. That flag is set
in the waiting thread before calling waitFor() and cleared by another thread when it
notifies the thread. The access to that flag happens when the lock is held.
Now the waiting thread checks if the flag after a timeout to see that it in fact should
proceed like a normal notification.

The added condition variable allows us to target a specific thread. We used to keep a list
of waiting threads, now we keep a list of all threads. To notify one thread, we look for
a waiting thread and notify it directly. If we can't find a waiting thread, we start a
sleeping thread.

We notify all threads by waking all waiting threads and starting all sleeping threads.

  • wtf/AutomaticThread.cpp:

(WTF::AutomaticThreadCondition::notifyOne):
(WTF::AutomaticThreadCondition::notifyAll):
(WTF::AutomaticThread::isWaiting):
(WTF::AutomaticThread::notify):
(WTF::AutomaticThread::start):

  • wtf/AutomaticThread.h:
2:05 PM Changeset in webkit [209937] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebKit2

Small refactor: Use HashCountedSet rather than HashMap<..., int> to store client counts in WebPlaybackSessionManager{,Proxy}.
https://bugs.webkit.org/show_bug.cgi?id=165807

Reviewed by Eric Carlson.

  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:

(WebKit::WebPlaybackSessionManagerProxy::addClientForContext):
(WebKit::WebPlaybackSessionManagerProxy::removeClientForContext):

  • WebProcess/cocoa/WebPlaybackSessionManager.h:
  • WebProcess/cocoa/WebPlaybackSessionManager.mm:

(WebKit::WebPlaybackSessionManager::addClientForContext):
(WebKit::WebPlaybackSessionManager::removeClientForContext):

1:52 PM Changeset in webkit [209936] by jer.noble@apple.com
  • 16 edits
    12 moves in trunk/Source/WebCore

Move existing CDM* implementations into modules/encryptedmedia/legacy
https://bugs.webkit.org/show_bug.cgi?id=165823

Rubber-stamped by Sam Weinig.

  • Modules/encryptedmedia/legacy/LegacyCDM.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDM.cpp.

(WebCore::CDMFactory::CDMFactory):
(WebCore::installedCDMFactories):
(WebCore::CDM::registerCDMFactory):
(WebCore::CDMFactoryForKeySystem):
(WebCore::CDM::supportsKeySystem):
(WebCore::CDM::keySystemSupportsMimeType):
(WebCore::CDM::create):
(WebCore::CDM::CDM):
(WebCore::CDM::~CDM):
(WebCore::CDM::supportsMIMEType):
(WebCore::CDM::createSession):
(WebCore::CDM::mediaPlayer):

  • Modules/encryptedmedia/legacy/LegacyCDM.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDM.h.

(WebCore::CDMClient::~CDMClient):
(WebCore::CDM::keySystem):
(WebCore::CDM::client):
(WebCore::CDM::setClient):

  • Modules/encryptedmedia/legacy/LegacyCDMPrivate.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivate.h.

(WebCore::CDMPrivateInterface::CDMPrivateInterface):
(WebCore::CDMPrivateInterface::~CDMPrivateInterface):

  • Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.cpp.

(WebCore::CDMPrivateClearKey::supportsKeySystem):
(WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType):
(WebCore::CDMPrivateClearKey::supportsMIMEType):
(WebCore::CDMPrivateClearKey::createSession):

  • Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.h.

(WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
(WebCore::CDMPrivateClearKey::~CDMPrivateClearKey):

  • Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp.

(WebCore::CDMPrivateMediaPlayer::supportsKeySystem):
(WebCore::CDMPrivateMediaPlayer::supportsKeySystemAndMimeType):
(WebCore::CDMPrivateMediaPlayer::supportsMIMEType):
(WebCore::CDMPrivateMediaPlayer::createSession):

  • Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateMediaPlayer.h.

(WebCore::CDMPrivateMediaPlayer::CDMPrivateMediaPlayer):
(WebCore::CDMPrivateMediaPlayer::~CDMPrivateMediaPlayer):
(WebCore::CDMPrivateMediaPlayer::cdm):

  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp.

(WebCore::clearKeyVM):
(WebCore::CDMSessionClearKey::CDMSessionClearKey):
(WebCore::CDMSessionClearKey::~CDMSessionClearKey):
(WebCore::CDMSessionClearKey::generateKeyRequest):
(WebCore::CDMSessionClearKey::releaseKeys):
(WebCore::CDMSessionClearKey::update):
(WebCore::CDMSessionClearKey::cachedKeyForKeyID):

  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h.
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/LegacyCDMSession.h: Renamed from Source/WebCore/platform/graphics/CDMSession.h.

(WebCore::CDMSessionClient::~CDMSessionClient):
(WebCore::CDMSession::CDMSession):
(WebCore::CDMSession::~CDMSession):
(WebCore::CDMSession::type):
(WebCore::CDMSession::cachedKeyForKeyID):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
  • platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
  • platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
  • testing/Internals.cpp:
  • testing/LegacyMockCDM.cpp: Renamed from Source/WebCore/testing/MockCDM.cpp.

(WebCore::MockCDMSession::~MockCDMSession):
(WebCore::MockCDM::supportsKeySystem):
(WebCore::MockCDM::supportsKeySystemAndMimeType):
(WebCore::MockCDM::supportsMIMEType):
(WebCore::MockCDM::createSession):
(WebCore::initDataPrefix):
(WebCore::keyPrefix):
(WebCore::keyRequest):
(WebCore::generateSessionId):
(WebCore::MockCDMSession::MockCDMSession):
(WebCore::MockCDMSession::generateKeyRequest):
(WebCore::MockCDMSession::releaseKeys):
(WebCore::MockCDMSession::update):

  • testing/LegacyMockCDM.h: Renamed from Source/WebCore/testing/MockCDM.h.

(WebCore::MockCDM::MockCDM):
(WebCore::MockCDM::~MockCDM):

1:42 PM Changeset in webkit [209935] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Move the skip expectation for fast/visual-viewport/ios/zoomed-focus-in-fixed.html to ios-simulator-wk2.

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator/TestExpectations:
1:36 PM Changeset in webkit [209934] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add missing cases to parseUnreachableExpression and cleanup FunctionParser
https://bugs.webkit.org/show_bug.cgi?id=165966

Reviewed by Saam Barati.

This patch adds a number of missing cases to the Wasm FunctionParser's unreachable
code decoder. It also, removes unneeded OpType namespaces where they were not
needed and has the unary / binary macros cover all the cases rather than
just the simple cases.

  • wasm/WasmFunctionParser.h:
1:20 PM Changeset in webkit [209933] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r209882): Opening find banner in editor causes UI to hang
https://bugs.webkit.org/show_bug.cgi?id=165967

Reviewed by Timothy Hatcher.

  • UserInterface/Views/ContentBrowser.js:

(WebInspector.ContentBrowser.prototype._findBannerDidShow):
Showing the find banner should cause search results to be refreshed only
if it contains query text.

12:44 PM Changeset in webkit [209932] by akling@apple.com
  • 5 edits in trunk

Subframes going into page cache don't need to resetScrollbars().
<https://webkit.org/b/163750>
<rdar://problem/29273020>

Reviewed by Antti Koivisto.

Source/WebCore:

The main frame is the only frame that switches its FrameView when using the page cache,
subframes just suspend their DOM and wait around to be either killed or restored.

Thus there is no reason for subframes to reset their FrameView's scrollbars when going
into page cache, since nothing affects them while cached, and their layout should end up
identical when restoring.

This was causing some flakiness with subframe scrollbars jumping between different sizes
in when restoring from page cache in macOS/WK1. This change makes the behavior consistent
in both WK1 and WK2, and removes the flakiness.

  • dom/Document.cpp:

(WebCore::Document::setPageCacheState):

LayoutTests:

Unskip compositing/iframes/page-cache-layer-tree.html on mac-wk1 and fix up the
result now that WK2 behaves correctly as well.

Both DRT and WTR run with scrollbars in "always on" mode, so the correct dimensions
for the 300x150 iframe layers here are 285x135.

  • compositing/iframes/page-cache-layer-tree-expected.txt:
  • platform/mac-wk1/TestExpectations:
12:24 PM Changeset in webkit [209931] by Wenson Hsieh
  • 27 edits
    10 adds in trunk

Visual viewports: carets and selection UI are incorrectly positioned when editing fixed elements
https://bugs.webkit.org/show_bug.cgi?id=165767
<rdar://problem/29602382>

Reviewed by Simon Fraser.

Source/WebCore:

When changing the layout viewport override, mark viewport-constrained objects as needing layout. If only the
width and height of the old and new layout viewports are compared, EditorState info (namely selection and caret
rects) that depends on the document location of fixed elements may be stale immediately after the layout
viewport override changes and before layout occurs.

This caused one of the tests (fixed-caret-position-after-scroll.html) to occasionally fail.

Tests: editing/caret/ios/absolute-caret-position-after-scroll.html

editing/caret/ios/fixed-caret-position-after-scroll.html
editing/selection/ios/absolute-selection-after-scroll.html
editing/selection/ios/fixed-selection-after-scroll.html

  • page/FrameView.cpp:

(WebCore::FrameView::setLayoutViewportOverrideRect):

Source/WebKit2:

When focusing an input, the position of the caret on iOS is determined by the overridden layout viewport rect in
the web process. However, this rect is not updated until the end the scroll gesture. Whereas this is fine for
non-fixed inputs since their document location does not change, fixed inputs effectively change their position
in the document as the user scrolls. This causes the caret to be 'left behind' in the document position it was
in at the start of the scroll. To fix this, we deactivate the selection when exiting stable state if the
assisted node is in a fixed position container, and reenable it upon receiving the next stable state EditorState
update (as indicated by postLayoutData().isStableStateUpdate). Additionally, we apply similar treatment to the
web selection assistant -- this time, we need to force the selection view to hide (analagous to deactivating
the text selection assistant) and show it again upon receiving the next selection change update when the WebPage
(in the web process) is stable.

Furthermore, adds test support for querying text caret and selection rects, as well as perform a callback after
the WebPage has indicated that it is stable, both as SPI on the WKWebView.

Covered by 4 new layout tests in fast/editing/caret/ios and fast/editing/selection/ios.

  • Platform/spi/ios/UIKitSPI.h:
  • Shared/EditorState.cpp:

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

  • Shared/EditorState.h:

Introduce isStableStateUpdate, which is true when the WebPage is known to be in stable state, as well as
insideFixedPosition, which is true when the current selection is inside a fixed position container.

  • Shared/mac/RemoteLayerTreeTransaction.h:

(WebKit::RemoteLayerTreeTransaction::isInStableState):
(WebKit::RemoteLayerTreeTransaction::setIsInStableState):

  • Shared/mac/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
(WebKit::RemoteLayerTreeTransaction::description):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _uiTextCaretRect]):

Introduced a new SPI method for fetching the current rect of the text assistant's caret view, at keyPath
"selectionView.selection.caretRect".

(-[WKWebView _uiTextSelectionRects]):

Renamed (and refactored) from _uiTextSelectionRectViews, which was previously fetching an array of UIViews. I
found this to cause character-granularity-rect.html to fail due to the array of UIViews here being empty, so I
refactored this to simply return an array of rects from the keyPath "selectionView.selection.selectionRects" for
the text selection assistant and @"selectionView.selectionRects" for the web selection assistant.

(-[WKWebView _doAfterNextStablePresentationUpdate:]):

Runs the given block after both the UI process and web processes agree that the visible content rect state is
stable. To do this, we fire presentation updates until the UI process (via RemoteLayerTreeTransactions)
discovers that the web page is in stable state. This is used solely for testing purposes.

(-[WKWebView _firePresentationUpdateForPendingStableStatePresentationCallbacks]):
(-[WKWebView _uiTextSelectionRectViews]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::inStableState):

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _didExitStableState]):

Deactivate the text selection if the assisted node is inside a fixed container.

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

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

(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView shouldHideSelectionWhenScrolling]):
(-[WKContentView _uiTextSelectionRects]):
(-[WKContentView _didEndScrollingOrZooming]):
(-[WKContentView _updateChangedSelection:]):

If the EditorState was created after a stable state update, reactivate the text selection assistant if it exists.
Additionally, if we are deferring the end scrolling selection update until after the first stable editor state
update arrives from the web process, we need to also call [_textSelectionAssistant didEndScrollingOverflow]
and [_webSelectionAssistant didEndScrollingOrZoomingPage] here instead of doing so immediately after scrolling
finishes. This ensures that selection UI (the callout and selection highlights) do not flicker from their old
position to the new position when scrolling finishes.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::willCommitLayerTree):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::platformEditorState):
(WebKit::WebPage::updateVisibleContentRects):

When updating the layout viewport override rect, also recompute the caret if needed and send an updated
EditorState over to the UI process.

Tools:

Introduces two new UIScriptController methods: doAfterWebPageIsInStableState and textSelectionCaretRect. See
WebKit2 ChangeLog for more details.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::doAfterNextStablePresentationUpdate):
(WTR::UIScriptController::textSelectionCaretRect):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::doAfterNextStablePresentationUpdate):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::doAfterNextStablePresentationUpdate):
(WTR::UIScriptController::textSelectionCaretRect):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView _setStableStateOverride:]):

Force the WKWebView to update its visible content rects when changing the stable state override.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::toNSDictionary):
(WTR::UIScriptController::doAfterNextStablePresentationUpdate):
(WTR::UIScriptController::selectionRangeViewRects):
(WTR::UIScriptController::textSelectionCaretRect):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::doAfterNextStablePresentationUpdate):

LayoutTests:

Adds new layout tests verifying that scrolling selected text (non-editable) and a text caret (in editable
content) results in the selection/caret rects having the correct location relative to the document, in both
cases where the selected/focused element has fixed position or absolute position. For fixed position elements,
this means that the rects must "move" down in the document as the document is scrolled, but for absolute
elements, these rects must remain in place.

  • TestExpectations:
  • editing/caret/ios/absolute-caret-position-after-scroll-expected.txt: Added.
  • editing/caret/ios/absolute-caret-position-after-scroll.html: Added.
  • editing/caret/ios/fixed-caret-position-after-scroll-expected.txt: Added.
  • editing/caret/ios/fixed-caret-position-after-scroll.html: Added.
  • editing/selection/ios/absolute-selection-after-scroll-expected.txt: Added.
  • editing/selection/ios/absolute-selection-after-scroll.html: Added.
  • editing/selection/ios/fixed-selection-after-scroll-expected.txt: Added.
  • editing/selection/ios/fixed-selection-after-scroll.html: Added.
12:01 PM Changeset in webkit [209930] by jmarcell@apple.com
  • 7 edits
    2 adds in branches/safari-602-branch

Merge r209926. rdar://problem/29706846

11:28 AM Changeset in webkit [209929] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add predecessor info to dumps from JSC_dumpBytecodeLivenessResults=true.
https://bugs.webkit.org/show_bug.cgi?id=165958

Reviewed by Saam Barati.

Also:

  1. refactored the code to use a common lambda function to dump FastBitVectors.
  2. list successors by their block index instead of pointers.
  • bytecode/BytecodeLivenessAnalysis.cpp:

(JSC::BytecodeLivenessAnalysis::dumpResults):

11:24 AM Changeset in webkit [209928] by sbarati@apple.com
  • 11 edits
    4 copies in trunk

WebAssembly: WasmB3IRGenerator should throw exceptions instead of crash
https://bugs.webkit.org/show_bug.cgi?id=165834

Reviewed by Keith Miller.

JSTests:

  • wasm/function-tests/exceptions.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):

  • wasm/function-tests/table-basic.js:

(i.i.42.throw.new.Error):

Source/JavaScriptCore:

This patch generalizes how we throw exceptions in the Wasm::B3IRGenerator.
There are still places where we need to throw exceptions and we don't, but
this patch removes most of those places inside the IR generator. There are
still a few places we need to throw exceptions inside the IR generator, like
div/mod by 0. Those will be done in a separate patch. Also, there are
still some stubs we need to throw exceptions from; those will also be
done in a separate patch.

All exceptions thrown from Wasm share a common stub. The ABI for the stub
is to move the Wasm::ExceptionType into argGPR1 and jump to the stub.
The stub will then throw an exception with an error message tailored
to the particular Wasm::ExceptionType failure.

This patch also refactors B3::Compilation. Before, B3::Compilation(VM, Procedure)
constructor would compile a B3 function. This patch makes B3::Compilation a simple
tuple that keeps the necessary bits of B3 function alive in order to be runnable.
There is a new function that actually does the compilation for you. It is:
Compilation B3::compile(VM&, Procedure&)
The reason for this change is that I'm now using B3::Compilation(CodeRef, OpaqueByproducts)
constructor in Wasm code. It is weird to have a class both have a
constructor that instantiates the tuple, and another that performs the
compilation and then instantiates the tuple. It's more straight
forward if Compilation's job wasn't to actually do the compilation
but just to hold the necessary bits to keep a compiled B3 alive.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • b3/B3Compilation.cpp:

(JSC::B3::Compilation::Compilation):

  • b3/B3Compilation.h:
  • b3/B3Compile.cpp: Added.

(JSC::B3::compile):

  • b3/B3Compile.h: Added.
  • b3/testb3.cpp:

(JSC::B3::compile):

  • jit/ThunkGenerators.cpp:

(JSC::throwExceptionFromWasmThunkGenerator):

  • jit/ThunkGenerators.h:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::emitExceptionCheck):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmExceptionType.h: Added.

(JSC::Wasm::errorMessageForExceptionType):

10:56 AM Changeset in webkit [209927] by weinig@apple.com
  • 30 edits
    14 adds
    4 deletes in trunk/Source/WebCore

[ApplePay] Remove remaining custom bindings from the ApplePay code
https://bugs.webkit.org/show_bug.cgi?id=165860

Reviewed by Darin Adler.

  • DerivedSources.make:

Add new IDL files.

  • WebCore.xcodeproj/project.pbxproj:

Add/remove files.

  • bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: Removed.
  • bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: Removed.
  • bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: Removed.
  • bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: Removed.

Remove custom bindings.

  • Modules/applepay/ApplePayLineItem.h: Added.
  • Modules/applepay/ApplePayLineItem.idl: Added.
  • Modules/applepay/ApplePayPayment.h: Added.
  • Modules/applepay/ApplePayPayment.idl: Added.
  • Modules/applepay/ApplePayPaymentContact.h: Added.
  • Modules/applepay/ApplePayPaymentContact.idl: Added.
  • Modules/applepay/ApplePayPaymentMethod.h: Added.
  • Modules/applepay/ApplePayPaymentMethod.idl: Added.
  • Modules/applepay/ApplePayPaymentPass.h: Added.
  • Modules/applepay/ApplePayPaymentPass.idl: Added.
  • Modules/applepay/ApplePayPaymentRequest.h: Added.
  • Modules/applepay/ApplePayPaymentRequest.idl: Added.
  • Modules/applepay/ApplePayShippingMethod.h: Added.
  • Modules/applepay/ApplePayShippingMethod.idl: Added.

Split out dictionaries and enums into separate files where needed.

  • Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:

(WebCore::ApplePayPaymentAuthorizedEvent::ApplePayPaymentAuthorizedEvent):

  • Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
  • Modules/applepay/ApplePayPaymentAuthorizedEvent.idl:

Convert the 'payment' property to return an ApplePayPayment dictionary, removing
the need for custom bindings.

  • Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:

(WebCore::ApplePayPaymentMethodSelectedEvent::ApplePayPaymentMethodSelectedEvent):

  • Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
  • Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl:

Convert the 'paymentMethod' property to return an ApplePayPaymentMethod dictionary, removing
the need for custom bindings.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):
(WebCore::ApplePaySession::create):
(WebCore::ApplePaySession::ApplePaySession):
(WebCore::ApplePaySession::completeShippingMethodSelection):
(WebCore::ApplePaySession::completeShippingContactSelection):
(WebCore::ApplePaySession::completePaymentMethodSelection):
(WebCore::ApplePaySession::didSelectShippingMethod):

  • Modules/applepay/ApplePaySession.h:

Update for new names, remove need for ExecState in the create function, and simplify
billingContact and shippingContact now that they are strongly typed.

  • Modules/applepay/ApplePaySession.idl:

Move dictionaries and enums to their own files.

  • Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:

(WebCore::ApplePayShippingContactSelectedEvent::ApplePayShippingContactSelectedEvent):

  • Modules/applepay/ApplePayShippingContactSelectedEvent.h:
  • Modules/applepay/ApplePayShippingContactSelectedEvent.idl:

Convert the 'shippingContact' property to return an ApplePayPaymentContact dictionary, removing
the need for custom bindings.

  • Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
  • Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
  • Modules/applepay/ApplePayShippingMethodSelectedEvent.idl:

Convert the 'shippingMethod' property to return an ApplePayShippingMethod dictionary, removing
the need for custom bindings.

  • Modules/applepay/Payment.h:
  • Modules/applepay/PaymentContact.h:
  • Modules/applepay/PaymentMethod.h:
  • Modules/applepay/cocoa/PaymentCocoa.mm:
  • Modules/applepay/cocoa/PaymentContactCocoa.mm:
  • Modules/applepay/cocoa/PaymentMethodCocoa.mm:

Replace toJS/fromJS functions with ones that convert to/from the associated dictionary type.

  • bindings/generic/IDLTypes.h:

(WebCore::IDLJSON::nullValue):
(WebCore::IDLJSON::isNullValue):
(WebCore::IDLJSON::extractValueFromNullable):

  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLJSON>::convert):
(WebCore::JSConverter<IDLJSON>::convert):
Add a new custom type, JSON, which converts from a String to a JS object.

  • bindings/scripts/CodeGenerator.pm:
  • bindings/scripts/CodeGeneratorJS.pm:

Add support for the new JSON type, and improve scoped naming to allow for enums
in dictionary only IDL files.

  • bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:

Update test result for improved scoped naming.

10:48 AM Changeset in webkit [209926] by Alan Bujtas
  • 7 edits
    2 adds in trunk

Defer certain accessibility callbacks until after layout is finished.
https://bugs.webkit.org/show_bug.cgi?id=165861
rdar://problem/29646301

Reviewed by Chris Fleizach.

Source/WebCore:

Currently with certain AXObjectCache callbacks, we can end up in a layout while the render tree is being mutated.
This patch ensures that such callbacks are deferred until after tree mutation/layout is finished.

Test: accessibility/accessibility-crash-with-dynamic-inline-content.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::performDeferredIsIgnoredChange):
(WebCore::AXObjectCache::insertDeferredIsIgnoredChange):

  • accessibility/AXObjectCache.h:
  • page/FrameView.cpp:

(WebCore::FrameView::performPostLayoutTasks):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::deleteLines):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::createAndAppendRootInlineBox):

LayoutTests:

  • accessibility/accessibility-crash-with-dynamic-inline-content-expected.txt: Added.
  • accessibility/accessibility-crash-with-dynamic-inline-content.html: Added.
10:45 AM Changeset in webkit [209925] by Ryan Haddad
  • 3 edits in trunk/Source/WebCore

Rebaseline bindings tests after r209897.

Unreviewed test gardening.

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::JSTestObj::visitChildren):

  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:

(WebCore::JSTestSerializedScriptValueInterface::visitChildren):

10:32 AM Changeset in webkit [209924] by Brent Fulgham
  • 8 edits in trunk

Arguments called in wrong order
https://bugs.webkit.org/show_bug.cgi?id=165923

Reviewed by Simon Fraser.

Source/WebCore:

Correct the ordering of several function calls.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): The 'nearestToPresentationStartTime'
argument is being checked for validity, but 'nearestToPresentationEndTime' is being used in the
calculation. This seems like a copy/paste error.

  • page/PrintContext.cpp:

(WebCore::PrintContext::outputLinkedDestinations): FloatPoint::expandedTo returns a new object that
has been expanded. This code continued using the 'unexpanded' point.

  • platform/graphics/GraphicsContext3D.cpp:

(WebCore::GraphicsContext3D::computeImageSizeInBytes): The 'bytesPerComponent' and 'componentsPerPixel'
variables were being passed in the wrong order.

  • platform/network/CacheValidation.cpp: The 'last-modified' header string was being concatenated with

the following string, resulting in an incorrect 'last-modifiedproxy-authenticate' string value.

  • svg/SVGToOTFFontConversion.cpp:

(WebCore::SVGToOTFFontConverter::firstGlyph): The ASSERT was assigning to the (by-value) input
parameter 'codePoint', rather than comparing it to the firstGlyph value's codePoint.

Tools:

The 'audioDeviceUIDs' array is being passed to the argument that expects video devices,
and the 'videoDeviceUIDs' array is being passed to the audo device argument. Fix this.

  • TestWebKitAPI/Tests/WebKit2/UserMedia.cpp:

(TestWebKitAPI::decidePolicyForUserMediaPermissionRequestCallBack): The
order of arguments to WKUserMediaPermissionRequestAllow are flipped.

9:53 AM Changeset in webkit [209923] by keith_miller@apple.com
  • 6 edits in trunk

i64.eqz should use an Int64 zero
https://bugs.webkit.org/show_bug.cgi?id=165942

Reviewed by Mark Lam.

JSTests:

  • wasm/wasm.json:

Source/JavaScriptCore:

This patch fixes i64.eqz, which was using an Int32 zero
for the comparison previously. This patch also, adds
printing opcodes names in verbose mode.

  • wasm/WasmFunctionParser.h:
  • wasm/generateWasmOpsHeader.py:
  • wasm/wasm.json:
9:40 AM Changeset in webkit [209922] by bshafiei@apple.com
  • 1 delete in tags/Safari-602.4.3

Delete tag.

8:56 AM Changeset in webkit [209921] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Modernize find banner UI
https://bugs.webkit.org/show_bug.cgi?id=165939

Reviewed by Timothy Hatcher.

The find banner should have a modern appearance, matching Xcode.

  • UserInterface/Views/FindBanner.css:

(.find-banner > input[type="search"]):
(.find-banner > button):
Use standard border colors.
(.find-banner > button:disabled > .glyph):
Disabled previous / next glyphs should be lighter.
(.find-banner > button:active:not(:disabled)):
Update depressed button style: flat colors, no text color change.
(.find-banner > button.segmented):
(.find-banner > button.segmented.left):
(.find-banner > button:not(:active).segmented.right:before):
(.find-banner > button.segmented.left:active + button.segmented.right,):
(.find-banner > button.segmented.left:active + button.segmented.right:before):
(.find-banner > button.segmented.right):
(.find-banner.console-find-banner > input[type="search"]):
(.find-banner.console-find-banner > :matches(input[type="search"], button)):
(.find-banner > button:disabled): Deleted.
(.find-banner > button.segmented:active): Deleted.
Overlapping button borders are no longer an issue.

  • UserInterface/Views/FindBanner.js:

(WebInspector.FindBanner):
Insert previous / next buttons after the input field in the DOM.
(WebInspector.FindBanner.prototype.get delegate):
(WebInspector.FindBanner.prototype.set delegate):
(WebInspector.FindBanner.prototype.get inputField):
(WebInspector.FindBanner.prototype.get searchQuery):
(WebInspector.FindBanner.prototype.set searchQuery):
(WebInspector.FindBanner.prototype.get numberOfResults):
Inline simple getters and setters.

  • UserInterface/Views/Variables.css:

(:root):
Add button colors.

8:43 AM Changeset in webkit [209920] by Claudio Saavedra
  • 3 edits in trunk/Source/WebKit2

[WK2] SharedMemory: include cleanups
https://bugs.webkit.org/show_bug.cgi?id=165950

Reviewed by Žan Doberšek.

The WTFString include is not needed in the header, so move to the
Unix file. Use the existing UNIX_DOMAIN_SOCKETS define. Also
include the WTFOptional header where needed.

  • Platform/SharedMemory.h:
  • Platform/unix/SharedMemoryUnix.cpp:
8:31 AM Changeset in webkit [209919] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebKit2

[EFL] Fix build break since r209907. Unreviewed.
https://bugs.webkit.org/show_bug.cgi?id=165954

  • UIProcess/efl/TextCheckerEfl.cpp: Change the remaining TextBreakIterator to UBreakIterator

(WebKit::nextWordOffset):
(WebKit::TextChecker::checkTextOfParagraph):

5:36 AM Changeset in webkit [209918] by Hunseop Jeong
  • 2 edits in trunk/Tools

[EFL] Disable non-srcdir builds for failing libraries
https://bugs.webkit.org/show_bug.cgi?id=165896

Reviewed by Gyuyoung Kim.

  • efl/jhbuild.modules: Set non srcdir builds to no
3:51 AM Changeset in webkit [209917] by commit-queue@webkit.org
  • 29 edits in trunk

[Fetch API] Improve resource loading console logging
https://bugs.webkit.org/show_bug.cgi?id=160546

Patch by Youenn Fablet <youenn@apple.com> on 2016-12-16
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebasing since error logging is happening for fetch API.

  • web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-about-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-others-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-basic-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-cookies-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-multiple-origins-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-origin-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight.html:
  • web-platform-tests/fetch/api/cors/cors-redirect-credentials-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-location-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-schemes-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-to-dataurl-expected.txt:

Source/WebCore:

Covered by rebased tests.

Adding support for logging of resource loading failures in ThreadableLoader.
This will allow doing consistent logging for clients such as fetch, XHR, event source...

Doing logging for Fetch API only at the moment in ThreadableLoader.
Future patches should migrate XHR to this logging system.

Logging routine is implemented in ThreadableLoader.
It is used directly by DocumentThreadableLoader before calling didFail client callback.
DocumentThreadableLoader has a new option to not log errors, in the case the client is WorkerThreadableLoader::MainBridge.
In that case, the logging is done in the worker context within WorkerThreadableLoader::MainBridge::didFail

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::loadResourceSynchronously): Enable logging.
(WebCore::DocumentThreadableLoader::create): Passing logging parameter to constructor.
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Adding initialization of logging parameter.
(WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Making use of the new logErrorAndFail helper routine.
(WebCore::DocumentThreadableLoader::cancel): No need to log error if it is being cancelled.
(WebCore::DocumentThreadableLoader::redirectReceived): Made the reportXX routines methods of DocumentThreadableLoaders and using logErrorAndFail internally.
(WebCore::DocumentThreadableLoader::didFail): Wrapper around logErrorAndFail since cancel is not calling it anymore.
(WebCore::DocumentThreadableLoader::preflightFailure):
(WebCore::DocumentThreadableLoader::loadRequest):
(WebCore::DocumentThreadableLoader::reportRedirectionWithBadScheme):
(WebCore::DocumentThreadableLoader::reportContentSecurityPolicyError):
(WebCore::DocumentThreadableLoader::reportCrossOriginResourceSharingError):
(WebCore::DocumentThreadableLoader::logErrorAndFail):
(WebCore::reportContentSecurityPolicyError): Deleted.
(WebCore::reportCrossOriginResourceSharingError): Deleted.
(WebCore::reportRedirectionWithBadScheme): Deleted.

  • loader/DocumentThreadableLoader.h:
  • loader/ThreadableLoader.cpp:

(WebCore::ThreadableLoader::logError):

  • loader/ThreadableLoader.h:
  • loader/ThreadableLoaderClientWrapper.h:

(WebCore::ThreadableLoaderClientWrapper::create):
(WebCore::ThreadableLoaderClientWrapper::initiator):
(WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):

  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):

LayoutTests:

Rebasing since error logging is happening for fetch API.
Some tests are flaky due to always changing console logs, in which case DumpJSConsoleLogInStdErr is used.

  • TestExpectations:
  • http/tests/fetch/fetching-same-resource-with-diffferent-options-expected.txt:
  • http/tests/inspector/network/fetch-network-data-expected.txt:
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-expected.txt:
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin-expected.txt:
3:50 AM Changeset in webkit [209916] by eocanha@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer][MSE] Fix build warning in MediaPlayerPrivateGStreamer.cpp using gcc 6.2
https://bugs.webkit.org/show_bug.cgi?id=165900

Reviewed by Žan Doberšek.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::supportsCodecs):
Move the variable asignation out of the if condition.

2:01 AM Changeset in webkit [209915] by commit-queue@webkit.org
  • 6 edits in trunk

[Readable Streams API] Implement ReadableByteStreamController cancel internal method
https://bugs.webkit.org/show_bug.cgi?id=165798

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-12-16
Reviewed by Youenn Fablet.

Source/WebCore:

Implemented cancel method of ReadableByteStreamController.
Also fixed small inconsistency in readableByteStreamControllerClose.

Added one test to check cancel behaviour. More tests may be added as the API is implemented.

  • Modules/streams/ReadableByteStreamInternals.js:

(privateInitializeReadableByteStreamController): Define cancel internal method.
(readableByteStreamControllerCancel): Added.
(readableByteStreamControllerClose): Fixed behaviour (no value should be dequeued).

  • bindings/js/WebCoreBuiltinNames.h: Removed bytesFilled (previous addition was not needed).

LayoutTests:

Added one test to check cancel behaviour. More tests may be added as the API is implemented.
Also replaced async_test by promise_test where applicable.

  • streams/readable-byte-stream-controller-expected.txt: Updated expectations.
  • streams/readable-byte-stream-controller.js: Added one test.
12:42 AM Changeset in webkit [209914] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

svg/as-image/svg-image-with-data-uri-use-data-uri.svg is flaky after r207754
https://bugs.webkit.org/show_bug.cgi?id=163887
<rdar://problem/29266436>

Patch by Youenn Fablet <youennf@gmail.com> on 2016-12-16
Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/security/cross-origin-cached-images-with-memory-pressure.html

With the introduction of cached resource cloning, an Image may be referenced by several CachedImage.
This did not work well with Image observer system as it mandates a one-to-one relationship.

Introducing CachedImageObserver to restore the one-to-one relationship between Image and its observer.
CachedImageObserver can keep references for more than one CachedImage.

In the future, it might be better to split more clearly CachedImageObserver and its API from CachedImage.
Or remove the concept of CachedResource cloning and find new ways to provide CachedResource origin information to clients.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::load): Moved boolean image observer fields to CachedImageObserver.
(WebCore::CachedImage::setBodyDataFrom): Keeping a reference of the image observer when cloning the resource.
(WebCore::CachedImage::createImage): Creating the observer when creating the image.
(WebCore::CachedImage::CachedImageObserver::CachedImageObserver):
(WebCore::CachedImage::CachedImageObserver::decodedSizeChanged):
(WebCore::CachedImage::CachedImageObserver::didDraw):
(WebCore::CachedImage::CachedImageObserver::animationAdvanced):
(WebCore::CachedImage::CachedImageObserver::changedInRect):
(WebCore::CachedImage::clearImage):

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

(WebCore::CachedResource::setBodyDataFrom): Now that each cached image receives decodedSizeChanged callback, we need to set its size correctly.

LayoutTests:

  • http/tests/security/cross-origin-cached-images-with-memory-pressure-expected.txt: Added.
  • http/tests/security/cross-origin-cached-images-with-memory-pressure.html: Added.
Note: See TracTimeline for information about the timeline view.