WebKit-https.git
3 years agoUnskip and rebaseline <attachment> tests on iOS
timothy_horton@apple.com [Tue, 15 Mar 2016 20:27:39 +0000 (20:27 +0000)]
Unskip and rebaseline <attachment> tests on iOS
<rdar://problem/24805991>

* fast/attachment/attachment-default-icon.html:
* fast/attachment/attachment-folder-icon.html:
* fast/attachment/attachment-type-attribute.html:
Make these tests have identical titles between ref and actual, because
on iOS the layout differs if you have a title or not (unlike on Mac).

* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/fast/attachment/attachment-label-highlight-expected.txt:
* platform/ios-simulator/fast/attachment/attachment-progress-expected.txt:
* platform/ios-simulator/fast/attachment/attachment-rendering-expected.txt:
* platform/ios-simulator/fast/attachment/attachment-select-on-click-expected.txt:
* platform/ios-simulator/fast/attachment/attachment-select-on-click-inside-user-select-all-expected.txt:
* platform/ios-simulator/fast/attachment/attachment-subtitle-expected.txt:
* platform/ios-simulator/fast/attachment/attachment-title-expected.txt:
Unskip and rebaseline all but one of the attachment tests on iOS.

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

3 years agoRestore pre-r197244 behavior on Mac
cdumez@apple.com [Tue, 15 Mar 2016 20:01:39 +0000 (20:01 +0000)]
Restore pre-r197244 behavior on Mac
https://bugs.webkit.org/show_bug.cgi?id=155507
<rdar://problem/25174132>

Reviewed by Gavin Barraclough.

<http://trac.webkit.org/changeset/197244> changed the session restore
behavior to disallow stale content on all platforms except iOS.
We would also like to maintain the behavior on Mac for performance
reasons and consistency between iOS and Mac.

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

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

3 years agoAdd Antti to WebKit2 Owners file
antti@apple.com [Tue, 15 Mar 2016 19:46:22 +0000 (19:46 +0000)]
Add Antti to WebKit2 Owners file
https://bugs.webkit.org/show_bug.cgi?id=155504

Reviewed by Anders Carlsson and Sam Weinig.

* Owners:

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

3 years ago<attachment> on iOS isn't quite vertically centered
timothy_horton@apple.com [Tue, 15 Mar 2016 19:45:00 +0000 (19:45 +0000)]
<attachment> on iOS isn't quite vertically centered
https://bugs.webkit.org/show_bug.cgi?id=155502
<rdar://problem/24805991>

Reviewed by Beth Dakin.

No new tests; there are existing tests that will be enabled shortly.

* rendering/RenderThemeIOS.mm:
(WebCore::AttachmentInfo::AttachmentInfo):
We were overcounting the total height of the attachment content by one margin, because each item
would add in its margin, including the last one. Remove one margin.

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

3 years agoRemove flaky expectation for webgl/1.0.2/conformance/rendering/gl-scissor-test.html...
ryanhaddad@apple.com [Tue, 15 Mar 2016 19:43:40 +0000 (19:43 +0000)]
Remove flaky expectation for webgl/1.0.2/conformance/rendering/gl-scissor-test.html for mac
https://bugs.webkit.org/show_bug.cgi?id=126586

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoFixing a typo in the ios-simulator TestExpectations file
ryanhaddad@apple.com [Tue, 15 Mar 2016 19:24:18 +0000 (19:24 +0000)]
Fixing a typo in the ios-simulator TestExpectations file

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoMarking animations/3d/transform-origin-vs-functions.html as flaky on ios-simulator-wk2
ryanhaddad@apple.com [Tue, 15 Mar 2016 19:15:49 +0000 (19:15 +0000)]
Marking animations/3d/transform-origin-vs-functions.html as flaky on ios-simulator-wk2
https://bugs.webkit.org/show_bug.cgi?id=155501

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

3 years agoAX: certain elements not included in accessibility tree
cfleizach@apple.com [Tue, 15 Mar 2016 19:03:11 +0000 (19:03 +0000)]
AX: certain elements not included in accessibility tree
https://bugs.webkit.org/show_bug.cgi?id=155480

Reviewed by Beth Dakin.

Source/WebCore:

This test case exposed a hole in the nextSibling logic where you can get into a state where we skip content.
The fix is to check if an inline element continuation has no sibling, to fall back on to the parent case to see if that has a sibling.

Test: accessibility/double-nested-inline-element-missing-from-tree.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::nextSibling):

LayoutTests:

* accessibility/double-nested-inline-element-missing-from-tree-expected.txt: Added.
* accessibility/double-nested-inline-element-missing-from-tree.html: Added.

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

3 years agoUnreviewed, rolling out r198203.
cdumez@apple.com [Tue, 15 Mar 2016 18:26:41 +0000 (18:26 +0000)]
Unreviewed, rolling out r198203.

Favorites view is no longer loading on iOS

Reverted changeset:

"URL Parsing should signal failure for illegal IDN"
https://bugs.webkit.org/show_bug.cgi?id=154945
http://trac.webkit.org/changeset/198203

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

3 years ago<attachment> on iOS should use short and emphasized fonts
timothy_horton@apple.com [Tue, 15 Mar 2016 18:25:52 +0000 (18:25 +0000)]
<attachment> on iOS should use short and emphasized fonts
https://bugs.webkit.org/show_bug.cgi?id=155485
<rdar://problem/24805991>

Reviewed by Simon Fraser.

No new tests; there are existing tests that will be enabled shortly.

* rendering/RenderThemeIOS.mm:
(WebCore::attachmentActionFont):
(WebCore::attachmentTitleFont):
(WebCore::attachmentSubtitleFont):
(WebCore::AttachmentInfo::buildTitleLines):
(WebCore::AttachmentInfo::buildSingleLine):
(WebCore::AttachmentInfo::AttachmentInfo):
No need for UIFonts, we can use CoreText, and that allows us to ask for the
correct Short and Emphasized variants that we need.

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

3 years agoSource/WebCore:
antti@apple.com [Tue, 15 Mar 2016 17:26:50 +0000 (17:26 +0000)]
Source/WebCore:
REGRESSION (196383): Class change invalidation does not handle :not correctly
https://bugs.webkit.org/show_bug.cgi?id=155493
<rdar://problem/24846762>

Reviewed by Andreas Kling.

We fail to invalidate bar style in

    :not(.foo) bar { }

when class foo is added or removed.

There is a logic error in the invalidation code. It assumes that class addition can only make new selectors match
and removal make them not match. This is not true when :not is present.

* style/AttributeChangeInvalidation.h:
(WebCore::Style::AttributeChangeInvalidation::AttributeChangeInvalidation):
* style/ClassChangeInvalidation.cpp:
(WebCore::Style::ClassChangeInvalidation::invalidateStyle):

    Invalidate style and collect full set of rules that may affect descendant style.

(WebCore::Style::ClassChangeInvalidation::invalidateDescendantStyle):

    Invalidate with this set both before and after committing the changes.

(WebCore::Style::ClassChangeInvalidation::computeClassChange): Deleted.
* style/ClassChangeInvalidation.h:
(WebCore::Style::ClassChangeInvalidation::ClassChangeInvalidation):
(WebCore::Style::ClassChangeInvalidation::~ClassChangeInvalidation):

LayoutTests:
Class change invalidation does not handle :not correctly
https://bugs.webkit.org/show_bug.cgi?id=155493
<rdar://problem/24846762>

Reviewed by Andreas Kling.

* fast/css/style-invalidation-attribute-change-descendants-expected.txt:
* fast/css/style-invalidation-attribute-change-descendants.html:

    Also add :not case for attribute changes (which handles this correctly already).

* fast/css/style-invalidation-class-change-descendants-expected.txt:
* fast/css/style-invalidation-class-change-descendants.html:

    Add :not case.

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

3 years agoVersioning.
bshafiei@apple.com [Tue, 15 Mar 2016 15:30:20 +0000 (15:30 +0000)]
Versioning.

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

3 years agoRemove the Baker barrier from JSC
fpizlo@apple.com [Tue, 15 Mar 2016 15:26:36 +0000 (15:26 +0000)]
Remove the Baker barrier from JSC
https://bugs.webkit.org/show_bug.cgi?id=155479

Reviewed by Saam Barati.

It's been a while since I added a Baker barrier, but I never followed it up with an actual
concurrent GC. While thinking about the GC, I became convinced that the right path forward
is to do a non-copying concurrent GC. That is, remove the copied space and just use the
marked space. The downside of using marked space cannot be more than the overhead of the
Baker barrier, so concurrent non-copying GC is definitely better than copying
non-concurrent GC. I also suspect that just plain non-copying non-concurrent GC is going to
be fine also, so the path forward will probably be to first just remove CopiedSpace.

Anyway, for now this patch just removes the Baker barrier. It was a cute implementation but
it just cost performance and I don't think we'll ever use it.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::generate):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGCopyBarrierOptimizationPhase.cpp: Removed.
* dfg/DFGCopyBarrierOptimizationPhase.h: Removed.
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
(JSC::DFG::SpeculativeJIT::compileGetButterfly):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetButterfly):
(JSC::FTL::DFG::LowerDFGToB3::compileConstantStoragePointer):
(JSC::FTL::DFG::LowerDFGToB3::compileGetIndexedPropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckArray):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileGetDirectPname):
(JSC::FTL::DFG::LowerDFGToB3::storageForTransition):
(JSC::FTL::DFG::LowerDFGToB3::getById):
(JSC::FTL::DFG::LowerDFGToB3::isFastTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::compileGetButterflyReadOnly): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::loadButterflyWithBarrier): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::loadVectorWithBarrier): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::copyBarrier): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::isInToSpace): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::loadButterflyReadOnly): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::loadVectorReadOnly): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::removeSpaceBits): Deleted.
* heap/CopyBarrier.h:
(JSC::CopyBarrierBase::CopyBarrierBase):
(JSC::CopyBarrierBase::operator bool):
(JSC::CopyBarrierBase::get):
(JSC::CopyBarrierBase::clear):
(JSC::CopyBarrierBase::setWithoutBarrier):
(JSC::CopyBarrier::CopyBarrier):
(JSC::CopyBarrier::get):
(JSC::CopyBarrier::set):
(JSC::CopyBarrier::setWithoutBarrier):
(JSC::CopyBarrierBase::operator!): Deleted.
(JSC::CopyBarrierBase::getWithoutBarrier): Deleted.
(JSC::CopyBarrierBase::getPredicated): Deleted.
(JSC::CopyBarrierBase::copyState): Deleted.
(JSC::CopyBarrierBase::setCopyState): Deleted.
(JSC::CopyBarrierBase::weakCASWithoutBarrier): Deleted.
(JSC::CopyBarrier::getWithoutBarrier): Deleted.
(JSC::CopyBarrier::getPredicated): Deleted.
(JSC::CopyBarrier::weakCASWithoutBarrier): Deleted.
* heap/Heap.cpp:
(JSC::Heap::addToRememberedSet):
(JSC::Heap::collectAndSweep):
(JSC::Heap::copyBarrier): Deleted.
* heap/Heap.h:
(JSC::Heap::writeBarrierBuffer):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::branchIfNotFastTypedArray):
(JSC::AssemblyHelpers::purifyNaN):
(JSC::AssemblyHelpers::loadTypedArrayVector): Deleted.
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::branchStructure):
(JSC::AssemblyHelpers::addressForByteOffset):
(JSC::AssemblyHelpers::branchIfToSpace): Deleted.
(JSC::AssemblyHelpers::branchIfNotToSpace): Deleted.
(JSC::AssemblyHelpers::removeSpaceBits): Deleted.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompile):
* jit/JITOpcodes.cpp:
(JSC::JIT::emitSlow_op_has_indexed_property):
(JSC::JIT::emit_op_get_direct_pname):
(JSC::JIT::emitSlow_op_get_direct_pname):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_direct_pname):
(JSC::JIT::emitSlow_op_get_direct_pname):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitDoubleLoad):
(JSC::JIT::emitContiguousLoad):
(JSC::JIT::emitArrayStorageLoad):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emitSlow_op_put_to_scope):
(JSC::JIT::emitIntTypedArrayGetByVal):
(JSC::JIT::emitFloatTypedArrayGetByVal):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/DirectArguments.cpp:
(JSC::DirectArguments::visitChildren):
(JSC::DirectArguments::copyBackingStore):
(JSC::DirectArguments::overrideArgument):
(JSC::DirectArguments::copyToArguments):
* runtime/DirectArguments.h:
(JSC::DirectArguments::canAccessIndexQuickly):
(JSC::DirectArguments::canAccessArgumentIndexQuicklyInDFG):
* runtime/JSArray.cpp:
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::fastSlice):
(JSC::JSArray::fastConcatWith):
(JSC::JSArray::shiftCountWithArrayStorage):
(JSC::JSArray::shiftCountWithAnyIndexingType):
(JSC::JSArray::unshiftCountWithAnyIndexingType):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToArguments):
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::finalize):
* runtime/JSArrayBufferView.h:
(JSC::JSArrayBufferView::isNeutered):
(JSC::JSArrayBufferView::vector):
(JSC::JSArrayBufferView::length):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::visitChildren):
(JSC::JSGenericTypedArrayView<Adaptor>::copyBackingStore):
* runtime/JSObject.cpp:
(JSC::JSObject::visitChildren):
(JSC::JSObject::copyBackingStore):
(JSC::JSObject::heapSnapshot):
(JSC::JSObject::getOwnPropertySlotByIndex):
(JSC::JSObject::putByIndex):
(JSC::JSObject::enterDictionaryIndexingMode):
(JSC::JSObject::createInitialIndexedStorage):
(JSC::JSObject::createArrayStorage):
(JSC::JSObject::convertUndecidedToInt32):
(JSC::JSObject::convertUndecidedToDouble):
(JSC::JSObject::convertUndecidedToContiguous):
(JSC::JSObject::constructConvertedArrayStorageWithoutCopyingElements):
(JSC::JSObject::convertUndecidedToArrayStorage):
(JSC::JSObject::convertInt32ToDouble):
(JSC::JSObject::convertInt32ToContiguous):
(JSC::JSObject::convertInt32ToArrayStorage):
(JSC::JSObject::convertDoubleToContiguous):
(JSC::JSObject::convertDoubleToArrayStorage):
(JSC::JSObject::convertContiguousToArrayStorage):
(JSC::JSObject::setIndexQuicklyToUndecided):
(JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode):
(JSC::JSObject::deletePropertyByIndex):
(JSC::JSObject::getOwnPropertyNames):
(JSC::JSObject::putIndexedDescriptor):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
(JSC::JSObject::putDirectIndexBeyondVectorLength):
(JSC::JSObject::getNewVectorLength):
(JSC::JSObject::ensureLengthSlow):
(JSC::JSObject::reallocateAndShrinkButterfly):
(JSC::JSObject::growOutOfLineStorage):
(JSC::getBoundSlotBaseFunctionForGetterSetter):
(JSC::JSObject::getEnumerableLength):
* runtime/JSObject.h:
(JSC::JSObject::getArrayLength):
(JSC::JSObject::getVectorLength):
(JSC::JSObject::canGetIndexQuickly):
(JSC::JSObject::getIndexQuickly):
(JSC::JSObject::tryGetIndexQuickly):
(JSC::JSObject::canSetIndexQuickly):
(JSC::JSObject::canSetIndexQuicklyForPutDirect):
(JSC::JSObject::setIndexQuickly):
(JSC::JSObject::initializeIndex):
(JSC::JSObject::hasSparseMap):
(JSC::JSObject::inSparseIndexingMode):
(JSC::JSObject::inlineStorage):
(JSC::JSObject::butterfly):
(JSC::JSObject::outOfLineStorage):
(JSC::JSObject::locationForOffset):
(JSC::JSObject::ensureInt32):
(JSC::JSObject::ensureDouble):
(JSC::JSObject::ensureContiguous):
(JSC::JSObject::ensureArrayStorage):
(JSC::JSObject::arrayStorage):
(JSC::JSObject::arrayStorageOrNull):
(JSC::JSObject::ensureLength):
(JSC::JSObject::putDirectWithoutTransition):
* runtime/MapData.h:
(JSC::JSIterator>::IteratorData::next):
(JSC::JSIterator>::IteratorData::refreshCursor):
* runtime/MapDataInlines.h:
(JSC::JSIterator>::find):
(JSC::JSIterator>::add):
(JSC::JSIterator>::remove):
(JSC::JSIterator>::replaceAndPackBackingStore):
(JSC::JSIterator>::replaceBackingStore):
(JSC::JSIterator>::ensureSpaceForAppend):
(JSC::JSIterator>::visitChildren):
(JSC::JSIterator>::copyBackingStore):
* runtime/Options.h:

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

3 years agoVideo elements with autoplay do not begin playing when scrolling into view if Invisib...
jer.noble@apple.com [Tue, 15 Mar 2016 15:20:40 +0000 (15:20 +0000)]
Video elements with autoplay do not begin playing when scrolling into view if InvisibleAutoplayNotPermitted is set.
https://bugs.webkit.org/show_bug.cgi?id=155468

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/video-restricted-invisible-autoplay-allowed-when-visible.html

A few bugs came together to cause this behavior. We were not telling the media session that we were going to begin
the autoplaying state, we were not restoring the correct state when the interruption ended, and we were not checking
to see if we could actually play correctly when the interruption ended.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad):
(WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::resumeAutoplaying):
(WebCore::HTMLMediaElement::updateShouldPlay):
(WebCore::elementCanTransitionFromAutoplayToPlay): Deleted.
* html/HTMLMediaElement.h:
* platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::endInterruption):

LayoutTests:

* media/video-restricted-invisible-autoplay-allowed-when-visible-expected.txt: Added.
* media/video-restricted-invisible-autoplay-allowed-when-visible.html: Added.

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

3 years ago[css-grid] Rename GridCoordinate to GridArea
rego@igalia.com [Tue, 15 Mar 2016 15:10:07 +0000 (15:10 +0000)]
[css-grid] Rename GridCoordinate to GridArea
https://bugs.webkit.org/show_bug.cgi?id=155489

Reviewed by Sergio Villar Senin.

As the comment in GridCoordinate states,
it actually represents a grid area as it stores
the initial and final positions in both axis (columns and rows).

Someone can think about a grid coordinate just like a single cell.
However this class was representing an area of several cells.

On top of that the "grid area" concept is defined in the spec:
https://drafts.csswg.org/css-grid/#grid-area-concept

No new tests, no change of behavior.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSGridTemplateAreasValue.cpp:
(WebCore::stringForPosition):
* css/CSSGridTemplateAreasValue.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTemplateAreasRow):
* css/CSSParser.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
(WebCore::RenderGrid::insertItemIntoGrid):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::clearGrid):
(WebCore::RenderGrid::cachedGridArea):
(WebCore::RenderGrid::cachedGridSpan):
* rendering/RenderGrid.h:
* rendering/style/GridArea.h: Renamed from Source/WebCore/rendering/style/GridCoordinate.h.
(WebCore::GridSpan::untranslatedDefiniteGridSpan):
(WebCore::GridSpan::translatedDefiniteGridSpan):
(WebCore::GridSpan::indefiniteGridSpan):
(WebCore::GridSpan::operator==):
(WebCore::GridSpan::integerSpan):
(WebCore::GridSpan::untranslatedResolvedInitialPosition):
(WebCore::GridSpan::untranslatedResolvedFinalPosition):
(WebCore::GridSpan::resolvedInitialPosition):
(WebCore::GridSpan::resolvedFinalPosition):
(WebCore::GridSpan::GridSpanIterator::GridSpanIterator):
(WebCore::GridSpan::GridSpanIterator::operator unsigned&):
(WebCore::GridSpan::GridSpanIterator::operator*):
(WebCore::GridSpan::begin):
(WebCore::GridSpan::end):
(WebCore::GridSpan::isTranslatedDefinite):
(WebCore::GridSpan::isIndefinite):
(WebCore::GridSpan::translate):
(WebCore::GridSpan::GridSpan):
(WebCore::GridArea::GridArea):
(WebCore::GridArea::operator==):
(WebCore::GridArea::operator!=):
* rendering/style/GridPositionsResolver.cpp:
* rendering/style/StyleGridData.h:

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

3 years ago[GTK] Remove duplicate HashMap traversal and unneeded reference count churn in DataOb...
jh718.park@samsung.com [Tue, 15 Mar 2016 14:21:49 +0000 (14:21 +0000)]
[GTK] Remove duplicate HashMap traversal and unneeded reference count churn in DataObjectGtk::forClipboard
https://bugs.webkit.org/show_bug.cgi?id=155470

Reviewed by Carlos Garcia Campos.

No new tests, no new behaviours.

* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::forClipboard):

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

3 years agoEFL build has been broken since r198180
gyuyoung.kim@webkit.org [Tue, 15 Mar 2016 10:42:01 +0000 (10:42 +0000)]
EFL build has been broken since r198180
https://bugs.webkit.org/show_bug.cgi?id=155488

Unreviewed build fix.

* WebProcess/UserContent/WebUserContentController.h: Use ENABLE(USER_MESSAGE_HANDLERS) guard.

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

3 years ago[css-grid] Rename GridResolvedPosition to GridPositionsResolver
rego@igalia.com [Tue, 15 Mar 2016 10:38:43 +0000 (10:38 +0000)]
[css-grid] Rename GridResolvedPosition to GridPositionsResolver
https://bugs.webkit.org/show_bug.cgi?id=155486

Reviewed by Sergio Villar Senin.

GridResolvedPosition is not storing a position (track or line) anymore.
Currently it's just a class wrapping the methods to resolve
grid positions from style.
Renamed the class to avoid confusions.

No new tests, no change of behavior.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
* rendering/RenderGrid.h:
* rendering/style/GridCoordinate.h:
* rendering/style/GridPositionsResolver.cpp: Renamed from Source/WebCore/rendering/style/GridResolvedPosition.cpp.
(WebCore::isColumnSide):
(WebCore::isStartSide):
(WebCore::initialPositionSide):
(WebCore::finalPositionSide):
(WebCore::gridLinesForSide):
(WebCore::implicitNamedGridLineForSide):
(WebCore::GridPositionsResolver::isNonExistentNamedLineOrArea):
(WebCore::adjustGridPositionsFromStyle):
(WebCore::GridPositionsResolver::explicitGridColumnCount):
(WebCore::GridPositionsResolver::explicitGridRowCount):
(WebCore::explicitGridSizeForSide):
(WebCore::lookAheadForNamedGridLine):
(WebCore::lookBackForNamedGridLine):
(WebCore::resolveNamedGridLinePositionFromStyle):
(WebCore::definiteGridSpanWithNamedLineSpanAgainstOpposite):
(WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
(WebCore::resolveGridPositionAgainstOppositePosition):
(WebCore::GridPositionsResolver::spanSizeForAutoPlacedItem):
(WebCore::resolveGridPositionFromStyle):
(WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
* rendering/style/GridPositionsResolver.h: Renamed from Source/WebCore/rendering/style/GridResolvedPosition.h.
* rendering/style/StyleAllInOne.cpp:

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

3 years agoDestructuring parameters are evaluated in the wrong scope
sbarati@apple.com [Tue, 15 Mar 2016 08:59:01 +0000 (08:59 +0000)]
Destructuring parameters are evaluated in the wrong scope
https://bugs.webkit.org/show_bug.cgi?id=155454

Reviewed by Geoffrey Garen.

This patch makes our engine compatible with how parameter
lists are evaluated in ES6. A parameter list that contains
a rest parameter, any destructuring patterns, or default parameter values,
is classified as being non-simple. Non-simple parameter lists
must get their own scope to live in, and the variables in the
scope are under TDZ. This means that functions evaluated in the
parameter list don't have access to variables inside the function
body. Also, non-simple parameter lists get the strict-mode arguments object.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::~BytecodeGenerator):
(JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
* bytecompiler/BytecodeGenerator.h:
* parser/Nodes.h:
(JSC::FunctionParameters::size):
(JSC::FunctionParameters::at):
(JSC::FunctionParameters::append):
(JSC::FunctionParameters::hasDefaultParameterValues): Deleted.
* tests/es6.yaml:
* tests/stress/parameter-scoping.js: Added.
(assert):
(test):
(test.foo):
(test.):

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

3 years agoLeak: Accelerated ImageBufferCairo doesn't destroy the used textures
commit-queue@webkit.org [Tue, 15 Mar 2016 08:58:27 +0000 (08:58 +0000)]
Leak: Accelerated ImageBufferCairo doesn't destroy the used textures
https://bugs.webkit.org/show_bug.cgi?id=155431

Patch by Miguel Gomez <magomez@igalia.com> on 2016-03-15
Reviewed by Žan Doberšek.

When using the Cairo backend, add a destructor to ImageBufferData and use it to destroy the
textures created if the buffer is being accelerated.

No new tests, already covered by existing ones.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::ImageBufferData):
Store the renderingMode flag.
(WebCore::ImageBufferData::~ImageBufferData):
Destroy gl resources if renderingMode is accelerated.
(WebCore::ImageBuffer::ImageBuffer):
Pass renderingMode to the data class and use it fro checks instead of the function parameter.
* platform/graphics/cairo/ImageBufferDataCairo.h:
Add destructor and a renderingMode flag.

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

3 years agoURL Parsing should signal failure for illegal IDN
jiewen_tan@apple.com [Tue, 15 Mar 2016 07:53:15 +0000 (07:53 +0000)]
URL Parsing should signal failure for illegal IDN
https://bugs.webkit.org/show_bug.cgi?id=154945
<rdar://problem/8014795>

Reviewed by Brent Fulgham.

Source/WebCore:

WebCore::URL will now invalidate URLs with illegal IDN. And functions inside WebCoreNSURLExtras.h
that deal with IDN mapping will now return nil to signal error.

Test: fast/url/invalid-idn.html

* platform/URL.cpp:
(WebCore::isSchemeFirstChar):
(WebCore::URL::init):
(WebCore::appendEncodedHostname):
(WebCore::encodeHostnames):
(WebCore::encodeRelativeString):
* platform/mac/WebCoreNSURLExtras.h:
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::mapHostNameWithRange):
(WebCore::hostNameNeedsDecodingWithRange):
(WebCore::hostNameNeedsEncodingWithRange):
(WebCore::decodeHostNameWithRange):
(WebCore::encodeHostNameWithRange):
(WebCore::decodeHostName):
(WebCore::encodeHostName):
(WebCore::collectRangesThatNeedMapping):
(WebCore::mapHostNames):
(WebCore::URLWithData):
(WebCore::dataWithUserTypedString):
(WebCore::URLWithUserTypedString):
(WebCore::URLWithUserTypedStringDeprecated):
(WebCore::userVisibleString):

Source/WebKit/ios:

* Misc/WebNSStringExtrasIOS.m:
(-[NSString _web_possibleURLsForForUserTypedString:]):
* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder _updateTitleForURL:]):

Source/WebKit/mac:

In this patch, we add new SPIs _webkit_URLWithUserTypedString, _webkit_decodeHostName and
_webkit_encodeHostName which will return nil while dealing with illegal IDN.

Old SPIs _web_URLWithUserTypedString, _web_decodeHostName and _web_encodeHostName are marked
deprecated as they ignore URL parsing failure.

* History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]):
* Misc/WebKitErrors.m:
(+[NSError _webKitErrorWithCode:failingURL:]):
* Misc/WebNSFileManagerExtras.mm:
(-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]):
* Misc/WebNSPasteboardExtras.mm:
(-[NSPasteboard _web_bestURL]):
* Misc/WebNSURLExtras.h:
* Misc/WebNSURLExtras.mm:
(+[NSURL _web_URLWithUserTypedString:]):
(+[NSURL _webkit_URLWithUserTypedString:relativeToURL:]):
(+[NSURL _webkit_URLWithUserTypedString:]):
(-[NSString _web_decodeHostName]):
(-[NSString _web_encodeHostName]):
(-[NSString _webkit_decodeHostName]):
(-[NSString _webkit_encodeHostName]):
* Panels/WebAuthenticationPanel.m:
(-[WebAuthenticationPanel setUpForChallenge:]):
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::canonicalizeURLString):

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController fetch:]):
* TestWebKitAPI/Tests/Cocoa/URLExtras.mm:
(TestWebKitAPI::TEST):

LayoutTests:

* fast/url/host-expected.txt:
* fast/url/idna2003-expected.txt:
* fast/url/invalid-idn-expected.txt: Added.
* fast/url/invalid-idn.html: Added.

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

3 years agoRegression(r197939): ASSERTION FAILED: url.containsOnlyASCII() in URL.cpp
cdumez@apple.com [Tue, 15 Mar 2016 07:37:34 +0000 (07:37 +0000)]
Regression(r197939): ASSERTION FAILED: url.containsOnlyASCII() in URL.cpp
https://bugs.webkit.org/show_bug.cgi?id=155449
<rdar://problem/25134826>

Reviewed by Carlos Garcia Campos.

Bump WK2 Network Disk Cache version after r197939 as the new cache format
is not compatible with the old one and leads to assertions being hit when
browsing in Debug builds.

SubresourceInfo used to only contain a boolean and would therefore be
serialized as "0" / "1". However, after r197939, a URL field was added
and when trying to decode old cache entries with the new format, we
would try to construct a URL from the String "0" or "1". This would
assert because these are not valid URLs.

* NetworkProcess/cache/NetworkCacheStorage.h:

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

3 years agoREGRESSION (r197724): [GTK] Web Inspector: Images being blocked by CSP 2.0
carlosgc@webkit.org [Tue, 15 Mar 2016 07:01:44 +0000 (07:01 +0000)]
REGRESSION (r197724): [GTK] Web Inspector: Images being blocked by CSP 2.0
https://bugs.webkit.org/show_bug.cgi?id=155432

Reviewed by Darin Adler.

The GTK+ port Web Inspector uses GResources for all internal
resources (images, fonts, scripts, etc.) that are now blocked by
the CSP. GResouces are like data URLs in practice, so we should
always allow them.

* page/csp/ContentSecurityPolicySourceList.cpp:
(WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar):

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

3 years agoUnreviewed, rolling out r197955.
ggaren@apple.com [Tue, 15 Mar 2016 05:39:35 +0000 (05:39 +0000)]
Unreviewed, rolling out r197955.

I decided to go in another direction

Reverted changeset:

"bmalloc: Rename SmallPage to SmallRun"
https://bugs.webkit.org/show_bug.cgi?id=155320
http://trac.webkit.org/changeset/197955

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

3 years agoFix WinCairo build after r198195.
achristensen@apple.com [Tue, 15 Mar 2016 05:32:45 +0000 (05:32 +0000)]
Fix WinCairo build after r198195.

* platform/network/NetworkingContext.h:
curl networking now uses NetworkingContext::storageSession.  That's everybody!

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

3 years agoWeb Inspector: Show path from root to instances in the Heap Snapshot content view
commit-queue@webkit.org [Tue, 15 Mar 2016 05:02:28 +0000 (05:02 +0000)]
Web Inspector: Show path from root to instances in the Heap Snapshot content view
https://bugs.webkit.org/show_bug.cgi?id=155478
<rdar://problem/25157408>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-14
Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and resources.

* UserInterface/Models/HeapSnapshotNode.js:
(WebInspector.HeapSnapshotNode.prototype.get shortestGCRootPath):
(WebInspector.HeapSnapshotNode.prototype._gcRootPaths.visitNode):
(WebInspector.HeapSnapshotNode.prototype._gcRootPaths):
Helper to get the shortest path from a GC root to the node.

* UserInterface/Models/HeapSnapshotRootPath.js: Added.
(WebInspector.HeapSnapshotRootPath):
(WebInspector.HeapSnapshotRootPath.emptyPath):
(WebInspector.HeapSnapshotRootPath.prototype.get node):
(WebInspector.HeapSnapshotRootPath.prototype.get parent):
(WebInspector.HeapSnapshotRootPath.prototype.get pathComponent):
(WebInspector.HeapSnapshotRootPath.prototype.get rootNode):
(WebInspector.HeapSnapshotRootPath.prototype.get fullPath):
(WebInspector.HeapSnapshotRootPath.prototype.isRoot):
(WebInspector.HeapSnapshotRootPath.prototype.isEmpty):
(WebInspector.HeapSnapshotRootPath.prototype.isGlobalScope):
(WebInspector.HeapSnapshotRootPath.prototype.isPathComponentImpossible):
(WebInspector.HeapSnapshotRootPath.prototype.isFullPathImpossible):
(WebInspector.HeapSnapshotRootPath.prototype.appendInternal):
(WebInspector.HeapSnapshotRootPath.prototype.appendArrayIndex):
(WebInspector.HeapSnapshotRootPath.prototype.appendPropertyName):
(WebInspector.HeapSnapshotRootPath.prototype.appendVariableName):
(WebInspector.HeapSnapshotRootPath.prototype.appendGlobalScopeName):
(WebInspector.HeapSnapshotRootPath.prototype.appendEdge):
(WebInspector.HeapSnapshotRootPath.prototype._canPropertyNameBeDotAccess):
Helper class, like PropertyPath, for building a string path to
a HeapSnapshotNode. Typically the path is built up with
HeapSnapshotEdges and so you can build a string such as:
`window.foo[0]["prop erty"]._foo`.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
(WebInspector.HeapAllocationsTimelineView.prototype.shown):
(WebInspector.HeapAllocationsTimelineView.prototype.hidden):
(WebInspector.HeapAllocationsTimelineView.prototype.closed):
Propogate shown/hidden to the contentViewContainer.
Cleanup the contentViewContainer when closing.

* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
Helper for logging a HeapSnapshotNode value to the console. If the
path is possible from the root, just output the path in the console
otherwise use a synthetic "Heap Snapshot Object (@1234)" like string.
For strings, just get the preview as we won't get a real RemoteObject.

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.sanitizeClassName):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.stringifyEdge):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
Give the @1234 id element a mouseover handler to display a popover
with the path from a root. Stop the path at "Window" if possible
to avoid displaying internals like "JSDOMWindowShell".

* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot .object-id):
(.heap-snapshot .object-id:hover):
(.heap-snapshot > .data-grid tr:not(.selected) td .object-id): Deleted.
(.heap-snapshot .icon):
(.heap-snapshot-instance-popover-content):
(.heap-snapshot-instance-popover-content table):
(.heap-snapshot-instance-popover-content tr):
(.heap-snapshot-instance-popover-content td):
(.heap-snapshot-instance-popover-content td.edge-name):
(.heap-snapshot-instance-popover-content td.object-data):
(.heap-snapshot-instance-popover-content .node):
(.heap-snapshot-instance-popover-content .node *):
Styles for contents of the popover.

* UserInterface/Views/HeapSnapshotInstancesContentView.js:
(WebInspector.HeapSnapshotInstancesContentView.prototype.hidden):
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get popover):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get popoverNode):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set popoverNode):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.hidden):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.willDismissPopover):
Have a single popover for the entire tree. Cache and clear
contents of the popover when appropriate.

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

3 years ago[WinCairo] Compile fix.
achristensen@apple.com [Tue, 15 Mar 2016 04:59:39 +0000 (04:59 +0000)]
[WinCairo] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=155463

Patch by Per Arne Vollan <peavo@outlook.com> on 2016-03-14
Reviewed by Alex Christensen.

Get the NetworkStorageSession object from the document in the same way as other platforms do.

Source/WebCore:

* loader/CookieJar.cpp:
(WebCore::storageSession):

Source/WebKit/win:

* WebCoreSupport/WebFrameNetworkingContext.cpp:
(WebFrameNetworkingContext::storageSession):
* WebCoreSupport/WebFrameNetworkingContext.h:
(WebFrameNetworkingContext::storageSession):

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

3 years ago[JSC] Don't reference the properties of @Reflect directly
utatane.tea@gmail.com [Tue, 15 Mar 2016 04:08:06 +0000 (04:08 +0000)]
[JSC] Don't reference the properties of @Reflect directly
https://bugs.webkit.org/show_bug.cgi?id=155436

Reviewed by Geoffrey Garen.

Reflect.ownKeys and Reflect.getOwnPropertyDescriptor can be altered with the user-crafted values.
Instead of referencing them directly, let's reference them through private names.

* builtins/ObjectConstructor.js:
(assign):
* runtime/CommonIdentifiers.h:
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation): Deleted.
* runtime/ReflectObject.cpp:
(JSC::ReflectObject::finishCreation):
* tests/stress/object-assign-correctness.js:
(runTests.):
(runTests.get let):
(Reflect.ownKeys):
(Reflect.getOwnPropertyDescriptor):
(test.let.handler.switch.case.string_appeared_here.return.get enumerable): Deleted.
(test.let.handler.getOwnPropertyDescriptor): Deleted.
(test.let.handler.ownKeys): Deleted.
(test.let.handler.get getProps): Deleted.
(test.let.handler): Deleted.
(test): Deleted.

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

3 years ago<attachment> on iOS should paint its progress indicator instead of a green square
timothy_horton@apple.com [Tue, 15 Mar 2016 04:01:39 +0000 (04:01 +0000)]
<attachment> on iOS should paint its progress indicator instead of a green square
https://bugs.webkit.org/show_bug.cgi?id=155482
<rdar://problem/24805991>

Reviewed by Simon Fraser.

No new tests; there are existing tests that will be enabled shortly.

* rendering/RenderThemeIOS.mm:
(WebCore::getAttachmentProgress):
Clamp progress to 0-1.

(WebCore::paintAttachmentProgress):
Paint a pie.

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

3 years agoUnreviewed, rolling out r197981.
cdumez@apple.com [Tue, 15 Mar 2016 03:53:07 +0000 (03:53 +0000)]
Unreviewed, rolling out r197981.

Caused a massive PLT regression on Mac.

Reverted changeset:

"Font antialiasing (smoothing) changes when elements are
rendered into compositing layers"
https://bugs.webkit.org/show_bug.cgi?id=23364
http://trac.webkit.org/changeset/197981

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

3 years agoUnreviewed, rolling out r198145.
cdumez@apple.com [Tue, 15 Mar 2016 03:51:39 +0000 (03:51 +0000)]
Unreviewed, rolling out r198145.

This attempt to disable the feature did not fix the PLT
regression

Reverted changeset:

"Regression(r197981): Huge regression on Mac PLT"
https://bugs.webkit.org/show_bug.cgi?id=155443
http://trac.webkit.org/changeset/198145

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

3 years agoAdd twisted-15.5.0 module to webkitpy.thirdparty.autoinstalled.
dewei_zhu@apple.com [Tue, 15 Mar 2016 01:52:02 +0000 (01:52 +0000)]
Add twisted-15.5.0 module to webkitpy.thirdparty.autoinstalled.
https://bugs.webkit.org/show_bug.cgi?id=154667

Reviewed by Ryosuke Niwa and Simon Fraser.

Add twisted-15.5.0 to webkitpy.thirdparty.autoinstalled.
Minor fix for twsited_http_server used by run-benchmark that we should only stop http server while recieving 'GET /shutdown'.

* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
(ServerControl.render_POST): Deleted.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook.find_module):
(AutoinstallImportHook._install_twisted_15_5_0):
* Scripts/webkitpy/thirdparty/__init___unittest.py:
(ThirdpartyTest.test_imports):

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

3 years agoRemove errant space.
weinig@apple.com [Tue, 15 Mar 2016 01:27:51 +0000 (01:27 +0000)]
Remove errant space.

* page/UserContentController.cpp:

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

3 years agoFix the windows build.
weinig@apple.com [Tue, 15 Mar 2016 01:21:08 +0000 (01:21 +0000)]
Fix the windows build.

* page/UserContentController.cpp:

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

3 years agoREGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
bfulgham@apple.com [Tue, 15 Mar 2016 00:59:57 +0000 (00:59 +0000)]
REGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
https://bugs.webkit.org/show_bug.cgi?id=155453

Reviewed by Eric Carlson.
<rdar://problem/24879447>

Reviewed by Dan Bates.

Further refinement to test case: Remove use of 'setTimeout', and ensure the code gets
called by using 'testRunner.waitUntilDone()'/'testRunner.notifyDone()'.

* fast/mediastream/enumerating-crash.html:

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

3 years agoAdd a baseURL parameter to _WKUserStyleSheet
weinig@apple.com [Tue, 15 Mar 2016 00:48:40 +0000 (00:48 +0000)]
Add a baseURL parameter to _WKUserStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=155219

Reviewed by Tim Horton.

Source/WebCore:

- Moves to a model for user content where instead of each page having a WebCore::UserContentController
  object, we have an abstract WebCore::UserContentProvider interface that can be implemented at the WebKit
  level. For now, legacy WebKit continues to use the old UserContentController, which implements
  WebCore::UserContentProvider, and WebKit2 implements its own implementation so it can store additional
  state.

* WebCore.xcodeproj/project.pbxproj:
Add new files.

* dom/ExtensionStyleSheets.cpp:
(WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache):
Switch to using forEachUserStyleSheet on the UserContentProvider.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):
Remove null check now that we always have a UserContentProvider.

* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* loader/EmptyClients.h:
Add new EmptyClients.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
Remove null check now that we always have a UserContentProvider.

* loader/PingLoader.cpp:
(WebCore::processContentExtensionRulesForLoad):
Remove null check now that we always have a UserContentProvider.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequestInternal):
Remove null check now that we always have a UserContentProvider.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
Remove null check now that we always have a UserContentProvider.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
Remove null checks now that we always have a UserContentProvider, and userMessageHandlerDescriptors
returns a reference.

(WebCore::DOMWindow::open):
Remove null check now that we always have a UserContentProvider.

* page/Frame.cpp:
(WebCore::Frame::injectUserScripts):
Simplify by lifting document check out of the main loop and using forEachUserScript.

* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::userContentProvider):
(WebCore::Page::setUserContentProvider):
(WebCore::Page::setUserContentController): Deleted.
* page/Page.h:
(WebCore::Page::userContentController): Deleted.
* page/PageConfiguration.h:
Store the UserContentProvider in a Ref, and require PageConfigurations to provide one. This
removes a bunch of null checks and simplifies the code.

* page/UserContentController.cpp:
(WebCore::UserContentController::~UserContentController):
(WebCore::UserContentController::forEachUserScript):
(WebCore::UserContentController::forEachUserStyleSheet):
(WebCore::UserContentController::addUserScript):
(WebCore::UserContentController::removeUserScript):
(WebCore::UserContentController::removeUserScripts):
(WebCore::UserContentController::addUserStyleSheet):
(WebCore::UserContentController::removeUserStyleSheet):
(WebCore::UserContentController::removeUserStyleSheets):
(WebCore::UserContentController::addUserMessageHandlerDescriptor):
(WebCore::UserContentController::removeUserMessageHandlerDescriptor):
(WebCore::UserContentController::addUserContentExtension):
(WebCore::UserContentController::removeUserContentExtension):
(WebCore::UserContentController::removeAllUserContentExtensions):
(WebCore::UserContentController::removeAllUserContent):
(WebCore::UserContentController::addPage): Deleted.
(WebCore::UserContentController::removePage): Deleted.
(WebCore::contentExtensionsEnabled): Deleted.
(WebCore::UserContentController::processContentExtensionRulesForLoad): Deleted.
(WebCore::UserContentController::actionsForResourceLoad): Deleted.
* page/UserContentController.h:
(WebCore::UserContentController::userScripts): Deleted.
(WebCore::UserContentController::userStyleSheets): Deleted.
(WebCore::UserContentController::userMessageHandlerDescriptors): Deleted.
Add inheritance from UserContentProvider and simplify things by removing unique_ptrs
that were holding the member variables. There is usually only one UserContentController
so having these in unique_ptrs doesn't make much sense.

* page/UserContentProvider.cpp: Added.
(WebCore::UserContentProvider::UserContentProvider):
(WebCore::UserContentProvider::~UserContentProvider):
(WebCore::UserContentProvider::addPage):
(WebCore::UserContentProvider::removePage):
(WebCore::UserContentProvider::invalidateInjectedStyleSheetCacheInAllFramesInAllPages):
(WebCore::contentExtensionsEnabled):
(WebCore::UserContentProvider::processContentExtensionRulesForLoad):
(WebCore::UserContentProvider::actionsForResourceLoad):
* page/UserContentProvider.h: Added.
Add abstract class for providing user content and add some helpers on it.

* page/UserMessageHandlerDescriptor.h:
(WebCore::UserMessageHandlerDescriptor::create):
(WebCore::UserMessageHandlerDescriptor::client):
(WebCore::UserMessageHandlerDescriptor::invalidateClient):
* page/UserMessageHandlersNamespace.cpp:
(WebCore::UserMessageHandlersNamespace::handler):
Simplify now that userContentProvider() and userMessageHandlerDescriptors() are references.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView setGroupName:]):
Update to account for the name change from UserContentController -> UserContentProvider.

Source/WebKit2:

- Moves to a model for user content where instead of using a WebCore::UserContentController
  object, we implement the new WebCore::UserContentProvider interface (on the existing
  WebUserContentController object).
- Uses this to maintain maps of UserStylesSheets and UserScripts along with their identifiers,
  freeing up the URL, which had been acting as the identifier, to be used as the baseURL which
  was what it was intended for.
- Adds a baseURL property to _WKUserStyleSheet.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* Scripts/webkit/messages.py:
(headers_for_type):
Add support for sending WebUserContentControllerDataTypes.

* Shared/WebUserContentControllerDataTypes.cpp: Added.
(WebKit::WebUserScriptData::encode):
(WebKit::WebUserScriptData::decode):
(WebKit::WebUserStyleSheetData::encode):
(WebKit::WebUserStyleSheetData::decode):
* Shared/WebUserContentControllerDataTypes.h: Added.
Add helper types for sending user content over IPC.

* UIProcess/API/APIUserScript.cpp:
(API::UserScript::generateUniqueURL):
(API::UserScript::UserScript):
* UIProcess/API/APIUserScript.h:
* UIProcess/API/APIUserStyleSheet.cpp:
(API::UserStyleSheet::generateUniqueURL):
(API::UserStyleSheet::UserStyleSheet):
* UIProcess/API/APIUserStyleSheet.h:
Add identifiers for tracking across processes.

* UIProcess/API/Cocoa/_WKUserStyleSheet.h:
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
(-[_WKUserStyleSheet baseURL]):
Add new initializer which takes a baseURL as well as an accessor for the baseURL.

* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserScript):
(WebKit::WebUserContentControllerProxy::removeUserScript):
(WebKit::WebUserContentControllerProxy::addUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
Pass identifiers as well as user content.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::addUserScript):
(WebKit::InjectedBundle::addUserStyleSheet):
Move user content in via move semantics rather than using a unique_ptr.

(WebKit::InjectedBundle::removeUserScript):
(WebKit::InjectedBundle::removeUserStyleSheet):
(WebKit::InjectedBundle::removeUserScripts):
(WebKit::InjectedBundle::removeUserStyleSheets):
(WebKit::InjectedBundle::removeAllUserContent):
Update for new function signatures.

* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::WebUserContentController):
(WebKit::WebUserContentController::~WebUserContentController):
(WebKit::WebUserContentController::addUserContentWorlds):
(WebKit::WebUserContentController::removeUserContentWorlds):
(WebKit::WebUserContentController::addUserScripts):
(WebKit::WebUserContentController::removeUserScript):
(WebKit::WebUserContentController::removeAllUserScripts):
(WebKit::WebUserContentController::addUserStyleSheets):
(WebKit::WebUserContentController::removeUserStyleSheet):
(WebKit::WebUserContentController::removeAllUserStyleSheets):
(WebKit::WebUserContentController::addUserScriptMessageHandlers):
(WebKit::WebUserContentController::removeUserScriptMessageHandler):
(WebKit::WebUserContentController::addUserContentExtensions):
(WebKit::WebUserContentController::removeUserContentExtension):
(WebKit::WebUserContentController::removeAllUserContentExtensions):
(WebKit::WebUserContentController::addUserScriptInternal):
(WebKit::WebUserContentController::addUserScript):
(WebKit::WebUserContentController::removeUserScriptWithURL):
(WebKit::WebUserContentController::removeUserScriptInternal):
(WebKit::WebUserContentController::removeUserScripts):
(WebKit::WebUserContentController::addUserStyleSheetInternal):
(WebKit::WebUserContentController::addUserStyleSheet):
(WebKit::WebUserContentController::removeUserStyleSheetWithURL):
(WebKit::WebUserContentController::removeUserStyleSheetInternal):
(WebKit::WebUserContentController::removeUserStyleSheets):
(WebKit::WebUserContentController::removeAllUserContent):
(WebKit::WebUserContentController::forEachUserScript):
(WebKit::WebUserContentController::forEachUserStyleSheet):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:
Convert to inheriting from UserContentProvider, rather than containing a UserContentController.
This means adding the storage for the user content, which has been simplified to avoid using
unique_ptrs.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):
(WebKit::WebPage::removeAllUserContent):
Update to call the WebUserContentController, rather than going to the UserContentController, which
no longer exists.

* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::userContentController):
* WebProcess/WebPage/WebPageGroupProxy.h:
Return the WebUserContentController rather than old UserContentController.

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

3 years agoiOS: RTFD format is not available in the pasteboard after copy/cut.
enrica@apple.com [Tue, 15 Mar 2016 00:47:11 +0000 (00:47 +0000)]
iOS: RTFD format is not available in the pasteboard after copy/cut.
https://bugs.webkit.org/show_bug.cgi?id=155477
rdar://problem/23500600

Reviewed by Tim Horton.

WebKit is using UTTypeRTFD instead of UTTypeFlatRTFD that is the
proper RTFD format for pastedboard. I also discovered that, when
we create the NSTextAttachment in the NSAttributedString we produce
from the DOM range, we are not generating a file name with the
appropriate extension for the MIME type. The iOS specific implementation
of the MIMETypeRegistry functions were empty.
There is no need to have a differentiation between OS X and iOS, so
we now have only one file called MIMETypeRegistryCocoa.mm.

* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/MIMETypeRegistryCocoa.mm: Added.
(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
(WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
(WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
* platform/ios/MIMETypeRegistryIOS.mm: Removed.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::supportedPasteboardTypes):
(WebCore::Pasteboard::hasData):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write):
* platform/mac/MIMETypeRegistryMac.mm: Removed.

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

3 years agoWeb Inspector: Display Content Security Policy hash in details sidebar for script...
dbates@webkit.org [Tue, 15 Mar 2016 00:39:59 +0000 (00:39 +0000)]
Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements
https://bugs.webkit.org/show_bug.cgi?id=155466
<rdar://problem/25152480>

Reviewed by Joseph Pecoraro and Timothy Hatcher.

Source/JavaScriptCore:

Add property contentSecurityPolicyHash to store the CSP hash for an HTML style element or an
applicable HTML script element.

* inspector/protocol/DOM.json:

Source/WebCore:

For convenience, display the SHA-256 Content Security Policy (CSP) hash in the node details
sidebar for the selected HTML script element or HTML style element. A CSP script hash is
only applicable to inline JavaScript scripts. Therefore, we will display a hash for HTML
script elements only if they do not have a src attribute.

Tests: inspector/dom/csp-big5-hash.html
       inspector/dom/csp-hash.html

* inspector/InspectorDOMAgent.cpp:
(WebCore::computeContentSecurityPolicySHA256Hash): Added.
(WebCore::InspectorDOMAgent::buildObjectForNode): For an applicable HTML script- or style-
element, pass the computed SHA-256 CSP hash to the Inspector front end.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js: Add English localized string for the CSP hash UI label.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode): Initialize the instance variable this._contentSecurityPolicyHash
with the value passed from the Inspector back end.
(WebInspector.DOMNode.prototype.contentSecurityPolicyHash): Returns the CSP hash for this node.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel): Append a row to the end of section Identity to display
the CSP hash (if applicable).
(WebInspector.DOMNodeDetailsSidebarPanel.prototype.refresh): Query the underlying WebInspector.DOMNode
for the CSP hash of the selected node.

LayoutTests:

Add tests to ensure that the WebInspector.DOMNode object associated with an HTML style element
or applicable HTML script element has a valid CSP hash.

* inspector/dom/csp-big5-hash-expected.txt: Added.
* inspector/dom/csp-big5-hash.html: Added.
* inspector/dom/csp-hash-expected.txt: Added.
* inspector/dom/csp-hash.html: Added.

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

3 years agoPurge PassRefPtr from ArrayBuffer, ArchiveResource, Pasteboard, LegacyWebArchive...
jh718.park@samsung.com [Tue, 15 Mar 2016 00:22:45 +0000 (00:22 +0000)]
Purge PassRefPtr from ArrayBuffer, ArchiveResource, Pasteboard, LegacyWebArchive and DataObjectGtk
https://bugs.webkit.org/show_bug.cgi?id=150497

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/ArrayBuffer.h:
(JSC::ArrayBuffer::create):
(JSC::ArrayBuffer::createAdopted):
(JSC::ArrayBuffer::createFromBytes):
(JSC::ArrayBuffer::createUninitialized):
(JSC::ArrayBuffer::slice):
(JSC::ArrayBuffer::sliceImpl):

Source/WebCore:

No new tests, no new behaviours.

* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::IDBGetResult):
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::didReceiveRawData):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
* dom/MessageEvent.h:
* editing/Editor.cpp:
(WebCore::Editor::selectedRange):
* editing/Editor.h:
* editing/FrameSelection.h:
(WebCore::FrameSelection::toNormalizedRange):
* editing/VisiblePosition.cpp:
(WebCore::makeRange):
* editing/VisiblePosition.h:
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::toNormalizedRange):
* editing/VisibleSelection.h:
* editing/VisibleUnits.cpp:
(WebCore::enclosingTextUnitOfGranularity):
(WebCore::wordRangeFromPosition):
(WebCore::rangeExpandedByCharactersInDirectionAtWordBoundary):
(WebCore::rangeExpandedAroundPositionByCharacters):
* editing/VisibleUnits.h:
* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_addAttachmentForElement):
(fileWrapperForURL):
* editing/efl/EditorEfl.cpp:
(WebCore::Editor::webContentFromPasteboard):
* editing/gtk/EditorGtk.cpp:
(WebCore::createFragmentFromPasteboardData):
(WebCore::Editor::webContentFromPasteboard):
* editing/ios/EditorIOS.mm:
(WebCore::dataInRTFDFormat):
(WebCore::dataInRTFFormat):
(WebCore::Editor::selectionInWebArchiveFormat):
(WebCore::Editor::WebContentReader::addFragment):
(WebCore::Editor::WebContentReader::readWebArchive):
(WebCore::Editor::WebContentReader::readRTFD):
(WebCore::Editor::WebContentReader::readRTF):
(WebCore::Editor::WebContentReader::readImage):
(WebCore::Editor::WebContentReader::readURL):
(WebCore::Editor::webContentFromPasteboard):
(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::createFragmentAndAddResources):
(WebCore::Editor::createFragmentForImageResourceAndAddResource):
* editing/mac/EditorMac.mm:
(WebCore::Editor::selectionInWebArchiveFormat):
(WebCore::Editor::adjustedSelectionRange):
(WebCore::dataInRTFDFormat):
(WebCore::dataInRTFFormat):
(WebCore::Editor::dataSelectionForPasteboard):
(WebCore::Editor::WebContentReader::readWebArchive):
(WebCore::Editor::WebContentReader::readRTFD):
(WebCore::Editor::WebContentReader::readRTF):
(WebCore::Editor::WebContentReader::readImage):
(WebCore::Editor::WebContentReader::readURL):
(WebCore::Editor::webContentFromPasteboard):
(WebCore::Editor::createFragmentForImageResourceAndAddResource):
(WebCore::Editor::createFragmentAndAddResources):
* editing/win/EditorWin.cpp:
(WebCore::createFragmentFromPlatformData):
(WebCore::Editor::webContentFromPasteboard):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::archive):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::mainResourceData):
(WebCore::DocumentLoader::maybeCreateArchive):
(WebCore::DocumentLoader::addArchiveResource):
(WebCore::DocumentLoader::mainResource):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadArchive):
* loader/SubstituteData.h:
(WebCore::SubstituteData::SubstituteData):
(WebCore::SubstituteData::isValid):
* loader/SubstituteResource.h:
(WebCore::SubstituteResource::data):
(WebCore::SubstituteResource::SubstituteResource):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didReceiveData):
(WebCore::ApplicationCacheGroup::didFail):
(WebCore::ApplicationCacheGroup::didReceiveManifestData):
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadMainResource):
(WebCore::ApplicationCacheHost::maybeLoadSynchronously):
(WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
* loader/appcache/ApplicationCacheResource.cpp:
(WebCore::ApplicationCacheResource::ApplicationCacheResource):
(WebCore::ApplicationCacheResource::deliver):
(WebCore::ApplicationCacheResource::estimatedSizeInStorage):
* loader/appcache/ApplicationCacheResource.h:
(WebCore::ApplicationCacheResource::create):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):
* loader/appcache/ApplicationCacheStorage.h:
* loader/archive/ArchiveFactory.cpp:
(WebCore::archiveFactoryCreate):
(WebCore::ArchiveFactory::create):
* loader/archive/ArchiveFactory.h:
* loader/archive/ArchiveResource.cpp:
(WebCore::ArchiveResource::ArchiveResource):
(WebCore::ArchiveResource::create):
* loader/archive/ArchiveResource.h:
* loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::addResource):
* loader/archive/ArchiveResourceCollection.h:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
(WebCore::LegacyWebArchive::createResource):
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::createFromSelection):
* loader/archive/cf/LegacyWebArchive.h:
* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::create):
* loader/archive/mhtml/MHTMLArchive.h:
* loader/archive/mhtml/MHTMLParser.cpp:
(WebCore::MHTMLParser::parseArchive):
(WebCore::MHTMLParser::parseArchiveWithHeader):
(WebCore::MHTMLParser::parseNextPart):
* loader/archive/mhtml/MHTMLParser.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient):
* loader/icon/IconDatabase.cpp:
(WebCore::loadDefaultIconRecord):
* loader/icon/IconRecord.cpp:
(WebCore::IconRecord::setImageData):
* loader/icon/IconRecord.h:
* platform/Pasteboard.h:
* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::createArrayBuffer):
(WebCore::utf8Buffer):
* platform/SharedBuffer.h:
(WebCore::SharedBuffer::create):
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::wrapCFData):
* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::replacementData):
* platform/cocoa/ParentalControlsContentFilter.mm:
(WebCore::ParentalControlsContentFilter::replacementData):
* platform/graphics/Image.cpp:
(WebCore::Image::setData):
* platform/graphics/Image.h:
* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::forClipboard):
* platform/gtk/DataObjectGtk.h:
(WebCore::DataObjectGtk::create):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::Pasteboard):
(WebCore::Pasteboard::dataObject):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::read):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::bufferForType):
(WebCore::PlatformPasteboard::readBuffer):
* platform/mac/PasteboardMac.mm:
(WebCore::writeFileWrapperAsRTFDAttachment):
(WebCore::Pasteboard::read):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::bufferForType):
* platform/mac/SharedBufferMac.mm:
(WebCore::SharedBuffer::wrapNSData):
(WebCore::SharedBuffer::createFromReadingFile):
* platform/network/MIMEHeader.cpp:
(WebCore::retrieveKeyValuePairs):
(WebCore::MIMEHeader::parseHeader):
* platform/network/MIMEHeader.h:
* platform/soup/SharedBufferSoup.cpp:
(WebCore::SharedBuffer::wrapSoupBuffer):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::fragmentFromFilenames):
(WebCore::fragmentFromCFHTML):
(WebCore::fragmentFromHTML):
* platform/win/ClipboardUtilitiesWin.h:
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::documentFragment):

Source/WebKit/mac:

* DOM/WebDOMOperations.mm:
(-[DOMNode webArchive]):
(-[DOMNode webArchiveByFilteringSubframes:]):
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::bufferForType):
(WebPlatformStrategies::readBufferFromPasteboard):
* WebView/WebArchive.mm:
(-[WebArchive initWithData:]):
* WebView/WebDataSource.mm:
(-[WebDataSource webArchive]):
(-[WebDataSource addSubresource:]):
* WebView/WebResource.mm:
(-[WebResource encodeWithCoder:]):
(-[WebResource data]):
(-[WebResource _stringValue]):
(-[WebResource _initWithCoreResource:]): Deleted.

Source/WebKit/win:

* WebArchive.cpp:
(WebArchive::initWithNode):

Source/WebKit2:

* Shared/APIWebArchive.mm:
(API::WebArchive::WebArchive):
* Shared/APIWebArchiveResource.mm:
(API::WebArchiveResource::data):
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::addArchiveResource):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::readBufferFromPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
(WebKit::WebEditorClient::documentFragmentFromAttributedString):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::webArchiveData):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::resourceDataForFrame):

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

3 years agoAndy VanWagoner no longer has time to own Intl
benjamin@webkit.org [Mon, 14 Mar 2016 23:35:40 +0000 (23:35 +0000)]
Andy VanWagoner no longer has time to own Intl

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-03-14

* features.json:
Andy is busy with other things.

Andy, thanks for your amazing work on Intl and your dedication
to making things right.

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

3 years agoWeb Inspector: REGRESSION(r197974): HeapAllocationsTimelineView broken, doesn't handl...
commit-queue@webkit.org [Mon, 14 Mar 2016 23:35:22 +0000 (23:35 +0000)]
Web Inspector: REGRESSION(r197974): HeapAllocationsTimelineView broken, doesn't handle Timeline Sidebar Navigation removal
https://bugs.webkit.org/show_bug.cgi?id=155458
<rdar://problem/25150803>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-14
Reviewed by Timothy Hatcher.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
(WebInspector.HeapAllocationsTimelineView.prototype.layout):
(WebInspector.HeapAllocationsTimelineView.prototype._compareHeapSnapshotsClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
(WebInspector.HeapAllocationsTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
Update the TimelineView now that there is no sidebar.
Remove any TreeOutline logic and replace with DataGrid logic.

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

3 years agoWeb Inspector: REGRESSION(r198026): Can't click on Snapshot in Timeline Overview
commit-queue@webkit.org [Mon, 14 Mar 2016 23:33:49 +0000 (23:33 +0000)]
Web Inspector: REGRESSION(r198026): Can't click on Snapshot in Timeline Overview
https://bugs.webkit.org/show_bug.cgi?id=155457
<rdar://problem/25150706>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-14
Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype._handleClick):
The conditional was accidentally inverted in r198026.

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

3 years ago[mips] Fix unaligned access in LLINT.
julien.brianceau@gmail.com [Mon, 14 Mar 2016 23:31:18 +0000 (23:31 +0000)]
[mips] Fix unaligned access in LLINT.
https://bugs.webkit.org/show_bug.cgi?id=153228

Address loads used with btbxx opcodes were wrongly converted to lw
instruction instead of lbu, leading to unaligned access on mips
platforms. This is not a bug as it's silently fixed up by kernel,
but it's more efficient to avoid unaligned accesses for mips.

Reviewed by Geoffrey Garen.

* offlineasm/mips.rb:

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

3 years agoREGRESSION(r194394): >2x slow-down on CDjs
fpizlo@apple.com [Mon, 14 Mar 2016 23:28:03 +0000 (23:28 +0000)]
REGRESSION(r194394): >2x slow-down on CDjs
https://bugs.webkit.org/show_bug.cgi?id=155471

Unreviewed (rollout).

Source/JavaScriptCore:

This revision changes localeCompare() so that it's *much* slower than before. It's
understandable that sometimes things will get a tiny bit slower when implementing new
language features, but more than 2x regression on a major benchmark is not OK.

This rolls out that change. We can reland it once we think about how to do it in a
performant way.

* builtins/StringPrototype.js:
(search):
(localeCompare): Deleted.
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):

LayoutTests:

* js/dom/script-tests/string-prototype-properties.js:
* js/dom/string-prototype-properties-expected.txt:
* js/script-tests/string-localeCompare.js:
* js/string-localeCompare-expected.txt:
* js/string-localeCompare.html:

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

3 years agoNeed to distinguish between Symbol() and Symbol("").
mark.lam@apple.com [Mon, 14 Mar 2016 23:20:27 +0000 (23:20 +0000)]
Need to distinguish between Symbol() and Symbol("").
https://bugs.webkit.org/show_bug.cgi?id=155438

Reviewed by Saam Barati.

Source/JavaScriptCore:

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

Source/WTF:

While toString of both Symbol() and Symbol("") yields "Symbol()", Function.name
should yield "" and "[]" respectively.  Hence, we need to tell between the two.
This functionality will be needed later in https://bugs.webkit.org/show_bug.cgi?id=155437.

We achieve this by creating another singleton instance like the empty StringImpl
as the null StringImpl.  isNullSymbol() tests if the Stringimpl instance is a
symbol, and its substring is the null() singleton.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createSymbol):
(WTF::StringImpl::createNullSymbol):
(WTF::StringImpl::containsOnlyWhitespace):
(WTF::StringImpl::createSymbolEmpty): Deleted.
* wtf/text/StringImpl.h:
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::stringKind):
(WTF::StringImpl::isSymbol):
(WTF::StringImpl::isAtomic):
(WTF::StringImpl::isNullSymbol):
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::null):

Tools:

* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
- Test that the a symbol with an empty string is not equivalent to a null symbol.

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

3 years agoTemporarily disable the separated heap.
oliver@apple.com [Mon, 14 Mar 2016 23:14:15 +0000 (23:14 +0000)]
Temporarily disable the separated heap.
https://bugs.webkit.org/show_bug.cgi?id=155472

Reviewed by Geoffrey Garen.

Temporarily disable this.

* Configurations/FeatureDefines.xcconfig:

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

3 years ago[iOS] WKPreviewAction conforms to NSCopying but doesn’t override -
bdakin@apple.com [Mon, 14 Mar 2016 22:58:28 +0000 (22:58 +0000)]
[iOS] WKPreviewAction conforms to NSCopying but doesn’t override -
copyWithZone:
https://bugs.webkit.org/show_bug.cgi?id=155395

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKPreviewActionItem.mm:
(-[WKPreviewAction copyWithZone:]):

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

3 years agoMarking js/funcion-apply.html as flaky on mac debug
ryanhaddad@apple.com [Mon, 14 Mar 2016 22:38:53 +0000 (22:38 +0000)]
Marking js/funcion-apply.html as flaky on mac debug
https://bugs.webkit.org/show_bug.cgi?id=155411

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoWeb Inspector: cssmin.py does not handle calc(var(--toolbar-height) + var(--tab-bar...
timothy@apple.com [Mon, 14 Mar 2016 22:22:24 +0000 (22:22 +0000)]
Web Inspector: cssmin.py does not handle calc(var(--toolbar-height) + var(--tab-bar-height))

https://bugs.webkit.org/show_bug.cgi?id=155464
rdar://problem/25152196

Reviewed by Joseph Pecoraro.

* Scripts/cssmin.py:
(cssminify): Check for var when stripping spaces around + and -.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._viewModeDidChange):
Drive-by fix to add a missing semi-colon found by the copy-user-interface-resources-dryrun.rb script.

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

3 years agoSelecting with shift+drag results in unexpected drag-n-drop
tonikitoo@webkit.org [Mon, 14 Mar 2016 22:08:32 +0000 (22:08 +0000)]
Selecting with shift+drag results in unexpected drag-n-drop
https://bugs.webkit.org/show_bug.cgi?id=155314

Reviewed by Darin Adler.

Source/WebCore:

Test: editing/selection/shift-drag-selection-no-drag-n-drop.html

Whenever user tries to extend an existing text selection by dragging the mouse
(left button hold) with shift key pressed, WebKit enters drag-n-drop mode.
This behavior does not match common editing behavior out there, including other
browsers' (Firefox, Opera/Presto and IE).

Patch changes WebKit so that whenever one extends a selection with mouse
and shift key pressed off of a #text node, it does not enter drag-n-drop mode.

Additionally, patch also adds some further tests to ensure that when
selection is extended off of either a link or an image, drag-n-drop does
get triggered, no matter if shift key is pressed.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):

LayoutTests:

Tests that ensure that WebKit:

1) does not enter drag-n-drop mode and extending selection by dragging with mouse with shift key is pressed,
   off of a #text node.
2) does enter drag-n-drop mode and extending selection by dragging with mouse with shift key is pressed,
   off of a link.
3) does enter drag-n-drop mode and extending selection by dragging with mouse with shift key is pressed,
   off of an image.

Note that (1) is a behavior changed by this patch, whereas (2) and (3) represent existing
behavior that is kept.
Tests are also skip for iOS similarly to other drag-n-drop related tests.

* fast/events/shift-drag-selection-no-drag-n-drop-expected.txt: Added.
* fast/events/shift-drag-selection-no-drag-n-drop.html: Added.
* fast/events/shift-drag-selection-on-link-triggers-drag-n-drop-expected.txt: Added.
* fast/events/shift-drag-selection-on-link-triggers-drag-n-drop.html: Added.
* fast/events/shift-drag-selection-on-image-triggers-drag-n-drop-expected.txt: Added.
* fast/events/shift-drag-selection-on-image-triggers-drag-n-drop.html: Added.

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

3 years agoMarking storage/indexeddb/transaction-abort-private.html as flaky on mac-wk1
ryanhaddad@apple.com [Mon, 14 Mar 2016 22:03:21 +0000 (22:03 +0000)]
Marking storage/indexeddb/transaction-abort-private.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=155067

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoSkip test storage/indexeddb/odd-strings.html
ryanhaddad@apple.com [Mon, 14 Mar 2016 22:03:19 +0000 (22:03 +0000)]
Skip test storage/indexeddb/odd-strings.html
https://bugs.webkit.org/show_bug.cgi?id=154975

Unreviewed test gardening.

Removing duplicate expectation for test and skipping since it fails or times out on every run.

* TestExpectations:
* platform/mac-wk1/TestExpectations:

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

3 years agoREGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
bfulgham@apple.com [Mon, 14 Mar 2016 21:53:10 +0000 (21:53 +0000)]
REGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
https://bugs.webkit.org/show_bug.cgi?id=155453
<rdar://problem/24879447>

Reviewed by Daniel Bates.

Source/WebCore:

Tested by fast/mediastream/enumerating-crash.html.

* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::didCompletePermissionCheck): Prevent UserMediaPermissionCheck object from being
destroyed before the method completes.

LayoutTests:

* fast/mediastream/enumerating-crash-expected.txt: Added.
* fast/mediastream/enumerating-crash.html: Added.

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

3 years agoReduce generated JSON HeapSnapshot size
commit-queue@webkit.org [Mon, 14 Mar 2016 21:50:20 +0000 (21:50 +0000)]
Reduce generated JSON HeapSnapshot size
https://bugs.webkit.org/show_bug.cgi?id=155460

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-14
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Adjust the HeapSnapshot JSON to better reduce its size.
Changes include:

  - avoid inner array groups and instead just have a large array for
    nodes/edges. This removes lots of small array allocations.
  - eliminate duplicate edges
  - avoid duplicating edge names by including them in their own table;
  - now both the nodes and edges lists hold only integers

* heap/HeapSnapshotBuilder.cpp:
(JSC::HeapSnapshotBuilder::json):
Add some more documentation for the slightly modified format.
While generating, clear data structures as early as possible.

* heap/HeapSnapshotBuilder.h:
(JSC::HeapSnapshotEdge::HeapSnapshotEdge):
During JSON building, the edge's cell pointers are converted to the
identifier they point to. This avoids having to re-lookup the identifier.

* tests/heapProfiler/driver/driver.js:
(CheapHeapSnapshotEdge):
(CheapHeapSnapshot):
(CheapHeapSnapshot.prototype.edgeNameFromTableIndex):
(HeapSnapshot):
Update test driver for slightly different snapshot format.

Source/WebInspectorUI:

* UserInterface/Models/HeapSnapshot.js:
(WebInspector.HeapSnapshot.fromPayload):
Update for the slightly modified format.

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

3 years agoUnreviewed, rolling out r198095.
commit-queue@webkit.org [Mon, 14 Mar 2016 21:44:27 +0000 (21:44 +0000)]
Unreviewed, rolling out r198095.
https://bugs.webkit.org/show_bug.cgi?id=155467

Made text look poor (Requested by JoePeck on #webkit).

Reverted changeset:

"Web Inspector: Large repaints when typing any character in
console"
https://bugs.webkit.org/show_bug.cgi?id=155387
http://trac.webkit.org/changeset/198095

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

3 years agoFix crash when reloading a page using requestAnimationFrame on iOS
simon.fraser@apple.com [Mon, 14 Mar 2016 21:32:38 +0000 (21:32 +0000)]
Fix crash when reloading a page using requestAnimationFrame on iOS
https://bugs.webkit.org/show_bug.cgi?id=155465
rdar://problem/25100202

Reviewed by Tim Horton.

On iOS, it's possible for all clients for a DisplayRefreshMonitor
to be unregistered, but still get a subsequent displayDidRefresh() for that monitor.
In this case, we would remove(notFound) which release-asserts.

Fix by just checking for notFound.

Unable to test because requestAnimationFrame doesn't work in the simulator.

* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::displayDidRefresh):

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

3 years agoRemove usage of -[UIGestureRecognizer requireOtherGestureToFail:]
andersca@apple.com [Mon, 14 Mar 2016 21:16:43 +0000 (21:16 +0000)]
Remove usage of -[UIGestureRecognizer requireOtherGestureToFail:]
https://bugs.webkit.org/show_bug.cgi?id=155461
rdar://problem/25143282

Reviewed by Beth Dakin.

Use -[UIGestureRecognizer requireGestureRecognizerToFail:] instead, which has been API ever since UIGestureRecognizer was added.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]):

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

3 years ago[WinCairo][MediaFoundation] Implement float versions of MediaPlayer methods.
peavo@outlook.com [Mon, 14 Mar 2016 20:55:18 +0000 (20:55 +0000)]
[WinCairo][MediaFoundation] Implement float versions of MediaPlayer methods.
https://bugs.webkit.org/show_bug.cgi?id=155357

Reviewed by Brent Fulgham.

It is better to implement the float versions of some of the MediaPlayer methods,
since the default implementation of the double versions is to call the float version.
Also added override keyword to overridden methods.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::seeking):
(WebCore::MediaPlayerPrivateMediaFoundation::seek):
(WebCore::MediaPlayerPrivateMediaFoundation::setRate):
(WebCore::MediaPlayerPrivateMediaFoundation::duration):
(WebCore::MediaPlayerPrivateMediaFoundation::currentTime):
(WebCore::MediaPlayerPrivateMediaFoundation::seekDouble): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::setRateDouble): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::durationDouble): Deleted.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

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

3 years agoWe should be able to eliminate cloned arguments objects that use the length property
keith_miller@apple.com [Mon, 14 Mar 2016 20:55:15 +0000 (20:55 +0000)]
We should be able to eliminate cloned arguments objects that use the length property
https://bugs.webkit.org/show_bug.cgi?id=155391

Reviewed by Geoffrey Garen.

Previously if a programmer tried to use arguments.length in a strict function we would not eliminate the
arguments object. We were unable to eliminate the arguments object because the user would get a cloned arguments
object, which does not special case the length property. Thus, in order to get arguments elimination for cloned
we need to add a special case. There are two things that need to happen for the elimination to succeed.

First, we need to eliminate the CheckStructure blocking the GetByOffset for the length property. In order to
eliminate the check structure we need to prove to the Abstract Interpreter that this structure check is
unnesssary. This didn't occur before for two reasons: 1) CreateClonedArguments did not set the structure it
produced. 2) Even if CreateClonedArguments provided the global object's cloned arguments structure we would
transition the new argements object when we added the length property during construction. To fix the second
problem we now pre-assign a slot on clonedArgumentsStructure for the length property. Additionally, in order to
prevent future transitions of the structure we need to choose an indexing type for the structure. Since, not
eliminating the arguments object is so expensive we choose to have all cloned arguments start with continuous
indexing type, this avoids transitioning when otherwise we would not have to. In the future we should be smarter
about choosing the indexing type but since its relatively rare to have a arguments object escape we don't worry
about this for now.

Additionally, this patch renames all former references of outOfBandArguments to clonedArguments and adds
extra instrumentation to DFGArgumentsEliminationPhase.

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/ValueRecovery.h:
(JSC::ValueRecovery::clonedArgumentsThatWereNotCreated):
(JSC::ValueRecovery::outOfBandArgumentsThatWereNotCreated): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGOperations.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCreateClonedArguments):
* dfg/DFGStructureRegistrationPhase.cpp:
(JSC::DFG::StructureRegistrationPhase::run):
* dfg/DFGVariableEventStream.cpp:
(JSC::DFG::VariableEventStream::tryToSetConstantRecovery):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCreateClonedArguments):
* ftl/FTLOperations.cpp:
(JSC::FTL::operationMaterializeObjectInOSR):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_cloned_arguments):
(JSC::JIT::emit_op_create_out_of_band_arguments): Deleted.
* llint/LowLevelInterpreter.asm:
* runtime/ClonedArguments.cpp:
(JSC::ClonedArguments::ClonedArguments):
(JSC::ClonedArguments::createEmpty):
(JSC::ClonedArguments::createWithInlineFrame):
(JSC::ClonedArguments::createByCopyingFrom):
(JSC::ClonedArguments::createStructure):
* runtime/ClonedArguments.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::clonedArgumentsStructure):
(JSC::JSGlobalObject::outOfBandArgumentsStructure): Deleted.

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

3 years agoREGRESSION (r191691): Can't Share Selected Text
andersca@apple.com [Mon, 14 Mar 2016 20:54:15 +0000 (20:54 +0000)]
REGRESSION (r191691): Can't Share Selected Text
https://bugs.webkit.org/show_bug.cgi?id=155459
rdar://problem/24893625

Reviewed by Tim Horton.

Add the selected text as well. Somehow this got lost in the refactoring.

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):

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

3 years agoRevert r194125 and r194186: We're going to fix this a different way.
timothy_horton@apple.com [Mon, 14 Mar 2016 20:27:26 +0000 (20:27 +0000)]
Revert r194125 and r194186: We're going to fix this a different way.

* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
* page/EventHandler.h:

* Shared/NativeWebGestureEvent.h:
* Shared/mac/NativeWebGestureEventMac.mm:
(WebKit::pointForEvent):
(WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
(WebKit::distanceForTouches): Deleted.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView selectFindMatch:completionHandler:]):
(-[WKWebView _web_superInputContext]):
(-[WKWebView touchesBeganWithEvent:]): Deleted.
(-[WKWebView touchesMovedWithEvent:]): Deleted.
(-[WKWebView touchesEndedWithEvent:]): Deleted.
(-[WKWebView touchesCancelledWithEvent:]): Deleted.
* UIProcess/API/mac/WKView.mm:
(-[WKView namesOfPromisedFilesDroppedAtDestination:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView touchesBeganWithEvent:]): Deleted.
(-[WKView touchesMovedWithEvent:]): Deleted.
(-[WKView touchesEndedWithEvent:]): Deleted.
(-[WKView touchesCancelledWithEvent:]): Deleted.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::magnifyWithEvent):
(WebKit::WebViewImpl::smartMagnifyWithEvent):
(WebKit::WebViewImpl::rotateWithEvent):
(WebKit::WebViewImpl::touchesOrderedByAge): Deleted.
(WebKit::WebViewImpl::touchesBeganWithEvent): Deleted.
(WebKit::WebViewImpl::touchesMovedWithEvent): Deleted.
(WebKit::WebViewImpl::touchesEndedWithEvent): Deleted.
(WebKit::WebViewImpl::touchesCancelledWithEvent): Deleted.

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

3 years ago[Fetch API] FetchLoader should check for empty bodies
youenn.fablet@crf.canon.fr [Mon, 14 Mar 2016 20:13:30 +0000 (20:13 +0000)]
[Fetch API] FetchLoader should check for empty bodies
https://bugs.webkit.org/show_bug.cgi?id=155440

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/request/request-consume-empty-expected.txt:
* web-platform-tests/fetch/api/request/request-consume-empty.html:
* web-platform-tests/fetch/api/response/response-consume-empty-expected.txt:
* web-platform-tests/fetch/api/response/response-consume-empty.html:

Source/WebCore:

Covered by added tests.

* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::didFinishLoading): returning empty array buffer/empty string if no data received during loading.

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

3 years ago[ES6] Make JSON.stringify ES6 compatible
sbarati@apple.com [Mon, 14 Mar 2016 20:07:16 +0000 (20:07 +0000)]
[ES6] Make JSON.stringify ES6 compatible
https://bugs.webkit.org/show_bug.cgi?id=155448

Reviewed by Sam Weinig and Mark Lam.

We weren't following the spec with respect to the "toJSON" property
of the thing being stringified. We were perform hasProperty(.)
on "toJSON" instead of get(.). This patch changes it our
implementation to perform get(value, "toJSON").

* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::isFunction):
(JSC::JSValue::isCallable):
* runtime/JSONObject.cpp:
(JSC::Stringifier::toJSON):
(JSC::Stringifier::toJSONImpl):
(JSC::Stringifier::appendStringifiedValue):
* tests/es6.yaml:
* tests/stress/proxy-json.js:
(test):
(test.let.handler.get assert):
(test.let.handler):

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

3 years agoFix build.
andersca@apple.com [Mon, 14 Mar 2016 20:06:54 +0000 (20:06 +0000)]
Fix build.

Source/WebKit/mac:

Ignore nullability warnings, create an empty PDF selection.

* WebView/WebPDFView.mm:
(-[WebPDFView centerSelectionInVisibleArea:]):
(-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]):
(+[WebPDFView _PDFSelectionClass]):
(-[WebPDFView _nextMatchFor:direction:caseSensitive:wrap:fromSelection:startInSelection:]):

Source/WebKit2:

Create an empty PDF selection.

* Shared/mac/PDFKitImports.h:
* Shared/mac/PDFKitImports.mm:
(WebKit::pdfSelectionClass):
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::nextMatchForString):

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

3 years ago[ES6] Disallow var assignments in for-in loops
sbarati@apple.com [Mon, 14 Mar 2016 19:40:01 +0000 (19:40 +0000)]
[ES6] Disallow var assignments in for-in loops
https://bugs.webkit.org/show_bug.cgi?id=155451

Reviewed by Mark Lam.

Source/JavaScriptCore:

We're doing this in its own patch instead of the patch for https://bugs.webkit.org/show_bug.cgi?id=155384
because last time we made this change it broke some websites. Lets try making
it again because it's what the ES6 mandates. If it still breaks things we will
roll it out.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseForStatement):

LayoutTests:

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:

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

3 years agoUnable to commit previews in Mobile Safari
bdakin@apple.com [Mon, 14 Mar 2016 19:33:22 +0000 (19:33 +0000)]
Unable to commit previews in Mobile Safari
https://bugs.webkit.org/show_bug.cgi?id=155450
-and corresponding-
rdar://problem/25135529

Reviewed by Tim Horton.

_uiDelegateProvidedPreviewingViewController was being consulted before
invoking the old SPI, which was always wrong. It should have been consulted
before calling the new API! But also, it doesn’t seem to be necessary at all
since [WKContentView _previewItemController:commitPreview:] is only invoked
when a custom view controller has been provided.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreview]):
(-[WKContentView _unregisterPreview]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
(-[WKContentView _previewItemController:commitPreview:]):

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

3 years agoRegression(r197981): Huge regression on Mac PLT
cdumez@apple.com [Mon, 14 Mar 2016 19:01:28 +0000 (19:01 +0000)]
Regression(r197981): Huge regression on Mac PLT
https://bugs.webkit.org/show_bug.cgi?id=155443
<rdar://problem/25113391>

Reviewed by Gavin Barraclough.

We have experience a huge regression on Mac PLT after r197981, so
disable the feature until the performance issue is resolved.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::supportsSmoothedLayerText):

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

3 years agoassignments in for-in/for-of header not allowed
sbarati@apple.com [Mon, 14 Mar 2016 18:38:28 +0000 (18:38 +0000)]
assignments in for-in/for-of header not allowed
https://bugs.webkit.org/show_bug.cgi?id=155384

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch prevents assignments to the loop variable
in for in/of loops in all but one situation. The following
syntax is still allowed even though the spec prevents it:
```
for (var i = X in blah) ;
```
If the loop contains let/const, destructuring, or is a for-of
loop, we always throw a syntax error if there is an assignment.
We can do this with full backwards compatibility.
We only allow the above type of for-in loops because Oliver told
me that when he tried to make such programs illegal he ran
into real websites breaking.

This patch also removed the !::CreatesAST compile-time branch when checking
assignments to new.target. This was a dangerous thing for me
to introduce into our parser. There are times where ::CreatesAST
is true but we also want to check for syntax errors. For example,
when parsing the top-level AST of a program. Though this check
was technically correct, it's dangerous to have. It was correct
because we would always be reparsing the new.target assignment
because new.target is only allowed inside a function. That made it
so that (!::CreatesAST <=> we care about new.target assignment syntax errors).
But, (!::CreatesAST <=> we care about syntax error X) is not true in general.
I think it's safer to remove such code.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createNewTargetExpr):
(JSC::ASTBuilder::isNewTarget):
(JSC::ASTBuilder::createResolve):
* parser/Nodes.h:
(JSC::ExpressionNode::isBoolean):
(JSC::ExpressionNode::isSpreadExpression):
(JSC::ExpressionNode::isSuperNode):
(JSC::ExpressionNode::isNewTarget):
(JSC::ExpressionNode::isBytecodeIntrinsicNode):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseForStatement):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseUnaryExpression):

LayoutTests:

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:

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

3 years agoPingHandle delete's itself but pointer is still used by handleDataURL
bfulgham@apple.com [Mon, 14 Mar 2016 18:29:05 +0000 (18:29 +0000)]
PingHandle delete's itself but pointer is still used by handleDataURL
https://bugs.webkit.org/show_bug.cgi?id=154752
<rdar://problem/24872347>

Source/WebCore:

Patch by Chris Vienneau <chris.vno@outlook.com> on 2016-03-14
Reviewed by Alex Christensen.

When a PingHandle is destroyed, we should tell its client so that the client can clear the pointer it
holds to the element to avoid accidentally attempting to use deallocated memory.

The ResourceHandle's client member may be null after "didReceiveResponse" is called. We should confirm
the client is still valid after these calls.

* platform/network/DataURL.cpp:
(WebCore::handleDataURL): Check the client pointer before using it.
* platform/network/PingHandle.h:
(WebCore::PingHandle::~PingHandle): Notify the client we are being destroyed.
* platform/platform/network/ResourceHandle.h:

Source/WebKit2:

Reviewed by Alex Christensen.

When a PingLoad is destroyed, we should tell its client so that the client can clear the pointer it
holds to the element to avoid accidentally attempting to use deallocated memory.

* NetworkProcess/PingLoad.h:
(WebKit::PingLoad::~PingLoad): Notify the client we are being destroyed.

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

3 years agoNegative outline offset could break curved outline-style: auto
zalan@apple.com [Mon, 14 Mar 2016 18:13:02 +0000 (18:13 +0000)]
Negative outline offset could break curved outline-style: auto
https://bugs.webkit.org/show_bug.cgi?id=155416

Reviewed by Tim Horton.

When radius becomes negative the rounded rect could end up being un-renderable -> no rounded corners at all.

Source/WebCore:

Test: fast/inline/hidpi-outline-auto-negative-offset-with-border-radius.html

* platform/graphics/PathUtilities.cpp:
(WebCore::adjustedtRadiiForHuggingCurve):

LayoutTests:

* fast/inline/hidpi-outline-auto-negative-offset-with-border-radius-expected.html: Added.
* fast/inline/hidpi-outline-auto-negative-offset-with-border-radius.html: Added.

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

3 years agoRemove blank lines after #include "config.h"
ddkilzer@apple.com [Mon, 14 Mar 2016 18:09:54 +0000 (18:09 +0000)]
Remove blank lines after #include "config.h"

Follow-up fix from review comments on Bug 155394.

* TestWebKitAPI/PlatformUtilities.cpp:
* TestWebKitAPI/Tests/WTF/RefLogger.cpp:

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

3 years ago[Outline: auto] Fractional radius value could result in non-renderable rounded border.
zalan@apple.com [Mon, 14 Mar 2016 18:01:24 +0000 (18:01 +0000)]
[Outline: auto] Fractional radius value could result in non-renderable rounded border.
https://bugs.webkit.org/show_bug.cgi?id=155420

Reviewed by Tim Horton.

RoundedRect::pixelSnappedRoundedRectForPainting ensures that the rounded rect is always renderable.

Source/WebCore:

Test: fast/inline/hidpi-outline-auto-with-fractional-radius.html

* platform/graphics/PathUtilities.cpp:
(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
* platform/graphics/PathUtilities.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::paintFocusRing):

LayoutTests:

* fast/inline/hidpi-outline-auto-with-fractional-radius-expected.html: Added.
* fast/inline/hidpi-outline-auto-with-fractional-radius.html: Added.

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

3 years agoUnreviewed.
youenn.fablet@crf.canon.fr [Mon, 14 Mar 2016 17:30:03 +0000 (17:30 +0000)]
Unreviewed.
Marking imported/fetch/api/request/request-consume.html as flaky on debug builds.

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

3 years agoOutline: auto has sharp corners with single line contenteditable.
zalan@apple.com [Mon, 14 Mar 2016 17:22:54 +0000 (17:22 +0000)]
Outline: auto has sharp corners with single line contenteditable.
https://bugs.webkit.org/show_bug.cgi?id=155418

Reviewed by Tim Horton.

Multiple rectangles assumed multiline content and it broke bottomLeft and bottomRight corner check.
This patch adds fast path for polygons with 4 corners.

Source/WebCore:

Test: fast/inline/hidpi-outline-auto-with-one-focusring-rect.html

* platform/graphics/PathUtilities.cpp:
(WebCore::cornerType):
(WebCore::cornerTypeForMultiline):
(WebCore::rectFromPolygon):
(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):

LayoutTests:

* fast/inline/hidpi-outline-auto-with-one-focusring-rect-expected.html: Added.
* fast/inline/hidpi-outline-auto-with-one-focusring-rect.html: Added.

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

3 years ago[AX] SVG element with child desc not exposed
jdiggs@igalia.com [Mon, 14 Mar 2016 17:18:53 +0000 (17:18 +0000)]
[AX] SVG element with child desc not exposed
https://bugs.webkit.org/show_bug.cgi?id=155374

Reviewed by Darin Adler.

Source/WebCore:

Covered by the accessibility/w3c-svg-roles.html test, which was updated.

AccessibilitySVGRoot is now a subclass of AccessibilitySVGElement, which
exposes SVG elements with a child desc element as per the specification.
Also made existing protected methods private.

* accessibility/AccessibilitySVGElement.h:
* accessibility/AccessibilitySVGRoot.cpp:
(WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
(WebCore::AccessibilitySVGRoot::parentObject):
* accessibility/AccessibilitySVGRoot.h:

LayoutTests:

* platform/gtk/accessibility/w3c-svg-roles-expected.txt: Updated.
* platform/mac/accessibility/w3c-svg-roles-expected.txt: Updated.

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

3 years agoSkip asserting test http/tests/security/aboutBlank/security-context-write.html
ryanhaddad@apple.com [Mon, 14 Mar 2016 16:55:00 +0000 (16:55 +0000)]
Skip asserting test http/tests/security/aboutBlank/security-context-write.html
https://bugs.webkit.org/show_bug.cgi?id=94458

Unreviewed test gardening.

* TestExpectations:

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

3 years agoAdd copy/paste plug-in check for XHTML document
darin@apple.com [Mon, 14 Mar 2016 16:27:27 +0000 (16:27 +0000)]
Add copy/paste plug-in check for XHTML document
https://bugs.webkit.org/show_bug.cgi?id=106350

* TestExpectations: Re-enable test now that it works in WebKit 1.
* editing/pasteboard/paste-noplugin-xhtml.xhtml: Fixed problem where test would try to
call setBlockAllPlugins even when it did not exist. Turns out that's needed for the
test to run under WebKit 2, but not needed at all under WebKit 1.

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

3 years agoBuild fix.
ap@apple.com [Mon, 14 Mar 2016 16:16:18 +0000 (16:16 +0000)]
Build fix.

* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::loadedBlobAsText):

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

3 years ago[Fetch API] Implement data resolution for blob stored in Body
youenn.fablet@crf.canon.fr [Mon, 14 Mar 2016 15:58:14 +0000 (15:58 +0000)]
[Fetch API] Implement data resolution for blob stored in Body
https://bugs.webkit.org/show_bug.cgi?id=155359

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/request/request-consume-expected.txt:
* web-platform-tests/fetch/api/request/request-consume.html:
* web-platform-tests/fetch/api/request/request-init-002-expected.txt:
* 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-init-002-expected.txt:

Source/WebCore:

Introducing FetchLoader as a wrapper around ThreadableLoader to load resources.
FetchLoader can retrieve data as text or array buffer. It only supports blob currently.

Introducing FetchLoaderClient interface and FetchBodyOwner::BlobLoader as specifc blob loader client.

Covered by existing rebased tests.

* CMakeLists.txt:
* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::loadingType):
(WebCore::FetchBody::loadedAsArrayBuffer):
(WebCore::FetchBody::loadedAsText):
* Modules/fetch/FetchBody.h:
* Modules/fetch/FetchBodyOwner.cpp: Added.
(WebCore::FetchBodyOwner::FetchBodyOwner):
(WebCore::FetchBodyOwner::loadBlob):
(WebCore::FetchBodyOwner::finishBlobLoading):
(WebCore::FetchBodyOwner::blobLoadingFailed):
(WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
* Modules/fetch/FetchBodyOwner.h:
(WebCore::FetchBodyOwner::loadedBlobAsText):
(WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer):
(WebCore::FetchBodyOwner::blobLoadingSucceeded):
* Modules/fetch/FetchLoader.cpp: Added.
(WebCore::FetchLoader::start):
(WebCore::FetchLoader::FetchLoader):
(WebCore::FetchLoader::stop):
(WebCore::FetchLoader::didReceiveResponse):
(WebCore::FetchLoader::didReceiveData):
(WebCore::FetchLoader::didFinishLoading):
(WebCore::FetchLoader::didFail):
* Modules/fetch/FetchLoader.h: Added.
* Modules/fetch/FetchLoaderClient.h: Added.
(WebCore::FetchLoaderClient::~FetchLoaderClient):
(WebCore::FetchLoaderClient::didReceiveResponse):
(WebCore::FetchLoaderClient::didFinishLoadingAsText):
(WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer):
* WebCore.xcodeproj/project.pbxproj:

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

3 years agoRestored ENABLE_WEBCORE option and used it in JSCOnly port.
commit-queue@webkit.org [Mon, 14 Mar 2016 15:42:54 +0000 (15:42 +0000)]
Restored ENABLE_WEBCORE option and used it in JSCOnly port.
https://bugs.webkit.org/show_bug.cgi?id=155428

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-03-14
Reviewed by Michael Catanzaro.

This is a partial revert of r182624.

* CMakeLists.txt:
* Source/CMakeLists.txt:
* Source/cmake/OptionsJSCOnly.cmake:
* Source/cmake/WebKitFS.cmake:

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

3 years agoUnreviewed: Add my professional email address.
fred.wang@free.fr [Mon, 14 Mar 2016 15:40:03 +0000 (15:40 +0000)]
Unreviewed: Add my professional email address.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoSkip accessibility/internal-link-anchors2.html as the linked ui element API is not...
fred.wang@free.fr [Mon, 14 Mar 2016 15:26:25 +0000 (15:26 +0000)]
Skip accessibility/internal-link-anchors2.html as the linked ui element API is not supported for links.

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

3 years agoMake MathML colspan/rowspan consistent with HTML table cells.
fred.wang@free.fr [Mon, 14 Mar 2016 15:19:12 +0000 (15:19 +0000)]
Make MathML colspan/rowspan consistent with HTML table cells.
https://bugs.webkit.org/show_bug.cgi?id=150253

Patch by Frederic Wang <fwang@igalia.com> on 2016-03-14
Reviewed by Martin Robinson.

Source/WebCore:

Test: mathml/rowspan-crash.xhtml

We make MathMLElement::colSpan and MathMLElement::rowSpan consistent with the corresponding functions in HTMLTableCellElement.cpp.
These functions now return unsigned integers, use the same parsing functions and set a maximum for rowspan.
This latter change fixes crash/timeout with large values of rowspan.

* mathml/MathMLElement.cpp: Include HTMLParserIdioms to use limitToOnlyHTMLNonNegative.
(WebCore::MathMLElement::colSpan): Use unsigned integer and limitToOnlyHTMLNonNegative.
(WebCore::MathMLElement::rowSpan): ditto. We also use the same maximum limit as HTMLTableCellElement.
* mathml/MathMLElement.h: Make colSpan and rowSpan return unsigned integers.

LayoutTests:

We import crashing test from bug 150253.

* mathml/rowspan-crash-expected.txt: Added.
* mathml/rowspan-crash.xhtml: Added.

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

3 years ago Continue work on https://bugs.webkit.org/show_bug.cgi?id=106350
darin@apple.com [Mon, 14 Mar 2016 15:17:06 +0000 (15:17 +0000)]
    Continue work on https://bugs.webkit.org/show_bug.cgi?id=106350

        * TestExpectations: Disable test fow now since it seems to be failing in WebKit 1 and
        depends on hooks not present in WebKit 1 test runner.

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

3 years agoEnable GSS-Negotiate support in libsoup
commit-queue@webkit.org [Mon, 14 Mar 2016 15:13:48 +0000 (15:13 +0000)]
Enable GSS-Negotiate support in libsoup
https://bugs.webkit.org/show_bug.cgi?id=155354

Patch by Tomas Popela <tpopela@redhat.com> on 2016-03-14
Reviewed by Carlos Garcia Campos.

Enable the SOUP_TYPE_AUTH_NEGOTIATE feature if libsoup was compiled
with the GSS-Negotiate support.

* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::SoupNetworkSession):

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

3 years agoUnreviewed. Fix the GTK+ build after r198124.
carlosgc@webkit.org [Mon, 14 Mar 2016 14:13:46 +0000 (14:13 +0000)]
Unreviewed. Fix the GTK+ build after r198124.

WebsiteDataTypes is now an OptionSet.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_clear_cache):

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

3 years ago[GTK] Reimplement webkit_web_context_clear_cache functionality.
carlosgc@webkit.org [Mon, 14 Mar 2016 13:36:48 +0000 (13:36 +0000)]
[GTK] Reimplement webkit_web_context_clear_cache functionality.
https://bugs.webkit.org/show_bug.cgi?id=146041

Reviewed by Michael Catanzaro.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_clear_cache):

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

3 years agoWeb platform test server should not try to launch servers on already bound sockets
youenn.fablet@crf.canon.fr [Mon, 14 Mar 2016 12:10:23 +0000 (12:10 +0000)]
Web platform test server should not try to launch servers on already bound sockets
https://bugs.webkit.org/show_bug.cgi?id=141157

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* resources/config.json: Changed wpt https port from 8443 to 9443.
* web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt: Updated according https port change.
* web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt: Ditto.
* web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt: Ditto.
* web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt: Ditto.

Tools:

* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(wpt_config_json): Load WPT config from LayoutTests/imported/w3c/resources/config.json.
(base_url): Refactored to use wpt_config_json routine.
(WebPlatformTestServer.__init__): Fill port mappings according WPT config.

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

3 years agoAdd slotchange event
rniwa@webkit.org [Mon, 14 Mar 2016 12:02:21 +0000 (12:02 +0000)]
Add slotchange event
https://bugs.webkit.org/show_bug.cgi?id=155424
<rdar://problem/24997534>

Reviewed by Antti Koivisto.

Source/WebCore:

Added `slotchange` event as discussed on https://github.com/w3c/webcomponents/issues/288.

While the exact semantics of it could still evolve over time, this patch implements as
an asynchronous event that fires on a slot element whenever its distributed nodes change
(flattened assigned nodes):
http://w3c.github.io/webcomponents/spec/shadow/#dfn-distributed-nodes

Since inserting or removing an element from a shadow host could needs to enqueue this event
on the right slot element, this patch moves the invalidation point of element removals and
insertions from Element::childrenChanged to Element::insertedInto and Element::removedFrom.
Text nodes are still invalidated at Element::childrenChanged for performance reasons
since it could only appear within a default slot element.

Because this more fine-grained invalidation needs to be overridden by HTMLDetailsElement,
we now subclass SlotAssignment in HTMLDetailsElement instead of passing in a std::function.

Test: fast/shadow-dom/slotchange-event.html

* dom/Document.cpp:
(WebCore::Document::enqueueSlotchangeEvent): Added.
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::attributeChanged): Call hostChildElementDidChangeSlotAttr.
(WebCore::Element::insertedInto): Call hostChildElementDidChange.
(WebCore::Element::removedFrom): Ditto.
(WebCore::Element::childrenChanged): Don't invalidate the slots on ElementInserted and
ElementRemoved since they're now done in Element::insertedInto and Element::removedFrom.
* dom/Event.cpp:
(WebCore::Event::scoped): slotchange event is scoped.
* dom/EventNames.h: Added eventNames().slotchange.
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::invalidateSlotAssignments): Deleted.
(WebCore::ShadowRoot::invalidateDefaultSlotAssignments): Deleted.
* dom/ShadowRoot.h:
(ShadowRoot): Added more fine-grained invalidators, mirroring changes to SlotAssignment.
* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::SlotAssignment): Removed a variant that takes SlotNameFunction
since HTMLDetailsElement now subclasses SlotAssignment.
(WebCore::SlotAssignment::~SlotAssignment): Added now that the class is virtual.
(WebCore::recursivelyFireSlotChangeEvent): Added.
(WebCore::SlotAssignment::didChangeSlot): Added. Invalidates the style tree only if there
is a corresponding slot element, and fires slotchange event. When the slot element we found
in this shadow tree is assigned to a slot element inside an inner shadow tree, recursively
fire slotchange event on each such inner slots.
(WebCore::SlotAssignment::hostChildElementDidChange): Added. Update the matching slot when
an element is inserted or removed under a shadow host.
(WebCore::SlotAssignment::assignedNodesForSlot): Removed the superfluous early exit to an
release assert since addSlotElementByName should always create a SlotInfo for each element.
(WebCore::SlotAssignment::slotNameForHostChild): Added. This is the equivalent of old
m_slotNameFunction which DetailsSlotAssignment overrides.
(WebCore::SlotAssignment::invalidateDefaultSlot): Deleted.
(WebCore::SlotAssignment::findFirstSlotElement): Added an assertion. slotInfo.element must
be nullptr if elementCount is 0, and elementCount must be 0 if slotInfo.element is nullptr
after calling resolveAllSlotElements, which traverses the entire shadow tree to find all
slot elements.
(WebCore::SlotAssignment::assignSlots):
* dom/SlotAssignment.h: Implemented inline functions of ShadowRoot here to avoid including
SlotAssignment.h in ShadowRoot.h. Not inlining them results in extra function calls for all
builtin elements with shadow root without slot elements, which impacts performance.
(WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost): Added.
(WebCore::ShadowRoot::didChangeDefaultSlot): Added.
(WebCore::ShadowRoot::hostChildElementDidChange): Added.
(WebCore::ShadowRoot::hostChildElementDidChangeSlotAttribute): Added.
(WebCore::ShadowRoot::innerSlotDidChange):
* html/HTMLDetailsElement.cpp:
(WebCore::DetailsSlotAssignment): Added. Subclasses SlotAssignment to override
hostChildElementDidChange and slotNameForHostChild.
(WebCore::DetailsSlotAssignment::hostChildElementDidChange): Added. We don't check if this
is the first summary element since we don't know the answer when this function is called
inside Element::removedFrom.
(WebCore::DetailsSlotAssignment::slotNameForHostChild): Renamed from slotNameFunction. Also
removed the code to return nullAtom when details element is not open as that messes up new
fine-grained invalidation. Insert/remove the slot element in parseAttribute instead.
(WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot): Don't insert the slot element for
the summary since the details element is not open now.
(WebCore::HTMLDetailsElement::parseAttribute): Remove and insert the slot element for the
summary here instead of changing the behavior of slotNameForHostChild.
* html/HTMLDetailsElement.h:
* html/HTMLSlotElement.cpp:
(WebCore::HTMLSlotElement::enqueueSlotChangeEvent): Added. Enqueues a new slotchange event
if we haven't done so for this element yet.
(WebCore::HTMLSlotElement::dispatchEvent): Added. Clear m_hasEnqueuedSlotChangeEvent when
dispatching a slotchange event so that a subsequent call to enqueueSlotChangeEvent would
enqueue a new event. Note scripts call EventTarget::dispatchEventForBindings instead.
* html/HTMLSlotElement.h:

LayoutTests:

Added a W3C style testharness.js test.

* fast/shadow-dom/ShadowRoot-interface-expected.txt:
* fast/shadow-dom/ShadowRoot-interface.html: Don't import testharness.css from svn.webkit.org.
* fast/shadow-dom/slotchange-event-expected.txt: Added.
* fast/shadow-dom/slotchange-event.html: Added.

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

3 years agoWeb Inspector: Reduce unnecessary dashboard repaints
nvasilyev@apple.com [Mon, 14 Mar 2016 11:38:13 +0000 (11:38 +0000)]
Web Inspector: Reduce unnecessary dashboard repaints
https://bugs.webkit.org/show_bug.cgi?id=155425
<rdar://problem/25138247>

Reviewed by Timothy Hatcher.

* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem.):
newText is a number for console message counters.

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

3 years agoIntroduce CallWith=Document in binding generator
youenn.fablet@crf.canon.fr [Mon, 14 Mar 2016 09:44:44 +0000 (09:44 +0000)]
Introduce CallWith=Document in binding generator
https://bugs.webkit.org/show_bug.cgi?id=155358

Reviewed by Darin Adler.

Covered by existing tests and binding test.

* Modules/notifications/Notification.cpp:
(WebCore::Notification::permission): Taking a Document& instead of ScriptExecutionContext&.
(WebCore::Notification::requestPermission): Ditto.
* Modules/notifications/Notification.h:
* Modules/notifications/Notification.idl: Using CallWith=Document.
* bindings/scripts/CodeGeneratorJS.pm: Adding support for CallWith=Document and changed name from scriptContext to context.
(GenerateCallWith):
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt: Adding support for CallWith=Document.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_with_document_argument):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjWithScriptExecutionContextAttribute):
(WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
(WebCore::jsTestObjPrototypeFunctionWithDocumentArgument):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj withDocumentArgument]):
* bindings/scripts/test/TestObj.idl: Adding binding test.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::focus): Taking a Document& instead of ScriptExecutionContext&.
(WebCore::DOMWindow::close): Ditto.
* page/DOMWindow.h:
* page/DOMWindow.idl:
* page/History.cpp:
(WebCore::History::back): Ditto.
(WebCore::History::forward): Ditto.
(WebCore::History::go): Ditto.
* page/History.h:
* page/History.idl:
* testing/Internals.cpp:
(WebCore::InspectorStubFrontend::closeWindow): Calling DOMWindow::close() directly.

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

3 years agoInstall WebKit2 WebProcess NetworkProcess on OSX when not building the Mac PORT
commit-queue@webkit.org [Mon, 14 Mar 2016 08:37:50 +0000 (08:37 +0000)]
Install WebKit2 WebProcess NetworkProcess on OSX when not building the Mac PORT
https://bugs.webkit.org/show_bug.cgi?id=152651

Patch by Jeremy Huddleston Sequoia <jeremyhu@apple.com> on 2016-03-14
Reviewed by Philippe Normand.

* CMakeLists.txt:

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

3 years agoAdd copy/paste plug-in check for XHTML document
darin@apple.com [Mon, 14 Mar 2016 06:27:43 +0000 (06:27 +0000)]
Add copy/paste plug-in check for XHTML document
https://bugs.webkit.org/show_bug.cgi?id=106350

Reviewed by David Kilzer.

This bug was filed because of the assumption that there was a bug, but it
turns out that even in XHTML documents, we use HTML tree builder, so there is
no bug. Thus this just adds the test that demonstrates this.

* editing/pasteboard/paste-noplugin-xhtml-expected.txt: Added.
* editing/pasteboard/paste-noplugin-xhtml.xhtml: Added.

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

3 years agoWeb Inspector: Large repaints when typing any character in console
nvasilyev@apple.com [Mon, 14 Mar 2016 06:20:29 +0000 (06:20 +0000)]
Web Inspector: Large repaints when typing any character in console
https://bugs.webkit.org/show_bug.cgi?id=155387
<rdar://problem/25125720>

Reviewed by Timothy Hatcher.

* UserInterface/Views/Main.css:
(#content):

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

3 years agoWeb Inspector: Memory timeline pie charts are misaligned when there is no recording
commit-queue@webkit.org [Mon, 14 Mar 2016 05:57:39 +0000 (05:57 +0000)]
Web Inspector: Memory timeline pie charts are misaligned when there is no recording
https://bugs.webkit.org/show_bug.cgi?id=155421

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-03-13
Reviewed by Timothy Hatcher.

* UserInterface/Views/MemoryTimelineView.css:
(.timeline-view.memory > .content > .overview):
Removed top padding to match bottom padding.

(.timeline-view.memory .legend > .row):
(.timeline-view.memory .legend):
Moved specified width to prevent unrecorded timelines from having graphs
that are offset horizontally.

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

3 years agoRemove ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX) guards
commit-queue@webkit.org [Mon, 14 Mar 2016 04:52:59 +0000 (04:52 +0000)]
Remove ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX) guards
https://bugs.webkit.org/show_bug.cgi?id=155417

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-13
Reviewed by Yusuke Suzuki.

.:

* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parsePrimaryExpression): Deleted.
(JSC::Parser<LexerType>::parseMemberExpression): Deleted.

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:

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

3 years agoImplement unprivileged execCommand("copy") and execCommand("cut")
weinig@apple.com [Mon, 14 Mar 2016 04:43:58 +0000 (04:43 +0000)]
Implement unprivileged execCommand("copy") and execCommand("cut")
<rdar://problem/24354406>
https://bugs.webkit.org/show_bug.cgi?id=146336

Reviewed by Dean Jackson.

Source/WebCore:

Test: editing/execCommand/clipboard-access-with-user-gesture.html

* WebCore.xcodeproj/project.pbxproj:
Add new files.

* editing/ClipboardAccessPolicy.h:
Added.

* editing/EditorCommand.cpp:
(WebCore::defaultValueForSupportedCopyCut):
(WebCore::supportedCopyCut):
Match other browsers and allow the copy and cut commands
to be executed when there is a user gesture.

* page/Settings.h:
Add include of ClipboardAccessPolicy.h.

* page/Settings.in:
Add new setting for ClipboardAccessPolicy

LayoutTests:

* editing/execCommand/clipboard-access-with-user-gesture-expected.txt: Added.
* editing/execCommand/clipboard-access-with-user-gesture.html: Added.
Add test for using execCommand("copy") and execCommand("cut") during a user gesture.

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

3 years agoDRT should enable WebGL by default on Mac
dino@apple.com [Mon, 14 Mar 2016 03:58:26 +0000 (03:58 +0000)]
DRT should enable WebGL by default on Mac
https://bugs.webkit.org/show_bug.cgi?id=155419
<rdar://problem/25136981>

Reviewed by Sam Weinig.

Tools:

For some reason, lost in time, WebGL was enabled
by default on trunk, but disabled by default
in DumpRenderTree when using WebKit 1. This
was very annoying, because each test had
an explicit command to enable it.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues): Deleted WebGL line.

LayoutTests:

Update all the tests that no longer have to explicitly
turn WebGL on.

* compositing/backface-visibility/backface-visibility-webgl.html:
* compositing/visibility/visibility-simple-webgl-layer.html:
* compositing/webgl/webgl-background-color.html:
* compositing/webgl/webgl-no-alpha.html:
* compositing/webgl/webgl-nonpremultiplied-blend.html:
* compositing/webgl/webgl-reflection.html:
* compositing/webgl/webgl-repaint.html:
* fast/canvas/webgl/antialiasing-enabled.html:
* fast/canvas/webgl/canvas-resize-crash.html:
* fast/canvas/webgl/css-webkit-canvas-repaint.html:
* fast/canvas/webgl/css-webkit-canvas.html:
* fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays-expected.txt:
* fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays.html:
* fast/canvas/webgl/premultiplyalpha-test.html:
* fast/canvas/webgl/resources/webgl-test.js:
(initNonKhronosFramework): Deleted.
* fast/canvas/webgl/texImage2DImageDataTest.html:
* fast/canvas/webgl/toDataURL-unpremultipliedAlpha.html:
* fast/canvas/webgl/unprefixed-context.html:
* fast/canvas/webgl/webgl-composite-modes-repaint.html:
* fast/canvas/webgl/webgl-composite-modes.html:
* fast/canvas/webgl/webgl-drawarrays-crash.html:
* fast/canvas/webgl/webgl-layer-update.html:
* fast/canvas/webgl/webgl-reload-crash.html:
* http/tests/canvas/webgl/origin-clean-conformance.html:
* http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html:
* http/tests/security/webgl-remote-read-remote-image-allowed.html:
* http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html:
* http/tests/webgl/1.0.2/resources/webgl_test_files/conformance/more/unit.js:
* http/tests/webgl/1.0.2/resources/webgl_test_files/resources/js-test-pre.js:
* http/tests/webgl/1.0.2/resources/webkit-webgl-test-harness.js:
* imported/blink/compositing/draws-content/webgl-simple-background.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/more/unit.js:
* webgl/1.0.2/resources/webgl_test_files/resources/js-test-pre.js:
* webgl/1.0.2/resources/webkit-webgl-test-harness.js:
* webgl/1.0.3/resources/webgl_test_files/conformance/more/unit.js:
* webgl/1.0.3/resources/webgl_test_files/resources/js-test-pre.js:
* webgl/1.0.3/resources/webkit-webgl-test-harness.js:
* webgl/resources/webkit-webgl-test-harness.js:

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

3 years agoREGRESSION (r190840): crash inside details element's slotNameFunction
rniwa@webkit.org [Mon, 14 Mar 2016 01:57:17 +0000 (01:57 +0000)]
REGRESSION (r190840): crash inside details element's slotNameFunction
https://bugs.webkit.org/show_bug.cgi?id=155388

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by HTMLDetailsElement::isActiveSummary calling findAssignedSlot with a summary element
inside the shadow tree of the detials element. Fixed it by existing early when the summary element passed
to isActiveSummary is not a direct child of the details element.

Test: fast/html/details-summary-tabindex-crash.html

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::findAssignedSlot): Added an assertion for regression testing.
* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::findAssignedSlot): Removed the superfluous call to assignSlots added in r190840.
There is no need to update the slot assignments here (entires in m_slots are added or removed by
addSlotElementByName or removeSlotElementByName and assignSlots only updates assignedNodes in each SlotInfo
which is never used in this function or findFirstSlotElement.
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::isActiveSummary): Fixed the bug.

LayoutTests:

Added a regression test.

* fast/html/details-summary-tabindex-crash-expected.txt: Added.
* fast/html/details-summary-tabindex-crash.html: Added.

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

3 years ago[Mac] Injected bundle in relocatable WebContent service can’t use XPC services from...
mitz@apple.com [Mon, 14 Mar 2016 01:44:08 +0000 (01:44 +0000)]
[Mac] Injected bundle in relocatable WebContent service can’t use XPC services from other relocatable frameworks
https://bugs.webkit.org/show_bug.cgi?id=155414
<rdar://problem/24428418>

Reviewed by Sam Weinig.

* Configurations/DebugRelease.xcconfig:
  Set WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT to NO, because
  engineering builds are ad-hoc signed and therefore can’t have a private entitlement.

* Configurations/WebContent-OSX.entitlements: Added. Includes the XPC domain extension
  entitlement.

* Configurations/WebContentService.xcconfig:
  Set WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT to YES if not already set
  and the framework is relocatable. Set CODE_SIGN_ENTITLEMENTS to the new entitlements file
  if the domain extension entitlement is needed.

* WebKit2.xcodeproj/project.pbxproj: Added reference to new file.

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