WebKit-https.git
3 years agoAdd an IndexedDB perf test to PerformanceTests.
beidson@apple.com [Tue, 6 Dec 2016 00:10:58 +0000 (00:10 +0000)]
Add an IndexedDB perf test to PerformanceTests.
https://bugs.webkit.org/show_bug.cgi?id=165430

Reviewed by Alex Christensen.

* IndexedDB/index-multientry.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209365 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agopointer lock needs to be feature detectable
dino@apple.com [Mon, 5 Dec 2016 23:48:15 +0000 (23:48 +0000)]
pointer lock needs to be feature detectable
https://bugs.webkit.org/show_bug.cgi?id=165426
<rdar://problem/29486715>

Reviewed by Antoine Quint.

Source/WebCore:

Annotate the public-facing API for pointer-lock, so
that it is hidden when not available.

Also move the Setting to a RuntimeEnabledFeature, since
pointer-lock is exposed from WebKit as a feature.

Tests: pointer-lock/pointerlock-interface-disabled.html
       pointer-lock/pointerlock-interface.html

* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setPointerLockEnabled):
(WebCore::RuntimeEnabledFeatures::pointerLockEnabled):
* dom/Document.idl:
* dom/Element.idl:
* page/PointerLockController.cpp:
(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::requestPointerUnlock):
* page/Settings.in:

Source/WebKit/mac:

Set the RuntimeEnabledFeature as preferences
change.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Set the RuntimeEnabledFeature as preferences
change.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPointerLockEnabled):
(WKPreferencesGetPointerLockEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Expose the comment line to turn on/off pointer lock.

* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::viewSupportsOptions):

Websites/webkit.org:

We can now accurately detect pointer-lock.

* experimental-features.html:

LayoutTests:

Checks that the API is hidden when the feature is turned off.

* pointer-lock/pointerlock-interface-disabled-expected.txt: Added.
* pointer-lock/pointerlock-interface-disabled.html: Added.
* pointer-lock/pointerlock-interface-expected.txt: Added.
* pointer-lock/pointerlock-interface.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209364 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Skip a grid test
hyatt@apple.com [Mon, 5 Dec 2016 23:39:59 +0000 (23:39 +0000)]
[CSS Parser] Skip a grid test
https://bugs.webkit.org/show_bug.cgi?id=165427

Reviewed by Zalan Bujtas.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209363 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago2016-12-05 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Mon, 5 Dec 2016 23:38:36 +0000 (23:38 +0000)]
2016-12-05  Geoffrey Garen  <ggaren@apple.com>

        Fixed a bug in my last patch.

        Unreviewed.

        * bytecode/UnlinkedFunctionExecutable.h: Restore the conversion to
        one-based counting.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209362 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMoved start and end column linking into helper functions
ggaren@apple.com [Mon, 5 Dec 2016 23:27:59 +0000 (23:27 +0000)]
Moved start and end column linking into helper functions
https://bugs.webkit.org/show_bug.cgi?id=165422

Reviewed by Sam Weinig.

* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::link):
* bytecode/UnlinkedFunctionExecutable.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209361 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoReduce number of platformMemoryUsage calls
krollin@apple.com [Mon, 5 Dec 2016 23:27:50 +0000 (23:27 +0000)]
Reduce number of platformMemoryUsage calls
https://bugs.webkit.org/show_bug.cgi?id=164375

Reviewed by Darin Adler.

Removed the calls to WTF::releaseFastMallocFreeMemory (it's already
called elsewhere in the free-all-memory pipeline) and
malloc_zone_pressure_relief (it should be called by the OS on its own
terms).

No new tests -- no new or changed features.

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209360 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Avoid more invalid tests
hyatt@apple.com [Mon, 5 Dec 2016 23:19:14 +0000 (23:19 +0000)]
[CSS Parser] Avoid more invalid tests
https://bugs.webkit.org/show_bug.cgi?id=165424

Reviewed by Dean Jackson.

* TestExpectations:
Avoid the aspect-ratio test, since it thinks whitespace should not be allowed, even though
it should be. Avoid a couple of grid tests that assume the grid breadth can't be 0fr, even
though it can be. Non-negative means < 0, not <= 0 like the old parser assumes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209359 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoFix JSC files so that we can build a release build with NDEBUG #undef'ed.
mark.lam@apple.com [Mon, 5 Dec 2016 23:04:57 +0000 (23:04 +0000)]
Fix JSC files so that we can build a release build with NDEBUG #undef'ed.
https://bugs.webkit.org/show_bug.cgi?id=165409

Reviewed by Keith Miller.

This allows us to run a release build with DEBUG ASSERTs enabled.

* bytecode/BytecodeLivenessAnalysis.cpp:
* bytecode/UnlinkedEvalCodeBlock.cpp:
* bytecode/UnlinkedFunctionCodeBlock.cpp:
* bytecode/UnlinkedModuleProgramCodeBlock.cpp:
* bytecode/UnlinkedProgramCodeBlock.cpp:
* runtime/EvalExecutable.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209358 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRenamed source => parentSource
ggaren@apple.com [Mon, 5 Dec 2016 23:00:36 +0000 (23:00 +0000)]
Renamed source => parentSource
https://bugs.webkit.org/show_bug.cgi?id=165419

Reviewed by Saam Barati.

This should help clarify that a FunctionExecutable holds the source
code to its *parent* scope, and not its own SourceCode.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createExecutable):
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::link):
* bytecode/UnlinkedFunctionExecutable.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209357 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Fix invalid column-span test
hyatt@apple.com [Mon, 5 Dec 2016 22:56:14 +0000 (22:56 +0000)]
[CSS Parser] Fix invalid column-span test
https://bugs.webkit.org/show_bug.cgi?id=165420

Reviewed by Dean Jackson.

* fast/multicol/newmulticol/spanner-becomes-regular-block.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209356 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Leave the Animation type alone when the property is invalid
hyatt@apple.com [Mon, 5 Dec 2016 22:53:23 +0000 (22:53 +0000)]
[CSS Parser] Leave the Animation type alone when the property is invalid
https://bugs.webkit.org/show_bug.cgi?id=165418

Reviewed by Dean Jackson.

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209355 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Avoid more tests
hyatt@apple.com [Mon, 5 Dec 2016 22:52:38 +0000 (22:52 +0000)]
[CSS Parser] Avoid more tests
https://bugs.webkit.org/show_bug.cgi?id=165417

Reviewed by Simon Fraser.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209354 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoScriptExecutable should not contain a copy of firstLine and startColumn
ggaren@apple.com [Mon, 5 Dec 2016 22:46:06 +0000 (22:46 +0000)]
ScriptExecutable should not contain a copy of firstLine and startColumn
https://bugs.webkit.org/show_bug.cgi?id=165415

Reviewed by Keith Miller.

We already have this data in SourceCode.

It's super confusing to have two copies of this data, where one is
allowed to mutate. In reality, your line and column number never change.

* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::link):
* runtime/CodeCache.cpp:
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):
* runtime/CodeCache.h:
(JSC::generateUnlinkedCodeBlock):
* runtime/FunctionExecutable.cpp:
(JSC::FunctionExecutable::FunctionExecutable):
* runtime/FunctionExecutable.h:
* runtime/ScriptExecutable.cpp:
(JSC::ScriptExecutable::ScriptExecutable):
(JSC::ScriptExecutable::newCodeBlockFor):
* runtime/ScriptExecutable.h:
(JSC::ScriptExecutable::firstLine):
(JSC::ScriptExecutable::startColumn):
(JSC::ScriptExecutable::recordParse):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209353 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agokeyframes do not work when defined inside a style in a shadowRoot
antti@apple.com [Mon, 5 Dec 2016 22:42:28 +0000 (22:42 +0000)]
keyframes do not work when defined inside a style in a shadowRoot
https://bugs.webkit.org/show_bug.cgi?id=164608
<rdar://problem/29210251>

Reviewed by Darin Adler.

Source/WebCore:

With :host and ::slotted rules a keyframe animation affecting an element can be
defined in a style scope different from the element's own scope. Style resolver
loses the scope information when building the RenderStyle so there is no way
to find out the correct scope.

Fix by passing style scope through to style builder and including a scope association
with the animation name. Find the correct scope when resolving keyframes.

Test: fast/shadow-dom/shadow-host-animation.html

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationName):

    Include scope with the name.

* css/ElementRuleCollector.cpp:
(WebCore::MatchRequest::MatchRequest):
(WebCore::ElementRuleCollector::addMatchedRule):
(WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
(WebCore::ElementRuleCollector::matchAuthorRules):
(WebCore::ElementRuleCollector::matchAuthorShadowPseudoElementRules):
(WebCore::ElementRuleCollector::matchHostPseudoClassRules):
(WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):

    Replace treeContextOrdinal int with Style::ScopeOrdinal enum carrying the same information.
    Simplify the code removing unnecessary use of MatchRequest struct.

(WebCore::compareRules):
* css/ElementRuleCollector.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::MatchResult::addMatchedProperties):
(WebCore::StyleResolver::CascadedProperties::setPropertyInternal):
(WebCore::StyleResolver::CascadedProperties::set):
(WebCore::StyleResolver::CascadedProperties::setDeferred):

    Pass styleScopeOrdinal through the cascade mechanism

(WebCore::cascadeLevelForIndex):
(WebCore::StyleResolver::CascadedProperties::addMatch):
(WebCore::StyleResolver::CascadedProperties::addImportantMatches):
(WebCore::StyleResolver::CascadedProperties::Property::apply):

    Set styleScopeOrdinal in State when applying style.

(WebCore::StyleResolver::CascadedProperties::addStyleProperties): Deleted.

    Move the code to the only caller.

* css/StyleResolver.h:
(WebCore::StyleResolver::State::styleScopeOrdinal):
(WebCore::StyleResolver::State::setStyleScopeOrdinal):
* page/animation/CompositeAnimation.cpp:
(WebCore::KeyframeAnimation::KeyframeAnimation):
(WebCore::KeyframeAnimation::resolveKeyframeStyles):

    Find the correct scope for resolving keyframes based on the scope ordinal.

* platform/animation/Animation.cpp:
* platform/animation/Animation.h:

    Add m_nameStyleScopeOrdinal that tells the scope where the name is defined.

* style/StyleScope.cpp:
(WebCore::Style::Scope::forOrdinal):

    Find the scope for ordinal.

* style/StyleScope.h:

    Define ScopeOrdinal types.

(WebCore::Style::operator++):

LayoutTests:

* fast/shadow-dom/shadow-host-animation-expected.html: Added.
* fast/shadow-dom/shadow-host-animation.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209352 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Support glyph-orientation-horizontal and glyph-orientation-vertical
hyatt@apple.com [Mon, 5 Dec 2016 22:38:37 +0000 (22:38 +0000)]
[CSS Parser] Support glyph-orientation-horizontal and glyph-orientation-vertical
https://bugs.webkit.org/show_bug.cgi?id=165414

Reviewed by Zalan Bujtas.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeGlyphOrientation):
(WebCore::CSSPropertyParser::parseSingleValue):
Add support for the glyph-orientation-horizontal and glyph-orientation-vertical
properties. They take an angle and allow unitless values.

* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeAngle):
Fix a bug in the handling of unitless values for angles. Make sure to
actually pass in the value instead of always doing 0. Blink does not
accept unitless values for angles at all, so this is another difference
to investigate for SVG in the future.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209351 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[JSC] report unexpected token when "async" is followed by identifier
caitp@igalia.com [Mon, 5 Dec 2016 22:20:08 +0000 (22:20 +0000)]
[JSC] report unexpected token when "async" is followed by identifier
https://bugs.webkit.org/show_bug.cgi?id=165091

Reviewed by Mark Lam.

JSTests:

* stress/bug-165091.js:

Source/JavaScriptCore:

Report a SyntaxError, in order to report correct error in contexts
an async ArrowFunction cannot occur. Also corrects errors in comment
describing JSTokenType bitfield, which was added in r209293.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/ParserTokens.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209350 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoSkip three media/modern-media-controls tests.
ryanhaddad@apple.com [Mon, 5 Dec 2016 22:16:01 +0000 (22:16 +0000)]
Skip three media/modern-media-controls tests.
https://bugs.webkit.org/show_bug.cgi?id=165312

Unreviewed test gardening.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209349 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, rolling out r209299.
ryanhaddad@apple.com [Mon, 5 Dec 2016 22:08:30 +0000 (22:08 +0000)]
Unreviewed, rolling out r209299.

This change appears to have caused LayoutTest failures on
Sierra WK1.

Reverted changeset:

"Improve the behavior of scroll-into-view when the target is
inside position:fixed"
https://bugs.webkit.org/show_bug.cgi?id=165354
http://trac.webkit.org/changeset/209299

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209348 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Fix column tests with illegal syntax
hyatt@apple.com [Mon, 5 Dec 2016 21:56:38 +0000 (21:56 +0000)]
[CSS Parser] Fix column tests with illegal syntax
https://bugs.webkit.org/show_bug.cgi?id=165411

Reviewed by Zalan Bujtas.

Patch column-span layout tests that use invalid syntax
to use the spec-compliant syntax instead (none instead of 1).

* fast/multicol/newmulticol/remove-spanner4.html:
* fast/multicol/newmulticol/remove-spanner5.html:
* fast/multicol/newmulticol/remove-spanner6.html:
* fast/multicol/span/span-as-immediate-child-property-removal.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209347 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[Cocoa] Add some memory usage related information to sysdiagnose state dumps
akling@apple.com [Mon, 5 Dec 2016 21:31:23 +0000 (21:31 +0000)]
[Cocoa] Add some memory usage related information to sysdiagnose state dumps
<https://webkit.org/b/165375>
<rdar://problem/29057243>

Reviewed by Darin Adler.

Source/WebCore:

Add a flag to memoryUsageStatistics() to allow gathering of slightly more expensive information.
This mode is used when capturing a state dump for sysdiagnose.

The more expensive information added in this patch relates to information about live objects
and memory on the JavaScript heap.

* WebCore.xcodeproj/project.pbxproj:
* page/PerformanceLogging.cpp:
(WebCore::PerformanceLogging::memoryUsageStatistics):
(WebCore::PerformanceLogging::javaScriptObjectCounts):
(WebCore::PerformanceLogging::didReachPointOfInterest):
* page/PerformanceLogging.h:

Source/WebKit2:

Add two new entries to the sysdiagnose state dumps for WebContent processes:
"Memory Usage Stats" and "JavaScript Object Counts".

The first category contains all the interesting stuff from task_info()
along with some WebCore and JavaScriptCore object/memory counters.

The second category contains a list of all the JS object types currently live
on the heap, along with a count.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::registerWithStateDumper): Add two new entries to the
state dictionary: "Memory Usage Stats" and "JavaScript Object Counts".

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209346 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Avoid a few more tests
hyatt@apple.com [Mon, 5 Dec 2016 21:04:29 +0000 (21:04 +0000)]
[CSS Parser] Avoid a few more tests
https://bugs.webkit.org/show_bug.cgi?id=165404

Reviewed by Zalan Bujtas.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209345 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Fix flex property parsing test
hyatt@apple.com [Mon, 5 Dec 2016 20:51:55 +0000 (20:51 +0000)]
[CSS Parser] Fix flex property parsing test
https://bugs.webkit.org/show_bug.cgi?id=165402

Reviewed by Simon Fraser.

flex-grow and flex-shrink must occur together. They cannot be before and after
the flex-basis. Since this test is about valid property declarations, just fix it
by removing the invalid ones.

* css3/flexbox/flex-property-parsing-expected.txt:
* css3/flexbox/flex-property-parsing.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209344 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMarking media/modern-media-controls/seek-backward-support/seek-backward-support.html...
ryanhaddad@apple.com [Mon, 5 Dec 2016 20:38:39 +0000 (20:38 +0000)]
Marking media/modern-media-controls/seek-backward-support/seek-backward-support.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=165386

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209343 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWeb Inspector: Remove legacy styles
commit-queue@webkit.org [Mon, 5 Dec 2016 20:32:36 +0000 (20:32 +0000)]
Web Inspector: Remove legacy styles
https://bugs.webkit.org/show_bug.cgi?id=165389

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-12-05
Reviewed by Matt Baker.

Remove styles for platforms we don't build on anymore (Mavericks
and Mountain Lion). There are also no "unknown-mac" styles to
upgrade to a named platform.

* UserInterface/Base/Platform.js:
Add sierra and remove older unsupported platforms.

* UserInterface/Views/Main.css:
(body):
(body:not(.mavericks)): Deleted.
* UserInterface/Views/TabBar.css:
(body.mavericks .tab-bar > .item:not(.disabled).selected): Deleted.
* UserInterface/Views/Toolbar.css:
(body .toolbar):
(body.window-inactive .toolbar):
(body.mac-platform:not(.docked) .toolbar):
(body.mac-platform:not(.docked)):
(body:not(.mavericks) .toolbar,): Deleted.
(body.window-inactive:not(.mavericks) .toolbar): Deleted.
(body.mac-platform:not(.docked, .mavericks) .toolbar): Deleted.
(body.mac-platform:not(.docked, .mavericks)): Deleted.
Remove mavericks specific styles.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209342 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Make sure the transform fast path uses WebKitCSSTransformValue
hyatt@apple.com [Mon, 5 Dec 2016 20:26:22 +0000 (20:26 +0000)]
[CSS Parser] Make sure the transform fast path uses WebKitCSSTransformValue
https://bugs.webkit.org/show_bug.cgi?id=165399

Reviewed by Dean Jackson.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::parseTransformTranslateArguments):
(WebCore::parseTransformNumberArguments):
(WebCore::parseSimpleTransformValue):
(WebCore::parseSimpleTransformList):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209341 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Fix calc() with -webkit-line-clamp
hyatt@apple.com [Mon, 5 Dec 2016 20:11:03 +0000 (20:11 +0000)]
[CSS Parser] Fix calc() with -webkit-line-clamp
https://bugs.webkit.org/show_bug.cgi?id=165398

Reviewed by Zalan Bujtas.

Remove the aggressive token type checking up front, since it was causing calc() to not
be allowed.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeLineClamp):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209338 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMake it possible to use an existing simulator instance for one-off testing
jbedard@apple.com [Mon, 5 Dec 2016 20:02:11 +0000 (20:02 +0000)]
Make it possible to use an existing simulator instance for one-off testing
https://bugs.webkit.org/show_bug.cgi?id=164568
<rdar://problem/29189133>

Reviewed by Daniel Bates.

With this patch, if a simulator is currently running on the machine and
'--dedicated-simulators' is not passed into the application, only one simulator
instance will be used, and this instance will be the existing instance.
If no simulator is running or '--dedicated-simulators' is passed to the script,
previous behavior will be used.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.__init__): Logic for enabling usage of currently running simulator.
(IOSSimulatorPort._create_simulators): Only create simulators when needed, don't reset already running simulators.
(IOSSimulatorPort.setup_test_run): Don't open already running simulators.
(IOSSimulatorPort._quit_ios_simulator): Only quit simulators if we manage them.
(IOSSimulatorPort.clean_up_test_run): Only clean up simulators if we manage them.
(IOSSimulatorPort._using_dedicated_simulators): True if simulators need to be managed, false if using an existing instance.
(IOSSimulatorPort.device_id_for_worker_number): Access currently running simulator if not managing devices.
* Scripts/webkitpy/xcode/simulator.py:
(Simulator.refresh): Check if xcode_simctl_list returned None instead of a generator.
(Simulator.current_device): Get currently running device.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209337 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Remove calc column-span test
hyatt@apple.com [Mon, 5 Dec 2016 20:01:00 +0000 (20:01 +0000)]
[CSS Parser] Remove calc column-span test
https://bugs.webkit.org/show_bug.cgi?id=165393

Reviewed by Zalan Bujtas.

"1" is not a legal value for column-span, let alone allowing it to support a calc that
resolves to 1.

* fast/css/webkit-column-span-calculated-value-expected.txt: Removed.
* fast/css/webkit-column-span-calculated-value.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209336 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Support -webkit-text-decoration
hyatt@apple.com [Mon, 5 Dec 2016 19:36:24 +0000 (19:36 +0000)]
[CSS Parser] Support -webkit-text-decoration
https://bugs.webkit.org/show_bug.cgi?id=165391

Reviewed by Dean Jackson.

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseShorthand):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209335 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoSTP 19 fails to launch on 16B255
bdakin@apple.com [Mon, 5 Dec 2016 19:25:57 +0000 (19:25 +0000)]
STP 19 fails to launch on 16B255
https://bugs.webkit.org/show_bug.cgi?id=165388
-and corresponding-
rdar://problem/29514476

Rubber-stamped by Brady Eidson.

* platform/spi/cocoa/NSTouchBarSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209332 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoSTP 19 fails to launch on 16B255
bdakin@apple.com [Mon, 5 Dec 2016 19:21:32 +0000 (19:21 +0000)]
STP 19 fails to launch on 16B255
https://bugs.webkit.org/show_bug.cgi?id=165388
-and corresponding-
rdar://problem/29514476

Reviewed by Tim Horton.

Speculative fix.
* platform/spi/cocoa/NSTouchBarSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209330 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Support the 'alphabetic' keyword for text-underline-position
hyatt@apple.com [Mon, 5 Dec 2016 19:17:21 +0000 (19:17 +0000)]
[CSS Parser] Support the 'alphabetic' keyword for text-underline-position
https://bugs.webkit.org/show_bug.cgi?id=165387

Reviewed by Simon Fraser.

Fixes fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position.html

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209329 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAdd Wasm i64 to i32 conversion.
keith_miller@apple.com [Mon, 5 Dec 2016 19:03:25 +0000 (19:03 +0000)]
Add Wasm i64 to i32 conversion.
https://bugs.webkit.org/show_bug.cgi?id=165378

Reviewed by Filip Pizlo.

It turns out the wrap operation is just B3's Trunc.

* wasm/wasm.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209328 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoDisable a crashing test on iOS.
mitz@apple.com [Mon, 5 Dec 2016 19:02:28 +0000 (19:02 +0000)]
Disable a crashing test on iOS.

* TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209327 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoREGRESSION(r208985): SafariForWebKitDevelopment Symbol Not Found looking for method...
joepeck@webkit.org [Mon, 5 Dec 2016 19:02:17 +0000 (19:02 +0000)]
REGRESSION(r208985): SafariForWebKitDevelopment Symbol Not Found looking for method with WTF::Optional
https://bugs.webkit.org/show_bug.cgi?id=165351

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Some versions of Safari expect:

    Inspector::BackendDispatcher::reportProtocolError(WTF::Optional<long>, Inspector::BackendDispatcher::CommonErrorCode, WTF::String const&)

Which we had updated to use std::optional. Expose a version with the original
Symbol for these Safaris. This stub will just call through to the new version.

* inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::reportProtocolError):
* inspector/InspectorBackendDispatcher.h:

Source/WTF:

Include a slimmed down version of WTF::Optional which older versions
of Safari still depend on for a JavaScriptCore exported symbol.
To prevent misuse name it WTF::DeprecatedOptional and use it only in
the one instance it is needed.

* WTF.xcodeproj/project.pbxproj:
* wtf/DeprecatedOptional.h: Added.
(WTF::Optional::operator bool):
(WTF::Optional::value):
(WTF::Optional::asPtr):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209326 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Fix assert when unknown properties are encountered.
hyatt@apple.com [Mon, 5 Dec 2016 18:19:25 +0000 (18:19 +0000)]
[CSS Parser] Fix assert when unknown properties are encountered.
https://bugs.webkit.org/show_bug.cgi?id=165385

Reviewed by Zalan Bujtas.

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209325 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Fix rx and ry parsing
hyatt@apple.com [Mon, 5 Dec 2016 18:04:48 +0000 (18:04 +0000)]
[CSS Parser] Fix rx and ry parsing
https://bugs.webkit.org/show_bug.cgi?id=165383

Reviewed by Dean Jackson.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::isSimpleLengthPropertyID):
rx and ry can be negative in the slow path, so make sure they can be negative in the
fast path too.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeRxOrRy):
Disallow auto as a value since we are not equipped to handle it, and it's not clear if it's
even valid.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209324 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMarking media/modern-media-controls/media-controller/media-controller-resize.html...
ryanhaddad@apple.com [Mon, 5 Dec 2016 17:50:35 +0000 (17:50 +0000)]
Marking media/modern-media-controls/media-controller/media-controller-resize.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=164571

Unreviewed test gardening.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209323 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAdd __STDC_FORMAT_MACROS before inttypes.h is included
annulen@yandex.ru [Mon, 5 Dec 2016 17:47:34 +0000 (17:47 +0000)]
Add __STDC_FORMAT_MACROS before inttypes.h is included
https://bugs.webkit.org/show_bug.cgi?id=165374

We need formatting macros like PRIu64 to be available in all places where
inttypes.h header is used. All these usages get inttypes.h definitions
via wtf/Assertions.h header, except SQLiteFileSystem.cpp where formatting
macros are not used anymore since r185129.

This patch fixes multiple build errors with MinGW and reduces number of
independent __STDC_FORMAT_MACROS uses in the code base.

Reviewed by Darin Adler.

Source/JavaScriptCore:

* disassembler/ARM64/A64DOpcode.cpp: Removed __STDC_FORMAT_MACROS
because it is obtained via Assertions.h now
* disassembler/ARM64Disassembler.cpp: Ditto.

Source/WebCore:

No new tests needed.

* platform/sql/SQLiteFileSystem.cpp: Removed unused inttypes.h
inclusion.

Source/WTF:

* wtf/Assertions.h: Define __STDC_FORMAT_MACROS.
* wtf/StdLibExtras.h: Remove definition of PRId64 for Windows, as we
have __STDC_FORMAT_MACROS defined now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209322 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Properly fail on bad values for -webkit-clip-path
hyatt@apple.com [Mon, 5 Dec 2016 17:43:37 +0000 (17:43 +0000)]
[CSS Parser] Properly fail on bad values for -webkit-clip-path
https://bugs.webkit.org/show_bug.cgi?id=165382

Reviewed by Dean Jackson.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeBasicShapeOrBox):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209321 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] The page-break-* properties are only keyword props for old parser.
hyatt@apple.com [Mon, 5 Dec 2016 17:35:44 +0000 (17:35 +0000)]
[CSS Parser] The page-break-* properties are only keyword props for old parser.
https://bugs.webkit.org/show_bug.cgi?id=165381

Reviewed by Dean Jackson.

* css/parser/CSSParser.cpp:
(WebCore::isKeywordPropertyID):
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209320 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Don't use CSS_PARSER_INTEGER unit for resolved integer calcs.
hyatt@apple.com [Mon, 5 Dec 2016 17:28:23 +0000 (17:28 +0000)]
[CSS Parser] Don't use CSS_PARSER_INTEGER unit for resolved integer calcs.
https://bugs.webkit.org/show_bug.cgi?id=165379

Reviewed by Dean Jackson.

* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumber):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209319 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Add parseValue support to new parser. Use new parser for UA sheet too...
hyatt@apple.com [Mon, 5 Dec 2016 17:13:42 +0000 (17:13 +0000)]
[CSS Parser] Add parseValue support to new parser. Use new parser for UA sheet too if useNewParser is set.
https://bugs.webkit.org/show_bug.cgi?id=165376

Reviewed by Zalan Bujtas.

* css/StyleColor.cpp:
(WebCore::StyleColor::isColorKeyword):
Include system colors when using the fast parseValue path.

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::setupParser):
Add an assert to catch any code path using the old parser when the new parser flag is set.

(WebCore::CSSParser::parseSheet):
(WebCore::CSSParser::parseRule):
(WebCore::CSSParser::parseKeyframeRule):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseSelector):
(WebCore::CSSParser::parseDeclaration):
Patched to use the new parser in UASheetMode as well as other modes when the new parser flag
is set. parseValue is patched to use the new parser's fast paths and to call into CSSParserImpl's
parseValue.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::isSimpleLengthPropertyID):
Support CSSPropertyShapeMargin in the fast path since the old parser did in its fast path.

(WebCore::parseSimpleLengthValue):
Don't ever return unitless numbers. If we accept a unitless number, convert the unit to PX still.

(WebCore::CSSParserFastPaths::parseColor):
Use the CSSValuePool when creating colors on the fast path.

* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::parseValue):
* css/parser/CSSParserImpl.h:
Change the return type to be compatible with the old parser's ParseResult flag.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209318 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRemoved MediaPlayerPrivateTaskTimer
annulen@yandex.ru [Mon, 5 Dec 2016 17:06:28 +0000 (17:06 +0000)]
Removed MediaPlayerPrivateTaskTimer
https://bugs.webkit.org/show_bug.cgi?id=165373

Reviewed by Sam Weinig.

It is not used anywhere since QTSDK removal in r165476.

No new tests needed.

* platform/graphics/win/MediaPlayerPrivateTaskTimer.cpp: Removed.
* platform/graphics/win/MediaPlayerPrivateTaskTimer.h: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209317 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed cmake buildfix after r209307.
ossy@webkit.org [Mon, 5 Dec 2016 11:50:56 +0000 (11:50 +0000)]
Unreviewed cmake buildfix after r209307.

* PlatformMac.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209316 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed cmake buildfix after r209252.
ossy@webkit.org [Mon, 5 Dec 2016 11:31:24 +0000 (11:31 +0000)]
Unreviewed cmake buildfix after r209252.

* PlatformMac.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209315 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Eliminate in-place lowercasing in the parser.
hyatt@apple.com [Mon, 5 Dec 2016 00:35:34 +0000 (00:35 +0000)]
[CSS Parser] Eliminate in-place lowercasing in the parser.
https://bugs.webkit.org/show_bug.cgi?id=165368

Reviewed by Darin Adler.

Source/WebCore:

Replace the in-place lowercasing that the parser does with new
mechanisms. In-place lowercasing ruins serialization and doesn't
work on CSS parsed from static strings. It also has the side effect
of mutating strings passed in from JavaScript like for querySelectorAll.

For class/id selectors, we now check if the string is lowercase or not.
If it contains uppercase ASCII characters, then we allocate the RareData
for the selector. RareData now has two fields instead of one for the value,
a matching value (all lowercase in quirks mode), and a serializing value (the
original string). Because this is done at the CSSSelector level, the old
parser has been patched as well for these cases.

In addition, in-place lowercasing was done for pseudo-elements, for
media query features, and for attr(). In all of these cases we do
lowercase converting by first checking if it's needed. Serialization will
not retain the original string in these cases, so we may want to revisit
these cases in the future and apply a solution similar to what we did for
selectors.

* css/CSSGrammar.y.in:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::createRareData):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::RareData::RareData):
(WebCore::CSSSelector::RareData::~RareData):
* css/CSSSelector.h:
(WebCore::CSSSelector::RareData::create):
(WebCore::CSSSelector::setValue):
(WebCore::CSSSelector::value):
(WebCore::CSSSelector::serializingValue):
* css/MediaQueryExp.cpp:
(WebCore::MediaQueryExpression::MediaQueryExpression):
* css/parser/CSSParserToken.cpp:
(WebCore::convertToASCIILowercaseInPlace): Deleted.
(WebCore::CSSParserToken::convertToASCIILowercaseInPlace): Deleted.
* css/parser/CSSParserToken.h:
* css/parser/CSSParserValues.h:
(WebCore::CSSParserSelector::setValue):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeAttr):
* css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumeId):
(WebCore::CSSSelectorParser::consumeClass):
(WebCore::CSSSelectorParser::consumePseudo):
* css/parser/MediaQueryParser.cpp:
(WebCore::MediaQueryParser::readFeature):

LayoutTests:

* fast/media/mq-pointer-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209314 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAdd support for Wasm ctz and popcnt
keith_miller@apple.com [Sun, 4 Dec 2016 22:47:02 +0000 (22:47 +0000)]
Add support for Wasm ctz and popcnt
https://bugs.webkit.org/show_bug.cgi?id=165369

Reviewed by Saam Barati.

JSTests:

* wasm/function-tests/ctz.js: Added.
* wasm/function-tests/popcnt.js: Added.

Source/JavaScriptCore:

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::countTrailingZeros32):
(JSC::MacroAssemblerARM64::countTrailingZeros64):
* assembler/MacroAssemblerX86Common.cpp:
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::countTrailingZeros32):
(JSC::MacroAssemblerX86Common::supportsBMI1):
(JSC::MacroAssemblerX86Common::ctzAfterBsf):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::countTrailingZeros64):
* assembler/X86Assembler.h:
(JSC::X86Assembler::tzcnt_rr):
(JSC::X86Assembler::tzcntq_rr):
(JSC::X86Assembler::bsf_rr):
(JSC::X86Assembler::bsfq_rr):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Ctz>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Ctz>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Popcnt>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Popcnt>):
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209313 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWe should have a Wasm callee
sbarati@apple.com [Sun, 4 Dec 2016 21:23:56 +0000 (21:23 +0000)]
We should have a Wasm callee
https://bugs.webkit.org/show_bug.cgi?id=165163

Reviewed by Keith Miller.

This patch adds JSWebAssemblyCallee and stores it into the
callee slot in the call frame as part of the prologue of a
wasm function. This is the first step in implementing
unwinding from/through wasm frames. We will use the callee
to identify that a machine frame belongs to wasm code.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(callWasmFunction):
(functionTestWasmModuleFunctions):
* llint/LowLevelInterpreter64.asm:
* runtime/JSGlobalObject.cpp:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* wasm/JSWebAssembly.h:
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::parseAndCompile):
* wasm/WasmCallingConvention.h:
(JSC::Wasm::CallingConvention::setupFrameInPrologue):
* wasm/WasmFormat.h:
* wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::initializeCallees):
* wasm/WasmPlan.h:
(JSC::Wasm::Plan::compiledFunction):
(JSC::Wasm::Plan::getCompiledFunctions): Deleted.
* wasm/js/JSWebAssemblyCallee.cpp: Added.
(JSC::JSWebAssemblyCallee::JSWebAssemblyCallee):
(JSC::JSWebAssemblyCallee::finishCreation):
(JSC::JSWebAssemblyCallee::destroy):
* wasm/js/JSWebAssemblyCallee.h: Added.
(JSC::JSWebAssemblyCallee::create):
(JSC::JSWebAssemblyCallee::createStructure):
(JSC::JSWebAssemblyCallee::jsEntryPoint):
* wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::create):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
(JSC::JSWebAssemblyModule::visitChildren):
* wasm/js/JSWebAssemblyModule.h:
(JSC::JSWebAssemblyModule::moduleInformation):
(JSC::JSWebAssemblyModule::callee):
(JSC::JSWebAssemblyModule::callees):
(JSC::JSWebAssemblyModule::offsetOfCallees):
(JSC::JSWebAssemblyModule::allocationSize):
(JSC::JSWebAssemblyModule::compiledFunctions): Deleted.
* wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::visitChildren):
(JSC::WebAssemblyFunction::finishCreation):
* wasm/js/WebAssemblyFunction.h:
(JSC::WebAssemblyFunction::webAssemblyCallee):
(JSC::WebAssemblyFunction::instance):
(JSC::WebAssemblyFunction::signature):
(JSC::CallableWebAssemblyFunction::CallableWebAssemblyFunction): Deleted.
(JSC::WebAssemblyFunction::webAssemblyFunctionCell): Deleted.
* wasm/js/WebAssemblyFunctionCell.cpp:
(JSC::WebAssemblyFunctionCell::create): Deleted.
(JSC::WebAssemblyFunctionCell::WebAssemblyFunctionCell): Deleted.
(JSC::WebAssemblyFunctionCell::destroy): Deleted.
(JSC::WebAssemblyFunctionCell::createStructure): Deleted.
* wasm/js/WebAssemblyFunctionCell.h:
(JSC::WebAssemblyFunctionCell::function): Deleted.
* wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::constructJSWebAssemblyModule):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209312 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWeb Inspector: Assertion Failures breakpoint should respect global Breakpoints enable...
mattbaker@apple.com [Sun, 4 Dec 2016 20:22:58 +0000 (20:22 +0000)]
Web Inspector: Assertion Failures breakpoint should respect global Breakpoints enabled setting
https://bugs.webkit.org/show_bug.cgi?id=165277
<rdar://problem/29467098>

Reviewed by Mark Lam.

Source/JavaScriptCore:

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::handleConsoleAssert):
Check that breakpoints are active before pausing.

LayoutTests:

New test for DebuggerManager.prototype.breakPointsEnabled.

* inspector/debugger/breakpoints-disabled-expected.txt: Added.
* inspector/debugger/breakpoints-disabled.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209311 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoFix a build break on EFL since r209303.
gyuyoung.kim@webkit.org [Sun, 4 Dec 2016 09:20:35 +0000 (09:20 +0000)]
Fix a build break on EFL since r209303.

Unreviewed build fix.

Source/WebCore:

* bindings/js/SerializedScriptValue.cpp:
(WebCore::exceptionForSerializationFailure): Add a return in the end of function.

Tools:

* Scripts/webkitperl/FeatureList.pm: Disable SS Device Adaptation temporarily.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209310 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRefactor SymbolImpl layout
utatane.tea@gmail.com [Sun, 4 Dec 2016 00:28:49 +0000 (00:28 +0000)]
Refactor SymbolImpl layout
https://bugs.webkit.org/show_bug.cgi?id=165247

Reviewed by Darin Adler.

Source/JavaScriptCore:

Use SymbolImpl::{create, createNullSymbol} instead.

* runtime/PrivateName.h:
(JSC::PrivateName::PrivateName):

Source/WTF:

This patch moves SymbolImpl initialization from StringImpl to SymbolImpl.
In SymbolImpl, we create the appropriate fields. At that time, these fields
should be aligned to the BufferSubstring StringImpl.

And we newly create the `m_flags` in SymbolImpl. Instead of using special
StringImpl::null(), we store s_flagIsNullSymbol flag here. In WTF, we have
the invariant that StringImpl::empty() is the only atomic empty string.
But StringImpl::null() breaks this invariant. Using a special flag is safer
way to represent the null Symbol `Symbol()`.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/StdLibExtras.h:
(WTF::roundUpToMultipleOfImpl0):
(WTF::roundUpToMultipleOfImpl):
(WTF::roundUpToMultipleOf):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::createSymbol): Deleted.
(WTF::StringImpl::createNullSymbol): Deleted.
* wtf/text/StringImpl.h:
(WTF::StringImpl::isAtomic):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::requiresCopy):
(WTF::StringImpl::isNullSymbol): Deleted.
(WTF::StringImpl::symbolAwareHash): Deleted.
(WTF::StringImpl::existingSymbolAwareHash): Deleted.
(WTF::StringImpl::null): Deleted.
(WTF::StringImpl::extractFoldedStringInSymbol): Deleted.
(WTF::StringImpl::symbolRegistry): Deleted.
(WTF::StringImpl::hashForSymbol): Deleted.
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::nextHashForSymbol): Deleted.
* wtf/text/SymbolImpl.cpp: Copied from Source/WTF/wtf/text/SymbolRegistry.cpp.
(WTF::SymbolImpl::nextHashForSymbol):
(WTF::SymbolImpl::create):
(WTF::SymbolImpl::createNullSymbol):
* wtf/text/SymbolImpl.h:
(WTF::SymbolImpl::hashForSymbol):
(WTF::SymbolImpl::symbolRegistry):
(WTF::SymbolImpl::isNullSymbol):
(WTF::SymbolImpl::extractFoldedString):
(WTF::SymbolImpl::SymbolImpl):
(WTF::StringImpl::symbolAwareHash):
(WTF::StringImpl::existingSymbolAwareHash):
* wtf/text/SymbolRegistry.cpp:
(WTF::SymbolRegistry::~SymbolRegistry):
(WTF::SymbolRegistry::symbolForKey):
(WTF::SymbolRegistry::keyForSymbol):
* wtf/text/UniquedStringImpl.h:
(WTF::UniquedStringImpl::UniquedStringImpl):

Tools:

* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209309 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoFixed the build after r209307.
mitz@apple.com [Sun, 4 Dec 2016 00:11:41 +0000 (00:11 +0000)]
Fixed the build after r209307.

* TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm:
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209308 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[Cocoa] Expose InjectedBundlePageEditorClient via the Objective-C bundle SPI
mitz@apple.com [Sat, 3 Dec 2016 23:49:32 +0000 (23:49 +0000)]
[Cocoa] Expose InjectedBundlePageEditorClient via the Objective-C bundle SPI
https://bugs.webkit.org/show_bug.cgi?id=165276
<rdar://problem/29467040>

Reviewed by Darin Adler.

Source/WebCore:

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write): Make sure to put the client data on the pasteboard,
  like we do on macOS.

Source/WebKit2:

Test: TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject): Wrap InjectedBundleRangeHandle in WKWebProcessPlugInRangeHandle.

* WebKit2.xcodeproj/project.pbxproj: Added references to new files, making
  WKWebProcessPlugInEditingDelegate.h and WKWebProcessPlugInRangeHandle.h private headers.

* WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h: Added. An base class
  based on InjectedBundlePageEditorClient.
(API::InjectedBundle::EditorClient::~EditorClient):
(API::InjectedBundle::EditorClient::shouldBeginEditing):
(API::InjectedBundle::EditorClient::shouldEndEditing):
(API::InjectedBundle::EditorClient::shouldInsertNode):
(API::InjectedBundle::EditorClient::shouldInsertText):
(API::InjectedBundle::EditorClient::shouldDeleteRange):
(API::InjectedBundle::EditorClient::shouldChangeSelectedRange):
(API::InjectedBundle::EditorClient::shouldApplyStyle):
(API::InjectedBundle::EditorClient::didBeginEditing):
(API::InjectedBundle::EditorClient::didEndEditing):
(API::InjectedBundle::EditorClient::didChange):
(API::InjectedBundle::EditorClient::didChangeSelection):
(API::InjectedBundle::EditorClient::willWriteToPasteboard):
(API::InjectedBundle::EditorClient::getPasteboardDataForRange):
(API::InjectedBundle::EditorClient::didWriteToPasteboard):

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Added. Declares
  the new delegate protocol, currently comprising three methods corresponding to
  willWriteToPasteboard, getPasteboardDataForRange, and didWriteToPasteboard.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame jsRangeForRangeHandle:inWorld:]): Added. Gets the JS wrapper for
  the specified range handle.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h: Added.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm: Added.
(-[WKWebProcessPlugInRangeHandle dealloc]): Call the InjectedBundleRangeHandle destructor.
(+[WKWebProcessPlugInRangeHandle rangeHandleWithJSValue:inContext:]): Get or create an
  InjectedBundleRangeHandle for the specified object.
(-[WKWebProcessPlugInRangeHandle frame]): Return the range’s owner document’s frame.
(-[WKWebProcessPlugInRangeHandle _rangeHandle]): Return the InjectedBundleRangeHandle.
(-[WKWebProcessPlugInRangeHandle _apiObject]): Ditto.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandleInternal.h: Added.
(WebKit::wrapper):

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetEditorClient): Updated for WebPage change.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _editingDelegate]): Added. Returns the
  delegate.
(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Added. Defines a
  Client class, which derives from API::InjectedBundle::EditorClient, and invokes the
  delegate methods. Instantiates a Client and sets it on the WebPage.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
  Declared new _editingDelegate property.

* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::document): Added. Returns an InjectedBundleNodeHandle
  for the range’s owner document.
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:

* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
(WebKit::InjectedBundlePageEditorClient::InjectedBundlePageEditorClient): Added. Calls
  initialize().
(WebKit::InjectedBundlePageEditorClient::shouldBeginEditing): Updated for type change.
(WebKit::InjectedBundlePageEditorClient::shouldEndEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldInsertNode): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldInsertText): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldDeleteRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldChangeSelectedRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldApplyStyle): Ditto.
(WebKit::InjectedBundlePageEditorClient::didBeginEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::didEndEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::didChange): Ditto.
(WebKit::InjectedBundlePageEditorClient::didChangeSelection): Ditto.
(WebKit::InjectedBundlePageEditorClient::willWriteToPasteboard): Ditto.
(WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::didWriteToPasteboard): Ditto.
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: Now derives from
  API::InjectedBundle::EditorClient.

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldDeleteRange): Ditto.
(WebKit::WebEditorClient::shouldBeginEditing): Ditto.
(WebKit::WebEditorClient::shouldEndEditing): Ditto.
(WebKit::WebEditorClient::shouldInsertNode): Ditto.
(WebKit::WebEditorClient::shouldInsertText): Ditto.
(WebKit::WebEditorClient::shouldChangeSelectedRange): Ditto.
(WebKit::WebEditorClient::shouldApplyStyle): Ditto.
(WebKit::WebEditorClient::didBeginEditing): Ditto.
(WebKit::WebEditorClient::respondToChangedContents): Ditto.
(WebKit::WebEditorClient::respondToChangedSelection): Ditto.
(WebKit::WebEditorClient::didEndEditing): Ditto.
(WebKit::WebEditorClient::didWriteSelectionToPasteboard): Ditto.
(WebKit::WebEditorClient::willWriteSelectionToPasteboard): Ditto.
(WebKit::WebEditorClient::getClientPasteboardDataForRange): Ditto.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize m_editorClient.
(WebKit::WebPage::setInjectedBundleEditorClient): Replaces
  initializeInjectedBundleEditorClient and just sets m_editorClient.
(WebKit::WebPage::close): Resets m_editorClient.

* WebProcess/WebPage/WebPage.h: Changed m_editorClient to a unique_ptr.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm: Added.
(-[BundleEditingDelegateRemoteObject willWriteToPasteboard:]):
(-[BundleEditingDelegateRemoteObject didWriteToPasteboard]):
(TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegatePlugIn.mm: Added.
(-[BundleEditingDelegatePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:willWriteRangeToPasteboard:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:pasteboardDataForRange:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextControllerDidWriteToPasteboard:]):
* TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegateProtocol.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209307 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWebAssembly: update binary format to 0xD version
jfbastien@apple.com [Sat, 3 Dec 2016 22:58:26 +0000 (22:58 +0000)]
WebAssembly: update binary format to 0xD version
https://bugs.webkit.org/show_bug.cgi?id=165345

Reviewed by Keith Miller.

As described in the following PR: https://github.com/WebAssembly/design/pull/836
Originally committed in r209175, reverted in r209242, and fixed in r209284.

JSTests:

* wasm/Builder.js:
(const._normalizeFunctionSignature):
* wasm/Builder_WebAssemblyBinary.js:
(const.emitters.Type):
(const.emitters.Code):
* wasm/LowLevelBinary.js:
(export.default.LowLevelBinary.prototype.block_type):
(export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.
* wasm/WASM.js:
* wasm/js-api/test_basic_api.js:
* wasm/self-test/test_BuilderWebAssembly.js:
(EmptyModule):
(CustomSection):
* wasm/self-test/test_WASM.js:
* wasm/wasm.json:

Source/JavaScriptCore:

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::zeroForType):
(JSC::Wasm::B3IRGenerator::addConstant):
(JSC::Wasm::createJSWrapper):
* wasm/WasmCallingConvention.h:
(JSC::Wasm::CallingConvention::marshallArgument):
* wasm/WasmFormat.cpp:
(JSC::Wasm::toString): Deleted.
* wasm/WasmFormat.h:
(JSC::Wasm::isValueType):
(JSC::Wasm::toB3Type): Deleted.
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
* wasm/WasmModuleParser.cpp:
(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseType):
* wasm/WasmModuleParser.h:
* wasm/WasmParser.h:
(JSC::Wasm::Parser::parseResultType):
* wasm/generateWasm.py:
(Wasm.__init__):
* wasm/generateWasmOpsHeader.py:
(cppMacro):
(typeMacroizer):
(opcodeMacroizer):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
* wasm/wasm.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209306 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Remove Inspector test of Bison errors
hyatt@apple.com [Sat, 3 Dec 2016 21:43:04 +0000 (21:43 +0000)]
[CSS Parser] Remove Inspector test of Bison errors
https://bugs.webkit.org/show_bug.cgi?id=165362

Reviewed by Simon Fraser.

The old parser logs invalid property declaration errors whenever a Bison error
occurs. This catches only a fraction of declaration errors,
since Bison accepts practically everything and leaves it up to the specific
parser functions to determine validity of a property.

The new parser does not have this error reporting. The old reporting will be
removed from CSSParser when the new parser turns on. This patch removes the
test of Bison errors.

* inspector/console/css-source-locations-expected.txt: Removed.
* inspector/console/css-source-locations.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209305 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Remove line numbers from StyleRule.
hyatt@apple.com [Sat, 3 Dec 2016 21:22:49 +0000 (21:22 +0000)]
[CSS Parser] Remove line numbers from StyleRule.
https://bugs.webkit.org/show_bug.cgi?id=165361

Reviewed by Simon Fraser.

StyleRules have a concept of a source line that is eventually passed
to the inspector. This was only ever used by normal rules, i.e., ones with
selectors, and set to 0 for all other rules. This line was set to the line number
at which the end of the selector text occurred.

Because Inspector already computes the start and end range for the selector
text, storing a source line on StyleRule ends up being redundant. This patch
gets rid of the source line and uses the end line of the selector text
instead.

* css/CSSGrammar.y.in:
Remove the code that updates the last seen selector line.

* css/CSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::StyleKeyframe):
* css/CSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
No longer need to pass in a 0 line number.

* css/StyleRule.cpp:
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::create):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
(WebCore::StyleRuleFontFace::StyleRuleFontFace):
(WebCore::StyleRuleGroup::StyleRuleGroup):
(WebCore::StyleRuleCharset::StyleRuleCharset):
(WebCore::StyleRuleNamespace::StyleRuleNamespace):
* css/StyleRule.h:
(WebCore::StyleRuleBase::StyleRuleBase):
(WebCore::StyleRuleBase::sourceLine): Deleted.
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::StyleRuleImport):
Remove m_sourceLine and change the create methods and constructors to not
require a line number.

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::createStyleRule):
Line number no longer needed.

(WebCore::CSSParser::updateLastSelectorLineAndPosition): Deleted.
* css/parser/CSSParser.h:
Got rid of the function that tracks and updates the last seen selector line.

* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeStyleRule):
Fix the rule creation in the new parser to not pass in a 0 line number.

* inspector/InspectorStyleSheet.cpp:
(WebCore::buildSourceRangeObject):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
* inspector/InspectorStyleSheet.h:
Patch the methods that build up the selector range to return the end line
information for selector text so that it can be set as the source line
for the rule (thus eliminating the need to store the line number on the style
rule itself).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209304 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agooptional sequence values not handled correctly by binding generator
weinig@apple.com [Sat, 3 Dec 2016 20:22:43 +0000 (20:22 +0000)]
optional sequence values not handled correctly by binding generator
https://bugs.webkit.org/show_bug.cgi?id=142562

Source/WebCore:

Also fixes:
    Remove non-standard postMessage overload
    https://bugs.webkit.org/show_bug.cgi?id=161911
and
    Wrong argument order in window.postMessage
    https://bugs.webkit.org/show_bug.cgi?id=63141

Reviewed by Darin Adler.

* WebCore.xcodeproj/project.pbxproj:
Remove no longer needed files.

* bindings/generic/IDLTypes.h:
* bindings/js/JSDOMConvert.h:
(WebCore::Converter<IDLObject>::convert):
Add support for the WebIDL object type.

* bindings/js/JSDOMBinding.cpp:
(WebCore::createDOMException):
Add support for throwing stack overflow errors.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::handlePostMessage): Deleted.
(WebCore::JSDOMWindow::postMessage): Deleted.
* bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp: Removed.
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::JSMessagePort::postMessage): Deleted.
(WebCore::extractTransferables): Deleted.
* bindings/js/JSMessagePortCustom.h: Removed.
* bindings/js/JSWorkerCustom.cpp:
(WebCore::JSWorker::postMessage): Deleted.
Remove custom bindings for postMessage.

* bindings/js/SerializedScriptValue.h:
Switch to using enum class.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
Add new create function that takes the transfer list, processes it, and returns
MessagePorts and SerializedScriptValue / exception.

(WebCore::CloneBase::throwStackOverflow): Deleted.
(WebCore::CloneDeserializer::throwValidationError): Deleted.
Remove uncalled functions.

* bindings/scripts/CodeGenerator.pm:
(IsRefPtrType):
(IsBuiltinType):
* bindings/scripts/CodeGeneratorJS.pm:
(AddToIncludesForIDLType):
(GetBaseIDLType):
Add support for the WebIDL 'object' type.

* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/TestObj.idl:
Add tests for 'object'.

* dom/ExceptionCode.h:
Add two new ExceptionCodes:
  - ExistingExceptionError, to indicate that implementation code threw a JS exception.
  - StackOverflowError, to indicate that a stack overflow exception should be thrown.

* dom/MessagePort.cpp:
(WebCore::MessagePort::postMessage):
* dom/MessagePort.h:
* dom/MessagePort.idl:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
* page/DOMWindow.h:
* page/DOMWindow.idl:
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::postMessage):
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerGlobalScope.idl:
* workers/Worker.cpp:
(WebCore::Worker::postMessage):
* workers/Worker.h:
* workers/Worker.idl:
Update to call new SerializedScriptValue create function.

LayoutTests:

Reviewed by Darin Adler.

* fast/canvas/webgl/resources/typed-array-worker.js:
* fast/dom/Window/window-postmessage-args-expected.txt:
* fast/dom/Window/window-postmessage-args.html:
* fast/events/message-port-deleted-document.html:
* fast/events/message-port-deleted-frame.html:
* fast/events/message-port-inactive-document.html:
* fast/events/message-port-multi-expected.txt:
* fast/events/message-port.html:
* fast/workers/worker-context-multi-port-expected.txt:
* fast/workers/worker-multi-port-expected.txt:
* webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js:
* webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js:
Update for new exceptions and stricter enforcement of the postMessage signature.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209303 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Support Dashboard Regions
hyatt@apple.com [Sat, 3 Dec 2016 19:56:49 +0000 (19:56 +0000)]
[CSS Parser] Support Dashboard Regions
https://bugs.webkit.org/show_bug.cgi?id=165357

Reviewed by Daniel Bates.

* css/CSSValueKeywords.in:
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeWebkitDashboardRegion):
(WebCore::CSSPropertyParser::parseSingleValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209302 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAdd Wasm copysign
keith_miller@apple.com [Sat, 3 Dec 2016 19:05:22 +0000 (19:05 +0000)]
Add Wasm copysign
https://bugs.webkit.org/show_bug.cgi?id=165355

Reviewed by Filip Pizlo.

JSTests:

* wasm/function-tests/copysign.js: Added.

Source/JavaScriptCore:

This patch also makes two other important changes:

1) allows for i64 constants in the B3 generator language.
2) Fixes a bug with F64ConvertUI64 where the operation returned a Float instead
   of a Double in B3.

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):
* wasm/generateWasmB3IRGeneratorInlinesHeader.py:
(CodeGenerator.generateOpcode):
(generateConstCode):
(generateI32ConstCode): Deleted.
* wasm/wasm.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209301 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, rolling out r209298.
commit-queue@webkit.org [Sat, 3 Dec 2016 18:41:14 +0000 (18:41 +0000)]
Unreviewed, rolling out r209298.
https://bugs.webkit.org/show_bug.cgi?id=165359

broke the build (Requested by smfr on #webkit).

Reverted changeset:

"Add Wasm copysign"
https://bugs.webkit.org/show_bug.cgi?id=165355
http://trac.webkit.org/changeset/209298

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209300 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoImprove the behavior of scroll-into-view when the target is inside position:fixed
simon.fraser@apple.com [Sat, 3 Dec 2016 18:33:54 +0000 (18:33 +0000)]
Improve the behavior of scroll-into-view when the target is inside position:fixed
https://bugs.webkit.org/show_bug.cgi?id=165354

Reviewed by Zalan Bujtas.
Source/WebCore:

The existing RenderLayer::scrollRectToVisible() code paid no heed to whether the
target was inside position:fixed, resulting in unwanted scrolls.

Fix this by plumbing through from the call sites a "insideFixed" flag which we get
when we call localToAbsolute(), and use this flag to avoid scrolling at all if
unzoomed.

If zoomed and we're focussing something inside position:fixed, and if visual viewports
are enabled, we can compute the visual viewport required to reveal the target rect,
which gives us the ideal scroll position.

Fix a bug on non-iOS platforms when zoomed, which is to scale the viewRect since
frameView.visibleContentRect() gives an unscaled rect on those platforms.

Not all callers of scrollRectToVisible() are fixed, but those that are not will get
the current behavior.

Tests: fast/overflow/scroll-anchor-in-position-fixed.html
       fast/visual-viewport/zoomed-scroll-into-view-fixed.html
       fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html

* dom/Element.cpp:
(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::scrollIntoViewIfNotVisible):
(WebCore::Element::updateFocusAppearance):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::absoluteCaretBounds):
(WebCore::FrameSelection::recomputeCaretRect):
(WebCore::FrameSelection::revealSelection):
* editing/FrameSelection.h:
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::absoluteCaretBounds):
* editing/VisiblePosition.h:
* editing/htmlediting.cpp:
(WebCore::absoluteBoundsForLocalCaretRect):
* editing/htmlediting.h:
* page/FrameView.cpp:
(WebCore::FrameView::scrollElementToRect):
(WebCore::FrameView::scrollToAnchor):
* page/PrintContext.cpp:
(WebCore::PrintContext::outputLinkedDestinations):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::getLeadingCorner):
(WebCore::RenderElement::getTrailingCorner):
(WebCore::RenderElement::absoluteAnchorRect):
(WebCore::RenderElement::anchorRect): Renamed to absoluteAnchorRect().
* rendering/RenderElement.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::getRectToExpose):
(WebCore::RenderLayer::autoscroll):
* rendering/RenderLayer.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::scrollRectToVisible):
* rendering/RenderObject.h:

Source/WebKit/mac:

Plumb through 'insideFixed'. We don't get compute it, so behavior from
these call sites won't change.

* WebView/WebFrame.mm:
(-[WebFrame _scrollDOMRangeToVisible:]):
(-[WebFrame _scrollDOMRangeToVisible:withInset:]):

LayoutTests:

* fast/overflow/scroll-anchor-in-position-fixed-expected.txt: Added.
* fast/overflow/scroll-anchor-in-position-fixed.html: Added.
* fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed-expected.txt: Added.
* fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html: Added.
* platform/ios-simulator/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209299 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAdd Wasm copysign
keith_miller@apple.com [Sat, 3 Dec 2016 17:37:46 +0000 (17:37 +0000)]
Add Wasm copysign
https://bugs.webkit.org/show_bug.cgi?id=165355

Reviewed by Filip Pizlo.

JSTests:

* wasm/function-tests/copysign.js: Added.

Source/JavaScriptCore:

This patch also makes two other important changes:

1) allows for i64 constants in the B3 generator language.
2) Fixes a bug with F64ConvertUI64 where the operation returned a Float instead
   of a Double in B3.

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):
* wasm/generateWasmB3IRGeneratorInlinesHeader.py:
(CodeGenerator.generateOpcode):
(generateConstCode):
(generateI32ConstCode): Deleted.
* wasm/wasm.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209298 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agolocalToAbsolute() does incorrect conversion for elements inside position:fixed with...
simon.fraser@apple.com [Sat, 3 Dec 2016 16:36:14 +0000 (16:36 +0000)]
localToAbsolute() does incorrect conversion for elements inside position:fixed with zooming
https://bugs.webkit.org/show_bug.cgi?id=165244

Reviewed by Zalan Bujtas.

Source/WebCore:

RenderView::mapLocalToContainer() and RenderView::mapAbsoluteToLocalPoint() handle the coordinate
mapping through the RenderView's transform (when zoomed), and apply the scroll offset for position:fixed
elements.

They did this in the wrong order; "local to absolute" applied the zoom scale, and then adjusted for the scroll position,
and "absolute to local" applied the scroll position and then the transform.

However that scroll position adjustment should be in unzoomed coordinates, since it's accounting for the
layout adjustment that position:fixed receives (which actually occurs via the localToAbsolute() call
in RenderLayer's accumulateOffsetTowardsAncestor()). "local to absolute" should therefore apply the scroll
adjustment first before the transform, and "absolute to local" the reverse.

In both visual viewport mode, and legacy drifty fixed mode FrameView::scrollPositionForFixedPosition()
returns a scroll offset that is unaffected by zoom, which is correct and confirms this change.

[Confusingly, ScrollView scroll positions _are_ affected by zoom, as the entire document gets bigger.]

RenderGeometryMap::mapToContainer(), which is an optimization on top of RenderView::mapLocalToContainer(),
gets a similar fix.

Test: fast/zooming/client-rect-in-fixed-zoomed.html

* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::mapToContainer):
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):

LayoutTests:

Test getBoundingClientRect() (which internally calls localToAbsolute())
for an element inside position:fixed after zooming.

* fast/visual-viewport/zoomed-fixed-expected.txt: Rebaseline
* fast/zooming/client-rect-in-fixed-zoomed-expected.txt: Added.
* fast/zooming/client-rect-in-fixed-zoomed.html: Added.
* platform/ios-simulator/TestExpectations: Skip new test on iOS; test requires window.scrollTo to be synchronous.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209297 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, fix git having a breakdown over trying to reland a rollout.
keith_miller@apple.com [Sat, 3 Dec 2016 07:28:25 +0000 (07:28 +0000)]
Unreviewed, fix git having a breakdown over trying to reland a rollout.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209296 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[JSC] add additional bit to JSTokenType bitfield
keith_miller@apple.com [Sat, 3 Dec 2016 06:40:37 +0000 (06:40 +0000)]
[JSC] add additional bit to JSTokenType bitfield
https://bugs.webkit.org/show_bug.cgi?id=165091

Patch by Caitlin Potter <caitp@igalia.com> on 2016-12-02
Reviewed by Geoffrey Garen.

JSTests:

* stress/bug-165091.js: Added.
(shouldThrowSyntaxError):

Source/JavaScriptCore:

Avoid overflow which causes keyword tokens to be treated as unary
tokens now that "async" is tokenized as a keyword, by granting an
additional 64 bits to be occupied by token IDs.

* parser/ParserTokens.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209295 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[iOS] Add a WebView private configuration for changing the WebContent update frequency
commit-queue@webkit.org [Sat, 3 Dec 2016 03:58:56 +0000 (03:58 +0000)]
[iOS] Add a WebView private configuration for changing the WebContent update frequency
https://bugs.webkit.org/show_bug.cgi?id=165289
<rdar://problem/29472577>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-12-02
Reviewed by Tim Horton.

Expose a preference which allows us to control the fps of web content updates.

* UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::contentUpdateFrequency):
(API::PageConfiguration::setContentUpdateFrequency):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _contentUpdateFrequency]):
(-[WKWebViewConfiguration _setContentUpdateFrequency:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(-[WKOneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
(WebKit::RemoteLayerTreeDrawingAreaProxy::contentUpdateFrequency):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209294 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[JSC] add additional bit to JSTokenType bitfield
caitp@igalia.com [Sat, 3 Dec 2016 03:39:42 +0000 (03:39 +0000)]
[JSC] add additional bit to JSTokenType bitfield
https://bugs.webkit.org/show_bug.cgi?id=165091

Reviewed by Geoffrey Garen.

JSTests:

* stress/bug-165091.js: Added.
(shouldThrowSyntaxError):

Source/JavaScriptCore:

Avoid overflow which causes keyword tokens to be treated as unary
tokens now that "async" is tokenized as a keyword, by granting an
additional 64 bits to be occupied by token IDs.

* parser/ParserTokens.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209293 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoPut names on layers in release builds
simon.fraser@apple.com [Sat, 3 Dec 2016 02:44:49 +0000 (02:44 +0000)]
Put names on layers in release builds
https://bugs.webkit.org/show_bug.cgi?id=165347

Reviewed by Tim Horton.

Put names on GraphicsLayers (and therefore CALayers) in release builds. Release names
are a simpler, truncated version of debug names, with <tagname> id class names.

Non-primary layer names converted to lowercase and "layer" removed.

Fix comments that refer to gdb.

Use ENABLE(TREE_DEBUGGING) in more places.

* dom/Node.h:
* dom/Position.h:
* dom/Range.h:
* editing/FrameSelection.h:
* editing/VisiblePosition.h:
* editing/VisibleSelection.h:
* history/HistoryItem.h:
* page/FrameTree.h:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setName):
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
(WebCore::GraphicsLayerCA::updateNames):
(WebCore::GraphicsLayerCA::updateBackdropFilters):
(WebCore::GraphicsLayerCA::updateContentsImage):
(WebCore::GraphicsLayerCA::updateClippingStrategy):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::tileGridContainerLayerName):
(WebCore::TileController::zoomedOutTileGridContainerLayerName):
(WebCore::TileController::createTileLayer):
* rendering/CounterNode.h:
* rendering/InlineBox.h:
* rendering/InlineFlowBox.h:
* rendering/RenderCounter.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::name):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateAncestorClippingLayer):
(WebCore::RenderLayerBacking::updateDescendantClippingLayer):
(WebCore::RenderLayerBacking::updateForegroundLayer):
(WebCore::RenderLayerBacking::updateBackgroundLayer):
(WebCore::RenderLayerBacking::updateMaskingLayer):
(WebCore::RenderLayerBacking::updateChildClippingStrategy):
(WebCore::RenderLayerBacking::updateScrollingLayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
* rendering/RenderObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209292 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[Modern Media Controls] Update the media controls size as the media element is resized
graouts@webkit.org [Sat, 3 Dec 2016 02:40:30 +0000 (02:40 +0000)]
[Modern Media Controls] Update the media controls size as the media element is resized
https://bugs.webkit.org/show_bug.cgi?id=165346

Reviewed by Dean Jackson.

The "resize" event dispatched by HTMLMediaElement indicates a change in the media's
intrinsic size, while the "resize" event dispatched by the HTMLMediaElement's ShadowRoot
indicates that the layout size of the media element has changed. We now use the latter.

* Modules/modern-media-controls/media/media-controller.js:
(MediaController):
(MediaController.prototype.handleEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209291 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMarking fast/dom/Window/window-resize-contents.html as flaky on mac-wk2.
ryanhaddad@apple.com [Sat, 3 Dec 2016 01:53:56 +0000 (01:53 +0000)]
Marking fast/dom/Window/window-resize-contents.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=165352

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209290 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting
aestes@apple.com [Sat, 3 Dec 2016 01:31:48 +0000 (01:31 +0000)]
[Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting
https://bugs.webkit.org/show_bug.cgi?id=164492

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

* Configurations/JavaScriptCore.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.$(PRODUCT_NAME:rfc1034identifier).
* Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to
${PRODUCT_BUNDLE_IDENTIFIER}.

Source/WebCore:

* Configurations/WebCore.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.$(PRODUCT_NAME:rfc1034identifier).
* Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to
${PRODUCT_BUNDLE_IDENTIFIER}.

Source/WebInspectorUI:

* Configurations/WebInspectorUIFramework.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.$(PRODUCT_NAME:rfc1034identifier).
* Info.plist: Changed CFBundleIdentifier's value from
com.apple.${PRODUCT_NAME:rfc1034identifier} to ${PRODUCT_BUNDLE_IDENTIFIER}.

Source/WebKit/mac:

* Configurations/WebKitLegacy.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.$(PRODUCT_NAME:rfc1034identifier).
* Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to
${PRODUCT_BUNDLE_IDENTIFIER}.

Source/WebKit2:

* Configurations/DatabaseService.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
$(PRODUCT_NAME).
* Configurations/NetworkService.xcconfig: Ditto.
* Configurations/PluginService.32.xcconfig: Ditto.
* Configurations/PluginService.64.xcconfig: Ditto.
* Configurations/WebContentService.xcconfig: Ditto.
* Configurations/WebKit.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.$(PRODUCT_NAME:rfc1034identifier).
* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist: Changed
CFBundleIdentifier's value from ${PRODUCT_NAME} to ${PRODUCT_BUNDLE_IDENTIFIER}.
* Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to
${PRODUCT_BUNDLE_IDENTIFIER}.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Changed
CFBundleIdentifier's value from ${PRODUCT_NAME} to ${PRODUCT_BUNDLE_IDENTIFIER}.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist: Ditto.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist: Ditto.
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Ditto.
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: Ditto.
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Ditto.
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: Ditto.
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Ditto.

Tools:

* DumpRenderTree/TestNetscapePlugIn/mac/Info.plist: Changed CFBundleIdentifier's value from
com.apple.testnetscapeplugin to ${PRODUCT_BUNDLE_IDENTIFIER}.
* DumpRenderTree/ios/Info.plist: Changed CFBundleIdentifier's value from
org.webkit.DumpRenderTree to ${PRODUCT_BUNDLE_IDENTIFIER}.
* DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig: Set
PRODUCT_BUNDLE_IDENTIFIER to org.webkit.DumpRenderTree.
* DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig: Set
PRODUCT_BUNDLE_IDENTIFIER to com.apple.testnetscapeplugin.
* MiniBrowser/Configurations/MiniBrowser.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
org.webkit.$(PRODUCT_NAME:rfc1034identifier).
* MiniBrowser/Configurations/MiniBrowserBundle.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.$(PRODUCT_NAME:rfc1034identifier).
* MiniBrowser/mac/Bundle/Info.plist: Changed CFBundleIdentifier's value from
com.apple.${PRODUCT_NAME:rfc1034identifier} to ${PRODUCT_BUNDLE_IDENTIFIER}.
* MiniBrowser/mac/Info.plist: Changed CFBundleIdentifier's value from
org.webkit.${PRODUCT_NAME} to ${PRODUCT_BUNDLE_IDENTIFIER}.
* TestWebKitAPI/Configurations/InjectedBundle.xcconfig: Set INFOPLIST_FILE to
InjectedBundle-Info.plist and set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.$(PRODUCT_NAME:rfc1034identifier).
* TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.$(PRODUCT_NAME:rfc1034identifier).
* TestWebKitAPI/InjectedBundle-Info.plist: Changed CFBundleIdentifier's value from
com.yourcompany.${PRODUCT_NAME:rfc1034identifier} to ${PRODUCT_BUNDLE_IDENTIFIER}.
* TestWebKitAPI/cocoa/WebProcessPlugIn/Info.plist: Added a CFBundleIdentifier key with the
value ${PRODUCT_BUNDLE_IDENTIFIER}.
* WebKitTestRunner/Configurations/InjectedBundle.xcconfig: Set INFOPLIST_FILE to
InjectedBundle-Info.plist and set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.WebKitTestRunner.InjectedBundle.
* WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig: Set
PRODUCT_BUNDLE_IDENTIFIER to org.webkit.$(PRODUCT_NAME:rfc1034identifier).
* WebKitTestRunner/InjectedBundle-Info.plist: Changed CFBundleIdentifier's value from
com.apple.WebKitTestRunner.InjectedBundle to ${PRODUCT_BUNDLE_IDENTIFIER}.
* WebKitTestRunner/WebKitTestRunnerApp/WebKitTestRunnerApp-Info.plist: Changed
CFBundleIdentifier's value from org.webkit.${PRODUCT_NAME:rfc1034identifier} to
${PRODUCT_BUNDLE_IDENTIFIER}.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209288 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMake a public facing page to check for WebKit features
dino@apple.com [Sat, 3 Dec 2016 01:20:48 +0000 (01:20 +0000)]
Make a public facing page to check for WebKit features
https://bugs.webkit.org/show_bug.cgi?id=165331
<rdar://problem/29488535>

Reviewed by Antoine Quint.

Add a web page to webkit.org that allows us to live
detect our experimental features. This is mostly for
internal debugging, but also provides simple examples
of how real content would do such detection.

* experimental-features.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209287 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Turn off more tests until new parser is on
hyatt@apple.com [Sat, 3 Dec 2016 01:09:21 +0000 (01:09 +0000)]
[CSS Parser] Turn off more tests until new parser is on
https://bugs.webkit.org/show_bug.cgi?id=165349

Reviewed by Dean Jackson.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209286 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRebaseline fast/text/crash-complex-text-surrogate.html after r209279.
ryanhaddad@apple.com [Sat, 3 Dec 2016 00:54:22 +0000 (00:54 +0000)]
Rebaseline fast/text/crash-complex-text-surrogate.html after r209279.

Unreviewed test gardening.

* platform/ios-simulator/fast/text/crash-complex-text-surrogate-expected.txt:
* platform/mac-yosemite/fast/text/crash-complex-text-surrogate-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209285 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWebAssembly: mark WasmOps.h as private
jfbastien@apple.com [Sat, 3 Dec 2016 00:37:33 +0000 (00:37 +0000)]
WebAssembly: mark WasmOps.h as private
https://bugs.webkit.org/show_bug.cgi?id=165335

Reviewed by Mark Lam.

* JavaScriptCore.xcodeproj/project.pbxproj: WasmOps.h will be used by non-JSC and should therefore be private

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209284 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, rolling out r209275 and r209276.
cdumez@apple.com [Sat, 3 Dec 2016 00:35:25 +0000 (00:35 +0000)]
Unreviewed, rolling out r209275 and r209276.
https://bugs.webkit.org/show_bug.cgi?id=165348

"broke the arm build" (Requested by keith_miller on #webkit).

Reverted changesets:

"Add Wasm floating point nearest and trunc"
https://bugs.webkit.org/show_bug.cgi?id=165339
http://trac.webkit.org/changeset/209275

"Unreviewed, forgot to change instruction after renaming."
http://trac.webkit.org/changeset/209276

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209283 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoHTML Interactive Form Validation popovers do not show in iOS WKWebViews
cdumez@apple.com [Sat, 3 Dec 2016 00:22:00 +0000 (00:22 +0000)]
HTML Interactive Form Validation popovers do not show in iOS WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=165340
<rdar://problem/29489966>

Reviewed by Simon Fraser.

HTML Interactive Form Validation popovers do not show in iOS WKWebViews,
only in MobileSafari. To address the issue try to find an appropriate
UIViewController to present the popover when the client does not provide
a presenting view controller.

* platform/ValidationBubble.h:
* platform/ios/ValidationBubbleIOS.mm:
(WebCore::fallbackViewController):
(WebCore::ValidationBubble::setAnchorRect):
* platform/spi/ios/UIKitSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209282 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[Mac] Update sandbox profiles to use modern syntax and avoid duplication
bfulgham@apple.com [Fri, 2 Dec 2016 23:21:22 +0000 (23:21 +0000)]
[Mac] Update sandbox profiles to use modern syntax and avoid duplication
https://bugs.webkit.org/show_bug.cgi?id=165332
<rdar://problem/26898991>

Reviewed by Anders Carlsson.

Update the Mac sandbox profiles to reflect that modern Cocoa applications
communicate with cfprefsd, rather than plists on disk (and have done so
for the past several releases).

Get rid of some duplicated rules, as well as old compatibility rules that
are never triggered under supported operating systems.

* DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209280 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Fix errors in numerous layout tests
hyatt@apple.com [Fri, 2 Dec 2016 23:07:41 +0000 (23:07 +0000)]
[CSS Parser] Fix errors in numerous layout tests
https://bugs.webkit.org/show_bug.cgi?id=165343

Reviewed by Zalan Bujtas.

* fast/backgrounds/repeat/parsing-background-repeat-expected.txt:
* fast/backgrounds/repeat/script-tests/parsing-background-repeat.js:
The old parser partially applies shorthands, even if it rejects later on.
The new parser properly rejects the entire shorthand. Fix the test so that
the numbers at the end are not unitless so that the entire shorthand parses, allowing
the components to be obtained.

* fast/css/unknown-pseudo-element-matching-expected.txt:
* fast/css/unknown-pseudo-element-matching.html:
* fast/text/crash-complex-text-surrogate.html:
The old parser allows the tag name to be omitted following a namespace bar (|). This
is not legal according to the namespaces spec, and the new parser behaves correctly.
For the crash test, it's important that all the code still runs, so we know the crash
doesn't happen, so I patched the test to put in '*' for the tag names to keep everything
the same.

For the unknown-pseudo-element test, I just removed the five invalid cases.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209279 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRemove redundant LayoutUnit conversions.
zalan@apple.com [Fri, 2 Dec 2016 23:05:48 +0000 (23:05 +0000)]
Remove redundant LayoutUnit conversions.
https://bugs.webkit.org/show_bug.cgi?id=165338

Reviewed by Simon Fraser.

RenderBlockFlow::computeColumnCountAndWidth has some redundant LayoutUnti <-> unsigned conversions.

No change in functionality.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeColumnCountAndWidth):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209277 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, forgot to change instruction after renaming.
keith_miller@apple.com [Fri, 2 Dec 2016 23:01:21 +0000 (23:01 +0000)]
Unreviewed, forgot to change instruction after renaming.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::nearestIntDouble):
(JSC::MacroAssemblerARM64::nearestIntFloat):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209276 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAdd Wasm floating point nearest and trunc
keith_miller@apple.com [Fri, 2 Dec 2016 22:59:20 +0000 (22:59 +0000)]
Add Wasm floating point nearest and trunc
https://bugs.webkit.org/show_bug.cgi?id=165339

Reviewed by Filip Pizlo.

JSTests:

* wasm/function-tests/nearest.js: Added.
* wasm/function-tests/trunc.js: Added.

Source/JavaScriptCore:

This patch also allows any wasm primitive type to be passed as a
string.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::nearestIntDouble):
(JSC::MacroAssemblerARM64::nearestIntFloat):
(JSC::MacroAssemblerARM64::truncDouble):
(JSC::MacroAssemblerARM64::truncFloat):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::nearestIntDouble):
(JSC::MacroAssemblerX86Common::nearestIntFloat):
* jsc.cpp:
(box):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32ConvertUI64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F64Nearest>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32Nearest>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F64Trunc>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32Trunc>):
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209275 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Turn off the large value test, since clamping is not the same.
hyatt@apple.com [Fri, 2 Dec 2016 22:53:19 +0000 (22:53 +0000)]
[CSS Parser] Turn off the large value test, since clamping is not the same.
https://bugs.webkit.org/show_bug.cgi?id=165341

Reviewed by Zalan Bujtas.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209274 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoES6SampleBench should report an average for Steady State so that all of the numbers...
fpizlo@apple.com [Fri, 2 Dec 2016 22:44:38 +0000 (22:44 +0000)]
ES6SampleBench should report an average for Steady State so that all of the numbers are comparable
https://bugs.webkit.org/show_bug.cgi?id=165325

Reviewed by Saam Barati.

This makes all of the numbers that ES6SampleBench reports comparable to each other: they all speak of the time
it took to run an iteration of something.

* ES6SampleBench/results.js:
(Results.prototype.reportResult):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209273 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMarking three imported/w3c/web-platform-tests/IndexedDB/idbindex-* tests as flaky...
ryanhaddad@apple.com [Fri, 2 Dec 2016 22:41:39 +0000 (22:41 +0000)]
Marking three imported/w3c/web-platform-tests/IndexedDB/idbindex-* tests as flaky on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=165222

Unreviewed test gardening.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209272 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[Modern Media Controls] Add rewind and fast-forward support
graouts@webkit.org [Fri, 2 Dec 2016 22:36:50 +0000 (22:36 +0000)]
[Modern Media Controls] Add rewind and fast-forward support
https://bugs.webkit.org/show_bug.cgi?id=165294

Reviewed by Dean Jackson.

We implement support for rewinding and fast-forwarding the media by pressing dedicated
buttons in fullscreen on macOS. We introduce a new SeekButton class that the existing
RewindButton and ForwardButton classes now extend and which provides handling of
"mousedown" and "mouseup" events to indicate that a button is being pressed to the
UI delegate.

We also introduce a new SeekSupport class from which SeekBackwardSupport and
SeekForwardSupport inherit to integrate with those controls and update the media
time.

Tests: media/modern-media-controls/layout-node/layout-node-parent-of-type.html
       media/modern-media-controls/seek-backward-support/seek-backward-support.html
       media/modern-media-controls/seek-forward-support/seek-forward-support.html

* Modules/modern-media-controls/controls/forward-button.js:
* Modules/modern-media-controls/controls/layout-node.js:
(LayoutNode.prototype.parentOfType):
* Modules/modern-media-controls/controls/rewind-button.js:
* Modules/modern-media-controls/controls/seek-button.js: Added.
(SeekButton):
(SeekButton.prototype.handleEvent):
(SeekButton.prototype._didStartPressing):
(SeekButton.prototype._didStopPressing):
(SeekButton.prototype._notifyDelegateOfPressingState):
* Modules/modern-media-controls/js-files:
* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype._updateControlsIfNeeded):
* Modules/modern-media-controls/media/seek-backward-support.js: Added.
(SeekBackwardSupport.prototype.get control):
(SeekBackwardSupport.prototype.get multiplier):
(SeekBackwardSupport):
* Modules/modern-media-controls/media/seek-forward-support.js: Added.
(SeekForwardSupport.prototype.get control):
(SeekForwardSupport.prototype.get multiplier):
(SeekForwardSupport):
* Modules/modern-media-controls/media/seek-support.js: Added.
(SeekSupport.prototype.get multiplier):
(SeekSupport.prototype.buttonPressedStateDidChange):
(SeekSupport.prototype._startSeeking):
(SeekSupport.prototype._stopSeeking):
(SeekSupport.prototype._seek):
(SeekSupport):
* WebCore.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209271 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago‘Versioning.’
matthew_hanson@apple.com [Fri, 2 Dec 2016 22:34:01 +0000 (22:34 +0000)]
‘Versioning.’

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209270 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMake IndexedDB.WebProcessKillIDBCleanup even more reliable.
beidson@apple.com [Fri, 2 Dec 2016 22:29:17 +0000 (22:29 +0000)]
Make IndexedDB.WebProcessKillIDBCleanup even more reliable.
https://bugs.webkit.org/show_bug.cgi?id=165330

Reviewed by Alex Christensen.

The test currently nulls out a RetainPtr<WKWebView> to try to destroy the view and kill the process.

Problem is that doesn't reliably destroy the view.
We should explicitly kill the process instead.

Also, by relocating when we kill the process, we can better test behavior of the IndexedDB mechanism.
e.g. We explicitly confirm that a second WebProcess can simultaneously attach to the same unique database as the first.

* TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm:
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209269 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRegression(r209252): HTML interactive validation should not be enabled on iOS WK1 yet
cdumez@apple.com [Fri, 2 Dec 2016 22:17:16 +0000 (22:17 +0000)]
Regression(r209252): HTML interactive validation should not be enabled on iOS WK1 yet
https://bugs.webkit.org/show_bug.cgi?id=165328

Reviewed by Simon Fraser.

Only enable HTML interactive form validation on Mac WK1, not iOS WK1.

* WebView/WebViewData.mm:
(-[WebViewPrivate init]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209267 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, rolling out r209136.
commit-queue@webkit.org [Fri, 2 Dec 2016 22:15:10 +0000 (22:15 +0000)]
Unreviewed, rolling out r209136.
https://bugs.webkit.org/show_bug.cgi?id=165337

broke 36 webkitpy tests (Requested by mcatanzaro on #webkit).

Reverted changeset:

"Make it possible to use an existing simulator instance for
one-off testing"
https://bugs.webkit.org/show_bug.cgi?id=164568
http://trac.webkit.org/changeset/209136

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209266 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Need to set edit flags properly when user-modify/select are used.
hyatt@apple.com [Fri, 2 Dec 2016 22:07:08 +0000 (22:07 +0000)]
[CSS Parser] Need to set edit flags properly when user-modify/select are used.
https://bugs.webkit.org/show_bug.cgi?id=165334

Reviewed by Dean Jackson.

The old parser calls parserSetUsesStyleBasedEditability on
StyleSheetContents* from inside isValidKeywordPropertyAndValue. This
is pretty lame, but we have to do the same in order to pass editing
layout tests.

All of the functions below have been patched with the sole purpose of
propagating StyleSheetContents* through to isValidKeywordPropertyAndValue
in the new parser.

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValueWithVariableReferences):
* css/parser/CSSParser.h:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::parseKeywordValue):
(WebCore::CSSParserFastPaths::maybeParseValue):
* css/parser/CSSParserFastPaths.h:
* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeDeclarationValue):
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::CSSPropertyParser):
(WebCore::CSSPropertyParser::parseValue):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
(WebCore::CSSPropertyParser::consumeFont):
(WebCore::CSSPropertyParser::parseShorthand):
* css/parser/CSSPropertyParser.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209265 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoREGRESSION (r208802): TouchBar pause button doesn't work
bdakin@apple.com [Fri, 2 Dec 2016 22:00:57 +0000 (22:00 +0000)]
REGRESSION (r208802): TouchBar pause button doesn't work
https://bugs.webkit.org/show_bug.cgi?id=165333
-and corresponding-
rdar://problem/29487187

Reviewed by Wenson Hsieh.

The previous code got this right by using self.playing. _playing was totally un-
used, so this patch just removes it.

* platform/mac/WebPlaybackControlsManager.h:
* platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager setPlaying:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209264 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMarking media/modern-media-controls/scrubber-support/scrubber-support-click.html...
ryanhaddad@apple.com [Fri, 2 Dec 2016 21:46:12 +0000 (21:46 +0000)]
Marking media/modern-media-controls/scrubber-support/scrubber-support-click.html as a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=165327

Unreviewed test gardening.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209263 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMarking http/tests/inspector/network/xhr-request-data-encoded-correctly.html as a...
ryanhaddad@apple.com [Fri, 2 Dec 2016 21:46:10 +0000 (21:46 +0000)]
Marking http/tests/inspector/network/xhr-request-data-encoded-correctly.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=164033

Unreviewed test gardening.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209262 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRequire preflight for non-standard CORS-safelisted request headers Accept, Accept...
wilander@apple.com [Fri, 2 Dec 2016 21:33:51 +0000 (21:33 +0000)]
Require preflight for non-standard CORS-safelisted request headers Accept, Accept-Language, and Content-Language
https://bugs.webkit.org/show_bug.cgi?id=165178
<rdar://problem/18792250>

Reviewed by Youenn Fablet.

Fetch currently only restricts the header Content-Type for simple requests:
https://fetch.spec.whatwg.org/#cors-safelisted-request-header

This means simple CORS requests can send unexpected characters in Accept,
Accept-Language, and Content-Language header values.

RFC 7231 implies restrictions on these header values:
- Accept https://tools.ietf.org/html/rfc7231#section-5.3.2
- Accept-Language https://tools.ietf.org/html/rfc7231#section-5.3.5
- Content-Language https://tools.ietf.org/html/rfc7231#section-3.1.3.2

As per discussions in the W3C WebAppSec group we should try to restrict
these header values to help protect servers that do not expect simple CORS
requests.

Non-standard, safelisted header values should trigger a preflight and require
the headers to be whitelisted in the response's Access-Control-Allow-Headers.
For Fetch in no-cors mode this change means non-standard header values are not
allowed to be set.

Source/WebCore:

Test: http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight.html

* loader/CrossOriginAccessControl.cpp:
(WebCore::isSimpleCrossOriginAccessRequest):
    Now calls WebCore::isCrossOriginSafeRequestHeader() instead of
    WebCore::isOnAccessControlSimpleRequestHeaderWhitelist().
(WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Deleted.
    It was a duplicate of WebCore::isCrossOriginSafeRequestHeader().
* loader/CrossOriginAccessControl.h:
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
    Now calls WebCore::isCrossOriginSafeRequestHeader() instead of
    WebCore::isOnAccessControlSimpleRequestHeaderWhitelist().
* platform/network/HTTPParsers.cpp:
(WebCore::isValidAcceptHeaderValue):
    Basic check that the characters are all ASCII alphanumeric, ' ', '*', '.',
    '/', ';', or '='.
(WebCore::isValidLanguageHeaderValue):
    Basic check that the characters are all ASCII alphanumeric, ' ', '*', '-',
    '.', ';', or '='.
(WebCore::isSimpleHeader):
    Removed duplicate code. Now calls WebCore::isCrossOriginSafeRequestHeader().
(WebCore::isCrossOriginSafeRequestHeader):
    Now makes a call to WebCore::isValidAcceptHeaderValue() for Accept
    headers and WebCore::isValidLanguageHeaderValue() for Accept-Language
    and Content-Language headers.
* platform/network/HTTPParsers.h:

LayoutTests:

* http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight-expected.txt: Added.
* http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight.html: Added.
    Tests that:
    - Normal Accept, Accept-Language, and Content-Language headers don't trigger
        a preflight.
    - Abnormal Accept, Accept-Language, and Content-Language headers do trigger
        a preflight.
    - Abnormal Accept, Accept-Language, and Content-Language headers are
        accepted if the server whitelists them.
* http/tests/xmlhttprequest/resources/cors-preflight-safelisted-headers-responder.php: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209261 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoASSERTION FAILED: flowThread->regionInRange(region, startRegion, endRegion) in WebCor...
zalan@apple.com [Fri, 2 Dec 2016 21:25:15 +0000 (21:25 +0000)]
ASSERTION FAILED: flowThread->regionInRange(region, startRegion, endRegion) in WebCore::RenderBox::borderBoxRectInRegion
https://bugs.webkit.org/show_bug.cgi?id=152113
<rdar://problem/27720221>

Reviewed by David Hyatt.

Source/WebCore:

In a nested column context, do not process a spanner if it belongs to an inner column.

While populating a flow, we search for possible spanners and construct multicolumnsets accordingly.
However due to the top-down nature of populating flows, a descendant spanner could belong to an inner
flow which hasn't been populated yet.
This patch checks if a potential spanner has an ancestor (which is also a descendant
of the flow that we are populating -> nested) that will eventually create a flow context.

Test: fast/multicol/assert-with-nested-columns-and-spanner.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeColumnCountAndWidth):
(WebCore::RenderBlockFlow::willCreateColumns):
* rendering/RenderBlockFlow.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::isValidColumnSpanner):

LayoutTests:

* fast/multicol/assert-with-nested-columns-and-spanner-expected.txt: Added.
* fast/multicol/assert-with-nested-columns-and-spanner.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209259 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Make sure the z-component of transform-origin can be implicit
hyatt@apple.com [Fri, 2 Dec 2016 21:02:44 +0000 (21:02 +0000)]
[CSS Parser] Make sure the z-component of transform-origin can be implicit
https://bugs.webkit.org/show_bug.cgi?id=165326

Reviewed by Tim Horton.

Source/WebCore:

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeTransformOrigin):

LayoutTests:

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209258 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoREGRESSION (r192344): Web Inspector: Turning off Code Coverage or Type Profiler logs...
nvasilyev@apple.com [Fri, 2 Dec 2016 20:59:00 +0000 (20:59 +0000)]
REGRESSION (r192344): Web Inspector: Turning off Code Coverage or Type Profiler logs an error
https://bugs.webkit.org/show_bug.cgi?id=164804
<rdar://problem/29278028>

Reviewed by Matt Baker.

BasicBlockAnnotator and TypeTokenAnnotator were instanciated for a resource in an inactive Debugger tab.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
Don't show any content view if we are not in a selected tab.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209257 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[CSS Parser] Fix invalid test font specification
hyatt@apple.com [Fri, 2 Dec 2016 20:31:58 +0000 (20:31 +0000)]
[CSS Parser] Fix invalid test font specification
https://bugs.webkit.org/show_bug.cgi?id=165324

Reviewed by Sam Weinig.

* fast/text/trak-optimizeLegibility.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209256 268f45cc-cd09-0410-ab3c-d52691b4dbfc