WebKit-https.git
4 years agoUnreviewed build fix after r209910
mmaxfield@apple.com [Fri, 16 Dec 2016 07:12:23 +0000 (07:12 +0000)]
Unreviewed build fix after r209910

Unreviewed.

* wtf/Platform.h:

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

4 years ago[EFL] Fix debug build break since r209873. Unreviewed.
jh718.park@samsung.com [Fri, 16 Dec 2016 07:10:00 +0000 (07:10 +0000)]
[EFL] Fix debug build break since r209873. Unreviewed.
https://bugs.webkit.org/show_bug.cgi?id=165945

No new tests, no new behaviours.

Use Primitive System Data Type uint64_t instead of unsigned long long.

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::openInternal):
* Modules/indexeddb/IDBFactory.h:

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

4 years agotext-align: justify and word-spacing combine to overflow column
zalan@apple.com [Fri, 16 Dec 2016 06:32:36 +0000 (06:32 +0000)]
text-align: justify and word-spacing combine to overflow column
https://bugs.webkit.org/show_bug.cgi?id=165796
rdar://problem/29672168

Reviewed by Myles C. Maxfield.

Source/WebCore:

The value of the word-spacing property is not applied on the inline-tree boxes (normal line layout)
with kerning enabled. It causes hittest failures and selection/rendering glitches.
We normally use the pre-computed 'WordMeasurements' values to figure out the run widths. However
with kerning on, in some cases we need to re-measure a certain part of the text by calling RenderText::width().
This function omits the word-spacing value for leading whitespace, so when this text fragment starts with a whitespace,
(while it's not at the beginning of the run) we have to manually add the word-spacing value back.
r146087 added this logic with the restriction of applying it only to whitespace-only runs.

Test: fast/css/word-spacing-with-normal-layout.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):

LayoutTests:

These are progressions.

* fast/css/word-spacing-with-normal-layout-expected.html: Added.
* fast/css/word-spacing-with-normal-layout.html: Added.
* platform/mac/css1/text_properties/word_spacing-expected.txt:
* platform/mac/fast/css/word-space-extra-expected.txt:
* platform/mac/fast/text/whitespace/span-in-word-space-causes-overflow-expected.txt:
* platform/mac/fast/text/word-space-expected.txt:
* platform/mac/svg/custom/svg-fonts-in-html-expected.txt:
* platform/mac/svg/custom/svg-fonts-word-spacing-expected.txt:

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

4 years agoStop reinterpret_casting UBreakIterators to the undefined type TextBreakIterator
mmaxfield@apple.com [Fri, 16 Dec 2016 05:19:32 +0000 (05:19 +0000)]
Stop reinterpret_casting UBreakIterators to the undefined type TextBreakIterator
https://bugs.webkit.org/show_bug.cgi?id=165931

Source/WebCore:

Reviewed by Alex Christensen.

No new tests because there is no behavior change.

* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
* editing/TextCheckingHelper.cpp:
(WebCore::findMisspellings):
* editing/VisibleUnits.cpp:
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
(WebCore::isLogicalStartOfWord):
(WebCore::islogicalEndOfWord):
(WebCore::visualWordPosition):
(WebCore::startSentenceBoundary):
(WebCore::endSentenceBoundary):
(WebCore::previousSentencePositionBoundary):
(WebCore::nextSentencePositionBoundary):
* html/HTMLInputElement.cpp:
* html/HTMLTextAreaElement.cpp:
* html/InputType.cpp:
* html/TextFieldInputType.cpp:
* html/TextInputType.cpp:
* platform/graphics/StringTruncator.cpp:
(WebCore::textBreakAtOrPreceding):
(WebCore::boundedTextBreakFollowing):
(WebCore::rightClipToWordBuffer):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::offsetForPosition):
* platform/text/TextBoundaries.cpp:
(WebCore::findNextWordFromIndex):
(WebCore::findWordBoundary):
(WebCore::findEndWordBoundary):
* platform/text/mac/TextBoundaries.mm:
(WebCore::findNextWordFromIndex):
* rendering/BreakLines.h:
(WebCore::nextBreakablePositionNonLoosely):
(WebCore::nextBreakablePositionLoosely):
* rendering/RenderBlock.cpp:
* rendering/RenderText.cpp:
(WebCore::makeCapitalized):
(WebCore::RenderText::previousOffset):
(WebCore::RenderText::previousOffsetForBackwardDeletion):
(WebCore::RenderText::nextOffset):
* rendering/SimpleLineLayoutTextFragmentIterator.h:
* rendering/line/LineBreaker.h:

Source/WebKit/ios:

Reviewed by Alex Christensen.

* Misc/WebUIKitSupport.mm:

Source/WTF:

We have a class declaration for TextBreakIterator but no definition for it. When we
create an ICU UBreakIterator, we immediately reinterpret_cast it to this undefined
type, and pass it around our code inside WebCore. Then, whenever we want to actually
use this iterator, we reinterpret_cast it back to UBreakIterator. This is likely due
to some ports historically implementing breaking interators on top of other libraries
other than ICU; however, now, all ports use ICU. Because this internal type is not
helpful and just adds confusion, we should just call our breaking iterators what
they are: UBreakIterators.

This patch is a mechanical replacement of TextBreakIterator to UBreakIterator and
removes the functions we were calling which pass through directly to ubrk_*().

Reviewed by Alex Christensen.

* wtf/text/LineBreakIteratorPoolICU.h:
(WTF::LineBreakIteratorPool::take):
(WTF::LineBreakIteratorPool::put):
* wtf/text/StringView.cpp:
(WTF::StringView::GraphemeClusters::Iterator::Impl::computeIndexEnd):
* wtf/text/TextBreakIterator.cpp:
(WTF::initializeIterator):
(WTF::initializeIteratorWithRules):
(WTF::setTextForIterator):
(WTF::setContextAwareTextForIterator):
(WTF::wordBreakIterator):
(WTF::sentenceBreakIterator):
(WTF::cursorMovementIterator):
(WTF::acquireLineBreakIterator):
(WTF::releaseLineBreakIterator):
(WTF::openLineBreakIterator):
(WTF::closeLineBreakIterator):
(WTF::getNonSharedCharacterBreakIterator):
(WTF::cacheNonSharedCharacterBreakIterator):
(WTF::isWordTextBreak):
(WTF::numGraphemeClusters):
(WTF::numCharactersInGraphemeClusters):
(WTF::textBreakFirst): Deleted.
(WTF::textBreakLast): Deleted.
(WTF::textBreakNext): Deleted.
(WTF::textBreakPrevious): Deleted.
(WTF::textBreakPreceding): Deleted.
(WTF::textBreakFollowing): Deleted.
(WTF::textBreakCurrent): Deleted.
(WTF::isTextBreak): Deleted.
* wtf/text/TextBreakIterator.h:
(WTF::LazyLineBreakIterator::lastCharacter):
(WTF::LazyLineBreakIterator::secondToLastCharacter):
(WTF::LazyLineBreakIterator::setPriorContext):
(WTF::LazyLineBreakIterator::updatePriorContext):
(WTF::LazyLineBreakIterator::resetPriorContext):
(WTF::LazyLineBreakIterator::priorContextLength):
(WTF::LazyLineBreakIterator::get):
(WTF::NonSharedCharacterBreakIterator::operator UBreakIterator*):
(WTF::NonSharedCharacterBreakIterator::operator TextBreakIterator*): Deleted.

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

4 years agoUse asString instead of toWTFString, toString, or getString when we already checked...
darin@apple.com [Fri, 16 Dec 2016 04:52:20 +0000 (04:52 +0000)]
Use asString instead of toWTFString, toString, or getString when we already checked isString
https://bugs.webkit.org/show_bug.cgi?id=165895

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Once we have called isString, we should always use asString and value rather than using
functions that have to deal with non-JSString objects. This leads to slightly fewer branches,
slightly less reference count churn, since the string is stored right inside the JSString,
and obviates the need for exception handling.

* bindings/ScriptValue.cpp:
(Inspector::jsToInspectorValue): Use asString/value instead of getString.
* dfg/DFGOperations.cpp:
(JSC::DFG::operationMapHash): Call jsMapHash with its new arguments.
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::evaluateWithScopeExtension): Use asString/value instead
of toWTFString.
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::evaluateWithScopeExtension): Ditto.
* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::InspectorHeapAgent::getPreview): Use asString/tryGetValue, instead of the
peculiar getString(nullptr) that was here before.
* jsc.cpp:
(functionGetGetterSetter): Use asString/toIdentifier instead of the much less efficient
toWTFString/Identifier::fromString.
(functionIsRope): Use asString instead of jsCast<JSString*>; same thing, but we should
prefer the asString function, since it exists.
(functionFindTypeForExpression): Use asString/value instead of getString.
(functionHasBasicBlockExecuted): Ditto.
(functionBasicBlockExecutionCount): Ditto.
(functionCreateBuiltin): Use asString/value instead of toWTFString and removed
unneeded RETURN_IF_EXCEPTION.
(valueWithTypeOfWasmValue): Use asString instead of jsCast<String*>.
(box): Ditto.
* runtime/DateConstructor.cpp:
(JSC::constructDate): Use asString/values instead of getString.
* runtime/ExceptionHelpers.cpp:
(JSC::errorDescriptionForValue): Tweaked formatting.

* runtime/HashMapImpl.h:
(JSC::jsMapHash): Changed this function to use asString/value.

* runtime/JSCJSValue.cpp:
(JSC::JSValue::dumpInContextAssumingStructure): Use asString instead of
jsCast<JSString*>.
(JSC::JSValue::dumpForBacktrace): Ditto.
* runtime/JSCJSValueInlines.h:
(JSC::toPreferredPrimitiveType): Ditto.

* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval): Use asString/value instead of toWTFString.

* runtime/JSString.cpp:
(JSC::JSString::destroy): Streamlined by removing local variable.
(JSC::JSString::estimatedSize): Use asString instead of jsCast<JSString*>.
(JSC::JSString::visitChildren): Ditto.
(JSC::JSString::toThis): Ditto.
* runtime/JSString.h:
(JSC::JSValue::toString): Ditto.
(JSC::JSValue::toStringOrNull): Ditto.
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncValueOf): Ditto.
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncToString): Ditto.
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncRepeatCharacter): Ditto.
(JSC::stringProtoFuncSubstr): Ditto.
(JSC::builtinStringSubstrInternal): Simplified assertion by removing local variable.

Source/WebCore:

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::extract): Use asString/value instead of toWTFString.

* Modules/mediastream/SDPProcessor.cpp:
(WebCore::SDPProcessor::callScript): Use asString/value instead of getString.

* bindings/js/ArrayValue.cpp:
(WebCore::ArrayValue::get): Use asString/value instead of toWTFString.

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::get): Use asString/length instead of toString/length.
(WebCore::createIDBKeyFromValue): Use asString/value instead of toWTFString.
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier): Ditto.
* bindings/js/JSDataCueCustom.cpp:
(WebCore::constructJSDataCue): Use asString/value instead of getString.
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::populateContextMenuItems): Use asString/value instead of toWTFString.

* bindings/js/ScriptController.cpp:
(WebCore::jsValueToModuleKey): Use asString/toIdentifier instead of
jsCast<JSString*>/value/Identifier::fromString.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal): Streamline by getting rid of local variable.

* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getDomainList): Use asString instead of jsCast<JSString*>.
(WebCore::ContentExtensions::loadTrigger): Use asString/value instead of toWTFString.
(WebCore::ContentExtensions::loadAction): Ditto.

* css/FontFace.cpp:
(WebCore::FontFace::create): Use asString/value instead of getString.

Source/WebKit/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::addValueToArray): Use asString/value instead of
toWTFString.
* WebView/WebView.mm:
(aeDescFromJSValue): Use asString/value instead of getString.

Source/WebKit2:

* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant): Use asString/value instead of toWTFString.

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

4 years agoChange ::computeLogicalHeight's computedValues out argument to the return value.
zalan@apple.com [Fri, 16 Dec 2016 04:37:28 +0000 (04:37 +0000)]
Change ::computeLogicalHeight's computedValues out argument to the return value.
https://bugs.webkit.org/show_bug.cgi?id=165789

Reviewed by Simon Fraser.

No change in functionality.

* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderContainer::computeLogicalHeight):
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::RenderImageControlsButton::computeLogicalHeight):
* html/shadow/mac/ImageControlsRootElementMac.cpp:
(WebCore::RenderImageControls::computeLogicalHeight):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
(WebCore::RenderBlock::estimateRegionRangeForBoxChild):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateLogicalHeight):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderBox.h:
(WebCore::RenderBox::ComputedMarginValues::ComputedMarginValues): Deleted.
(WebCore::RenderBox::LogicalExtentComputedValues::LogicalExtentComputedValues): Deleted.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::computeLogicalHeight):
* rendering/RenderFlowThread.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::computeLogicalHeight):
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::computeLogicalHeight):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::computeLogicalHeight):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::computeLogicalHeight):
* rendering/RenderProgress.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::computeLogicalHeight):
* rendering/RenderView.h:
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::computeLogicalHeight):
* rendering/svg/RenderSVGForeignObject.h:

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

4 years agocheck-style should not complain about code in icu directories
dbates@webkit.org [Fri, 16 Dec 2016 03:35:54 +0000 (03:35 +0000)]
check-style should not complain about code in icu directories
https://bugs.webkit.org/show_bug.cgi?id=53929

Reviewed by Darin Adler.

Skip style checking of imported ICU headers to avoid a deluge of style issues
as they do not conform to the WebKit Code Style guideline. We want to preserve
the formatting of these headers so as to make it straightforward to merge
changes to them, if necessary.

* Scripts/webkitpy/style/checker.py:

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

4 years agoMake sure HTML validation bubble's state is updated after layout
cdumez@apple.com [Fri, 16 Dec 2016 03:14:52 +0000 (03:14 +0000)]
Make sure HTML validation bubble's state is updated after layout
https://bugs.webkit.org/show_bug.cgi?id=165922
<rdar://problem/29694730>

Reviewed by Simon Fraser.

Source/WebCore:

Make sure HTML validation bubble's state is updated after layout.
In particular, if the validation bubble's associated element has
moved or is no longer visible, we now hide the bubble.

Tests: fast/forms/validation-bubble-disappears-when-input-detached.html
       fast/forms/validation-bubble-disappears-when-input-moved.html
       fast/forms/validation-bubble-disappears-when-input-no-longer-visible.html

* page/FrameView.cpp:
(WebCore::FrameView::viewportContentsChanged):
* page/Page.cpp:
(WebCore::Page::updateValidationBubbleStateIfNeeded):
* page/Page.h:
* page/ValidationMessageClient.h:

Source/WebKit/mac:

Make sure HTML validation bubble's state is updated after layout.
In particular, if the validation bubble's associated element has
moved or is no longer visible, we now hide the bubble.

* WebCoreSupport/WebValidationMessageClient.h:
* WebCoreSupport/WebValidationMessageClient.mm:
(WebValidationMessageClient::showValidationMessage):
(WebValidationMessageClient::hideValidationMessage):
(WebValidationMessageClient::updateValidationBubbleStateIfNeeded):

Source/WebKit2:

Make sure HTML validation bubble's state is updated after layout.
In particular, if the validation bubble's associated element has
moved or is no longer visible, we now hide the bubble.

* WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:
(WebKit::WebValidationMessageClient::showValidationMessage):
(WebKit::WebValidationMessageClient::hideValidationMessage):
(WebKit::WebValidationMessageClient::updateValidationBubbleStateIfNeeded):
* WebProcess/WebCoreSupport/WebValidationMessageClient.h:

LayoutTests:

Add several layout tests to cover this.

* fast/forms/validation-bubble-disappears-when-input-detached-expected.txt: Added.
* fast/forms/validation-bubble-disappears-when-input-detached.html: Added.
* fast/forms/validation-bubble-disappears-when-input-moved-expected.txt: Added.
* fast/forms/validation-bubble-disappears-when-input-moved.html: Added.
* fast/forms/validation-bubble-disappears-when-input-no-longer-visible-expected.txt: Added.
* fast/forms/validation-bubble-disappears-when-input-no-longer-visible.html: Added.

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

4 years ago[WebIDL] Remove use of Dictionary from JSCryptoAlgorithmDictionary
commit-queue@webkit.org [Fri, 16 Dec 2016 03:01:14 +0000 (03:01 +0000)]
[WebIDL] Remove use of Dictionary from JSCryptoAlgorithmDictionary
https://bugs.webkit.org/show_bug.cgi?id=165919

Patch by Sam Weinig <sam@webkit.org> on 2016-12-15
Reviewed by Darin Adler.

* bindings/js/JSCryptoAlgorithmDictionary.cpp:
* bindings/js/JSCryptoAlgorithmDictionary.h:
* bindings/js/JSCryptoOperationData.cpp:
* bindings/js/JSCryptoOperationData.h:
* bindings/js/JSWebKitSubtleCryptoCustom.cpp:
Replace simplistic use of Dictionary with simplistic use of direct JSObject
functions. Also, pass the ExecState by reference.

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

4 years agoFix validation of non-void if blocks with no else
keith_miller@apple.com [Fri, 16 Dec 2016 02:38:27 +0000 (02:38 +0000)]
Fix validation of non-void if blocks with no else
https://bugs.webkit.org/show_bug.cgi?id=165938

Reviewed by Saam Barati.

JSTests:

Add a new failing test and a fix an existing one.

* wasm/function-tests/dead-call.js:
* wasm/function-tests/if-no-else-non-void.js: Added.

Source/JavaScriptCore:

We should not have been allowing non-void if-blocks that don't
have an else. Since this causes a value to be placed on the
stack that only appears under some control flow and not another.

* wasm/WasmValidate.cpp:

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

4 years agoImprove NetworkSession logging
achristensen@apple.com [Fri, 16 Dec 2016 02:25:35 +0000 (02:25 +0000)]
Improve NetworkSession logging
https://bugs.webkit.org/show_bug.cgi?id=165941

Reviewed by Tim Horton.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
One of the "didReceiveResponse completionHandler (cancel)" messages was wrong,
and other messages could have more useful information without being overwhelming.

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

4 years agoGet rid of HeapRootVisitor and make SlotVisitor less painful to use
fpizlo@apple.com [Fri, 16 Dec 2016 02:16:19 +0000 (02:16 +0000)]
Get rid of HeapRootVisitor and make SlotVisitor less painful to use
https://bugs.webkit.org/show_bug.cgi?id=165911

Reviewed by Geoffrey Garen.
Source/JavaScriptCore:

Previously we had two ways of adding a raw pointer to the GC's mark stack:

- SlotVisitor::appendUnbarrieredXYZ() methods
- HeapRootVisitor::visit() methods

HeapRootVisitor existed only to prevent you from calling its non-WriteBarrier<> methods
unless you had permission. But SlotVisitor would let you do it anyway, because that was
a lot more practical.

I think that we should just have one way to do it. This removes HeapRootVisitor. It
also renames appendUnbarrieredXYZ to appendUnbarriered, and it removes the use of extra
indirection (so you now pass const WriteBarrier<>& instead of WriteBarrier<>*).

* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
* JavaScriptCore.xcodeproj/project.pbxproj:
* Scripts/builtins/builtins_templates.py:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitWeakly):
(JSC::CodeBlock::visitChildren):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
(JSC::CodeBlock::visitOSRExitTargets):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::CodeBlock::stronglyVisitWeakReferences):
* bytecode/DirectEvalCodeCache.cpp:
(JSC::DirectEvalCodeCache::visitAggregate):
* bytecode/InternalFunctionAllocationProfile.h:
(JSC::InternalFunctionAllocationProfile::visitAggregate):
* bytecode/ObjectAllocationProfile.h:
(JSC::ObjectAllocationProfile::visitAggregate):
* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::propagateTransitions):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::visitChildren):
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::visitChildren):
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::visitChildren):
* dfg/DFGDesiredTransitions.cpp:
(JSC::DFG::DesiredTransition::visitChildren):
* dfg/DFGDesiredWeakReferences.cpp:
(JSC::DFG::DesiredWeakReferences::visitChildren):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::visitChildren):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::markCodeBlocks):
(JSC::DFG::Plan::checkLivenessAndVisitChildren):
* heap/HandleSet.cpp:
(JSC::HandleSet::visitStrongHandles):
* heap/HandleSet.h:
* heap/HandleStack.cpp:
(JSC::HandleStack::visit):
* heap/HandleStack.h:
* heap/Heap.cpp:
(JSC::Heap::markToFixpoint):
* heap/Heap.h:
* heap/HeapRootVisitor.h: Removed.
* heap/LargeAllocation.cpp:
(JSC::LargeAllocation::visitWeakSet):
* heap/LargeAllocation.h:
* heap/MarkedBlock.h:
(JSC::MarkedBlock::Handle::visitWeakSet):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::visitWeakSets):
* heap/MarkedSpace.h:
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::appendUnbarriered):
* heap/SlotVisitor.h:
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::appendUnbarriered):
(JSC::SlotVisitor::append):
(JSC::SlotVisitor::appendHidden):
(JSC::SlotVisitor::appendValues):
(JSC::SlotVisitor::appendValuesHidden):
(JSC::SlotVisitor::appendUnbarrieredPointer): Deleted.
(JSC::SlotVisitor::appendUnbarrieredReadOnlyPointer): Deleted.
(JSC::SlotVisitor::appendUnbarrieredValue): Deleted.
(JSC::SlotVisitor::appendUnbarrieredReadOnlyValue): Deleted.
(JSC::SlotVisitor::appendUnbarrieredWeak): Deleted.
* heap/WeakBlock.cpp:
(JSC::WeakBlock::specializedVisit):
(JSC::WeakBlock::visit):
* heap/WeakBlock.h:
* heap/WeakSet.h:
(JSC::WeakSet::visit):
* interpreter/ShadowChicken.cpp:
(JSC::ShadowChicken::visitChildren):
* jit/GCAwareJITStubRoutine.cpp:
(JSC::MarkingGCAwareJITStubRoutine::markRequiredObjectsInternal):
* jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallStubRoutine::markRequiredObjectsInternal):
* jsc.cpp:
(WTF::Element::visitChildren):
(WTF::ImpureGetter::visitChildren):
(WTF::SimpleObject::visitChildren):
* runtime/AbstractModuleRecord.cpp:
(JSC::AbstractModuleRecord::visitChildren):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/ArgList.h:
* runtime/ClonedArguments.cpp:
(JSC::ClonedArguments::visitChildren):
* runtime/DirectArguments.cpp:
(JSC::DirectArguments::visitChildren):
* runtime/EvalExecutable.cpp:
(JSC::EvalExecutable::visitChildren):
* runtime/Exception.cpp:
(JSC::Exception::visitChildren):
* runtime/FunctionExecutable.cpp:
(JSC::FunctionExecutable::visitChildren):
* runtime/FunctionRareData.cpp:
(JSC::FunctionRareData::visitChildren):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::visitChildren):
* runtime/HashMapImpl.cpp:
(JSC::HashMapBucket<Data>::visitChildren):
(JSC::HashMapImpl<HashMapBucket>::visitChildren):
* runtime/InferredTypeTable.cpp:
(JSC::InferredTypeTable::visitChildren):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::visitChildren):
* runtime/IntlCollator.cpp:
(JSC::IntlCollator::visitChildren):
* runtime/IntlCollatorConstructor.cpp:
(JSC::IntlCollatorConstructor::visitChildren):
* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::visitChildren):
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::IntlDateTimeFormatConstructor::visitChildren):
* runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormat::visitChildren):
* runtime/IntlNumberFormatConstructor.cpp:
(JSC::IntlNumberFormatConstructor::visitChildren):
* runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::visitChildren):
* runtime/JSCallee.cpp:
(JSC::JSCallee::visitChildren):
* runtime/JSCellInlines.h:
(JSC::JSCell::visitChildren):
* runtime/JSCustomGetterSetterFunction.cpp:
(JSC::JSCustomGetterSetterFunction::visitChildren):
* runtime/JSFunction.cpp:
(JSC::JSFunction::visitChildren):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::visitChildren):
* runtime/JSMapIterator.cpp:
(JSC::JSMapIterator::visitChildren):
* runtime/JSModuleEnvironment.cpp:
(JSC::JSModuleEnvironment::visitChildren):
* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::visitChildren):
* runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::visitChildren):
* runtime/JSNativeStdFunction.cpp:
(JSC::JSNativeStdFunction::visitChildren):
* runtime/JSObject.cpp:
(JSC::JSObject::visitButterflyImpl):
* runtime/JSPromiseDeferred.cpp:
(JSC::JSPromiseDeferred::visitChildren):
* runtime/JSPropertyNameEnumerator.cpp:
(JSC::JSPropertyNameEnumerator::visitChildren):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::visitChildren):
* runtime/JSProxy.cpp:
(JSC::JSProxy::visitChildren):
* runtime/JSScope.cpp:
(JSC::JSScope::visitChildren):
* runtime/JSSegmentedVariableObject.cpp:
(JSC::JSSegmentedVariableObject::visitChildren):
* runtime/JSSetIterator.cpp:
(JSC::JSSetIterator::visitChildren):
* runtime/JSString.cpp:
(JSC::JSRopeString::visitFibers):
* runtime/JSSymbolTableObject.cpp:
(JSC::JSSymbolTableObject::visitChildren):
* runtime/JSWeakMap.cpp:
(JSC::JSWeakMap::visitChildren):
* runtime/JSWeakSet.cpp:
(JSC::JSWeakSet::visitChildren):
* runtime/JSWithScope.cpp:
(JSC::JSWithScope::visitChildren):
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::visitChildren):
* runtime/LazyClassStructure.cpp:
(JSC::LazyClassStructure::visit):
* runtime/LazyPropertyInlines.h:
(JSC::ElementType>::visit):
* runtime/MapBase.cpp:
(JSC::MapBase<HashMapBucketType>::visitChildren):
* runtime/ModuleProgramExecutable.cpp:
(JSC::ModuleProgramExecutable::visitChildren):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::visitChildren):
* runtime/ProgramExecutable.cpp:
(JSC::ProgramExecutable::visitChildren):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::visitChildren):
* runtime/ProxyRevoke.cpp:
(JSC::ProxyRevoke::visitChildren):
* runtime/RegExpCachedResult.cpp:
(JSC::RegExpCachedResult::visitChildren):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::visitChildren):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::visitChildren):
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::visit):
* runtime/ScopedArguments.cpp:
(JSC::ScopedArguments::visitChildren):
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::visitStrongReferences):
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::visitChildren):
* runtime/Structure.cpp:
(JSC::Structure::visitChildren):
(JSC::Structure::markIfCheap):
* runtime/StructureChain.cpp:
(JSC::StructureChain::visitChildren):
* runtime/StructureRareData.cpp:
(JSC::StructureRareData::visitChildren):
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::visitChildren):
* runtime/TypeProfilerLog.cpp:
(JSC::TypeProfilerLog::visit):
* runtime/WeakMapData.cpp:
(JSC::WeakMapData::DeadKeyCleaner::visitWeakReferences):
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::visitChildren):
* wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::visitChildren):
* wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::visitChildren):
* wasm/js/JSWebAssemblyTable.cpp:
(JSC::JSWebAssemblyTable::visitChildren):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::visitChildren):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::visitChildren):

Source/WebCore:

No new tests because no new behavior.

This updates WebCore code to new JSC API.

* bindings/js/JSDOMBinding.cpp:
(WebCore::DOMConstructorJSBuiltinObject::visitChildren):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildren):
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredPromise::visitAggregate):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::visitJSFunction):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::visitChildren):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

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

4 years agoSort Xcode project files
mmaxfield@apple.com [Fri, 16 Dec 2016 01:54:58 +0000 (01:54 +0000)]
Sort Xcode project files
https://bugs.webkit.org/show_bug.cgi?id=165937

Reviewed by Simon Fraser.

Source/bmalloc:

* bmalloc.xcodeproj/project.pbxproj:

Source/JavaScriptCore:

* JavaScriptCore.xcodeproj/project.pbxproj:

Source/ThirdParty/ANGLE:

* ANGLE.xcodeproj/project.pbxproj:

Source/WebCore:

No new tests because there is no behavior change.

* WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit2:

* WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

* WTF.xcodeproj/project.pbxproj:

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

4 years agoMove charCode / keyCode / which attributes from UIEvent to KeyboardEvent
cdumez@apple.com [Fri, 16 Dec 2016 01:29:23 +0000 (01:29 +0000)]
Move charCode / keyCode / which attributes from UIEvent to KeyboardEvent
https://bugs.webkit.org/show_bug.cgi?id=165904

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

* web-platform-tests/dom/events/Event-subclasses-constructors-expected.txt:

Source/WebCore:

Move 'charCode' / 'keyCode' attributes from UIEvent to KeyboardEvent and add
'which' to KeyboardEvent to match the specification:
- https://w3c.github.io/uievents/#legacy-interface-KeyboardEvent

We keep a 'which' attribute on UIEvent even though the specification does
not say we should because Firefox and Chrome have 'which' on UIEvent still.

Specification:
- 'charCode' / 'keyCode' / 'which' on KeyboardEvent only

Firefox:
- 'charCode' / 'keyCode' on KeyboardEvent only
- 'which' on UIEvent only

Chrome:
- 'charCode' / 'keyCode' / 'which' on KeyboardEvent
- 'which' on UIEvent as well

Old WebKit behavior:
- 'charCode' / 'keyCode' / 'which' on UIEvent only

New WebKit behavior:
- 'charCode' / 'keyCode' / 'which' on KeyboardEvent
- 'which' on UIEvent as well

Our new behavior is identical to Chrome, much closer to the specification,
and closer to Firefox as well.

No new tests, updated / rebaselined existing tests.

* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEvent::KeyboardEvent):
(WebCore::KeyboardEvent::keyCode):
(WebCore::KeyboardEvent::charCode):
(WebCore::KeyboardEvent::which):
* dom/KeyboardEvent.h:
* dom/KeyboardEvent.idl:
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::which):
* dom/UIEvent.cpp:
* dom/UIEvent.h:
* dom/UIEvent.idl:

Source/WebKit/mac:

Update ObjC bindings so they keep building.

* DOM/DOMUIEvent.mm:
(-[DOMUIEvent keyCode]):
(-[DOMUIEvent charCode]):

LayoutTests:

Extend existing testing.

* fast/events/arrow-keys-on-body-expected.txt:
* fast/events/arrow-keys-on-body.html:
* fast/events/key-events-in-input-button-expected.txt:
* fast/events/key-events-in-input-button.html:
* fast/events/key-events-in-input-text-expected.txt:
* fast/events/key-events-in-input-text.html:

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

4 years agoMove JSC testers from Yosemite to Sierra
ap@apple.com [Fri, 16 Dec 2016 01:28:57 +0000 (01:28 +0000)]
Move JSC testers from Yosemite to Sierra
https://bugs.webkit.org/show_bug.cgi?id=165925

Reviewed by Lucas Forschler.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):

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

4 years agoIndexedDB: Add an "IDBCursorRecord" struct.
beidson@apple.com [Fri, 16 Dec 2016 01:20:24 +0000 (01:20 +0000)]
IndexedDB: Add an "IDBCursorRecord" struct.
https://bugs.webkit.org/show_bug.cgi?id=165929

Reviewed by Alex Christensen.

No new tests (Refactor, no behavior change).

* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::currentData):
(WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
(WebCore::IDBServer::SQLiteIDBCursor::advanceUnique):
(WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
(WebCore::IDBServer::SQLiteIDBCursor::iterate):

* Modules/indexeddb/server/SQLiteIDBCursor.h:
(WebCore::IDBServer::SQLiteIDBCursor::currentKey):
(WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
(WebCore::IDBServer::SQLiteIDBCursor::currentValue):

* Modules/indexeddb/shared/IDBCursorRecord.h: Added.
(WebCore::IDBCursorRecord::encode):
(WebCore::IDBCursorRecord::decode):

* WebCore.xcodeproj/project.pbxproj:

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

4 years agoAdd coordinate space to event streams and streamline tests
commit-queue@webkit.org [Fri, 16 Dec 2016 01:14:40 +0000 (01:14 +0000)]
Add coordinate space to event streams and streamline tests
https://bugs.webkit.org/show_bug.cgi?id=165119

Patch by Megan Gardner <megan_gardner@apple.com> on 2016-12-15
Reviewed by Simon Fraser.

Tools:

Update event streams to allow for both content and global coordinate space.
Update example script to more accurately show all the available options.

* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* WebKitTestRunner/ios/HIDEventGenerator.h:
* WebKitTestRunner/ios/HIDEventGenerator.mm:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::convertCoordinates):
(WTR::UIScriptController::sendEventStream):

LayoutTests:

Streamline tests. Make them more readable and only use one function for drags.
Update for new content coordinate space.

* fast/events/touch/ios/long-press-then-drag-down-to-change-selected-text.html:
* fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html:

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

4 years agoWasm should not create empty unlinked callsites
keith_miller@apple.com [Fri, 16 Dec 2016 01:06:02 +0000 (01:06 +0000)]
Wasm should not create empty unlinked callsites
https://bugs.webkit.org/show_bug.cgi?id=165933

Reviewed by Mark Lam.

JSTests:

* wasm/function-tests/dead-call.js: Added.

Source/JavaScriptCore:

Wasm would create holes in the unlinked callsite vector if B3 was able to
eliminate the callsite.

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addCall):

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

4 years agoRefactor Document::suspend/resume
krollin@apple.com [Fri, 16 Dec 2016 01:04:07 +0000 (01:04 +0000)]
Refactor Document::suspend/resume
https://bugs.webkit.org/show_bug.cgi?id=165921

Reviewed by Chris Dumez.

Update Document::suspend to call Document::suspendScheduledTasks
rather than duplicating the latter's code within itself. Similar
treatment of Document::resume and Document::resumeScheduledTasks.

No new tests -- no new functionality, just refactoring existing code.

* dom/Document.cpp:
(WebCore::Document::suspend):
(WebCore::Document::resume):

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

4 years agoMarking js/dom/global-constructors-attributes.html as failing on ElCapitan WK1.
ryanhaddad@apple.com [Fri, 16 Dec 2016 01:02:49 +0000 (01:02 +0000)]
Marking js/dom/global-constructors-attributes.html as failing on ElCapitan WK1.
https://bugs.webkit.org/show_bug.cgi?id=165934

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

4 years agofast/visual-viewport/ios/zoomed-focus-in-fixed.html always times out
simon.fraser@apple.com [Fri, 16 Dec 2016 01:00:12 +0000 (01:00 +0000)]
fast/visual-viewport/ios/zoomed-focus-in-fixed.html always times out

Skip this test, which relies on touch events.

* platform/ios-simulator/TestExpectations:

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

4 years agoFix flakiness of fast/visual-viewport/ios/zoomed-focus-in-fixed.html
simon.fraser@apple.com [Fri, 16 Dec 2016 00:46:27 +0000 (00:46 +0000)]
Fix flakiness of fast/visual-viewport/ios/zoomed-focus-in-fixed.html
https://bugs.webkit.org/show_bug.cgi?id=165930

Reviewed by Tim Horton.

The test zooms when focussing the input, which completes after the keyboard shows,
so we need to wait for zooming to finish using the uiController.didEndZoomingCallback.

* fast/visual-viewport/ios/zoomed-focus-in-fixed-expected.txt:
* fast/visual-viewport/ios/zoomed-focus-in-fixed.html:

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

4 years agoRemove flex and bison build dependencies; commit generated XPath parser
achristensen@apple.com [Thu, 15 Dec 2016 23:53:24 +0000 (23:53 +0000)]
Remove flex and bison build dependencies; commit generated XPath parser
https://bugs.webkit.org/show_bug.cgi?id=165783

Reviewed by Brent Fulgham.

.:

* Source/cmake/WebKitCommon.cmake:
* Source/cmake/WebKitMacros.cmake:

Source/WebCore:

flex and bison are annoying to install and use, especially on Windows.
Since only XPathGrammar uses them and that's not actively developed, let's just check in the one generated file
and make building WebKit easier forever!

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* css/makegrammar.pl: Removed.
* xml/XPathGrammar.cpp: Added.
(xpathyylex):
(xpathyyerror):
(yysyntax_error):
* xml/XPathGrammar.h: Added.
* xml/XPathGrammar.y: Rename TEXT to TEXT_ to fix a build error on Windows.  TEXT is already defined.

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

4 years agoWeb Inspector: console search bar jumps, behaves poorly at narrow widths
mattbaker@apple.com [Thu, 15 Dec 2016 23:52:42 +0000 (23:52 +0000)]
Web Inspector: console search bar jumps, behaves poorly at narrow widths
https://bugs.webkit.org/show_bug.cgi?id=164047
<rdar://problem/29055582>

Reviewed by Timothy Hatcher.

At narrow widths the find banner behaves poorly in the split console
toolbar. It should work like the main content browser, appearing below
the toolbar when Command-F is pressed and either the split console or
quick console prompt has the focus.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Enable split content browser find banner.

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.showFindBanner):
Check for custom find banner support at runtime.
(WebInspector.ContentBrowser.prototype._findBannerDidShow):
(WebInspector.ContentBrowser.prototype._findBannerDidHide):
Refresh search results when banner is shown/hidden, instead of relying
on toggling the "showing-find-banner" class name for everything.

(WebInspector.ContentBrowser.prototype.handleFindEvent): Deleted.
Renamed `showFindBanner`.

* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.prototype.get supportsCustomFindBanner):
(WebInspector.ContentView.prototype.showCustomFindBanner):
Custom find banner support (used by LogContentView).

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.get supportsSearch):
(WebInspector.LogContentView.prototype.get numberOfSearchResults):
(WebInspector.LogContentView.prototype.get hasPerformedSearch):
Cleanup.
(WebInspector.LogContentView.prototype.get supportsCustomFindBanner):
Use toolbar item find banner when showing Console tab.
(WebInspector.LogContentView.prototype.findBannerRevealPreviousResult):
(WebInspector.LogContentView.prototype.findBannerRevealNextResult):
(WebInspector.LogContentView.prototype._isMessageVisible):
(WebInspector.LogContentView.prototype._visibleMessageElements):
(WebInspector.LogContentView.prototype._logCleared):
(WebInspector.LogContentView.prototype._filterMessageElements):
(WebInspector.LogContentView.prototype.findBannerPerformSearch):
(WebInspector.LogContentView.prototype.findBannerSearchCleared):
(WebInspector.LogContentView.prototype.performSearch):
Support both the standard and custom (toolbar item) find banners.
(WebInspector.LogContentView.prototype.searchCleared):
Refresh search results.
(WebInspector.LogContentView.prototype._highlightRanges):
Correct spelling: _selectedSearchMathIsValid -> _selectedSearchMatchIsValid.
(WebInspector.LogContentView.prototype.get searchInProgress): Deleted.
Override ContentView.prototype.hasPerformedSearch instead.
(WebInspector.LogContentView.prototype.handleFindEvent): Deleted.
Replaced by `showCustomFindBanner`.
(WebInspector.LogContentView.prototype.highlightPreviousSearchMatch): Deleted.
Absorbed by findBannerRevealPreviousResult.
(WebInspector.LogContentView.prototype.highlightNextSearchMatch): Deleted.
Absorbed by findBannerRevealNextResult.
(WebInspector.LogContentView.prototype._performSearch): Deleted.
Override ContentView.prototype.performSearch instead.

* UserInterface/Views/Main.css:
(#split-content-browser > .navigation-bar :matches(.find-banner, .find-banner + .divider)):
Hide the toolbar banner and divider.

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

4 years agoEnhance some of the logging statements just added for IndexedDB Operation scheduling.
beidson@apple.com [Thu, 15 Dec 2016 23:42:54 +0000 (23:42 +0000)]
Enhance some of the logging statements just added for IndexedDB Operation scheduling.

Rubberstamped by Tim Horton.

No new tests (No behavior change).

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::iterateCursor):
(WebCore::IDBTransaction::requestGetRecord):
(WebCore::IDBTransaction::requestIndexRecord):
(WebCore::IDBTransaction::requestPutOrAdd):

* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::loggingString):

* Modules/indexeddb/shared/IDBIterateCursorData.cpp:
(WebCore::IDBIterateCursorData::loggingString):

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

4 years agoWebAssembly: improve compilation error messages
jfbastien@apple.com [Thu, 15 Dec 2016 23:42:19 +0000 (23:42 +0000)]
WebAssembly: improve compilation error messages
https://bugs.webkit.org/show_bug.cgi?id=163919

Reviewed by Saam Barati.

JSTests:

Update error messages in these tests.
Use the assert.throws facility in many of them which weren't already.

* wasm/js-api/element.js:
(assert.throws.new.WebAssembly.Module.builder.WebAssembly):
(assert.throws):
* wasm/js-api/global-error.js:
(assert.throws.new.WebAssembly.Module.bin):
(assert.throws):
(new.Number):
* wasm/js-api/table.js:
(assert.throws.new.WebAssembly.Module.builder.WebAssembly):
(assert.throws):
(assertBadTableImport):
* wasm/js-api/test_Data.js:
(DataSectionWithoutMemory):
* wasm/js-api/test_Start.js:
(InvalidStartFunctionIndex):
* wasm/js-api/test_basic_api.js:
(const.c.in.constructorProperties.switch):

Source/JavaScriptCore:

The error handling messages were underwhelming because most
locations merely returned `false` on failure. This patch uses
std::expected to denote that failure isn't expected. Doing this
makes it almost impossible to mess up the code: either a function
returns a result (or a partial result for internal helpers) or an
error. We're not synchronizing the error string with the m_failed
bool anymore, and the caller will abort if they try to get a
result but the outcome was an error.

This also shortens the code significantly using macros, while also
judiciously preventing inlining of error handling code and biasing
towards success using UNLIKELY. This means that the generated code
should be more efficient (no string formatting on success, and
regalloc can avoid these unlikely paths).

The patch adds a few missing checks as well, especially related to
count limits and memory allocation failure.

As a follow-up I'd like to improve WTF::makeString further, so it
does coercions to string and understands ADL as I did in this
patch.

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::fail):
(JSC::Wasm::parseAndCompile):
* wasm/WasmB3IRGenerator.h:
* wasm/WasmFormat.h:
(JSC::Wasm::isValidExternalKind):
(JSC::Wasm::makeString):
* wasm/WasmFunctionParser.h:
* wasm/WasmModuleParser.cpp:
* wasm/WasmModuleParser.h:
* wasm/WasmParser.h:
(JSC::Wasm::FailureHelper::makeString):
(JSC::Wasm::Parser::fail):
(JSC::Wasm::Parser<SuccessType>::Parser):
(JSC::Wasm::Parser<SuccessType>::consumeCharacter):
(JSC::Wasm::Parser<SuccessType>::consumeString):
(JSC::Wasm::Parser<SuccessType>::consumeUTF8String):
(JSC::Wasm::Parser<SuccessType>::parseVarUInt32):
(JSC::Wasm::Parser<SuccessType>::parseVarUInt64):
(JSC::Wasm::Parser<SuccessType>::parseVarInt32):
(JSC::Wasm::Parser<SuccessType>::parseVarInt64):
(JSC::Wasm::Parser<SuccessType>::parseUInt32):
(JSC::Wasm::Parser<SuccessType>::parseUInt64):
(JSC::Wasm::Parser<SuccessType>::parseUInt8):
(JSC::Wasm::Parser<SuccessType>::parseInt7):
(JSC::Wasm::Parser<SuccessType>::parseUInt7):
(JSC::Wasm::Parser<SuccessType>::parseVarUInt1):
(JSC::Wasm::Parser<SuccessType>::parseResultType):
(JSC::Wasm::Parser<SuccessType>::parseValueType):
(JSC::Wasm::Parser<SuccessType>::parseExternalKind):
* wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::run):
* wasm/WasmSections.h:
(JSC::Wasm::isValidSection):
(JSC::Wasm::validateOrder):
(JSC::Wasm::makeString):
* wasm/WasmValidate.cpp:
(JSC::Wasm::Validate::fail):
(JSC::Wasm::Validate::addUnreachable):
(JSC::Wasm::validateFunction):
* wasm/WasmValidate.h:
* wasm/generateWasmB3IRGeneratorInlinesHeader.py:
* wasm/generateWasmOpsHeader.py:
* wasm/generateWasmValidateInlinesHeader.py:
(loadMacro):
(storeMacro):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):

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

4 years agoAdd more mach_msg logging instrumentation
andersca@apple.com [Thu, 15 Dec 2016 22:48:10 +0000 (22:48 +0000)]
Add more mach_msg logging instrumentation
https://bugs.webkit.org/show_bug.cgi?id=165914

Reviewed by Darin Adler.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::sendMessage):
(IPC::Connection::sendOutgoingMessage):
* Platform/IPC/mac/MachMessage.h:
(IPC::MachMessage::messageName):
(IPC::MachMessage::setMessageName):

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

4 years ago[Cocoa] Implement font-synthesis: small-caps
mmaxfield@apple.com [Thu, 15 Dec 2016 22:12:21 +0000 (22:12 +0000)]
[Cocoa] Implement font-synthesis: small-caps
https://bugs.webkit.org/show_bug.cgi?id=165892

Reviewed by David Hyatt.

Source/WebCore:

The CSS Fonts level 4 spec adds a new value to the "font-synthesis"
property which controls whether or not small-caps is allowed to be
synthesized. Luckily, we already have an implementation of this
straightforward, so the implementation is quite simple.

Tests: css3/font-synthesis-small-caps.html
       fast/text/font-synthesis-parsing.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontSynthesisFromStyle):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFontSynthesis):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontSynthesis):
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::makeFlagsKey):
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::FontDescription):
* platform/graphics/FontDescription.h:
(WebCore::FontCascadeDescription::initialFontSynthesis):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::shouldSynthesize):
(WebCore::ComplexTextController::collectComplexTextRuns):

LayoutTests:

* fast/text/font-synthesis-parsing-expected.txt: Added.
* fast/text/font-synthesis-parsing.html: Added.
* css3/font-synthesis-small-caps-expected.html: Added.
* css3/font-synthesis-small-caps.html: Added.
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css3-text/font-synthesis-parse-expected.txt:
* fast/css3-text/font-synthesis-parse.html:
* svg/css/getComputedStyle-basic-expected.txt:

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

4 years agoJSTests:
jfbastien@apple.com [Thu, 15 Dec 2016 22:08:38 +0000 (22:08 +0000)]
JSTests:
WebAssembly API: improve data section errors
https://bugs.webkit.org/show_bug.cgi?id=165733

Reviewed by Keith Miller.

* wasm/js-api/element-data.js: Added.
(ElementBeforeData.set const):
(ElementBeforeData): check the order of initialization, which is observable on failure
* wasm/js-api/test_Data.js:
(DataSectionWithoutMemory):
(DataSectionOffTheEnd): Deleted.
(DataSectionPartlyOffTheEnd): Deleted.
(DataSectionEmptyOffTheEnd): Deleted.
(DataSectionSeenByStart): Deleted.

Source/JavaScriptCore:
WebAssembly API: improve data section errors, initialize after Element
https://bugs.webkit.org/show_bug.cgi?id=165733

Reviewed by Keith Miller.

* wasm/WasmModuleParser.cpp:
(JSC::Wasm::ModuleParser::parseData): Data section without Memory section or import is a validation error
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::dataSegmentFail):
(JSC::WebAssemblyModuleRecord::evaluate): tighten checks (though the spec isn't fully baked), and move after Element initialization

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

4 years agoAdd a new Logging Channel for IndexedDB Operation scheduling.
beidson@apple.com [Thu, 15 Dec 2016 22:08:26 +0000 (22:08 +0000)]
Add a new Logging Channel for IndexedDB Operation scheduling.
https://bugs.webkit.org/show_bug.cgi?id=165912

Reviewed by Alex Christensen.

No new tests (No behavior change).

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::transaction):

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::internalAbort):
(WebCore::IDBTransaction::commit):
(WebCore::IDBTransaction::createObjectStore):
(WebCore::IDBTransaction::renameObjectStore):
(WebCore::IDBTransaction::createIndex):
(WebCore::IDBTransaction::renameIndex):
(WebCore::IDBTransaction::doRequestOpenCursor):
(WebCore::IDBTransaction::iterateCursor):
(WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
(WebCore::IDBTransaction::requestGetAllIndexRecords):
(WebCore::IDBTransaction::requestGetRecord):
(WebCore::IDBTransaction::requestIndexRecord):
(WebCore::IDBTransaction::requestCount):
(WebCore::IDBTransaction::requestDeleteRecord):
(WebCore::IDBTransaction::requestClearObjectStore):
(WebCore::IDBTransaction::requestPutOrAdd):
(WebCore::IDBTransaction::deleteObjectStore):
(WebCore::IDBTransaction::deleteIndex):

* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::loggingString):
* Modules/indexeddb/shared/IDBCursorInfo.h:

* Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
(WebCore::IDBGetAllRecordsData::loggingString):
* Modules/indexeddb/shared/IDBGetAllRecordsData.h:

* Modules/indexeddb/shared/IDBGetRecordData.cpp:
(WebCore::IDBGetRecordData::loggingString):
* Modules/indexeddb/shared/IDBGetRecordData.h:

* Modules/indexeddb/shared/IDBIndexInfo.cpp:
(WebCore::IDBIndexInfo::condensedLoggingString):
* Modules/indexeddb/shared/IDBIndexInfo.h:

* Modules/indexeddb/shared/IDBIterateCursorData.cpp:
(WebCore::IDBIterateCursorData::loggingString):
* Modules/indexeddb/shared/IDBIterateCursorData.h:

* Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::condensedLoggingString):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:

* platform/Logging.h:

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

4 years agoTurn on WebAssembly by default
keith_miller@apple.com [Thu, 15 Dec 2016 22:07:10 +0000 (22:07 +0000)]
Turn on WebAssembly by default
https://bugs.webkit.org/show_bug.cgi?id=165918

Reviewed by Saam Barati.

* runtime/Options.h:

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

4 years agoAdded missing override and final specifiers
annulen@yandex.ru [Thu, 15 Dec 2016 21:26:08 +0000 (21:26 +0000)]
Added missing override and final specifiers
https://bugs.webkit.org/show_bug.cgi?id=165903

Reviewed by Darin Adler.

Source/JavaScriptCore:

* bytecompiler/BytecodeGenerator.h:
* jsc.cpp:
* parser/Nodes.h:

Source/WebCore:

No new tests needed.

* Modules/mediastream/OverconstrainedErrorEvent.h:
* bindings/js/JSCallbackData.h:
* bindings/js/JSCustomXPathNSResolver.h:
* bindings/js/JSErrorHandler.h:
* css/StyleRuleImport.h:
* dom/SecurityPolicyViolationEvent.h:
* editing/CreateLinkCommand.h:
* editing/DeleteSelectionCommand.h:
* editing/DictationCommand.h:
* editing/Editor.cpp:
* editing/FormatBlockCommand.h:
* editing/IndentOutdentCommand.h:
* editing/InsertLineBreakCommand.h:
* editing/InsertParagraphSeparatorCommand.h:
* editing/ModifySelectionListLevel.h:
* editing/MoveSelectionCommand.h:
* editing/RemoveFormatCommand.h:
* editing/RemoveNodePreservingChildrenCommand.h:
* editing/ReplaceSelectionCommand.h:
* editing/SimplifyMarkupCommand.h:
* editing/SplitTextNodeContainingElementCommand.h:
* editing/UnlinkCommand.h:
* fileapi/FileReaderLoader.h:
* html/canvas/ANGLEInstancedArrays.h:
* html/canvas/WebGLVertexArrayObjectBase.h:
* loader/SinkDocument.h:
* loader/archive/mhtml/MHTMLArchive.h:
* page/animation/CSSPropertyAnimation.cpp:
* platform/audio/MultiChannelResampler.cpp:
* platform/audio/SincResampler.cpp:
* platform/audio/gstreamer/AudioDestinationGStreamer.h:
* platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
* platform/graphics/TextTrackRepresentation.cpp:
* platform/graphics/displaylists/DisplayListItems.h:
* platform/graphics/filters/FEBlend.h:
* platform/graphics/filters/FEColorMatrix.h:
* platform/graphics/filters/FEComponentTransfer.h:
* platform/graphics/filters/FEConvolveMatrix.h:
* platform/graphics/filters/FEDiffuseLighting.h:
* platform/graphics/filters/FEDropShadow.h:
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/FEMerge.h:
* platform/graphics/filters/FEMorphology.h:
* platform/graphics/filters/FEOffset.h:
* platform/graphics/filters/FESpecularLighting.h:
* platform/graphics/filters/FETile.h:
* platform/graphics/filters/FETurbulence.h:
* platform/graphics/filters/SourceAlpha.h:
* platform/graphics/filters/SourceGraphic.h:
* platform/graphics/opengl/Extensions3DOpenGL.h:
* platform/graphics/opengl/Extensions3DOpenGLCommon.h:
* platform/graphics/texmap/TextureMapperBackingStore.h:
* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
* platform/mock/GeolocationClientMock.h:
* platform/text/TextCodecICU.h:
* platform/text/TextCodecLatin1.h:
* platform/text/TextCodecUTF16.h:
* platform/text/TextCodecUTF8.h:
* platform/text/TextCodecUserDefined.h:
* rendering/RenderFullScreen.cpp:
* storage/StorageEvent.h:
* svg/properties/SVGListProperty.h:
* svg/properties/SVGStaticListPropertyTearOff.h:
* svg/properties/SVGStaticPropertyTearOff.h:
* xml/NativeXPathNSResolver.h:
* xml/XMLHttpRequestProgressEvent.h:
* xml/XMLHttpRequestProgressEventThrottle.h:
* xml/XPathVariableReference.h:
* xml/XSLImportRule.h:

Source/WebKit2:

* UIProcess/API/gtk/WebKitGeolocationProvider.h:
* UIProcess/WebFormSubmissionListenerProxy.h:
* UIProcess/WebFramePolicyListenerProxy.h:
* WebProcess/Automation/WebAutomationSessionProxy.h:
* WebProcess/InjectedBundle/API/gtk/DOM/GObjectXPathNSResolver.h:
* WebProcess/MediaCache/WebMediaKeyStorageManager.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
* WebProcess/WebCoreSupport/WebPlugInClient.h:
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
* WebProcess/WebPage/FindController.h:

Source/WTF:

* wtf/RunLoop.h:

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

4 years agoInline Document::existingAXObjectCache()
cdumez@apple.com [Thu, 15 Dec 2016 21:08:40 +0000 (21:08 +0000)]
Inline Document::existingAXObjectCache()
https://bugs.webkit.org/show_bug.cgi?id=165906

Reviewed by Darin Adler.

Inline Document::existingAXObjectCache() to avoid paying function call
cost in the common case where AX is disabled.

* dom/Document.cpp:
(WebCore::Document::existingAXObjectCacheSlow):
(WebCore::Document::existingAXObjectCache): Deleted.
* dom/Document.h:
(WebCore::Document::existingAXObjectCache):

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

4 years agoHarden JSObject::getOwnPropertyDescriptor()
cdumez@apple.com [Thu, 15 Dec 2016 20:55:18 +0000 (20:55 +0000)]
Harden JSObject::getOwnPropertyDescriptor()
https://bugs.webkit.org/show_bug.cgi?id=165908

Reviewed by Geoffrey Garen.

* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertyDescriptor):

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

4 years agoRebaseline bindings tests after r209864.
ryanhaddad@apple.com [Thu, 15 Dec 2016 20:18:25 +0000 (20:18 +0000)]
Rebaseline bindings tests after r209864.

Unreviewed test gardening.

* bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
(WebCore::convertDictionary<DictionaryImplName>):

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

4 years ago[iOS WK2] Don't disable position:fixed when a form element has focus
simon.fraser@apple.com [Thu, 15 Dec 2016 19:19:51 +0000 (19:19 +0000)]
[iOS WK2] Don't disable position:fixed when a form element has focus
https://bugs.webkit.org/show_bug.cgi?id=165891
rdar://problem/29271694

Reviewed by Wenson Hsieh.

Source/WebKit2:

Before visual viewports, we had to lay out position:fixed relative to the document rect (effectively
disabling position:fixed) when a form element was focused, to ensure that we could scroll to inputs
inside position:Fixed.

When visual viewports are enabled, we can do a better job of this, and keep position:fixed active.

Test: fast/visual-viewport/ios/zoomed-focus-in-fixed.html

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]): Soon this will use
insideFixed to have better scroll-into-view behavior.
(-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
(-[WKContentView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]): Deleted.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _displayFormNodeInputView]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computeCustomFixedPositionRect): Don't fall back to using the documentRect as the fixed
position rect if visual viewports are enabled.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation): Don't reset the customtFixedPositionRect around computing element
coordinates if visual viewports are enabled.

LayoutTests:

* TestExpectations:
* fast/visual-viewport/ios/zoomed-focus-in-fixed-expected.txt: Added.
* fast/visual-viewport/ios/zoomed-focus-in-fixed.html: Added.
* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoFix 64-bit shift family Wasm opcodes
keith_miller@apple.com [Thu, 15 Dec 2016 19:17:00 +0000 (19:17 +0000)]
Fix 64-bit shift family Wasm opcodes
https://bugs.webkit.org/show_bug.cgi?id=165902

Reviewed by Geoffrey Garen.

JSTests:

Add tests for shift family of instructions. Since
we can't generate i64 values to pass to wasm we only compile
the code for those functions. Attempting to generate any i64
code using these instructions would have been enough to cause
the B3 Validation error anyway.

* wasm/assert.js:
* wasm/function-tests/rotl.js: Added.
* wasm/function-tests/rotr.js: Added.
* wasm/function-tests/shl.js: Added.
* wasm/function-tests/shr-s.js: Added.
* wasm/function-tests/shr-u.js: Added.
* wasm/wasm.json:

Source/JavaScriptCore:

The Int64 versions of the shift family B3 opcodes take an Int32
for the shift value. Wasm, however, takes an i64, so we need to
Trunc the shift value. Also, this fixes a bug where shr_u mapped
to signed shift and shr_s mapped to the unsigned shift.

* wasm/wasm.json:

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

4 years agoAlways clear RenderLayer backing stores when going into page cache.
akling@apple.com [Thu, 15 Dec 2016 18:37:18 +0000 (18:37 +0000)]
Always clear RenderLayer backing stores when going into page cache.
<https://webkit.org/b/165901>

Reviewed by Simon Fraser.

Source/WebCore:

We were already doing this for the iOS and GTK+ ports, let's do it everywhere
for consistency, and a bit of memory usage improvement.

This patch just removes the setting and always calls FrameView::clearBackingStores()
when there is composited content going into page cache.

* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* history/PageCache.h:
(WebCore::PageCache::shouldClearBackingStores): Deleted.
(WebCore::PageCache::setShouldClearBackingStores): Deleted.

Source/WebKit/mac:

* WebView/WebView.mm:
(+[WebView _setCacheModel:]):

Source/WebKit2:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):

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

4 years agoRemove custom binding for MediaDevices
darin@apple.com [Thu, 15 Dec 2016 17:25:53 +0000 (17:25 +0000)]
Remove custom binding for MediaDevices
https://bugs.webkit.org/show_bug.cgi?id=165894

Reviewed by Eric Carlson.

Source/WebCore:

Removes the explicit code to parse the MediaStreamConstraints and
MediaTrackConstraints. Next step could be to change the internal
code to use the structs from bindings directly so we don't need
code to convert to an internal format.

* CMakeLists.txt: Added MediaTrackConstraints.idl and MediaTrackConstraints.cpp,
removed JSMediaDevicesCustom.cpp.

* DerivedSources.make: Added MediaTrackConstraints.idl.
Also sorted list of IDL files and fixed use of tabs.

* Modules/mediastream/MediaDevices.cpp:
(WebCore::createMediaConstraintsImpl): Added.
(WebCore::MediaDevices::getUserMedia): Changed this function to take arguments that
are generated by the bindings script, and call createMediaConstraintsImpl to convert
into the internal data structure.
* Modules/mediastream/MediaDevices.h: Added StreamConstraints struct and changed
getUserMedia to take that as specified in the IDL.
* Modules/mediastream/MediaDevices.idl: Added definition of the MediaStreamConstraints
dictionary. Removed [Custom] from getUserMedia.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream): Pass a reference to addObserver.
(WebCore::MediaStream::~MediaStream): Pass a rference to removeObserver.
(WebCore::MediaStream::internalAddTrack): Ditto.
(WebCore::MediaStream::internalRemoveTrack): Ditto.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::createMediaConstraintsImpl): Added.
(WebCore::MediaStreamTrack::applyConstraints): Changed to take an optional
MediaTrackConstraints argument and call createMediaConstraintsImpl to convert
into the internal data structure. Also merged the multiple overloads of this
all into a single function, used auto to make the code easier to read, and
moved the code that stores new constrains into the success handling, since the
specification says that's the only case where we should store it.
(WebCore::MediaStreamTrack::addObserver): Take a reference instead of a pointer.
(WebCore::MediaStreamTrack::removeObserver): Ditto.
* Modules/mediastream/MediaStreamTrack.h: Removed many unneeded includes.
Changed getConstraints to return const MediaTrackConstraints&, applyConstraints
to take an optional MediaTrackConstraints, add/removeObserver to take a reference
rather than a pointer, and changed m_constraints to be a MediaTrackConstraints
instead of a RefPtr<MediaConstraints>.
* Modules/mediastream/MediaStreamTrack.idl: Removed [Custom] from getConstraints
and applyConstraints.

* Modules/mediastream/MediaTrackConstraints.cpp: Added.
(WebCore::set): Overloaded function to set constriaints in a
MediaTrackConstraintSetMap.
(WebCore::convertToInternalForm): Helper function that takes a
MediaTrackConstraintSet and turns it into a MediaTrackConstraintSetMap.
(WebCore::convertAdvancedToInternalForm): More of the same, but for vectors.
(WebCore::createMediaConstraintsImpl): Top level function. Calls the other
functions and then MediaConstraintsImpl::create.
* Modules/mediastream/MediaTrackConstraints.h: Added. Contains all the structures
and type definitions for the dictionaries defined in the IDL file, and also the
createMediaConstraintsImpl function declaration.
* Modules/mediastream/MediaTrackConstraints.idl: Added. Contains the
MediaTrackConstraints and all the other dictionaries and typedefs that are needed
to define that dictionary.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::start): Changed to not depend on MediaDevices::Promise.
(WebCore::UserMediaRequest::UserMediaRequest): Ditto.
(WebCore::isSecure): Rearranged to be easier to understand.
(WebCore::UserMediaRequest::start): Removed a local variable for simplicity.
(WebCore::UserMediaRequest::document): Removed a redundant null check.
* Modules/mediastream/UserMediaRequest.h: Reduced includes, changed to not depend
on MediaDevices::Promise, removing the reason to include MediaDevices.h.

* WebCore.xcodeproj/project.pbxproj: Updated to remove old files and add new ones.

* bindings/js/JSBindingsAllInOne.cpp: Removed JSMediaDevicesCustom.cpp.

* bindings/js/JSMediaDevicesCustom.cpp: Removed.
* bindings/js/JSMediaDevicesCustom.h: Removed.

* bindings/js/JSMediaStreamTrackCustom.cpp:
(WebCore::JSMediaStreamTrack::applyConstraints): Deleted.
(WebCore::JSMediaStreamTrack::getConstraints): Deleted.

* bindings/scripts/CodeGenerator.pm:
(ProcessDocument): Updated to allow multiple standalone dictionaries, as long as
the name of one of the dictionaries matches the name of the file.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateDictionary): Added "other dictionaries" argument so we can support
files with multiple dictionaries in them.
(GenerateDictionariesHeaderContent): Completed support for dictionaries that
are not named after a top level interface by added one more check for a missing
$interface in a place that otherwise would not handle it correctly.
(GenerateImplementation): Removed code that set $currentCachedAttribute and
$cacheIndex, since no was reading the value of either any longer.
(GenerateDictionaryHeader): Added "other dictionaries".
(GenerateDictionaryImplementation): Ditto.
(WriteData): Removed unnnecessarily indirect code that was using FileNamePrefix
and a local variable named $prefix instead of just writing "JS".

* bindings/scripts/generate-bindings.pl: Corrected the use of the fileparse
function from the Path::Basename module; after reading the documentation for
this it is clear that there is no need to first call basename, and fileparse
should also be used instead of basename.

* platform/mediastream/MediaConstraints.h: Removed unneeded includes.
(WebCore::StringConstraint::appendExact): Removed an incorrect use of clear
here that would mess up cases where there is supposed to be more than one
exact value.

* platform/mediastream/MediaStreamTrackPrivate.cpp: Remvoed unneeded includes.
(WebCore::MediaStreamTrackPrivate::clone): Removed code to copy m_constraints.
(WebCore::MediaStreamTrackPrivate::constraints): Deleted.
* platform/mediastream/MediaStreamTrackPrivate.h: Removed the constraints
function member and the m_constraints data member.

Source/WebKit2:

* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
Added include of MediaConstraintsImpl.h, now needed because we
removed some unneeded includes from the WebCore headers.

LayoutTests:

* fast/mediastream/MediaDevices-getUserMedia-expected.txt: Expect the exception the
generated bindings code throws, rather than the different one the hand-written binding
was throwing before.

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

4 years agoWebAssembly: test_BuilderJSON.js is broken
keith_miller@apple.com [Thu, 15 Dec 2016 16:53:38 +0000 (16:53 +0000)]
WebAssembly: test_BuilderJSON.js is broken
https://bugs.webkit.org/show_bug.cgi?id=165893

Reviewed by Michael Saboff.

* wasm/Builder.js:
(const._isValidValue):
* wasm/self-test/test_BuilderJSON.js:

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

4 years ago[CSS Parser] Enable CSS Deferred Parsing
hyatt@apple.com [Thu, 15 Dec 2016 15:46:13 +0000 (15:46 +0000)]
[CSS Parser] Enable CSS Deferred Parsing
https://bugs.webkit.org/show_bug.cgi?id=165869

Reviewed by Sam Weinig.

Source/WebCore:

Enable CSS deferred parsing once again. It's now behind a pref,
so it's easy to flip off and on.

To address the memory regression that caused the previous rollout,
the tokenizer is no longer retained. Instead the sheet text and escaped
strings are retained by CSSDeferredParser, and then DeferredStyleProperties
and DeferredStyleGroupRuleList make copies of the tokens from the original
tokenization process. As the rules get parsed, these tokens get thrown
away.

This means that instead of the entire set of tokens staying in memory
as long as even one unparsed rule remained, now only the tokens that
still need parsing will remain alive.

Unparsed rules will consume slightly more memory than parsed rules, but
the more unparsed rules you have, the bigger the performance win as
well, so this is a tradeoff. Given that the parsing speed is going up
by anywhere from 25-40% on cold loads of pages (where all stylesheets
have to parse), this seems worth it to me.

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

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:

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

4 years agoSync web-platform-tests up to revision a4c2b37
commit-queue@webkit.org [Thu, 15 Dec 2016 13:47:57 +0000 (13:47 +0000)]
Sync web-platform-tests up to revision a4c2b37
https://bugs.webkit.org/show_bug.cgi?id=165041

LayoutTests/imported/w3c:

Patch by Youenn Fablet <youenn@apple.com> on 2016-12-15
Reviewed by Alex Christensen.

* resources/ImportExpectations:
* resources/TestRepositories:
* resources/resource-files.json:
* web-platform-tests/IndexedDB/historical-expected.txt: Added.
* web-platform-tests/IndexedDB/historical.html: Added.
* web-platform-tests/IndexedDB/interfaces-expected.txt:
* web-platform-tests/IndexedDB/interfaces.html:
* web-platform-tests/IndexedDB/interfaces.idl:
* web-platform-tests/IndexedDB/interfaces.worker-expected.txt:
* web-platform-tests/IndexedDB/interfaces.worker.js:
(async_test):
(request.onload): Deleted.
* web-platform-tests/IndexedDB/name-scopes-expected.txt: Added.
* web-platform-tests/IndexedDB/name-scopes.html: Added.
* web-platform-tests/IndexedDB/support-promises.js:
(const.databaseName):
(const.requestWatcher):
(const.migrateDatabase):
(const.migrateNamedDatabase):
(const.createDatabase):
(const.createNamedDatabase):
(const.openDatabase):
(const.openNamedDatabase):
(const.createBooksStore):
(const.checkStoreIndexes):
(const.checkStoreGenerator):
(const.checkStoreContents):
(const.checkAuthorIndexContents):
(const.checkTitleIndexContents):
* web-platform-tests/IndexedDB/w3c-import.log:
* web-platform-tests/README.md:
* web-platform-tests/XMLHttpRequest/event-readystatechange-loaded-expected.txt:
* web-platform-tests/XMLHttpRequest/event-readystatechange-loaded.htm:
* web-platform-tests/check_stability.py:
(TravisFold):
(TravisFold.__init__):
(TravisFold.__enter__):
(TravisFold.__exit__):
(markdown_adjust):
(table):
(write_inconsistent):
(write_results):
(main):
* web-platform-tests/common/dummy.xhtml: Added.
* web-platform-tests/common/dummy.xml: Added.
* web-platform-tests/common/w3c-import.log:
* web-platform-tests/config.default.json:
* web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
* web-platform-tests/dom/events/ProgressEvent-expected.txt:
* web-platform-tests/dom/events/ProgressEvent.html:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
* web-platform-tests/dom/nodes/Document-createElement-expected.txt:
* web-platform-tests/dom/nodes/Document-createElement.html:
* web-platform-tests/dom/nodes/Document-createElementNS-expected.txt:
* web-platform-tests/dom/nodes/Document-createElementNS.html:
* web-platform-tests/dom/nodes/Document-createElementNS.js:
* web-platform-tests/dom/nodes/Document-createEvent-expected.txt:
* web-platform-tests/dom/nodes/Document-createEvent.html:
* web-platform-tests/dom/nodes/Document-createEvent.js:
* web-platform-tests/dom/nodes/Element-closest-expected.txt:
* web-platform-tests/dom/nodes/Element-closest.html:
* web-platform-tests/domparsing/OWNERS:
* web-platform-tests/domparsing/createContextualFragment-expected.txt:
* web-platform-tests/domparsing/createContextualFragment.html:
* web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources.html:
* web-platform-tests/encrypted-media/content/video_512x288_h264-360k_multikey_key1_dashinit.mp4: Added.
* web-platform-tests/encrypted-media/drm-mp4-playback-temporary-encrypted-clear-sources.html:
* web-platform-tests/encrypted-media/scripts/playback-persistent-license-events.js:
(runTest):
* web-platform-tests/encrypted-media/scripts/playback-persistent-usage-record-events.js:
(runTest):
* web-platform-tests/encrypted-media/scripts/playback-temporary-events.js:
(runTest):
* web-platform-tests/encrypted-media/scripts/playback-temporary-multikey-sequential.js:
(runTest):
* web-platform-tests/encrypted-media/scripts/unique-origin.js:
(runTest.):
* web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt:
* web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials-expected.txt:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials-worker-expected.txt:
* web-platform-tests/fetch/api/headers/headers-idl.html:
* web-platform-tests/fetch/api/headers/headers-normalize-expected.txt:
* web-platform-tests/fetch/api/headers/headers-normalize.html:
* web-platform-tests/fetch/api/redirect/redirect-count.js:
(redirectCount):
* web-platform-tests/fetch/api/request/request-error-expected.txt:
* web-platform-tests/fetch/api/request/request-error.html:
* web-platform-tests/fetch/api/request/request-idl.html:
* web-platform-tests/fetch/api/resources/redirect.py:
(main):
* web-platform-tests/fetch/api/response/response-consume-expected.txt:
* web-platform-tests/fetch/api/response/response-consume.html:
* web-platform-tests/fetch/api/response/response-idl.html:
* web-platform-tests/fonts/math/mathvariant-bold-fraktur.woff: Added.
* web-platform-tests/fonts/math/mathvariant-bold-italic.woff: Added.
* web-platform-tests/fonts/math/mathvariant-bold-sans-serif.woff: Added.
* web-platform-tests/fonts/math/mathvariant-bold-script.woff: Added.
* web-platform-tests/fonts/math/mathvariant-bold.woff: Added.
* web-platform-tests/fonts/math/mathvariant-double-struck.woff: Added.
* web-platform-tests/fonts/math/mathvariant-fraktur.woff: Added.
* web-platform-tests/fonts/math/mathvariant-initial.woff: Added.
* web-platform-tests/fonts/math/mathvariant-italic.woff: Added.
* web-platform-tests/fonts/math/mathvariant-looped.woff: Added.
* web-platform-tests/fonts/math/mathvariant-monospace.woff: Added.
* web-platform-tests/fonts/math/mathvariant-sans-serif-bold-italic.woff: Added.
* web-platform-tests/fonts/math/mathvariant-sans-serif-italic.woff: Added.
* web-platform-tests/fonts/math/mathvariant-sans-serif.woff: Added.
* web-platform-tests/fonts/math/mathvariant-script.woff: Added.
* web-platform-tests/fonts/math/mathvariant-stretched.woff: Added.
* web-platform-tests/fonts/math/mathvariant-tailed.woff: Added.
* web-platform-tests/fonts/math/w3c-import.log:
* web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/014.html:
* web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling.html:
* web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-function-src.html:
* web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-function.html:
* web-platform-tests/html/browsers/history/the-history-interface/history_go_to_uri-1.html: Added.
* web-platform-tests/html/browsers/history/the-history-interface/history_go_to_uri-expected.txt: Added.
* web-platform-tests/html/browsers/history/the-history-interface/history_go_to_uri.html: Added.
* web-platform-tests/html/browsers/history/the-history-interface/w3c-import.log:
* web-platform-tests/html/browsers/history/the-location-interface/location_reload-iframe.html:
* web-platform-tests/html/browsers/history/the-location-interface/location_reload.html:
* web-platform-tests/html/browsers/the-window-object/support/noopener-target.html: Added.
* web-platform-tests/html/browsers/the-window-object/support/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/resetting-a-form/w3c-import.log.
* web-platform-tests/html/browsers/the-window-object/w3c-import.log:
* web-platform-tests/html/browsers/the-window-object/window-open-noopener-expected.txt: Added.
* web-platform-tests/html/browsers/the-window-object/window-open-noopener.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/w3c-import.log:
* web-platform-tests/html/browsers/windows/support-open-cross-origin.sub.html: Added.
* web-platform-tests/html/browsers/windows/targeting-multiple-cross-origin-manual.sub.html: Added.
* web-platform-tests/html/browsers/windows/w3c-import.log:
* web-platform-tests/html/dom/interfaces.html:
* web-platform-tests/html/dom/new-harness.js:
(ReflectionHarness.test):
(ReflectionHarness.run): Deleted.
(ReflectionHarness.testException): Deleted.
* web-platform-tests/html/dom/original-harness.js:
(ReflectionHarness.test):
(ReflectionHarness.assertEquals):
(ReflectionHarness.assertThrows):
(ReflectionHarness.testWrapper): Deleted.
(ReflectionHarness.run): Deleted.
(ReflectionHarness.testException): Deleted.
* web-platform-tests/html/dom/reflection.js:
(ReflectionTests.reflects):
(ReflectionTests.doReflects): Deleted.
* web-platform-tests/html/semantics/document-metadata/the-link-element/all: Added.
* web-platform-tests/html/semantics/document-metadata/the-link-element/all.headers: Added.
* web-platform-tests/html/semantics/document-metadata/the-link-element/resources/empty-href.css: Added.
(body):
* web-platform-tests/html/semantics/document-metadata/the-link-element/resources/w3c-import.log:
* web-platform-tests/html/semantics/document-metadata/the-link-element/stylesheet-empty-href-expected.html: Added.
* web-platform-tests/html/semantics/document-metadata/the-link-element/stylesheet-empty-href.html: Added.
* web-platform-tests/html/semantics/document-metadata/the-link-element/stylesheet-media-expected.html: Added.
* web-platform-tests/html/semantics/document-metadata/the-link-element/stylesheet-media.html: Added.
* web-platform-tests/html/semantics/document-metadata/the-link-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-embed-element/historical-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/historical.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-object-element/historical-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-object-element/historical.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-object-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/resetting-a-form/reset-event-expected.txt: Added.
* web-platform-tests/html/semantics/forms/resetting-a-form/reset-event.html: Added.
* web-platform-tests/html/semantics/forms/resetting-a-form/reset-form-expected.txt:
* web-platform-tests/html/semantics/forms/resetting-a-form/reset-form.html:
* web-platform-tests/html/semantics/forms/resetting-a-form/w3c-import.log:
* web-platform-tests/html/semantics/forms/the-fieldset-element/HTMLFieldSetElement-expected.txt:
* web-platform-tests/html/semantics/forms/the-fieldset-element/HTMLFieldSetElement.html:
* web-platform-tests/html/semantics/forms/the-form-element/form-action-url-expected.txt: Added.
* web-platform-tests/html/semantics/forms/the-form-element/form-action-url.html: Added.
* web-platform-tests/html/semantics/forms/the-form-element/resources/form-action-url-iframe.html: Added.
* web-platform-tests/html/semantics/forms/the-form-element/resources/target/form-action-url-target.html: Added.
* web-platform-tests/html/semantics/forms/the-form-element/resources/target/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/resetting-a-form/w3c-import.log.
* web-platform-tests/html/semantics/forms/the-form-element/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/resetting-a-form/w3c-import.log.
* web-platform-tests/html/semantics/forms/the-form-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/the-input-element/radio.html:
* web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-add-expected.txt: Added.
* web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-add.html: Added.
* web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-expected.txt:
* web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection.html:
* web-platform-tests/html/semantics/forms/the-select-element/selected-index-expected.txt: Added.
* web-platform-tests/html/semantics/forms/the-select-element/selected-index.html: Added.
* web-platform-tests/html/semantics/forms/the-select-element/w3c-import.log:
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001.html:
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-002.html:
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-mixed-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-mixed.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-not-dir-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-not-dir.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ol-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ol.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-parent-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-parent.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ul-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ul.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-not-being-rendered-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-not-being-rendered.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-li-element/w3c-import.log:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1e-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1e.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/w3c-import.log:
* web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/node-document-changes.html:
* web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt: Added.
* web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html: Added.
* web-platform-tests/html/webappapis/scripting/events/uncompiled_event_handler_with_scripting_disabled-expected.txt: Added.
* web-platform-tests/html/webappapis/scripting/events/uncompiled_event_handler_with_scripting_disabled.html: Added.
* web-platform-tests/html/webappapis/scripting/events/w3c-import.log:
* web-platform-tests/lint.whitelist:
* web-platform-tests/media-source/OWNERS:
* web-platform-tests/serve.py:
* web-platform-tests/shadow-dom/OWNERS:
* web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.js:
(promise_test):
* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-origin-expected.txt: Added.
* web-platform-tests/url/a-element-origin-xhtml-expected.txt: Added.
* web-platform-tests/url/a-element-origin-xhtml.xhtml: Added.
* web-platform-tests/url/a-element-origin.html: Added.
* web-platform-tests/url/a-element-origin.js: Added.
(setup.async_test.string_appeared_here.setup.step):
(setBase):
(bURL):
(runURLTests):
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/historical-expected.txt:
* web-platform-tests/url/historical.html:
* web-platform-tests/url/historical.worker-expected.txt:
* web-platform-tests/url/historical.worker.js:
(test):
* web-platform-tests/url/interfaces-expected.txt:
* web-platform-tests/url/interfaces.html:
* web-platform-tests/url/setters_tests.json:
* web-platform-tests/url/url-constructor-expected.txt:
* web-platform-tests/url/url-origin-expected.txt: Added.
* web-platform-tests/url/url-origin.html: Added.
* web-platform-tests/url/urlsearchparams-foreach-expected.txt: Added.
* web-platform-tests/url/urlsearchparams-foreach.html: Added.
* web-platform-tests/url/urltestdata.json:
* web-platform-tests/url/w3c-import.log:
* web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:
* web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor.html:
* web-platform-tests/webrtc/simplecall-expected.txt:
* web-platform-tests/webrtc/simplecall.html:

LayoutTests:

Patch by Youenn Fablet <youennf@gmail.com> on 2016-12-15
Reviewed by Alex Christensen.

* platform/ios-simulator-wk2/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt: Added.
* platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
* platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt: Added.
* tests-options.json:

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

4 years ago[OWR] Unskip fast/mediastream/MediaStream-video-element-track-stop.html
commit-queue@webkit.org [Thu, 15 Dec 2016 13:15:33 +0000 (13:15 +0000)]
[OWR] Unskip fast/mediastream/MediaStream-video-element-track-stop.html
https://bugs.webkit.org/show_bug.cgi?id=165316

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-12-15
Reviewed by Philippe Normand.

Source/WebCore:

Fixed the ended support of the video element in the OWR player and
fixed the videoTracks support. Now the OW player properly adds and
removes the audio and video tracks. Added the getSettings support
to the mediastream interface. Solved also the size handling in
some of the enable/muted situations.

Unskipping fast/mediastream/MediaStream-video-element-track-stop.html.

* platform/GStreamer.cmake: Added the new
RealtimeMediaSourceOwr.cpp with the new code handling the
settings.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
(WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
Release the new video and audio maps that creates a relationship
of the mediastream tracks with the mediatracks of the video element.
(WebCore::MediaPlayerPrivateGStreamerOwr::play): Set ended to
false when we start playing.
(WebCore::MediaPlayerPrivateGStreamerOwr::load): Create the media
tracks to the player so that the videoTracks API returns it, and
add an entry in the map to be able to restore it using the
mediastream track.
(WebCore::MediaPlayerPrivateGStreamerOwr::disableMediaTracks):
Move some part of the stop function to this one in order to use it
in pause method and avoid changing the video selection in that
case.
(WebCore::MediaPlayerPrivateGStreamerOwr::stop): Now we call the
function disableMediaTracks and we also change teh selected
videoTrack.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): For
videoTrack reset the size and the selected element. In case there
is no media playing we Make sure we set the ended variable to true
and call the timeChange to modify the state of the player.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
Handle properly the situation when the user changed the enabled
value, we disable the media.
(WebCore::MediaPlayerPrivateGStreamerOwr::setSize): Modify the
size of the source.
(WebCore::MediaPlayerPrivateGStreamerOwr::naturalSize): Overrided
to make sure we return a size even when the sample is not ready
for gst.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
Added the ended attribute and the maps.
* platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
(WebCore::MediaEndpointOwr::createMutedRemoteSource): Use the new
realtime video and audio sources classes, this new classes
implement the settings of each type of media element.
* platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
Use the new audio and video source classes instead of the general
one in order to handle the settings properly.
* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Added
(WebCore::RealtimeMediaSourceOwr::settings): Initialize using the
subclass and return the new currentSettings attribute.
(WebCore::RealtimeMediaSourceOwr::supportedConstraints): Call the
subclass initialization of the supportedSettings.
* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
(WebCore::RealtimeMediaSourceOwr::initializeSettings): Added to
initialize the settings before returning the value. Implemented in
the subclass.
(WebCore::RealtimeMediaSourceOwr::initializeSupportedConstraints):
Added to initialize the supported settings of the
media. Implemented in the subclass.
(WebCore::RealtimeMediaSourceOwr::settings): Moved to the cpp
file, implemented using the initialize functions of the subclass
* platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Added
this new class to handle the settings of the video elements. The
class initializes the settings and the supportedSettings.
* platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Added
this new class to handle the settings of the audio elements. The
class initializes the settings and the supportedSettings.

LayoutTests:

* platform/gtk/TestExpectations: Unskipped the test and moved the
stop one, now it does not timeout because we correctly handle the
ended value but still fails, we need more features in the mock
classes for owr.

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

4 years ago[GTK] Ensure gst* docs are not built with update-webkitgtk-libs
csaavedra@igalia.com [Thu, 15 Dec 2016 13:05:44 +0000 (13:05 +0000)]
[GTK] Ensure gst* docs are not built with update-webkitgtk-libs
https://bugs.webkit.org/show_bug.cgi?id=165855

Reviewed by Philippe Normand.

GStreamer's autogen.sh enables gtk-doc always so we end up building
docs even if we disable them. Use the configure script instead, since
we build from packages and these include it already.

* gtk/jhbuild.modules: Use shipped configure instead of autogen.sh for
upstream gstreamer packages.

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

4 years ago[JSC] Optimize Kraken stringify
utatane.tea@gmail.com [Thu, 15 Dec 2016 10:28:55 +0000 (10:28 +0000)]
[JSC] Optimize Kraken stringify
https://bugs.webkit.org/show_bug.cgi?id=165857

Reviewed by Darin Adler.

Kraken json-stringify-tinderbox performance heavily relies on StringBuilder::appendQuotedJSONString.
According to the result produced by Linux `perf`, it occupies 28% of execution time.

We tighten the hottest loop in the above function. We create the super fast path for non escaping case.
And add " and \ cases (since including " in the string is common). Then we fallback to the slow case.

It improves the performance 5.5% in Kraken json-stringify-tinderbox in MBP.

    Performance result in my MBP (dandelion).

        Collected 100 samples per benchmark/VM, with 100 VM invocations per benchmark. Emitted a call to gc()
        between sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used the
        jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark execution times
        with 95% confidence intervals in milliseconds.

                                           baseline                  patched

        json-stringify-tinderbox        29.243+-0.241      ^      27.701+-0.235         ^ definitely 1.0557x faster

        <arithmetic>                    29.243+-0.241      ^      27.701+-0.235         ^ definitely 1.0557x faster

    Performance result in my Linux laptop (hanayamata).

        Collected 100 samples per benchmark/VM, with 100 VM invocations per benchmark. Emitted a call to gc()
        between sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used the
        jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark execution times
        with 95% confidence intervals in milliseconds.

                                           baseline                  patched

        json-stringify-tinderbox        26.711+-0.475      ^      25.255+-0.034         ^ definitely 1.0577x faster

        <arithmetic>                    26.711+-0.475      ^      25.255+-0.034         ^ definitely 1.0577x faster

* wtf/text/StringBuilder.cpp:
(WTF::appendQuotedJSONStringInternalSlow):
(WTF::appendQuotedJSONStringInternal):

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

4 years agoREGRESSION (r208902) Null pointer dereference in wkIsPublicSuffix
achristensen@apple.com [Thu, 15 Dec 2016 08:19:47 +0000 (08:19 +0000)]
REGRESSION (r208902) Null pointer dereference in wkIsPublicSuffix
https://bugs.webkit.org/show_bug.cgi?id=165885
<rdar://problem/29476917>

Reviewed by Darin Adler.

Source/WebCore:

wkIsPublicSuffix crashes if you give it a nil NSString*.
This was possible before IDN2008 adoption, but it's more common now
because domains like "r4---asdf.example.com" fail in uidna_nameToASCII but not in uidna_IDNToASCII.
decodeHostName can return a nil NSString.  We can't use it unchecked, so instead we use an algorithm that allows
for decoding failures while still finding top privately controlled domains correctly.

Tested by new API tests which crash before this change and verify the behavior matches behavior before r208902.

* platform/mac/PublicSuffixMac.mm:
(WebCore::isPublicSuffix):
(WebCore::topPrivatelyControlledDomain):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::utf16String): Deleted.
* TestWebKitAPI/Tests/mac/PublicSuffix.mm:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/WTFStringUtilities.h:
(utf16String):
Moved from URLParser to share with other tests.

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

4 years agoFix Windows WebGL build after r209832
achristensen@apple.com [Thu, 15 Dec 2016 08:17:17 +0000 (08:17 +0000)]
Fix Windows WebGL build after r209832

* CMakeLists.txt:
Source/ThirdParty/ANGLE:

* include/EGL/egl.h:
* include/GLES2/gl2.h:

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

4 years agoWeb Inspector: Jumping to the definition of a custom elements is broken
rniwa@webkit.org [Thu, 15 Dec 2016 05:15:11 +0000 (05:15 +0000)]
Web Inspector: Jumping to the definition of a custom elements is broken
https://bugs.webkit.org/show_bug.cgi?id=165890

Reviewed by Joseph Pecoraro.

Fix the regression from https://trac.webkit.org/changeset/208304.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._showCustomElementDefinition): Use the main target
since a custom element definition can never come from a worker.

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

4 years agoUnreviewed build fix after r209832
hs85.jeong@samsung.com [Thu, 15 Dec 2016 05:10:45 +0000 (05:10 +0000)]
Unreviewed build fix after r209832

* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::sharedDisplay): Added the guard for the clang

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

4 years agoUnreviewed, fix test.
keith_miller@apple.com [Thu, 15 Dec 2016 04:45:24 +0000 (04:45 +0000)]
Unreviewed, fix test.

* wasm/function-tests/i32-const.js:

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

4 years agoWasm should decode constants correctly
keith_miller@apple.com [Thu, 15 Dec 2016 04:36:08 +0000 (04:36 +0000)]
Wasm should decode constants correctly
https://bugs.webkit.org/show_bug.cgi?id=165886

Reviewed by Saam Barati.

JSTests:

* wasm/Builder.js:
(const._isValidValue):
* wasm/Builder_WebAssemblyBinary.js:
(const.putOp):
* wasm/LowLevelBinary.js:
(export.default.LowLevelBinary.prototype.float):
(export.default.LowLevelBinary.prototype.double):
* wasm/function-tests/f32-const.js: Added.
* wasm/function-tests/f64-const.js: Added.
* wasm/function-tests/i32-const.js: Added.
* wasm/wasm.json:

Source/JavaScriptCore:

This patch fixes how we decode the constant part of i32, i64, f32,
and f64.const opcodes.

* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
* wasm/wasm.json:

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

4 years agoOnly send Messages::WebPageProxy::DidSaveToPageCache once when entering page cache.
akling@apple.com [Thu, 15 Dec 2016 03:48:49 +0000 (03:48 +0000)]
Only send Messages::WebPageProxy::DidSaveToPageCache once when entering page cache.
<https://webkit.org/b/165887>

Reviewed by Brady Eidson.

We were sending one of these IPC messages per frame when a page enters the page cache,
and we really only need one, so only do it for the main frame.

(This message is used to adopt the page cache on the UI process side, in case another
web process currently owns the cache. That happens in WebProcessPool::processDidCachePage().)

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didSaveToPageCache):

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

4 years agoWebAssembly: Add various low hanging fruit that will allow us to run the LLVM torture...
sbarati@apple.com [Thu, 15 Dec 2016 03:30:44 +0000 (03:30 +0000)]
WebAssembly: Add various low hanging fruit that will allow us to run the LLVM torture tests in Wasm
https://bugs.webkit.org/show_bug.cgi?id=165883

Reviewed by Keith Miller.

JSTests:

* wasm/Builder.js:
(export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
* wasm/Builder_WebAssemblyBinary.js:
(const.emitters.Export):
* wasm/js-api/table.js:
(assertBadBinary):
(assertBadTable):
(assert.truthy):
* wasm/js-api/test_memory.js:
(binaryShouldNotParse):
(test):
(test.testMemImportError):
(assert.truthy):
(assert): Deleted.

Source/JavaScriptCore:

This patch implements some low hanging fruit:
- Exporting Table
- Exporting Memory
- Load16 with zero extension to both 32 and 64 bit values.
- Fixes Unreachable to emit code that will prevent B3 from having a validation error.

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addUnreachable):
(JSC::Wasm::sizeOfLoadOp):
(JSC::Wasm::B3IRGenerator::emitLoadOp):
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
* wasm/WasmModuleParser.cpp:
(JSC::Wasm::ModuleParser::parseExport):
* wasm/WasmValidate.cpp:
(JSC::Wasm::Validate::addUnreachable):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::finishCreation):
(JSC::WebAssemblyModuleRecord::link):

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

4 years ago[GTK] Support latest SubtleCrypto HMAC APIs
utatane.tea@gmail.com [Thu, 15 Dec 2016 02:31:37 +0000 (02:31 +0000)]
[GTK] Support latest SubtleCrypto HMAC APIs
https://bugs.webkit.org/show_bug.cgi?id=165863

Reviewed by Sam Weinig.

Source/WebCore:

SubtleCrypto spec is updated, and new delegate implementations are required to support these interfaces.
This patch implements platformSign and platformVerify with WorkQueues for gcrypt backend.

* crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:
(WebCore::calculateSignature):
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):

LayoutTests:

Enable HMAC tests.

* platform/gtk/TestExpectations:

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

4 years agoUpdate ModuleLoader code by using the latest builtin primitives
utatane.tea@gmail.com [Thu, 15 Dec 2016 02:23:56 +0000 (02:23 +0000)]
Update ModuleLoader code by using the latest builtin primitives
https://bugs.webkit.org/show_bug.cgi?id=165851

Reviewed by Sam Weinig.

Update the module loader code,

1. Use @globalPrivate for the utilities, instead of setting them as the member of ModuleLoader.
2. Use @putByValDirect instead of @push. @push is user-observable since it uses Set() operation
   and it can be observed by defining indexed setters in Array.prototype.

* builtins/ModuleLoaderPrototype.js:
(ensureRegistered):
(fulfillFetch):
(commitInstantiated):
(requestFetch):
(requestSatisfy):
(setStateToMax): Deleted.
(newRegistryEntry): Deleted.
* runtime/ModuleLoaderPrototype.cpp:

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

4 years agoThe stress GC bot crashes in JavaScriptCore beneath ShadowChicken::update and Inspect...
msaboff@apple.com [Thu, 15 Dec 2016 01:41:53 +0000 (01:41 +0000)]
The stress GC bot crashes in JavaScriptCore beneath ShadowChicken::update and Inspector::jsToInspectorValue
https://bugs.webkit.org/show_bug.cgi?id=165871

Reviewed by Mark Lam.

This fixes two issues with the VM watch dog timer firing in a worker.

The first issue has to do with bytecode ordering.  Prior to this change, the first few opcodes
generated when the watch dog is enabled are:
        op_enter
        op_watchdog
        op_get_scope
When the watchdog fires, the function will get an exception at op_watchdog.  In processing that exception,
we'll try to update the ShadowChicken shadow stack.  That update assumes that if there is a scope
VirtualRegister allocated, then the slot contains a valid JSScope.  With the current bytecode ordering,
this is not true at op_watchdog as op_enter will put JSUndefined in the scope slot.  It isn't until the
op_get_scope gets processed that we'll have a valid scope in the slot.  The fix for this issue is to
ensure that op_get_scope happens before the op_watchdog.

The second issue is that ScriptFunctionCall::call() will not tell its caller that a terminated
execution exception happened.  Instead call() returns an empty JSValue.  InjectedScript::wrapCallFrames()
wasn't checking for an empty JSValue, but was passing it to another function.  Added a short circuit
return when call returns an empty JSValue.

Added <https://bugs.webkit.org/show_bug.cgi?id=165875> to fix other callers of ScriptFunctionCall::call()
to check for an empty JSValue return value.
Also tracked with <rdar://problem/29671015>.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitEnter):
* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::wrapCallFrames):

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

4 years agoDirectTailCall implementation needs to tell the shuffler what to put into the Argumen...
fpizlo@apple.com [Thu, 15 Dec 2016 01:25:16 +0000 (01:25 +0000)]
DirectTailCall implementation needs to tell the shuffler what to put into the ArgumentCount explicitly
https://bugs.webkit.org/show_bug.cgi?id=165882

Reviewed by Mark Lam.
JSTests:

* stress/direct-tail-call-arity-mismatch-count-args.js: Added.
(foo):
(bar):

Source/JavaScriptCore:

The CallFrameShuffler was assuming that the ArgumentCount that it should store into the
callee frame is simply the size of the args vector.

That's not true for DirectTailCall, which will pad the args vector with undefined if we
are optimizing an arity mismatch. We need to pass the ArgumentCount explicitly in this
case.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
* jit/CallFrameShuffleData.h:
* jit/CallFrameShuffler.cpp:
(JSC::CallFrameShuffler::CallFrameShuffler):
(JSC::CallFrameShuffler::prepareAny):
* jit/CallFrameShuffler.h:
(JSC::CallFrameShuffler::snapshot):
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):

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

4 years agoFix cause of viewport-related flakiness in iOS tests
simon.fraser@apple.com [Thu, 15 Dec 2016 01:06:21 +0000 (01:06 +0000)]
Fix cause of viewport-related flakiness in iOS tests
https://bugs.webkit.org/show_bug.cgi?id=165878

Reviewed by Tim Horton.

Source/WebKit2:

When TestController::platformConfigureViewForTest() changes the view size for a flexible
viewport test, the page would not have updated with the new scale by the time the load event
fired, causing flakiness depending on test order.

This was caused by code added in r170325 that delayed visible content rect updates until
after the UI process has received the transaction after didCommitLoad. So fix by overriding
this mechanism if the view has been resized.

* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
(WebKit::operator<<):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::isFirstUpdateForNewViewSize):
(WebKit::operator==):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateContentRectsWithState:]):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::setSize):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):

LayoutTests:

Try un-flaking some viewport tests.

* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoUnreviewed, rolling out r209415.
cdumez@apple.com [Thu, 15 Dec 2016 00:47:54 +0000 (00:47 +0000)]
Unreviewed, rolling out r209415.

This workaround is no longer needed now that
<rdar://problem/29518605> has been fixed

Reverted changeset:

"Add HTML interactive form validation blacklist for some
WebKit-specific sites"
https://bugs.webkit.org/show_bug.cgi?id=165470
http://trac.webkit.org/changeset/209415

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

4 years agoFull Pass CSS Variables Test Suite
jonlee@apple.com [Thu, 15 Dec 2016 00:35:06 +0000 (00:35 +0000)]
Full Pass CSS Variables Test Suite
https://bugs.webkit.org/show_bug.cgi?id=150183

Reviewed by Simon Fraser.

The new CSS parser progresses these tests. Move them out of the failures/ sub-directory.
One of the tests needs the Ahem font, which was not available when put in the sub-directory.

* fast/css/variables/test-suite/024-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/024-expected.html.
* fast/css/variables/test-suite/024.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/024.html.
* fast/css/variables/test-suite/025-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/025-expected.html.
* fast/css/variables/test-suite/025.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/025.html.
* fast/css/variables/test-suite/026-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/026-expected.html.
* fast/css/variables/test-suite/026.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/026.html.
* fast/css/variables/test-suite/028-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/028-expected.html.
* fast/css/variables/test-suite/028.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/028.html.
* fast/css/variables/test-suite/030-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/030-expected.html.
* fast/css/variables/test-suite/030.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/030.html.
* fast/css/variables/test-suite/054-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/054-expected.html.
* fast/css/variables/test-suite/054.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/054.html.
* fast/css/variables/test-suite/055-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/055-expected.html.
* fast/css/variables/test-suite/055.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/055.html.
* fast/css/variables/test-suite/056-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/056-expected.html.
* fast/css/variables/test-suite/056.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/056.html.
* fast/css/variables/test-suite/058-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/058-expected.html.
* fast/css/variables/test-suite/058.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/058.html.
* fast/css/variables/test-suite/071-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/071-expected.html.
* fast/css/variables/test-suite/071.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/071.html.
* fast/css/variables/test-suite/081-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/081-expected.html.
* fast/css/variables/test-suite/081.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/081.html.
* fast/css/variables/test-suite/082-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/082-expected.html.
* fast/css/variables/test-suite/082.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/082.html.
* fast/css/variables/test-suite/085-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/085-expected.html.
* fast/css/variables/test-suite/085.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/085.html.
* fast/css/variables/test-suite/086-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/086-expected.html.
* fast/css/variables/test-suite/086.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/086.html.
* fast/css/variables/test-suite/087-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/087-expected.html.
* fast/css/variables/test-suite/087.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/087.html.
* fast/css/variables/test-suite/091-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/091-expected.html.
* fast/css/variables/test-suite/091.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/091.html.
* fast/css/variables/test-suite/103-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/103-expected.html.
* fast/css/variables/test-suite/103.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/103.html.
* fast/css/variables/test-suite/111-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/111-expected.html.
* fast/css/variables/test-suite/111.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/111.html.
* fast/css/variables/test-suite/115-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/115-expected.html.
* fast/css/variables/test-suite/115.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/115.html.
* fast/css/variables/test-suite/126-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/126-expected.html.
* fast/css/variables/test-suite/126.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/126.html.
* fast/css/variables/test-suite/152-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/152-expected.html.
* fast/css/variables/test-suite/152.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/152.html.
* fast/css/variables/test-suite/159-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/159-expected.html.
* fast/css/variables/test-suite/159.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/159.html.
* fast/css/variables/test-suite/161-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/161-expected.html.
* fast/css/variables/test-suite/161.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/161.html.
* fast/css/variables/test-suite/163-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/163-expected.html.
* fast/css/variables/test-suite/163.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/163.html.
* fast/css/variables/test-suite/169-expected.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/169-expected.html.
* fast/css/variables/test-suite/169.html: Renamed from LayoutTests/fast/css/variables/test-suite/failures/169.html.

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

4 years agoUpdate prefers-reduced-motion syntax
dino@apple.com [Thu, 15 Dec 2016 00:12:21 +0000 (00:12 +0000)]
Update prefers-reduced-motion syntax
https://bugs.webkit.org/show_bug.cgi?id=165880
<rdar://problems/29671807>

Reviewed by Sam Weinig.

Source/WebCore:

After discussion in:
https://github.com/w3c/csswg-drafts/issues/442
... the syntax of prefers-reduced-motion was changed
to accept "reduce" or "no-preference".

Updated the tests in fast/media.

* css/CSSValueKeywords.in: Add no-preference keyword.
* css/MediaQueryEvaluator.cpp:
(WebCore::prefersReducedMotionEvaluate):

LayoutTests:

* fast/media/mq-prefers-reduced-motion-forced-value.html:
* fast/media/mq-prefers-reduced-motion.html:

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

4 years agoSource/WebCore:
weinig@apple.com [Thu, 15 Dec 2016 00:04:01 +0000 (00:04 +0000)]
Source/WebCore:
REGRESSION (204679): Google notifications never load (expecting DOMStringList rather than JS array for Location.ancestorOrigins)
<rdar://problem/29573563>
https://bugs.webkit.org/show_bug.cgi?id=165872

Reviewed by Chris Dumez.

Revert the Location.ancestorOrigins part of r204679 because google.com is relying on
it returning a DOMStringList (or at least something with a .item() function), rather
than a frozen javascript array.

Spec changes are tracked with https://github.com/whatwg/html/issues/2179.

* page/Location.cpp:
(WebCore::Location::ancestorOrigins):
* page/Location.h:
* page/Location.idl:
Change Location.ancestorOrigins back to returning a DOMStringList.

Source/WebKit2:
[WebIDL] Add support for converting dictionaries to JS
https://bugs.webkit.org/show_bug.cgi?id=165367

Reviewed by Chris Dumez.

* CMakeLists.txt:
Add missing directories to look in for headers.

LayoutTests:
REGRESSION (204679): Google notifications never load (expecting DOMStringList rather than JS array for Location.ancestorOrigins)
<rdar://problem/29573563>
https://bugs.webkit.org/show_bug.cgi?id=165872

Reviewed by Chris Dumez.

* fast/dom/Window/Location/ancestor-origins-expected.txt:
* fast/dom/Window/Location/ancestor-origins.html:
Change back to test that Location.ancestorOrigins returns a DOMStringList.

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

4 years agoAdd WKContextRefreshPlugIns
andersca@apple.com [Thu, 15 Dec 2016 00:00:38 +0000 (00:00 +0000)]
Add WKContextRefreshPlugIns
https://bugs.webkit.org/show_bug.cgi?id=165879
rdar://problem/29602414

Reviewed by Tim Horton.

* UIProcess/API/C/WKContext.cpp:
(WKContextRefreshPlugIns):
* UIProcess/API/C/WKContext.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::refreshPlugins):
* UIProcess/WebProcessPool.h:
* WebProcess/Plugins/WebPluginInfoProvider.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::refreshPlugins):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

4 years agoAPI Test Fullscreen.TopContentInset is asserting on Yosemite
timothy_horton@apple.com [Wed, 14 Dec 2016 23:42:51 +0000 (23:42 +0000)]
API Test Fullscreen.TopContentInset is asserting on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=165877

Reviewed by Brady Eidson.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setTopContentInset):
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
We don't use fences on Yosemite, but this codepath still tried to.
Instead of guarding with PLATFORM(COCOA), make use of the more accurate
HAVE(COREANIMATION_FENCES) guard.

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

4 years ago[CSS Parser] Rename StyleKeyframe to StyleRuleKeyframe
hyatt@apple.com [Wed, 14 Dec 2016 23:15:24 +0000 (23:15 +0000)]
[CSS Parser] Rename StyleKeyframe to StyleRuleKeyframe
https://bugs.webkit.org/show_bug.cgi?id=165876

Reviewed by Simon Fraser.

* css/CSSKeyframeRule.cpp:
(WebCore::StyleRuleKeyframe::StyleRuleKeyframe):
(WebCore::StyleRuleKeyframe::~StyleRuleKeyframe):
(WebCore::StyleRuleKeyframe::mutableProperties):
(WebCore::StyleRuleKeyframe::keyText):
(WebCore::StyleRuleKeyframe::setKeyText):
(WebCore::StyleRuleKeyframe::cssText):
(WebCore::CSSKeyframeRule::CSSKeyframeRule):
(WebCore::StyleKeyframe::StyleKeyframe): Deleted.
(WebCore::StyleKeyframe::~StyleKeyframe): Deleted.
(WebCore::StyleKeyframe::mutableProperties): Deleted.
(WebCore::StyleKeyframe::keyText): Deleted.
(WebCore::StyleKeyframe::setKeyText): Deleted.
(WebCore::StyleKeyframe::cssText): Deleted.
* css/CSSKeyframeRule.h:
* css/CSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::keyframes):
(WebCore::StyleRuleKeyframes::parserAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
(WebCore::CSSKeyframesRule::appendRule):
(WebCore::CSSKeyframesRule::item):
* css/CSSKeyframesRule.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::keyframeStylesForAnimation):
* css/StyleResolver.h:
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
* css/StyleRule.h:
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseKeyframeRule):
* css/parser/CSSParser.h:
* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::parseDeferredKeyframeList):
(WebCore::CSSParserImpl::consumeKeyframesRule):
(WebCore::CSSParserImpl::consumeKeyframeStyleRule):
* css/parser/CSSParserImpl.h:

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

4 years agoMarking streams/pipe-to.html as flaky on macOS debug.
ryanhaddad@apple.com [Wed, 14 Dec 2016 23:01:17 +0000 (23:01 +0000)]
Marking streams/pipe-to.html as flaky on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=165874

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoRemoving Release annotation from three tests that are also flaky on Debug.
ryanhaddad@apple.com [Wed, 14 Dec 2016 22:48:36 +0000 (22:48 +0000)]
Removing Release annotation from three tests that are also flaky on Debug.
https://bugs.webkit.org/show_bug.cgi?id=163361

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

4 years ago[CSS Parser] Make deferred parsing retain the sheet text. Fix invalidation to avoid...
hyatt@apple.com [Wed, 14 Dec 2016 22:34:04 +0000 (22:34 +0000)]
[CSS Parser] Make deferred parsing retain the sheet text. Fix invalidation to avoid deferred parsing.
https://bugs.webkit.org/show_bug.cgi?id=165868

Reviewed by Simon Fraser.

With this new model of token copying, the sheet text needs to be retained. The tokenizer did this,
but we're no longer keeping it around.

StyleInvalidation is also aggressively crawling media rules, even unsupported ones, so fix it
to avoid deferred parsing.

* css/StyleInvalidationAnalysis.cpp:
(WebCore::shouldDirtyAllStyle):
* css/parser/CSSDeferredParser.cpp:
(WebCore::CSSDeferredParser::CSSDeferredParser):
* css/parser/CSSDeferredParser.h:
(WebCore::CSSDeferredParser::create):
* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::CSSParserImpl):

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

4 years agoWeb Inspector: Zooming in on the Timeline should always zoom right where the cursor is
mattbaker@apple.com [Wed, 14 Dec 2016 22:04:25 +0000 (22:04 +0000)]
Web Inspector: Zooming in on the Timeline should always zoom right where the cursor is
https://bugs.webkit.org/show_bug.cgi?id=151118
<rdar://problem/23487912>

Reviewed by Timothy Hatcher.

Use correct left edge for timeline overview graph elements.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._handleWheelEvent):
(WebInspector.TimelineOverview._handleGestureStart):
(WebInspector.TimelineOverview.prototype._handleGestureChange):

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

4 years agoiOS: An element with tabindex is not focusable unless there is no mouse event handler
rniwa@webkit.org [Wed, 14 Dec 2016 21:57:37 +0000 (21:57 +0000)]
iOS: An element with tabindex is not focusable unless there is no mouse event handler
https://bugs.webkit.org/show_bug.cgi?id=165843

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by ancestorRespondingToClickEvents not checking the precense of tabindex attribute.
Check that condition along with event listeners.

Test: fast/events/focusing-element-with-tabindex-by-tap-or-click.html

* page/ios/FrameIOS.mm:
(WebCore::ancestorRespondingToClickEvents):

Tools:

Add testRunner.isWebKit2 which is always true in WebKitTestRunner.
Without this, it's really hard to reliably differentiate DumpRenderTree and WebKitTestRunner,
and DumpRenderTree's runUIScript would hit an assertion :(

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::isWebKit2):

LayoutTests:

Added a regression test for focusing an element with just tabindex using UIHelper.

Also fixed UIHelper to work in iOS DumpRenderTree which was hitting an assertion
by explicitly checking testRunner.isWebKit2. Prior to fixing this, it was hitting
an assertion in RunLoop::main() which was asserting that there is a runloop,
which doesn't exist in DumpRenderTree.

* fast/events/focusing-element-with-tabindex-by-tap-or-click-expected.txt: Added.
* fast/events/focusing-element-with-tabindex-by-tap-or-click.html: Added.
* platform/ios-simulator-wk2/TestExpectations:
* resources/ui-helper.js:
(window.UIHelper.isWebKit2):
(window.UIHelper.wait): Added the support for js-test.js / js-test-pre.js style tests.

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

4 years agoProgress towards using ANGLE to do WebGL rendering
achristensen@apple.com [Wed, 14 Dec 2016 21:45:28 +0000 (21:45 +0000)]
Progress towards using ANGLE to do WebGL rendering
https://bugs.webkit.org/show_bug.cgi?id=165864

Reviewed by Dean Jackson.

Source/ThirdParty/ANGLE:

* ANGLE.xcodeproj/project.pbxproj:
Compile more files, and add some more "public" headers.
ANGLE is not a public framework, so these headers just go in
WebKitBuild/Release/usr/local/include/ANGLE to be included when compiling WebCore.
* ANGLE/egl.h: Added.
* ANGLE/eglext.h: Added.
* ANGLE/eglplatform.h: Added.
* ANGLE/entry_points_gles_2_0.h: Added.
* ANGLE/entry_points_gles_2_0_ext.h: Added.
* ANGLE/entry_points_gles_3_0.h: Added.
* ANGLE/export.h: Added.
* ANGLE/gl2.h: Added.
* ANGLE/gl2ext.h: Added.
* ANGLE/gl2platform.h: Added.
* ANGLE/gl3.h: Added.
* ANGLE/gl31.h: Added.
* ANGLE/gl3platform.h: Added.
* ANGLE/khrplatform.h: Added.
Add more forwarding headers.  There are already a few, but we need more.
* CMakeLists.txt:
* PlatformMac.cmake:
Make the frameworks linked to by ANGLE be private so frameworks that link with
ANGLE don't automatically link with them. This allows me to switch ANGLE from a
static library to a dynamic library to make sure WebCore isn't directly using OpenGL.
* PlatformWin.cmake:
Move HLSL-specific files to only be built on Windows.
* include/EGL/egl.h:
* include/EGL/eglplatform.h:
* include/GLES2/gl2.h:
* include/GLES2/gl2platform.h:
* include/GLES3/gl3.h:
* include/GLES3/gl31.h:
* include/GLES3/gl32.h:
* include/GLES3/gl3platform.h:
* src/libGLESv2/entry_points_egl.h:
* src/libGLESv2/entry_points_egl_ext.h:
* src/libGLESv2/entry_points_gles_2_0.h:
* src/libGLESv2/entry_points_gles_2_0_ext.h:
* src/libGLESv2/entry_points_gles_3_0.h:
* src/libGLESv2/entry_points_gles_3_1.h:
Include ANGLE headers as #include <ANGLE/*> instead of #include <KHR/*> or #include <GLES/*>
This is needed to distinguish the ANGLE headers from any system OpenGL/OpenGLES headers.
We will eventually only include ANGLE's entry_points_*.h directly from WebCore.

Source/WebCore:

No new tests, no change in behavior.
Just compile fixes for a configuration that will soon be standard
that can be landed now without breaking anything.

* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::sharedDisplay):
Ignore some clang warnings that will cause problems when this is compiled on Mac.

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

4 years agoAdd some instrumentation to try to detect a crash on the bots
andersca@apple.com [Wed, 14 Dec 2016 21:31:26 +0000 (21:31 +0000)]
Add some instrumentation to try to detect a crash on the bots
https://bugs.webkit.org/show_bug.cgi?id=165866

Reviewed by Sam Weinig.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::sendMessage):

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

4 years agoWebAssembly JS API: implement Global
keith_miller@apple.com [Wed, 14 Dec 2016 21:29:14 +0000 (21:29 +0000)]
WebAssembly JS API: implement Global
https://bugs.webkit.org/show_bug.cgi?id=164133

Reviewed by Saam Barati.

JSTests:

* wasm/Builder.js:
(export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
* wasm/Builder_WebAssemblyBinary.js:
(const.valueType.WASM.description.type.i32.type.const.putGlobalType):
(const.putOp):
(const.putInitExpr):
(const.emitters.Import):
(const.emitters.Global):
(const.emitters.Export):
(const.emitters.Code):
* wasm/LowLevelBinary.js:
(export.default.LowLevelBinary.prototype.varuint32):
(export.default.LowLevelBinary.prototype.varint32):
* wasm/js-api/global-error.js: Added.
(catch):
(assert.truthy):
* wasm/js-api/global-external-init-from-import.js: Added.
* wasm/js-api/global-internal-init-from-import.js: Added.
* wasm/js-api/global-mutate.js: Added.
(createInternalGlobalModule):
* wasm/js-api/globals-export.js: Added.
* wasm/js-api/globals-import.js: Added.
* wasm/wasm.json:

Source/JavaScriptCore:

This patch adds support for globals. It handles imports, exports
and internal globals. In the MVP only internal globals are allowed
to be mutable. This means we can store a C-array of 64-bit slots
off the instance holding them. When globals are exported to JS
they are done so as numbers. This means that i64 globals cannot be
imported or exported.

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::getGlobal):
(JSC::Wasm::B3IRGenerator::setGlobal):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
(JSC::Wasm::parseAndCompile):
* wasm/WasmFormat.h:
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
* wasm/WasmModuleParser.cpp:
(JSC::Wasm::ModuleParser::parseImport):
(JSC::Wasm::ModuleParser::parseGlobal):
(JSC::Wasm::ModuleParser::parseExport):
(JSC::Wasm::ModuleParser::parseElement):
(JSC::Wasm::ModuleParser::parseInitExpr):
(JSC::Wasm::ModuleParser::parseGlobalType):
(JSC::Wasm::ModuleParser::parseData):
* wasm/WasmModuleParser.h:
* wasm/WasmParser.h:
(JSC::Wasm::Parser::parseVarInt32):
(JSC::Wasm::Parser::parseVarInt64):
(JSC::Wasm::Parser::parseUInt64):
* wasm/WasmValidate.cpp:
(JSC::Wasm::Validate::hasMemory):
(JSC::Wasm::Validate::Validate):
(JSC::Wasm::Validate::getGlobal):
(JSC::Wasm::Validate::setGlobal):
(JSC::Wasm::validateFunction):
* wasm/generateWasmOpsHeader.py:
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::create):
(JSC::JSWebAssemblyInstance::finishCreation):
(JSC::JSWebAssemblyInstance::visitChildren):
* wasm/js/JSWebAssemblyInstance.h:
(JSC::JSWebAssemblyInstance::loadI32Global):
(JSC::JSWebAssemblyInstance::loadI64Global):
(JSC::JSWebAssemblyInstance::loadF32Global):
(JSC::JSWebAssemblyInstance::loadF64Global):
(JSC::JSWebAssemblyInstance::setGlobal):
(JSC::JSWebAssemblyInstance::offsetOfGlobals):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::finishCreation):
(JSC::WebAssemblyModuleRecord::link):

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

4 years ago[iOS] MediaDocuments have controls on the bottom of the page
dino@apple.com [Wed, 14 Dec 2016 21:14:25 +0000 (21:14 +0000)]
[iOS] MediaDocuments have controls on the bottom of the page
https://bugs.webkit.org/show_bug.cgi?id=165865
<rdar://problem/28757268>

Reviewed by Jon Lee.

MediaDocuments on iOS are incorrectly placing the controls at
the bottom of the page. This is due to the <video> element
getting a height of 100%. It should be "auto" instead.

* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):

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

4 years agoUnreviewed, re-enable concurrent GC on ARM64 now that the most likely culprit of...
fpizlo@apple.com [Wed, 14 Dec 2016 21:05:56 +0000 (21:05 +0000)]
Unreviewed, re-enable concurrent GC on ARM64 now that the most likely culprit of the memory
regressions is fixed. Lets see what the bots think!

* runtime/Options.cpp:
(JSC::recomputeDependentOptions):

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

4 years ago[CSS Parser] Implement deferred parsing of properties, @media, @supports and @keyframes
hyatt@apple.com [Wed, 14 Dec 2016 21:02:07 +0000 (21:02 +0000)]
[CSS Parser] Implement deferred parsing of properties, @media, @supports and @keyframes
https://bugs.webkit.org/show_bug.cgi?id=165743

Reviewed by Dean Jackson.

Source/WebCore:

Added new tests in fast/css/deferred-parsing.

This patch implements deferred parsing in CSS. By default, when parsing
author stylesheets, the parser goes into a deferred mode where it leaves
the declaration block of all style rules unparsed initially. Instead of
creating and setting an ImmutableStyleProperties object on the StyleRule,
the parser creates a DeferredStyleProperties object instead that is
capable of calling into CSSDeferredParser to parse the properties and values
only when the properties are finally asked for.

In addition, this patch defers the parsing of the interior of @media,
@supports, and @keyframes rules. @media blocks that are never matched will
never parse any of the rules inside. @supports conditions for unsupported
features will also not be parsed. For @keyframes, if the animation is never
referenced/used, then the @keyframes child rules will never be parsed.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Add CSSDeferredParser to the build.

* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::matchingFaces):
Patched to drop the StyleSheetContents* argument from parseValue, since it
is no longer needed.

* css/CSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::parseDeferredRulesIfNeeded):
(WebCore::StyleRuleKeyframes::keyframes):
(WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
(WebCore::StyleRuleKeyframes::findKeyframeIndex):
* css/CSSKeyframesRule.h:
Keyframes now hold both a keyframes Vector and a DeferredStyleGroupRuleList
object. The keyframes vector won't be populated until it is needed, and the
population is done by DeferredStyleGroupRuleList, which holds both the original
tokens of the keyframes rule interior, and a references to the
CSSDeferredParser that will do the parsing.

* css/DOMCSSNamespace.cpp:
(WebCore::DOMCSSNamespace::supports):
Patched to drop the StyleSheetContents* argument from parseValue, since it
is no longer needed.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
ElementRuleCollector tests to see if a rule is empty by counting properties(),
but we don't want to initiate deferred parsing just to check this. Instead we
invoke propertiesWithoutDeferredParsing, which will hand back a nullptr if
the properties haven't been parsed yet. In order to ensure this optimization
continues to work, any rules whose interiors consist of only whitespace do
not get deferred.

* css/FontFace.cpp:
(WebCore::FontFace::setVariant):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::setProperty):
(WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
Patched to drop the StyleSheetContents* argument from parseValue, since it
is no longer needed.

* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::MutableStyleProperties):
(WebCore::MutableStyleProperties::setProperty):
(WebCore::DeferredStyleProperties::create):
(WebCore::DeferredStyleProperties::DeferredStyleProperties):
(WebCore::DeferredStyleProperties::~DeferredStyleProperties):
(WebCore::DeferredStyleProperties::parseDeferredProperties):
* css/StyleProperties.h:
(WebCore::StylePropertiesBase::type):
(WebCore::StylePropertiesBase::cssParserMode):
(WebCore::StylePropertiesBase::StylePropertiesBase):
(WebCore::StyleProperties::isMutable):
(WebCore::StyleProperties::StyleProperties):
(WebCore::StylePropertiesBase::deref):
(isType):
(WebCore::StyleProperties::cssParserMode): Deleted.
(WebCore::StyleProperties::deref): Deleted.
Right now StyleProperties has two subclasses, ImmutableStyleProperties (which
is created by the parser when not deferring), and MutableStyleProperties (used
when making changes and doing DOM Manipulations).

This patch adds a new base class called StylePropertiesBase, and StyleProperties
now derives from it. DeferredStyleProperties derives from this base. The members
of StyleProperties have been moved up into StylePropertiesBase.

The m_isMutable bit, used to determine the type for downcasting has been enhanced
to m_type (2 bits), since there are now three possible subclasses.

* css/StyleRule.cpp:
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::properties):
(WebCore::StyleRule::mutableProperties):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
Patched to ensure that when properties() are accessed, that if the current
stored StylePropertyBase in the rule is a DeferredStyleProperties, we then
parse and replace DeferredStyleProperties with ImmutableStyleProperties on the
rule. By using a common base class, we avoid increasing memory usage in
StyleRule.

(WebCore::DeferredStyleGroupRuleList::create):
(WebCore::DeferredStyleGroupRuleList::DeferredStyleGroupRuleList):
(WebCore::DeferredStyleGroupRuleList::parseDeferredRules):
(WebCore::DeferredStyleGroupRuleList::parseDeferredKeyframes):
DeferredStyleGroupList is used to handle deferred parsing of objects with
child rules. These include @media, @supports and @keyframes.

(WebCore::StyleRuleGroup::StyleRuleGroup):
(WebCore::StyleRuleGroup::childRules):
(WebCore::StyleRuleGroup::wrapperInsertRule):
(WebCore::StyleRuleGroup::wrapperRemoveRule):
(WebCore::StyleRuleGroup::parseDeferredRulesIfNeeded):
(WebCore::StyleRuleMedia::StyleRuleMedia):
(WebCore::StyleRuleSupports::StyleRuleSupports):
StyleRuleGroup now holds both a child rules Vector and a
DeferredStyleGroupRuleList. If DeferredStyleGroupRuleList is set, then
when the childRules are finally accessed, we will populate the childRules
Vector and then null out the DeferredStyleGroupRuleList.

* css/StyleRule.h:
(WebCore::StyleRule::propertiesWithoutDeferredParsing):
(WebCore::StyleRuleGroup::childRulesWithoutDeferredParsing):
(WebCore::StyleRuleGroup::childRules): Deleted.
Add new accesors for fetching properties and child rules without causing
deferred parsing to happen.

* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseString):
Patched to turn on deferred parsing for author sheets and for all
non-UA stylesheets parsed from a string (e.g., <style>).

(WebCore::traverseSubresourcesInRules):
The broken resource check was aggressively accessing properties(). Patch
it to call propertiesWithoutDeferredParsing() instead so that it doesn't
defeat the new optimization.

* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
Patched to drop the StyleSheetContents* argument from parseValue, since it
is no longer needed.

* css/parser/CSSDeferredParser.cpp: Added.
(WebCore::CSSDeferredParser::CSSDeferredParser):
(WebCore::CSSDeferredParser::parseDeclaration):
(WebCore::CSSDeferredParser::parseRuleList):
(WebCore::CSSDeferredParser::parseKeyframeList):
* css/parser/CSSDeferredParser.h: Added.
(WebCore::CSSDeferredParser::create):
(WebCore::CSSDeferredParser::tokenizer):
(WebCore::CSSDeferredParser::mode):
(WebCore::CSSDeferredParser::context):
(WebCore::CSSDeferredParser::styleSheet):
The CSSDeferredParser. It caches the original tokenizer's' escaped strings. Because
the CSSDeferredParser is referenced by all the rules that have yet to parse,
it will stay alive until all rules in the stylesheet has been fully parsed.

The parser receives CSSParserTokenRanges from DeferredStyleProperties or
DeferredStyleGroupRuleList and feeds them to CSSParserImpl, which then
is able to do the parsing as it would have occurred originally had the
range not been deferred.

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseSheet):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseSingleValue):
(WebCore::CSSParser::parseValue):
* css/parser/CSSParser.h:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::parseKeywordValue):
(WebCore::CSSParserFastPaths::maybeParseValue):
* css/parser/CSSParserFastPaths.h:
Drop the StyleSheetContents* argument from the methods that no longer need
them.

* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::CSSParserImpl):
(WebCore::CSSParserImpl::tokenizer):
(WebCore::CSSParserImpl::parseValue):
(WebCore::CSSParserImpl::parseCustomPropertyValue):
(WebCore::CSSParserImpl::parseDeclarationList):
(WebCore::CSSParserImpl::parseInlineStyleDeclaration):
(WebCore::CSSParserImpl::parseRule):
(WebCore::CSSParserImpl::parseStyleSheet):
(WebCore::CSSParserImpl::parseDeclarationListForInspector):
(WebCore::CSSParserImpl::parseStyleSheetForInspector):
(WebCore::CSSParserImpl::consumeQualifiedRule):
(WebCore::CSSParserImpl::consumeMediaRule):
(WebCore::CSSParserImpl::consumeSupportsRule):
(WebCore::CSSParserImpl::consumeKeyframesRule):
(WebCore::CSSParserImpl::consumeStyleRule):
Drop the StyleSheetContents* argument from the methods that no longer need
them.

(WebCore::CSSParserImpl::createDeferredStyleProperties):
(WebCore::CSSParserImpl::parseDeferredDeclaration):
(WebCore::CSSParserImpl::parseDeferredRuleList):
(WebCore::CSSParserImpl::parseDeferredKeyframeList):
The methods that handle deferred parsing. They make sure to initialize
new CSSParserImpls with the original deferred parser, and then call existing
methods to do the parsing.

* css/parser/CSSParserImpl.h:
Patched to remove StyleSheetContents* arguments from some methods and
to add the new deferred parsing methods.

* css/parser/CSSParserTokenRange.cpp:
(WebCore::CSSParserTokenRange::consumeBlockCheckingForEditability):
* css/parser/CSSParserTokenRange.h:
In order to preserve the editability optimization from r180867, when
a style rule's block is consumed, we use a special method that looks
for -webkit-user-modify tokens. If one is seen, then the editability
optimization is turned off. Because we do this at the token level,
the optimization keeps working even if properties don't get parsed.

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
(WebCore::CSSPropertyParser::consumeFont):
(WebCore::CSSPropertyParser::parseShorthand):
Patched to remove StyleSheetContents* arguments now that the editability
check is in CSSTokenizer instead.

* css/parser/CSSTokenizer.cpp:
(WebCore::CSSTokenizer::tokenRange):
* css/parser/CSSTokenizer.h:
Make tokenRange() const.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
Patched to drop the StyleSheetContents* argument.

* testing/Internals.cpp:
(WebCore::deferredStyleRulesCountForList):
(WebCore::Internals::deferredStyleRulesCount):
(WebCore::deferredGroupRulesCountForList):
(WebCore::Internals::deferredGroupRulesCount):
(WebCore::deferredKeyframesRulesCountForList):
(WebCore::Internals::deferredKeyframesRulesCount):
* testing/Internals.h:
* testing/Internals.idl:
Add new testing methods that can count the deferred style rules and
group child rule lists. These methods are used by the new layout tests.

Source/WebKit2:

Repurpose the newCSSParserEnabled preference for deferred parsing. Just change the name
from "new" to "deferred."

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetDeferredCSSParserEnabled):
(WKPreferencesGetDeferredCSSParserEnabled):
(WKPreferencesSetNewCSSParserEnabled): Deleted.
(WKPreferencesGetNewCSSParserEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

LayoutTests:

* fast/css/deferred-parsing: Added.
* fast/css/deferred-parsing/dynamic-external-style-expected.txt: Added.
* fast/css/deferred-parsing/dynamic-external-style.html: Added.
* fast/css/deferred-parsing/dynamic-style-in-document-expected.txt: Added.
* fast/css/deferred-parsing/dynamic-style-in-document.html: Added.
* fast/css/deferred-parsing/hover-test-expected.txt: Added.
* fast/css/deferred-parsing/hover-test.html: Added.
* fast/css/deferred-parsing/keyframes-rule-expected.txt: Added.
* fast/css/deferred-parsing/keyframes-rule.html: Added.
* fast/css/deferred-parsing/media-print-expected.txt: Added.
* fast/css/deferred-parsing/media-print.html: Added.
* fast/css/deferred-parsing/nth-of-type-expected.txt: Added.
* fast/css/deferred-parsing/nth-of-type.html: Added.
* fast/css/deferred-parsing/resources: Added.
* fast/css/deferred-parsing/resources/basic-sheet.css: Added.
* fast/css/deferred-parsing/simple-external-style-expected.txt: Added.
* fast/css/deferred-parsing/simple-external-style.html: Added.
* fast/css/deferred-parsing/simple-style-in-document-expected.txt: Added.
* fast/css/deferred-parsing/simple-style-in-document.html: Added.
* fast/css/deferred-parsing/supports-rule-expected.txt: Added.
* fast/css/deferred-parsing/supports-rule.html: Added.

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

4 years agoDevices with fewer cores should use a more aggressive GC schedule by default
fpizlo@apple.com [Wed, 14 Dec 2016 20:57:20 +0000 (20:57 +0000)]
Devices with fewer cores should use a more aggressive GC schedule by default
https://bugs.webkit.org/show_bug.cgi?id=165859

Reviewed by Mark Lam.

* heap/Heap.cpp:
(JSC::Heap::markToFixpoint): Log when we have an unexpected delay in wake-up.
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::drainInParallelPassively): Don't drain passively if there aren't many cores.
* runtime/Options.cpp:
(JSC::overrideDefaults): Change the heuristics if we have fewer cores.
(JSC::Options::initialize):
* runtime/Options.h:

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

4 years agoIndexedDB 2.0: Massively speedup IDBIndex.get().
beidson@apple.com [Wed, 14 Dec 2016 20:56:50 +0000 (20:56 +0000)]
IndexedDB 2.0: Massively speedup IDBIndex.get().
https://bugs.webkit.org/show_bug.cgi?id=165802

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (No behavior change to Javascript, table upgrade change covered by API test).

This change upgrades the IndexRecords schema to include the ObjectStore record ID for the referenced record.
It also adds a SQLite Index-by-key on IndexRecords.

This speeds up PerformanceTests/IndexedDB/index-get.html by 15-20x.

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::v3IndexRecordsTableSchema):
(WebCore::IDBServer::v3IndexRecordsTableSchemaAlternate):
(WebCore::IDBServer::v1IndexRecordsIndexSchema):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsTable):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:

* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::markAsErrored):
(WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
* Modules/indexeddb/server/SQLiteIDBCursor.h:
(WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/IDBIndexUpgradeToV2.html: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/IDBIndexUpgradeToV2.mm: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexUpgrade.blob: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexUpgrade.sqlite3: Added.

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

4 years agoActually set the shipping contact when validating the payment request
weinig@apple.com [Wed, 14 Dec 2016 20:42:52 +0000 (20:42 +0000)]
Actually set the shipping contact when validating the payment request

Reviewed by Anders Carlsson.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidate):
Fix typo.

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

4 years agoHandle key generation with empty challenge string
wilander@apple.com [Wed, 14 Dec 2016 20:30:51 +0000 (20:30 +0000)]
Handle key generation with empty challenge string
https://bugs.webkit.org/show_bug.cgi?id=165835
<rdar://problem/29128710>

Reviewed by Anders Carlsson.

https://bugs.webkit.org/show_bug.cgi?id=160945 didn't set the challenge length to
1 for empty challenge strings. Thus the null terminator was not included. Empty
challenge strings are allowed:
"If the element has a challenge attribute, then let challenge be that attribute's
value. Otherwise, let challenge be the empty string."
https://www.w3.org/TR/html5/forms.html#the-keygen-element (fetched 2016-12-13)

Email certificate generation at
https://www.comodo.com/home/email-security/free-email-certificate.php broke
because of https://bugs.webkit.org/show_bug.cgi?id=160945.

No new tests. The original patch did not have tests and the breakage was in the
produced key material so a test would have to validate the crypto output.

* platform/mac/SSLKeyGeneratorMac.mm:
(WebCore::signedPublicKeyAndChallengeString):
    Now adds 1 to the length of the challenge to account for its null terminator.
    This matches the old behavior.

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

4 years agoCSP: Allow HTTPS URL to match HTTP source expression
dbates@webkit.org [Wed, 14 Dec 2016 20:17:28 +0000 (20:17 +0000)]
CSP: Allow HTTPS URL to match HTTP source expression
https://bugs.webkit.org/show_bug.cgi?id=159520
<rdar://problem/27287177>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/security/contentSecurityPolicy/script-src-parsing-implicit-and-explicit-port-number.html

* page/csp/ContentSecurityPolicySource.cpp:
(WebCore::ContentSecurityPolicySource::schemeMatches):
(WebCore::ContentSecurityPolicySource::portMatches):

LayoutTests:

* http/tests/security/contentSecurityPolicy/script-src-parsing-implicit-and-explicit-port-number-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/script-src-parsing-implicit-and-explicit-port-number.html: Added.
* platform/wk2/TestExpectations: Skip the test on WebKit2 because it makes use of Internals.registerDefaultPortForProtocol(),
which does not work with NetworkProcess.

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

4 years agoBytecodeBasicBlock::computeImpl() should not keep iterating blocks if all jump target...
mark.lam@apple.com [Wed, 14 Dec 2016 19:58:27 +0000 (19:58 +0000)]
BytecodeBasicBlock::computeImpl() should not keep iterating blocks if all jump targets have already been found.
https://bugs.webkit.org/show_bug.cgi?id=165820

Reviewed by Saam Barati.

Currently, if an opcode is a branch type opcode, BytecodeBasicBlock::computeImpl()
will iterate over all basic blocks looking for the block containing the jump
target, and it will continue to do this even when all the jump targets have been
found.  This is wasted work, and all the more so given that most branch type
opcodes only have a single jump target.

* bytecode/BytecodeBasicBlock.cpp:
(JSC::BytecodeBasicBlock::computeImpl):

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

4 years agoREGRESSION (r209776): [ios-simulator] LayoutTest http/tests/xmlhttprequest/on-network...
achristensen@apple.com [Wed, 14 Dec 2016 19:53:00 +0000 (19:53 +0000)]
REGRESSION (r209776): [ios-simulator] LayoutTest http/tests/xmlhttprequest/on-network-timeout-error-during-preflight.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=165836

Reviewed by Brady Eidson.

* loader/CrossOriginAccessControl.cpp:
(WebCore::createAccessControlPreflightRequest):
Use the platform default timeout for CORS preflight requests.

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

4 years agoAdd mac-elcapitan baseline for js/dom/global-constructors-attributes.html.
ryanhaddad@apple.com [Wed, 14 Dec 2016 19:27:14 +0000 (19:27 +0000)]
Add mac-elcapitan baseline for js/dom/global-constructors-attributes.html.

Unreviewed test gardening.

* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt: Added.

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

4 years agoWebContent crash under WebCore::CachedResource::load in WebCore::FrameLoader::outgoin...
antti@apple.com [Wed, 14 Dec 2016 18:54:28 +0000 (18:54 +0000)]
WebContent crash under WebCore::CachedResource::load in WebCore::FrameLoader::outgoingReferrer const
https://bugs.webkit.org/show_bug.cgi?id=165852
<rdar://problem/27297153>

Reviewed by Chris Dumez.

There appears to be some path where we get here with a null frame.
No test, don't know how exactly this happens.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::outgoingReferrer):

    Null check the frame.

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

4 years agoVersioning.
bshafiei@apple.com [Wed, 14 Dec 2016 18:44:13 +0000 (18:44 +0000)]
Versioning.

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

4 years agoUnreviewed test fix after r209806.
bfulgham@apple.com [Wed, 14 Dec 2016 18:27:30 +0000 (18:27 +0000)]
Unreviewed test fix after r209806.

Plugin-common doesn't define 'home-subpath'. Instead it has 'home-library-subpath'. Switch to the correct
function. Also, 'home-library-subpath' adds '/Library' to the path, so revise the arguments so that we
do not generate paths like '/home/username/Library/Library/Keychains'.

* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:

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

4 years agoSource/JavaScriptCore:
barraclough@apple.com [Wed, 14 Dec 2016 18:07:22 +0000 (18:07 +0000)]
Source/JavaScriptCore:
MarkedBlock::marksConveyLivenessDuringMarking should take into account collection scope
https://bugs.webkit.org/show_bug.cgi?id=165741

Unreviewed, re-landing this with fix (revert erroneous change to Options).

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/CellContainer.cpp: Added.
(JSC::CellContainer::isNewlyAllocated):
* heap/CellContainer.h:
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::addBlock):
(JSC::MarkedAllocator::removeBlock):
(JSC::MarkedAllocator::dumpBits):
* heap/MarkedAllocator.h:
(JSC::MarkedAllocator::forEachBitVector):
(JSC::MarkedAllocator::forEachBitVectorWithName):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::tryCreate):
(JSC::MarkedBlock::Handle::~Handle):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::Handle::specializedSweep):
(JSC::MarkedBlock::Handle::sweepHelperSelectMarksMode):
(JSC::MarkedBlock::Handle::stopAllocating):
(JSC::MarkedBlock::Handle::resumeAllocating):
(JSC::MarkedBlock::aboutToMarkSlow):
(JSC::MarkedBlock::Handle::didConsumeFreeList):
(JSC::MarkedBlock::Handle::dumpState):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::markingVersion):
(JSC::MarkedBlock::isMarkedRaw):
(JSC::MarkedBlock::isMarked):
* heap/MarkedBlockInlines.h:
(JSC::MarkedBlock::marksConveyLivenessDuringMarking):
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::appendJSCellOrAuxiliary):
* runtime/StructureIDTable.h:
(JSC::StructureIDTable::size):
(JSC::StructureIDTable::get):

Source/WTF:
Unreviewed, rolling out r209795.
https://bugs.webkit.org/show_bug.cgi?id=165853

rolled out the wrong revision (Requested by pizlo on #webkit).

Reverted changeset:

"MarkedBlock::marksConveyLivenessDuringMarking should take
into account collection scope"
https://bugs.webkit.org/show_bug.cgi?id=165741
http://trac.webkit.org/changeset/209795

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

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

4 years agoUnreviewed, rolling out r209766.
cdumez@apple.com [Wed, 14 Dec 2016 17:50:20 +0000 (17:50 +0000)]
Unreviewed, rolling out r209766.

Regressed Dromaeo JSLib by ~50%

Reverted changeset:

"Make opaque root scanning truly constraint-based"
https://bugs.webkit.org/show_bug.cgi?id=165760
http://trac.webkit.org/changeset/209766

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

4 years agoEventDispatcher::dispatchEvent() should take its Node by reference
aestes@apple.com [Wed, 14 Dec 2016 17:41:28 +0000 (17:41 +0000)]
EventDispatcher::dispatchEvent() should take its Node by reference
https://bugs.webkit.org/show_bug.cgi?id=165840

Reviewed by Andreas Kling.

No new tests. No change in behavior.

* dom/Element.cpp:
(WebCore::Element::dispatchWheelEvent): Dereferenced |this| when calling
EventDispatcher::dispatchEvent().
(WebCore::Element::dispatchKeyEvent): Ditto.
(WebCore::Element::dispatchFocusEvent): Ditto.
(WebCore::Element::dispatchBlurEvent): Ditto.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent): Changed |origin| from a Node* to a Node&, renamed
it to |node|, and protected it with a Ref called |protectedNode| to match our preferred
style.
* dom/EventDispatcher.h: Changed dispatchEvent's first parameter type from Node* to Node&.
* dom/Node.cpp:
(WebCore::Node::dispatchEvent): Dereferenced |this| when calling
EventDispatcher::dispatchEvent().
(WebCore::Node::dispatchTouchEvent): Ditto.
(WebCore::Node::dispatchUIRequestEvent): Ditto.
* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::dispatchEvent): Dereferenced |node| when calling
EventDispatcher::dispatchEvent().
* dom/SimulatedClick.cpp:
(WebCore::simulateMouseEvent): Passed |element| as a reference to
EventDispatcher::dispatchEvent().

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

4 years agoRemove Unicode case-insensitive matching for usemap=""
cdumez@apple.com [Wed, 14 Dec 2016 17:37:24 +0000 (17:37 +0000)]
Remove Unicode case-insensitive matching for usemap=""
https://bugs.webkit.org/show_bug.cgi?id=163894

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/semantics/embedded-content/the-img-element/usemap-casing-expected.txt:

Source/WebCore:

Remove Unicode case-insensitive matching for usemap="" as this no longer
matches the specification [1] or Firefox. Also align our parsing logic for
the usemap attribute to match the specification [2].

This simplifies the code a bit, is more efficient and the compatibility
risk should be low based on Firefox's behavior and Chome's usage data.

[1] https://github.com/whatwg/html/commit/6acdb2122298d2bb7bb839c0a61b4e1f9b0f9bc9
[2] https://html.spec.whatwg.org/#rules-for-parsing-a-hash-name-reference

Test: fast/images/image-usemap-parsing.html

* dom/Document.cpp:
(WebCore::Document::addImageElementByUsemap):
(WebCore::Document::removeImageElementByUsemap):
(WebCore::Document::imageElementByUsemap):
* dom/Document.h:
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::getElementByUsemap):
* dom/DocumentOrderedMap.h:
* dom/TreeScope.cpp:
(WebCore::TreeScope::getImageMap):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
(WebCore::HTMLImageElement::matchesUsemap):
* html/HTMLImageElement.h:
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
(WebCore::HTMLMapElement::parseAttribute):
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLHashNameReference):
* html/parser/HTMLParserIdioms.h:

LayoutTests:

* fast/images/image-map-multiple.html:
Fix case of the usemap.

* fast/images/image-usemap-parsing-expected.txt: Added.
* fast/images/image-usemap-parsing.html: Added.
Add layout test coverage.

* fast/images/imagemap-case.html: Removed.
* platform/efl/fast/images/imagemap-case-expected.png: Removed.
* platform/efl/fast/images/imagemap-case-expected.txt: Removed.
* platform/gtk/fast/images/imagemap-case-expected.png: Removed.
* platform/gtk/fast/images/imagemap-case-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/images/imagemap-case-expected.txt: Removed.
* platform/ios-simulator/fast/images/imagemap-case-expected.txt: Removed.
* platform/mac/fast/images/imagemap-case-expected.png: Removed.
* platform/mac/fast/images/imagemap-case-expected.txt: Removed.
* platform/win/fast/images/imagemap-case-expected.txt: Removed.
Drop outdated pixel test case. Case sensitivity is now covered by
the new fast/images/image-usemap-parsing.html test.

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

4 years agoAttempt to fix the Windows build after r209805.
ryanhaddad@apple.com [Wed, 14 Dec 2016 17:28:16 +0000 (17:28 +0000)]
Attempt to fix the Windows build after r209805.

Unreviewed build fix.

* css/CSSAllInOne.cpp:

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

4 years agoUnreviewed, rolling out r209795.
commit-queue@webkit.org [Wed, 14 Dec 2016 17:25:19 +0000 (17:25 +0000)]
Unreviewed, rolling out r209795.
https://bugs.webkit.org/show_bug.cgi?id=165853

rolled out the wrong revision (Requested by pizlo on #webkit).

Reverted changeset:

"MarkedBlock::marksConveyLivenessDuringMarking should take
into account collection scope"
https://bugs.webkit.org/show_bug.cgi?id=165741
http://trac.webkit.org/changeset/209795

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

4 years agoUnreviewed, disable concurrent GC on ARM while we investigate a memory use regression.
fpizlo@apple.com [Wed, 14 Dec 2016 17:19:33 +0000 (17:19 +0000)]
Unreviewed, disable concurrent GC on ARM while we investigate a memory use regression.

* runtime/Options.cpp:
(JSC::recomputeDependentOptions):

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

4 years agoUnreviewed test fix after r209779.
bfulgham@apple.com [Wed, 14 Dec 2016 17:17:41 +0000 (17:17 +0000)]
Unreviewed test fix after r209779.

The 'Keygen' element requires the ability to create new keys in '$HOME/Library/Keychains'. Remove the
WebProcess and Plugin sandbox restrictions on per-user Keychain creation to support this use.

* 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@209806 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[CSS Parser] Remove WebkitCSSTransformValue
hyatt@apple.com [Wed, 14 Dec 2016 16:34:48 +0000 (16:34 +0000)]
[CSS Parser] Remove WebkitCSSTransformValue
https://bugs.webkit.org/show_bug.cgi?id=165844

Reviewed by Zalan Bujtas.

Source/WebCore:

Remove WebkitCSSTransformValue and just use a CSSFunctionValue instead. No other
browsers support it, and the information it provides is easily obtainable from cssText.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJSNewlyCreated):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::matrixTransformValue):
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):
* css/CSSValue.h:
(WebCore::CSSValue::isSpringTimingFunctionValue):
(WebCore::CSSValue::isWebKitCSSTransformValue): Deleted.
* css/StyleResolver.cpp:
* css/TransformFunctions.cpp:
(WebCore::transformOperationType):
(WebCore::transformsForValue):
* css/TransformFunctions.h:
* css/WebKitCSSTransformValue.cpp: Removed.
* css/WebKitCSSTransformValue.h: Removed.
* css/WebKitCSSTransformValue.idl: Removed.
* css/parser/CSSParserFastPaths.cpp:
(WebCore::parseTransformTranslateArguments):
(WebCore::parseTransformNumberArguments):
(WebCore::parseSimpleTransformValue):
(WebCore::parseSimpleTransformList):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeTranslate3d):
(WebCore::consumeNumbers):
(WebCore::consumePerspective):
(WebCore::consumeTransformValue):
(WebCore::transformOperationForCSSValueID): Deleted.

LayoutTests:

* fast/css/getFloatValueForUnit-expected.txt:
* fast/css/getFloatValueForUnit.html:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/fast/dom/wrapper-classes-objc-expected.txt:
* platform/mac/fast/dom/wrapper-classes-objc.html:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* transforms/2d/transform-value-types-expected.txt:
* transforms/2d/transform-value-types.html:

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

4 years ago[GTK][EFL] Update the JHBuild version.
clopez@igalia.com [Wed, 14 Dec 2016 16:19:05 +0000 (16:19 +0000)]
[GTK][EFL] Update the JHBuild version.
https://bugs.webkit.org/show_bug.cgi?id=165838

Reviewed by Michael Catanzaro.

* jhbuild/jhbuild-wrapper: This new version fixes a bug with the
usage of the JHBUILD_MIRROR feature with git repositories.

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

4 years agoUnreviewed, LayoutTest http/tests/misc/module-script-async.html is a flaky timeout
utatane.tea@gmail.com [Wed, 14 Dec 2016 16:16:39 +0000 (16:16 +0000)]
Unreviewed, LayoutTest http/tests/misc/module-script-async.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=165764

Annotate it as Slow.

* TestExpectations:

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

4 years agoMake Style::Update const in RenderTreeUpdater
antti@apple.com [Wed, 14 Dec 2016 16:06:50 +0000 (16:06 +0000)]
Make Style::Update const in RenderTreeUpdater
https://bugs.webkit.org/show_bug.cgi?id=165845

Reviewed by Andreas Kling.

Moving style away from unique_ptrs leaves them in weird state.

* style/RenderTreeUpdater.cpp:
(WebCore::findRenderingRoots):
(WebCore::RenderTreeUpdater::commit):
(WebCore::RenderTreeUpdater::updateElementRenderer):

    Clone the style instead of moving it. This is not meaningfully more expensive.
    Remove null checks, style is never null.

* style/RenderTreeUpdater.h:

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

4 years agoUse JSValue::toWTFString instead of calling toString(exec) and value(exec)
utatane.tea@gmail.com [Wed, 14 Dec 2016 16:04:30 +0000 (16:04 +0000)]
Use JSValue::toWTFString instead of calling toString(exec) and value(exec)
https://bugs.webkit.org/show_bug.cgi?id=165795

Reviewed by Saam Barati.

Source/JavaScriptCore:

In old days, we frequently use the idiom like, `value.toString(exec)->value(exec)` to
get WTFString from the given JSValue. But now, we have better function, `toWTFString`.
`toWTFString` does not create intermediate JSString objects, then reduce unnecessary
allocations.

This patch mechanically replaces `value.toString(exec)->value(exec)` with `toWTFString(exec)`.

* API/JSValueRef.cpp:
(JSValueToStringCopy):
* bindings/ScriptValue.cpp:
(Deprecated::ScriptValue::toString):
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::reportAPIException):
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::evaluateWithScopeExtension):
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::evaluateWithScopeExtension):
* inspector/ScriptCallStackFactory.cpp:
(Inspector::extractSourceInformationFromException):
* runtime/ConsoleObject.cpp:
(JSC::valueToStringWithUndefinedOrNullCheck):
(JSC::valueOrDefaultLabelString):
* runtime/DateConstructor.cpp:
(JSC::dateParse):
* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::sanitizedToString):
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString):
* runtime/InspectorInstrumentationObject.cpp:
(JSC::inspectorInstrumentationObjectLog):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
* runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::fetch):
* runtime/ModuleLoaderPrototype.cpp:
(JSC::moduleLoaderPrototypeParseModule):
* runtime/RegExpConstructor.cpp:
(JSC::regExpCreate):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
* runtime/StringPrototype.cpp:
(JSC::replaceUsingRegExpSearch):
(JSC::replaceUsingStringSearch):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplitFast):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncLocaleCompare):
(JSC::stringProtoFuncBig):
(JSC::stringProtoFuncSmall):
(JSC::stringProtoFuncBlink):
(JSC::stringProtoFuncBold):
(JSC::stringProtoFuncFixed):
(JSC::stringProtoFuncItalics):
(JSC::stringProtoFuncStrike):
(JSC::stringProtoFuncSub):
(JSC::stringProtoFuncSup):
(JSC::stringProtoFuncFontcolor):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncAnchor):
(JSC::stringProtoFuncLink):
(JSC::trimString):
(JSC::stringProtoFuncStartsWith):
(JSC::stringProtoFuncEndsWith):
(JSC::stringProtoFuncIncludes):
(JSC::builtinStringIncludesInternal):
(JSC::stringProtoFuncNormalize):
* tools/JSDollarVMPrototype.cpp:
(JSC::functionPrint):
* wasm/js/JSWebAssemblyCompileError.h:
(JSC::JSWebAssemblyCompileError::create):
* wasm/js/JSWebAssemblyRuntimeError.h:
(JSC::JSWebAssemblyRuntimeError::create):

Source/WebCore:

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromValue):
* bindings/js/JSAudioTrackCustom.cpp:
(WebCore::JSAudioTrack::setKind):
(WebCore::JSAudioTrack::setLanguage):
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::setLocation):
* bindings/js/JSDeviceMotionEventCustom.cpp:
(WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
* bindings/js/JSDeviceOrientationEventCustom.cpp:
(WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::callHTMLAllCollection):
(WebCore::JSHTMLAllCollection::namedItem):
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
(WebCore::JSHTMLFormControlsCollection::namedItem):
* bindings/js/JSHTMLInputElementCustom.cpp:
(WebCore::JSHTMLInputElement::setSelectionDirection):
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::populateContextMenuItems):
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
* bindings/js/JSSQLTransactionCustom.cpp:
(WebCore::JSSQLTransaction::executeSql):
* bindings/js/JSTextTrackCustom.cpp:
(WebCore::JSTextTrack::setLanguage):
* bindings/js/JSVideoTrackCustom.cpp:
(WebCore::JSVideoTrack::setKind):
(WebCore::JSVideoTrack::setLanguage):
* bindings/js/JSWebKitSubtleCryptoCustom.cpp:
(WebCore::cryptoKeyFormatFromJSValue):
(WebCore::cryptoKeyUsagesFromJSValue):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send):
* bindings/js/JSXSLTProcessorCustom.cpp:
(WebCore::JSXSLTProcessor::setParameter):
(WebCore::JSXSLTProcessor::getParameter):
(WebCore::JSXSLTProcessor::removeParameter):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::create):
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertValueToNPVariant):
* bridge/testbindings.cpp:
(main):

Source/WebKit2:

* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):

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