WebKit.git
4 years agoFix some issues in MallocBench
ggaren@apple.com [Fri, 26 Feb 2016 17:58:58 +0000 (17:58 +0000)]
Fix some issues in MallocBench
https://bugs.webkit.org/show_bug.cgi?id=154600

Reviewed by Oliver Hunt.

* MallocBench/MallocBench.xcodeproj/project.pbxproj: Make nimlang.ops
a part of the build so that it copies to the right place for execution.

* MallocBench/MallocBench/Interpreter.cpp:
(Interpreter::Interpreter): Don't try to open .ops files for writing
because we're only going to read and we might need extra permissions to
write.

(Interpreter::~Interpreter): Give more context when opening a file fails
to help with debugging.

* MallocBench/MallocBench/stress.cpp:
(benchmark_stress): Reduce iterations to complete in less than 10 seconds.

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

4 years agobmalloc: Added a fast XLarge allocator
ggaren@apple.com [Fri, 26 Feb 2016 17:57:37 +0000 (17:57 +0000)]
bmalloc: Added a fast XLarge allocator
https://bugs.webkit.org/show_bug.cgi?id=154720

Reviewed by Andreas Kling.

This is a big speedup for XLarge allocations because it avoids mmap
and page fault churn. It also enables future design changes to handle
a smaller size range on the fast path.

* bmalloc.xcodeproj/project.pbxproj:

* bmalloc/Algorithm.h:
(bmalloc::roundUpToMultipleOf):
(bmalloc::roundDownToMultipleOf): Added a non-constant round down.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::tryAllocate): XLarge no longer requires the caller
to align things.

(bmalloc::Allocator::allocate): Tweaked the alignment calculation for
clarity. When alignment and largeAlignment are equal, no adjustment
is necessary since all allocations guarantee largeAlignment.

(bmalloc::Allocator::reallocate): Updated for interface change.

Note that the new interface fixes some concurrency bugs. The old code
kept an iterator into the XLarge allocator across lock drop and acquisition,
which is not cool.

(bmalloc::Allocator::allocateXLarge): XLarge no longer requires the caller
to align things.

* bmalloc/Heap.cpp:
(bmalloc::Heap::scavengeXLargeObjects): Added scavenging for XLarge.

(bmalloc::Heap::allocateXLarge):

(bmalloc::Heap::splitAndAllocate): Split XLarge objects to xLargeAlignment.

(bmalloc::Heap::tryAllocateXLarge):
(bmalloc::Heap::xLargeSize):
(bmalloc::Heap::shrinkXLarge):
(bmalloc::Heap::deallocateXLarge): Allocate from our map before going
to the OS.

(bmalloc::Heap::findXLarge): Deleted.

* bmalloc/Heap.h:

* bmalloc/LargeObject.h:
(bmalloc::LargeObject::split):

* bmalloc/ObjectType.h:
(bmalloc::isXLarge): Give XLarge objects an explicit alignment for clarity.

* bmalloc/Range.h:
(bmalloc::Range::size):
(bmalloc::Range::operator!):
(bmalloc::Range::operator bool):
(bmalloc::Range::operator<):
(bmalloc::canMerge):
(bmalloc::merge): Some helpers that were useful in writing this patch.

* bmalloc/Sizes.h:

* bmalloc/SortedVector.h: Added.
(bmalloc::SortedVector::Bucket::Bucket):
(bmalloc::SortedVector::Bucket::operator<):
(bmalloc::SortedVector::iterator::iterator):
(bmalloc::SortedVector::iterator::operator++):
(bmalloc::SortedVector::iterator::operator!=):
(bmalloc::SortedVector::iterator::operator*):
(bmalloc::SortedVector::iterator::operator->):
(bmalloc::SortedVector::iterator::skipDeletedBuckets):
(bmalloc::SortedVector::begin):
(bmalloc::SortedVector::end):
(bmalloc::SortedVector<T>::insert):
(bmalloc::SortedVector<T>::find):
(bmalloc::SortedVector<T>::get):
(bmalloc::SortedVector<T>::take):
(bmalloc::SortedVector<T>::shrinkToFit): A simple abstraction for keeping
a sorted vector. Insertion is average amortized log(n) because we keep
deleted buckets that we can reuse.

This is better than a tree because we get better locality, less memory
use, and simpler code. Also, trees require a node memory allocator, and
implementing a memory allocator in a memory allocator is no fun.

Arguably we should use a hash table instead. But that's more code, and
sorted vector has other nice properties that we might want to take
adavantage of in the future.

* bmalloc/VMAllocate.h:
(bmalloc::tryVMAllocate): Fixed an inaccuracy in the alignment calculation
here. This code was sort of trying to enforce the alignment that the
XLarge allocator enforces -- but it's better to enforce that alignment
there.

The right calculation is:

    vmAlignment - vmPageSize + vmSize

because the worst case is when you are aligned to 0 + vmPageSize, and
you must walk forward vmAlignment - vmPageSize to reach the next
vmAlignment.

(bmalloc::tryVMExtend): Deleted. No need to go back to the OS for VM
since we manage our own.

* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::allocateLargeChunk): Updated for clarity. When we
grow the large heap we know that grown region is where the next allocation
will take place, so we return it directly instead of pushing it to the
free list.

This fixes a subtle bug where an overly conservative aligned allocation
algorithm can fail to allocate at all when it grows the heap.

* bmalloc/VMHeap.h:
(bmalloc::VMHeap::allocateLargeObject): Ditto.
(bmalloc::VMHeap::allocateLargeObject): Ditto.

* bmalloc/VMState.h:
(bmalloc::merge): Added a helper.

* bmalloc/Vector.h:
(bmalloc::Vector::begin):
(bmalloc::Vector::end):
(bmalloc::Vector::size):
(bmalloc::Vector::capacity):
(bmalloc::Vector::last):
(bmalloc::Vector::pop):
(bmalloc::Vector<T>::push):
(bmalloc::Vector<T>::pop):
(bmalloc::Vector<T>::shrink): Use a proper iterator API to play nice
with std algorithms.

(bmalloc::Vector<T>::insert): New function required by SortedVector.

(bmalloc::Vector<T>::reallocateBuffer):
(bmalloc::Vector<T>::shrinkCapacity): Allow for shrinking back all the way
to 0 because that's what shrinkToFit wants.
(bmalloc::Vector<T>::growCapacity):
(bmalloc::Vector<T>::shrinkToFit):

* bmalloc/XLargeMap.cpp: Added. Helper data structure for managing XLarge
objects. We have enough granularity in our metadata to represent any
kind of address range.

We store free ranges in a flat vector because most programs have very
few individual free XLarge ranges. (They usually merge.)

We store allocated ranges in a sorted vector because programs might
allocate lots of XLarge ranges. For example, if the XLarge minimum is
128kB, and you have a 1GB process, that's 8192 ranges. Linear scan would
examine 8192 items but binary search only 13.

Empirically, this is 1.5X faster than our current large allocator if you
modify MallocBench/big to allocate XLarge objects and not to initialize
objects and you allocate 128kB-256kB objects in a 1GB address space.

(bmalloc::XLargeMap::takeFree): Be careful about overflow in this function
because we support super huge pointers, alignments, and sizes.

(bmalloc::XLargeMap::addFree): Merge eagerly on free because the cost
of missing an XLarge opportunity is catastrophic. Also, I discovered
by experiment that any allocator that doesn't merge eagerly can create
lots of subtle opportunities for snowballing fragmentation, as
fragmentation in range A forces you to chop up range B, and so on.

We allocate "first fit" (allocating the lowest address) because someone
wrote a paper once that said that it's the best algorithm to combat
fragmentation (even though worst case fragmentation is unavoidable
regardless of algorithm).

(bmalloc::XLargeMap::addAllocated):
(bmalloc::XLargeMap::getAllocated):
(bmalloc::XLargeMap::takeAllocated):
(bmalloc::XLargeMap::shrinkToFit):
(bmalloc::XLargeMap::takePhysical):
(bmalloc::XLargeMap::addVirtual):
* bmalloc/XLargeMap.h: Added.
(bmalloc::XLargeMap::Allocation::operator<):

* bmalloc/XLargeRange.h: Added.
(bmalloc::XLargeRange::XLargeRange):
(bmalloc::XLargeRange::vmState):
(bmalloc::XLargeRange::setVMState):
(bmalloc::canMerge):
(bmalloc::merge):
(bmalloc::XLargeRange::split): Helper for tracking VMState in a range.

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

4 years agoUnreviewed, rolling out r197168.
commit-queue@webkit.org [Fri, 26 Feb 2016 17:54:32 +0000 (17:54 +0000)]
Unreviewed, rolling out r197168.
https://bugs.webkit.org/show_bug.cgi?id=154728

crashing on some devices (Requested by kling on #webkit).

Reverted changeset:

"[Darwin] Use vm_kernel_page_size for WTF::pageSize()."
https://bugs.webkit.org/show_bug.cgi?id=154726
http://trac.webkit.org/changeset/197168

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

4 years agoAllow WKUserScripts to be run in isolated worlds
weinig@apple.com [Fri, 26 Feb 2016 17:50:50 +0000 (17:50 +0000)]
Allow WKUserScripts to be run in isolated worlds
https://bugs.webkit.org/show_bug.cgi?id=154701

Reviewed by Anders Carlsson.

Source/WebKit2:

Adds support for using isolated worlds, called _WKUserContentWorlds in the SPI,
from the UIProcess.

* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
* UIProcess/API/APIUserContentWorld.cpp: Added.
(API::generateIdentifier):
(API::UserContentWorld::worldWithName):
(API::UserContentWorld::normalWorld):
(API::UserContentWorld::UserContentWorld):
(API::UserContentWorld::~UserContentWorld):
* UIProcess/API/APIUserContentWorld.h: Added.
Add new UserContentWorld type.

* UIProcess/API/APIUserScript.h:
Bind each user script to a particular _WKUserContentWorld.

* UIProcess/API/C/WKUserScriptRef.cpp:
(WKUserScriptCreateWithSource):
(WKUserScriptCopySource):
Existing APIs create user scripts for the normal world, preserving existing behavior.

* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
Existing APIs create user scripts for the normal world, preserving existing behavior.

(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
Add a new initializer which takes a world to bind to.  Also add support for the legacy whitelist/blacklist mechanism
while we are here, as the expected client needs these as well.

(-[WKUserScript _userContentWorld]):
Add accessor for the bound world.

* UIProcess/API/Cocoa/WKUserScriptInternal.h:
* UIProcess/API/Cocoa/WKUserScriptPrivate.h: Added.
Add new private header.

* UIProcess/API/Cocoa/_WKUserContentWorld.h: Added.
* UIProcess/API/Cocoa/_WKUserContentWorld.mm: Added.
(+[_WKUserContentWorld worldWithName:]):
(+[_WKUserContentWorld normalWorld]):
(-[_WKUserContentWorld dealloc]):
(-[_WKUserContentWorld name]):
(-[_WKUserContentWorld _apiObject]):
* UIProcess/API/Cocoa/_WKUserContentWorldInternal.h: Added.
Add SPI wrapper.

* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserScript):
(WebKit::WebUserContentControllerProxy::removeUserScript):
(WebKit::WebUserContentControllerProxy::removeAllUserScripts):
(WebKit::WebUserContentControllerProxy::addUserStyleSheet):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
(WebKit::WebUserContentControllerProxy::userScripts):
(WebKit::WebUserContentControllerProxy::userStyleSheets):
Add support for registering the worlds with the associated WebContentProcesses and then using
their identifiers to map user scripts to the correct world.

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

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
(-[WKWebProcessPlugInScriptWorld name]):
Expose the name property.

* WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
(WKBundleScriptWorldCopyName):
* WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
Expose the name property.

* WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
(WebKit::allWorlds):
(WebKit::InjectedBundleScriptWorld::create):
(WebKit::InjectedBundleScriptWorld::getOrCreate):
(WebKit::InjectedBundleScriptWorld::normalWorld):
(WebKit::InjectedBundleScriptWorld::InjectedBundleScriptWorld):
(WebKit::InjectedBundleScriptWorld::~InjectedBundleScriptWorld):
(WebKit::InjectedBundleScriptWorld::coreWorld):
(WebKit::InjectedBundleScriptWorld::clearWrappers):
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
(WebKit::InjectedBundleScriptWorld::name):
Add the name property and do some drive-by RefPtr -> Ref conversions.

* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::userContentControllers):
(WebKit::worldMap):
(WebKit::WebUserContentController::getOrCreate):
(WebKit::WebUserContentController::~WebUserContentController):
(WebKit::WebUserContentController::addUserContentWorlds):
(WebKit::WebUserContentController::removeUserContentWorld):
(WebKit::WebUserContentController::addUserScripts):
(WebKit::WebUserContentController::removeUserScript):
(WebKit::WebUserContentController::removeAllUserScripts):
(WebKit::WebUserContentController::addUserStyleSheets):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:
Track and use worlds passed from the UIProcess.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentWorld.mm: Added.
(-[SimpleDelegate webView:didFinishNavigation:]):
(-[UserContentWorldRemoteObject didObserveNormalWorld]):
(-[UserContentWorldRemoteObject didObserveWorldWithName:]):
* TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentWorldPlugIn.mm: Added.
(-[_WKUserContentWorldPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[_WKUserContentWorldPlugIn webProcessPlugInBrowserContextController:globalObjectIsAvailableForFrame:inScriptWorld:]):
* TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentWorldProtocol.h: Added.

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

4 years agoRemove libqcms support
commit-queue@webkit.org [Fri, 26 Feb 2016 17:36:41 +0000 (17:36 +0000)]
Remove libqcms support
https://bugs.webkit.org/show_bug.cgi?id=154707

Patch by Martin Robinson <mrobinson@igalia.com> on 2016-02-26
Reviewed by Žan Doberšek.

No new tests. This change simply removes dead code.

* platform/image-decoders/ImageDecoder.h: Remove QCMS support.
(WebCore::ImageDecoder::qcmsOutputDeviceProfile): Deleted.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Remove QCMS support.
(WebCore::JPEGImageReader::JPEGImageReader): Deleted.
(WebCore::JPEGImageReader::close): Deleted.
(WebCore::JPEGImageReader::decode): Deleted.
(WebCore::JPEGImageReader::colorTransform): Deleted.
(WebCore::JPEGImageReader::createColorTransform): Deleted.
(WebCore::JPEGImageDecoder::outputScanlines): Deleted.
* platform/image-decoders/png/PNGImageDecoder.cpp: Remove QCMS support.
(WebCore::PNGImageReader::PNGImageReader): Deleted.
(WebCore::PNGImageReader::close): Deleted.
(WebCore::PNGImageReader::rowBuffer): Deleted.
(WebCore::PNGImageReader::createRowBuffer): Deleted.
(WebCore::PNGImageReader::colorTransform): Deleted.
(WebCore::PNGImageReader::createColorTransform): Deleted.
(WebCore::PNGImageDecoder::headerAvailable): Deleted.
(WebCore::PNGImageDecoder::rowAvailable): Deleted.
(WebCore::PNGImageDecoder::frameComplete): Deleted.
* platform/image-decoders/webp/WEBPImageDecoder.cpp: Remove QCMS support.
(WebCore::WEBPImageDecoder::decode): Remove QCMS support.
(WebCore::WEBPImageDecoder::WEBPImageDecoder): Deleted.
(WebCore::WEBPImageDecoder::clear): Deleted.
(WebCore::WEBPImageDecoder::createColorTransform): Deleted.
(WebCore::WEBPImageDecoder::readColorProfile): Deleted.
(WebCore::WEBPImageDecoder::applyColorProfile): Deleted.
* platform/image-decoders/webp/WEBPImageDecoder.h: Remove QCMS support.
(WebCore::WEBPImageDecoder::colorTransform): Deleted.

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

4 years agoRenderTheme::controlSize* methods should take const RenderStyle&.
zalan@apple.com [Fri, 26 Feb 2016 17:36:03 +0000 (17:36 +0000)]
RenderTheme::controlSize* methods should take const RenderStyle&.
https://bugs.webkit.org/show_bug.cgi?id=154708

Reviewed by Darin Adler.

No change in functionality.

* rendering/RenderTheme.h:
(WebCore::RenderTheme::minimumMenuListSize):
(WebCore::RenderTheme::popupInternalPaddingLeft):
(WebCore::RenderTheme::popupInternalPaddingRight):
(WebCore::RenderTheme::popupInternalPaddingTop):
(WebCore::RenderTheme::popupInternalPaddingBottom):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::controlSizeForFont):
(WebCore::RenderThemeMac::sizeForFont):
(WebCore::RenderThemeMac::sizeForSystemFont):
(WebCore::RenderThemeMac::controlSizeForSystemFont):
(WebCore::RenderThemeMac::minimumProgressBarHeight):
(WebCore::RenderThemeMac::popupInternalPaddingLeft):
(WebCore::RenderThemeMac::popupInternalPaddingRight):
(WebCore::RenderThemeMac::popupInternalPaddingTop):
(WebCore::RenderThemeMac::popupInternalPaddingBottom):
(WebCore::RenderThemeMac::minimumMenuListSize):

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

4 years agoWeb Inspector: Option-clicking on the a CSS property sometimes doesn't work
commit-queue@webkit.org [Fri, 26 Feb 2016 17:15:11 +0000 (17:15 +0000)]
Web Inspector: Option-clicking on the a CSS property sometimes doesn't work
https://bugs.webkit.org/show_bug.cgi?id=154384
<rdar://problem/24714755>

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

It seems as though there were race conditions between CodeMirror's event
and the native mousemove such that if CodeMirror fired second, the current
candidate was cleared, and would not reset itself until the cursor was
moved, at which point the same issue could happen. To fix this, the current
candidate is no longer cleared by CodeMirror's event and is instead only
modified by the native mouse-events.

* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._hidePopover):

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

4 years ago[Darwin] Use vm_kernel_page_size for WTF::pageSize().
akling@apple.com [Fri, 26 Feb 2016 17:04:18 +0000 (17:04 +0000)]
[Darwin] Use vm_kernel_page_size for WTF::pageSize().
<https://webkit.org/b/154726>

Reviewed by Antti Koivisto.

Source/WebKit2:

Use WTF::pageSize() for the SharedMemory page size.

* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::systemPageSize):

Source/WTF:

Make sure we use the right VM page size on Darwin systems.
On devices where the native page size is 4 KB, it's both
possible and profitable to madvise in smaller chunks.

* wtf/PageBlock.cpp:
(WTF::systemPageSize):

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

4 years agoREGRESSION (188611): Search field Cancel button should not overlap search text on...
zalan@apple.com [Fri, 26 Feb 2016 17:00:50 +0000 (17:00 +0000)]
REGRESSION (188611): Search field Cancel button should not overlap search text on extensions page.
https://bugs.webkit.org/show_bug.cgi?id=154692
<rdar://problem/22840453>

Reviewed by Brent Fulgham.

Adjust the cancel button position using the actual size of the cancel button.

When the input box and the font height trigger different cancel button sizes, we need to readjust
the rectangle returned by cancelButtonRectForBounds.
This fixes both the mispositioned cancel button and the squared off icon when the input field is zoomed all the way in.

Covered by existing tests.

Source/WebCore:

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::cancelButtonSizes): Update button size.

LayoutTests:

* fast/forms/search/search-padding-cancel-results-buttons-expected.txt:
* platform/mac/fast/css/focus-ring-exists-for-search-field-expected.txt:
* platform/mac/fast/css/text-input-with-webkit-border-radius-expected.txt:
* platform/mac/fast/css/text-overflow-input-expected.txt:
* platform/mac/fast/forms/box-shadow-override-expected.txt:
* platform/mac/fast/forms/control-restrict-line-height-expected.txt:
* platform/mac/fast/forms/input-appearance-height-expected.txt:
* platform/mac/fast/forms/placeholder-position-expected.txt:
* platform/mac/fast/forms/placeholder-pseudo-style-expected.txt:
* platform/mac/fast/forms/search-cancel-button-style-sharing-expected.txt:
* platform/mac/fast/forms/search-display-none-cancel-button-expected.txt:
* platform/mac/fast/forms/search-rtl-expected.txt:
* platform/mac/fast/forms/search-styled-expected.txt:
* platform/mac/fast/forms/search-vertical-alignment-expected.txt:
* platform/mac/fast/forms/search/search-size-with-decorations-expected.txt:
* platform/mac/fast/forms/searchfield-heights-expected.txt:
* platform/mac/fast/repaint/search-field-cancel-expected.txt:
* platform/mac/fast/replaced/width100percent-searchfield-expected.txt:

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

4 years ago[cmake] Moved WebKit/Storage sources and include dir to CMakeLists.txt.
commit-queue@webkit.org [Fri, 26 Feb 2016 16:47:29 +0000 (16:47 +0000)]
[cmake] Moved WebKit/Storage sources and include dir to CMakeLists.txt.
https://bugs.webkit.org/show_bug.cgi?id=154722

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-02-26
Reviewed by Darin Adler.

This code provides port-independent layer used by all WK1 ports,
so it belongs to main CMakeLists.txt, not Platform files.

* CMakeLists.txt:
* PlatformMac.cmake:
* PlatformWin.cmake:

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

4 years agoImplement ::slotted pseudo element
antti@apple.com [Fri, 26 Feb 2016 14:57:01 +0000 (14:57 +0000)]
Implement ::slotted pseudo element
https://bugs.webkit.org/show_bug.cgi?id=149441
<rdar://problem/22731987>

Reviewed by Andreas Kling.

Source/WebCore:

Based on latest in https://github.com/w3c/webcomponents/issues/331

* css/CSSGrammar.y.in:

    Parse ::slotted.

* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
(WebCore::CSSParserSelector::parsePseudoElementSlottedFunctionSelector):

    Tokenize ::slotted.

(WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId):
* css/CSSSelector.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchAuthorRules):
(WebCore::ElementRuleCollector::matchHostPseudoClassRules):
(WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):

    Match ::slotted selector.

(WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):

    Collect ::slotted rules that may apply to an element in a slot.

(WebCore::ElementRuleCollector::matchUserRules):
(WebCore::ElementRuleCollector::matchUARules):
(WebCore::findSlottedPseudoElementSelector):
(WebCore::ElementRuleCollector::ruleMatches):
* css/ElementRuleCollector.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::addRule):

    Collect ::slotted rules.

(WebCore::RuleSet::shrinkToFit):
* css/RuleSet.h:
(WebCore::RuleSet::hostPseudoClassRules):
(WebCore::RuleSet::slottedPseudoElementRules):
(WebCore::RuleSet::focusPseudoClassRules):
(WebCore::RuleSet::universalRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* style/StyleSharingResolver.cpp:
(WebCore::Style::SharingResolver::resolve):

    Disable style sharing for children of shadow host. They may be affected by the shadow tree style
    which is not considered in style sharing checks.

LayoutTests:

* fast/shadow-dom/css-scoping-shadow-slotted-rule.html:

    Enable the test, fix it and update it to the current spec.

* fast/shadow-dom/slotted-pseudo-element-css-text-expected.txt: Added.
* fast/shadow-dom/slotted-pseudo-element-css-text.html: Added.

    Add parsing/cssText test based on a Blink test.
    There are a few failures due to * not roundtripping and the parser being too lenient with pseudo elements.

* platform/mac/TestExpectations:

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

4 years ago[DFG] Drop unnecessary proved type branch in ToPrimitive
utatane.tea@gmail.com [Fri, 26 Feb 2016 11:49:49 +0000 (11:49 +0000)]
[DFG] Drop unnecessary proved type branch in ToPrimitive
https://bugs.webkit.org/show_bug.cgi?id=154716

Reviewed by Geoffrey Garen.

This branching based on the proved types is unnecessary because this is already handled in constant folding phase.
In fact, the DFGSpeculativeJIT64.cpp case is already removed in r164243.
This patch removes the remaining JIT32_64 case.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

4 years agoW3C test importer should have an option to clean the destination directory
youenn.fablet@crf.canon.fr [Fri, 26 Feb 2016 10:10:06 +0000 (10:10 +0000)]
W3C test importer should have an option to clean the destination directory
https://bugs.webkit.org/show_bug.cgi?id=152685

Reviewed by Darin Adler.

Adding --clean-dest-dir option to W3C test importer.
When this option is set, all files in the destination directory will be deleted
except for WebKit specific files (test expectations, .gitignore...) before new tests import.
Dangling test expectations are removed after tests import.'

Adding unit test and minor refactoring for the other tests.

* Scripts/webkitpy/w3c/test_importer.py:
(parse_args): Add '--clean-dest-dir' option.
(TestImporter.do_import):
(TestImporter._is_baseline): helper routine to capture -expected.txt files.
(TestImporter):
(TestImporter._should_not_keep_when_importing): helper routine to filter files that should not be cleaned before importing.
(TestImporter.clean_destination_directory):
(TestImporter.remove_dangling_expectations):
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest._parse_options):
(TestImporterTest.test_import_dir_with_no_tests_and_no_hg):
(TestImporterTest.test_import_dir_with_no_tests):
(TestImporterTest.test_import_dir_with_empty_init_py):
(test_clean_directory_option):

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

4 years agoSync web-platform-tests up to revision 5ca8b46
youenn.fablet@crf.canon.fr [Fri, 26 Feb 2016 08:55:07 +0000 (08:55 +0000)]
Sync web-platform-tests up to revision 5ca8b46
https://bugs.webkit.org/show_bug.cgi?id=154678

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* resources/ImportExpectations: Unskipped some tests (already imported tests) and skipped new tests added to WPT repo.
* resources/TestRepositories: Update revision to 5ca8b46.
* resources/web-platform-tests-modules.json:
* web-platform-tests/XMLHttpRequest/FormData-append-expected.txt:
* web-platform-tests/XMLHttpRequest/FormData-append.html:
* web-platform-tests/XMLHttpRequest/OWNERS: Added.
* web-platform-tests/XMLHttpRequest/event-readystate-sync-open-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-readystate-sync-open.htm: Added.
* web-platform-tests/XMLHttpRequest/formdata-delete-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/formdata-delete.htm: Added.
* web-platform-tests/XMLHttpRequest/formdata-get-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/formdata-get.htm: Added.
* web-platform-tests/XMLHttpRequest/formdata-has-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/formdata-has.htm: Added.
* web-platform-tests/XMLHttpRequest/formdata-set-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/formdata-set.htm: Added.
* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
* web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync-expected.txt:
* web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync.htm:
* web-platform-tests/XMLHttpRequest/open-url-encoding-expected.txt:
* web-platform-tests/XMLHttpRequest/open-url-encoding.htm:
* web-platform-tests/XMLHttpRequest/responsexml-document-properties-expected.txt:
* web-platform-tests/XMLHttpRequest/responsexml-document-properties.htm:
* web-platform-tests/XMLHttpRequest/responsexml-get-twice-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/responsexml-get-twice.htm: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-document-expected.txt:
* web-platform-tests/XMLHttpRequest/w3c-import.log:
* web-platform-tests/common/OWNERS: Added.
* web-platform-tests/common/w3c-import.log:
* web-platform-tests/dom/OWNERS: Added.
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.html: Added.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.svg: Added.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml: Added.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xml: Added.
* web-platform-tests/dom/nodes/Document-createEvent-expected.txt:
* web-platform-tests/dom/nodes/Document-createEvent.html:
* web-platform-tests/dom/nodes/MutationObserver-childList-expected.txt:
* web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt:
* web-platform-tests/dom/w3c-import.log:
* web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt:
* web-platform-tests/domparsing/OWNERS: Added.
* web-platform-tests/domparsing/w3c-import.log:
* web-platform-tests/fetch/OWNERS: Added.
* web-platform-tests/fetch/api/headers/headers-combine-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-nameshake-expected.txt.
* web-platform-tests/fetch/api/headers/headers-combine.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-nameshake.html.
* web-platform-tests/fetch/api/headers/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/domparsing/w3c-import.log.
* web-platform-tests/fetch/api/request/request-clone.sub.html:
* web-platform-tests/fetch/api/request/request-consume.html:
* web-platform-tests/fetch/api/request/request-error-expected.txt:
* web-platform-tests/fetch/api/request/request-error.html:
* web-platform-tests/fetch/api/request/request-idl-expected.txt:
* web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt:
* web-platform-tests/fetch/api/request/request-init-001.sub.html:
* web-platform-tests/fetch/api/request/request-init-003.sub.html:
* web-platform-tests/fetch/api/request/w3c-import.log: Added.
* web-platform-tests/fetch/api/resources/method.py:
(main):
* web-platform-tests/fetch/api/resources/utils.js:
(checkRequest):
(readTextStream):
* web-platform-tests/fetch/api/resources/w3c-import.log: Added.
* web-platform-tests/fetch/api/response/response-clone.html:
* web-platform-tests/fetch/api/response/response-consume.html:
* web-platform-tests/fetch/api/response/response-error-expected.txt:
* web-platform-tests/fetch/api/response/response-error.html:
* web-platform-tests/fetch/api/response/response-idl-expected.txt:
* web-platform-tests/fetch/api/response/response-idl.html:
* web-platform-tests/fetch/api/response/response-init-002.html:
* web-platform-tests/fetch/api/response/response-static-error.html:
* web-platform-tests/fetch/api/response/response-static-redirect-expected.txt:
* web-platform-tests/fetch/api/response/response-static-redirect.html:
* web-platform-tests/fetch/api/response/w3c-import.log: Added.
* web-platform-tests/fetch/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/w3c-import.log.
* web-platform-tests/html/OWNERS: Added.
* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces.html:
* web-platform-tests/html/dom/w3c-import.log:
* web-platform-tests/html/semantics/document-metadata/the-base-element/base_multiple.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/historical-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/historical.html:
* web-platform-tests/html/semantics/embedded-content/the-area-element/area-coords-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-area-element/area-coords.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-document-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-document.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-iframe-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-iframe.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-img-element/update-media-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-img-element/update-media.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-img-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/textfieldselection/w3c-import.log:
* web-platform-tests/html/semantics/forms/the-input-element/checkbox.html:
* web-platform-tests/html/semantics/forms/the-input-element/radio.html:
* web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
* web-platform-tests/html/semantics/forms/the-input-element/type-change-state.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/indeterminate-radio-expected.txt: Added.
* web-platform-tests/html/semantics/selectors/pseudo-classes/indeterminate-radio.html: Added.
* web-platform-tests/html/semantics/selectors/pseudo-classes/w3c-import.log:
* web-platform-tests/html/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/w3c-import.log.
* web-platform-tests/images/OWNERS: Added.
* web-platform-tests/images/w3c-import.log:
* web-platform-tests/lint.whitelist:
* web-platform-tests/media/OWNERS: Added.
* web-platform-tests/media/w3c-import.log:
* web-platform-tests/service-workers/OWNERS: Added.
* web-platform-tests/service-workers/cache-storage/OWNERS: Added.
* web-platform-tests/service-workers/cache-storage/resources/credentials-iframe.html: Added.
* web-platform-tests/service-workers/cache-storage/resources/credentials-worker.js: Added.
(assert_equals):
(self.onfetch):
(self.onmessage):
* web-platform-tests/service-workers/cache-storage/resources/test-helpers.js:
(response.new.Response):
(assert_response_equals):
(assert_response_array_equivalent):
(assert_response_array_equals):
(assert_response_in_array):
* web-platform-tests/service-workers/cache-storage/resources/testharness-helpers.js:
* web-platform-tests/service-workers/cache-storage/resources/w3c-import.log:
* web-platform-tests/service-workers/cache-storage/script-tests/cache-add.js:
(cache_test):
* web-platform-tests/service-workers/cache-storage/script-tests/cache-match.js:
(request.new.Request.entries.a.request.clone):
(return.cache.match.entries.non_2xx_response.request.url.then):
(return.cache.match.entries.error_response.request.url.then):
(return.cache.match.string_appeared_here.then): Deleted.
(return.cache.match.entries.a.request.url.then): Deleted.
(return.cache.match.entries.a.request.then): Deleted.
(return.cache.match.new.Request.entries.a.request.url.then): Deleted.
(then): Deleted.
(return.cache.match.entries.cat.request.url.string_appeared_here.then): Deleted.
(cache_test): Deleted.
(return.cache.match.request.then): Deleted.
* web-platform-tests/service-workers/cache-storage/script-tests/cache-matchAll.js: Added.
(return.cache.matchAll.string_appeared_here.then):
(return.cache.matchAll.entries.a.request.url.then):
(return.cache.matchAll.entries.a.request.then):
(return.cache.matchAll.new.Request.entries.a.request.url.then):
(then):
(return.cache.matchAll.entries.cat.request.url.string_appeared_here.then):
* web-platform-tests/service-workers/cache-storage/script-tests/cache-put.js:
(cache_test):
* web-platform-tests/service-workers/cache-storage/script-tests/cache-storage.js:
(promise_test):
* web-platform-tests/service-workers/cache-storage/script-tests/w3c-import.log:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https.html:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https.html.
* web-platform-tests/service-workers/cache-storage/serviceworker/credentials.html: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/w3c-import.log:
* web-platform-tests/service-workers/cache-storage/w3c-import.log:
* web-platform-tests/service-workers/cache-storage/window/cache-match.https.html:
* web-platform-tests/service-workers/cache-storage/window/cache-matchAll.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-match.https.html.
* web-platform-tests/service-workers/cache-storage/window/w3c-import.log:
* web-platform-tests/service-workers/cache-storage/worker/cache-match.https.html:
* web-platform-tests/service-workers/cache-storage/worker/cache-matchAll.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-match.https.html.
* web-platform-tests/service-workers/cache-storage/worker/w3c-import.log:
* web-platform-tests/service-workers/w3c-import.log:
* web-platform-tests/streams/README.txt: Removed.
* web-platform-tests/streams/byte-length-queuing-strategy.https-expected.txt: Added.
* web-platform-tests/streams/byte-length-queuing-strategy.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/byte-length-queuing-strategy.html.
* web-platform-tests/streams/byte-length-queuing-strategy.js:
(test):
* web-platform-tests/streams/count-queuing-strategy.https-expected.txt: Added.
* web-platform-tests/streams/count-queuing-strategy.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/count-queuing-strategy.html.
* web-platform-tests/streams/count-queuing-strategy.js:
(test):
* web-platform-tests/streams/readable-streams/bad-strategies.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/bad-strategies.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-strategies.html.
* web-platform-tests/streams/readable-streams/bad-strategies.js:
(get string_appeared_here):
(test):
(promise_test):
* web-platform-tests/streams/readable-streams/bad-underlying-sources.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/bad-underlying-sources.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-underlying-sources.html.
* web-platform-tests/streams/readable-streams/brand-checks.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/brand-checks.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/brand-checks.html.
* web-platform-tests/streams/readable-streams/cancel.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/cancel.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/cancel.html.
* web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.html.
* web-platform-tests/streams/readable-streams/garbage-collection.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/garbage-collection.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/garbage-collection.html.
* web-platform-tests/streams/readable-streams/general.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/general.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.html.
* web-platform-tests/streams/readable-streams/general.js:
(test):
(promise_test):
* web-platform-tests/streams/readable-streams/pipe-through.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/pipe-through.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/pipe-through.html.
* web-platform-tests/streams/readable-streams/readable-stream-reader.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/readable-stream-reader.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/readable-stream-reader.html.
* web-platform-tests/streams/readable-streams/readable-stream-reader.js:
(test):
* web-platform-tests/streams/readable-streams/tee.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/tee.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/tee.html.
* web-platform-tests/streams/readable-streams/templated.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/templated.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/templated.html.
* web-platform-tests/streams/readable-streams/w3c-import.log: Added.
* web-platform-tests/streams/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/domparsing/w3c-import.log.
* web-platform-tests/streams/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/w3c-import.log.

LayoutTests:

* platform/mac/TestExpectations: Renaming test filenames, and adding test expectation to area-coords.html.

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

4 years ago[EFL] Remove WebUIPopupMenuClient
ryuan.choi@navercorp.com [Fri, 26 Feb 2016 06:45:41 +0000 (06:45 +0000)]
[EFL] Remove WebUIPopupMenuClient
https://bugs.webkit.org/show_bug.cgi?id=154717

Reviewed by Gyuyoung Kim.

WebUIPopupMenuClient is only for EFL to expose WebPopupMenuProxy and WebPopupItem to WK C APIs.
This patch removes it and related code.

* PlatformEfl.cmake: Removed WKPopupItem related files from source list.
* UIProcess/API/C/efl/WKAPICastEfl.h: Removed WKPopupMenu related code.
* UIProcess/API/C/efl/WKPageEfl.cpp: Removed.
* UIProcess/API/C/efl/WKPageEfl.h: Removed.
* UIProcess/API/C/efl/WKPopupItem.cpp: Removed.
* UIProcess/API/C/efl/WKPopupItem.h: Removed.
* UIProcess/API/C/efl/WKPopupMenuListener.cpp: Removed.
* UIProcess/API/C/efl/WKPopupMenuListener.h: Removed.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::requestPopupMenu):
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/ewk_popup_menu.cpp:
(EwkPopupMenu::EwkPopupMenu):
(EwkPopupMenu::close):
(EwkPopupMenu::setSelectedIndex):
* UIProcess/API/efl/ewk_popup_menu_item.cpp: Used WebPopupItem and others instead of WK C APIs.
* UIProcess/API/efl/ewk_popup_menu_item_private.h: Ditto.
* UIProcess/API/efl/ewk_popup_menu_private.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close): Removed unnecessary EFL guards.
(WebKit::WebPageProxy::showPopupMenu): Ditto.
(WebKit::WebPageProxy::hidePopupMenu): Ditto.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPopupMenuProxy.h:
* UIProcess/efl/PageUIClientEfl.cpp: Removed WKPopupMenuListener related code.
(WebKit::PageUIClientEfl::PageUIClientEfl): Deleted.
(WebKit::PageUIClientEfl::showPopupMenu): Deleted.
(WebKit::PageUIClientEfl::hidePopupMenu): Deleted.
* UIProcess/efl/PageUIClientEfl.h:
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::initializeUIPopupMenuClient): Deleted.
* UIProcess/efl/WebPopupMenuListenerEfl.cpp:
(WebKit::WebPopupMenuListenerEfl::WebPopupMenuListenerEfl): Deleted.
(WebKit::WebPopupMenuListenerEfl::valueChanged): Deleted.
* UIProcess/efl/WebPopupMenuListenerEfl.h:
(WebKit::WebPopupMenuListenerEfl::create): Deleted.
* UIProcess/efl/WebPopupMenuProxyEfl.cpp: Used WebPopupItem and others instead of WK C APIs.
* UIProcess/efl/WebPopupMenuProxyEfl.h: Ditto.
(WebKit::WebPopupMenuProxyEfl::create):
* UIProcess/efl/WebUIPopupMenuClient.cpp: Removed.
* UIProcess/efl/WebUIPopupMenuClient.h: Removed.
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::createPopupMenuProxy): Used WebPopupItem and others instead of WK C APIs.

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

4 years agoFont size computed style is innaccurate
mmaxfield@apple.com [Fri, 26 Feb 2016 06:38:53 +0000 (06:38 +0000)]
Font size computed style is innaccurate
https://bugs.webkit.org/show_bug.cgi?id=154705
<rdar://problem/23474068>

Reviewed by Timothy Hatcher.

Source/WebCore:

Safari rounds the font size value reported to getComputedStyle(). Neither Firefox
nor Chrome do this.

Covered by existing tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
(WebCore::fontSizeFromStyle):

LayoutTests:

Update expected results.

* css3/calc/font-size-fractional-expected.txt:
* css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html:
* css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt:
* editing/mac/attributed-string/font-size-expected.txt:
* editing/mac/attributed-string/vertical-align-expected.txt:
* platform/mac-mavericks/editing/mac/attributed-string/font-size-expected.txt:
* platform/mac-mavericks/editing/mac/attributed-string/vertical-align-expected.txt:
* platform/mac-yosemite/editing/mac/attributed-string/font-size-expected.txt:
* platform/mac-yosemite/editing/mac/attributed-string/vertical-align-expected.txt:

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

4 years ago[JSC] Be aggressive with OSR Entry to FTL if the DFG function was only used for OSR...
commit-queue@webkit.org [Fri, 26 Feb 2016 05:59:48 +0000 (05:59 +0000)]
[JSC] Be aggressive with OSR Entry to FTL if the DFG function was only used for OSR Entry itself
https://bugs.webkit.org/show_bug.cgi?id=154575

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-02-25
Reviewed by Filip Pizlo.

I noticed that imaging-gaussian-blur spends most of its
samples in DFG code despite executing most of the loop
iterations in FTL.

On this particular test, the main function is only entered
once and have a very heavy loop there. What happens is DFG
starts by compiling the full function in FTL. That takes about
8 to 10 milliseconds during which the DFG code makes very little
progress. The calls to triggerOSREntryNow() try to OSR Enter
for a while then finally start compiling something. By the time
the function is ready, we have wasted a lot of time in DFG code.

What this patch does is set a flag when a DFG function is entered.
If we try to triggerOSREntryNow() and the flag was never set,
we start compiling both the full function and the one for OSR Entry.

* dfg/DFGJITCode.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileEntryExecutionFlag):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGJITCompiler.h:
* dfg/DFGOperations.cpp:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan): Deleted.
* dfg/DFGPlan.h:
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):

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

4 years agoREGRESSION(r195795): [WK2] fast/text/crash-complex-text-surrogate.html is flakey
mmaxfield@apple.com [Fri, 26 Feb 2016 05:20:54 +0000 (05:20 +0000)]
REGRESSION(r195795): [WK2] fast/text/crash-complex-text-surrogate.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=154709
<rdar://problem/24483596>

Reviewed by Dan Bernstein.

Tools:

Force auto-activation rules to a consistent state.

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):

LayoutTests:

* platform/mac-wk2/TestExpectations:

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

4 years ago[iOS] Enable PageCache backing store clearing optimization for WebKit2.
akling@apple.com [Fri, 26 Feb 2016 05:01:25 +0000 (05:01 +0000)]
[iOS] Enable PageCache backing store clearing optimization for WebKit2.
<https://webkit.org/b/154712>

Reviewed by Anders Carlsson.

We had an optimization for iOS where we'd tear down the compositing tree for
pages in the page cache, to save memory, but we were only enabling it when
instantiating a WebKit1 web view.

This patch enables the optimization for WebKit2 as well.

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

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

4 years ago[Web IDL] Mark DOMString parameters as nullable when they should be
cdumez@apple.com [Fri, 26 Feb 2016 04:36:37 +0000 (04:36 +0000)]
[Web IDL] Mark DOMString parameters as nullable when they should be
https://bugs.webkit.org/show_bug.cgi?id=154666

Reviewed by Darin Adler.

Source/WebCore:

Mark DOMString parameters as nullable when they should be. We previously
emulated nullable DOMString attributes by using:
[TreatNullAs=NullString, TreatUndefinedAs=NullString]
However, this was non-standard and very verbose. Also, developers would
sometimes forget the [TreatUndefinedAs=NullString] part and the behavior
would end up being wrong for undefined.

After this clean up, the non-standard [TreatUndefinedAs=NullString] is
no longer used so this patch drops support for it. Only
[TreatNullAs=NullString] remains and this one will be renamed to
[TreatNullAs=EmptyString] via Bug 154654 to match Web IDL standard.

Tests: fast/dom/Element/getElementsByTagNameNS-nullable.html
       fast/dom/Node/nullable-parameters.html
       fast/events/storageevent-initStorageEvent-nullable.html

* Modules/mediastream/RTCPeerConnection.idl:
Drop [TreatUndefinedAs=NullString] from createDataChannel()'s first
parameter instead of marking it as nullable. This matches the
specification:
- http://w3c.github.io/webrtc-pc/#rtcpeerconnection-interface-extensions-1
This means there is a slight behavior change when undefined is passed, it
now becomes the string "undefined" instead of a null String.

* bindings/scripts/CodeGeneratorJS.pm:
(JSValueToNative):
Drop handling of [TreatUndefinedAs=] as it is no longer used.

* bindings/scripts/IDLAttributes.txt:
Drop support for [TreatUndefinedAs=] as it is no longer used.

* bindings/scripts/test/TestObj.idl:

* dom/DOMImplementation.idl:
Make a few parameters nullable and drop [TreatNullAs=NullString,
TreatUndefinedAs=NullString]. There is no web-exposed behavior
change.

* dom/Document.idl:
- Make a few parameters nullable and drop [TreatNullAs=NullString,
  TreatUndefinedAs=NullString]. There is no web-exposed behavior
  change from this.
- Drop these attributes from ObjC-specific bindings as they only
  matter to JS bindings.
- The namespaceURI parameter to getElementsByTagNameNS() is now marked
  as nullable even though it only treated null as a null String, not
  undefined. This was a bug and did not match the specification:
  https://dom.spec.whatwg.org/#document

* dom/Element.idl:
- Make a few parameters nullable and drop [TreatNullAs=NullString,
  TreatUndefinedAs=NullString]. There is no web-exposed behavior
  change from this.
- Drop these attributes from ObjC-specific bindings as they only
  matter to JS bindings.
- The namespaceURI parameter to getElementsByTagNameNS() is now marked
  as nullable even though it only treated null as a null String, not
  undefined. This was a bug and did not match the specification:
  https://dom.spec.whatwg.org/#interface-element

* dom/NamedNodeMap.idl:
Make a few parameters nullable and drop [TreatNullAs=NullString,
TreatUndefinedAs=NullString]. There is no web-exposed behavior
change from this.

* dom/Node.idl:
- Drop these attributes from isSupported() as this is not exposed
  to JS (only native bindings) and these attributes only matter to
  JS bindings.
- Make the first parameter to lookupPrefix() / isDefaultNamespace()
  and lookupNamespaceURI() nullable. Previously, we treated null
  as a null string but not undefined. There is therefore a slight
  behavior change but this matches the specification:
  https://dom.spec.whatwg.org/#node

* fileapi/Blob.idl:
* html/HTMLButtonElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTextAreaElement.idl:
* page/DOMWindow.idl:
Make a few parameters nullable and drop [TreatNullAs=NullString,
TreatUndefinedAs=NullString]. There is no web-exposed behavior
change from this.

* storage/StorageEvent.idl:
Mark oldValueArg / newValueArg parameters to initStorageEvent()
as nullable. Previously, we only treated null as a null string,
not undefined. This is therefore a slight behavior change but
it matches the specification:
https://www.w3.org/TR/webstorage/#storageeventinit

LayoutTests:

Add test coverage for minor behavioral changes in this patch.

* fast/dom/Element/getElementsByTagNameNS-nullable-expected.txt: Added.
* fast/dom/Element/getElementsByTagNameNS-nullable.html: Added.
* fast/dom/Node/nullable-parameters-expected.txt: Added.
* fast/dom/Node/nullable-parameters.html: Added.
* fast/dom/Node/resources/testdoc.xml: Added.
* fast/dom/Node/resources/testdoc2.xml: Added.
* fast/events/storageevent-initStorageEvent-nullable-expected.txt: Added.
* fast/events/storageevent-initStorageEvent-nullable.html: Added.

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

4 years ago[JSC] Temporal Dead Zone checks on "this" are eliminated when doing OSR Entry to FTL
benjamin@webkit.org [Fri, 26 Feb 2016 02:04:42 +0000 (02:04 +0000)]
[JSC] Temporal Dead Zone checks on "this" are eliminated when doing OSR Entry to FTL
https://bugs.webkit.org/show_bug.cgi?id=154664

Reviewed by Saam Barati.

When doing OSR Enter into a constructor, we lose the information
that this may have been set to empty by a previously executed block.

All the code just assumed the type for a FlushedJS value and thus
not an empty value. It was then okay to eliminate the TDZ checks.

In this patch, the values on root entry now assume they may be empty.
As a result, the SetArgument() for "this" has "empty" as possible
type and the TDZ checks are no longer eliminated.

* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::initialize):

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

4 years agoREGRESSION (r196744): NetworkExtension.framework and NEFilterSource class are not...
ddkilzer@apple.com [Fri, 26 Feb 2016 02:04:01 +0000 (02:04 +0000)]
REGRESSION (r196744): NetworkExtension.framework and NEFilterSource class are not available on Recovery partition
<http://webkit.org/b/154703>

Reviewed by Andy Estes.

* platform/cocoa/NetworkExtensionContentFilter.mm: Make
soft-linking of NetworkExtension.framework and NEFilterSource
class optional since they are not available on the Recovery
partition.  Note that NetworkExtensionContentFilter::enabled()
does not need to change since it already had the correct
behavior when getNEFilterSourceClass() returned nullptr.

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

4 years agoUpdate the definition of ENABLE_VIDEO_PRESENTATION_MODE for Mac platform
adachan@apple.com [Fri, 26 Feb 2016 02:03:22 +0000 (02:03 +0000)]
Update the definition of ENABLE_VIDEO_PRESENTATION_MODE for Mac platform
https://bugs.webkit.org/show_bug.cgi?id=154702

Reviewed by Dan Bernstein.

* Configurations/FeatureDefines.xcconfig:# Please enter the commit message for your changes. Lines starting

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

4 years agoSkipping flaky test storage/indexeddb/intversion-open-in-upgradeneeded.html on mac-wk2
ryanhaddad@apple.com [Fri, 26 Feb 2016 01:56:25 +0000 (01:56 +0000)]
Skipping flaky test storage/indexeddb/intversion-open-in-upgradeneeded.html on mac-wk2
https://bugs.webkit.org/show_bug.cgi?id=154706

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agoUnreivewed build fix for r197150.
jiewen_tan@apple.com [Fri, 26 Feb 2016 01:33:37 +0000 (01:33 +0000)]
Unreivewed build fix for r197150.

* TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.mm:

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

4 years agoRestrict information passed with navigation action which is triggered by untrusted...
jiewen_tan@apple.com [Fri, 26 Feb 2016 01:22:33 +0000 (01:22 +0000)]
Restrict information passed with navigation action which is triggered by untrusted event
https://bugs.webkit.org/show_bug.cgi?id=154571
<rdar://problem/15967937>

Reviewed by Andy Estes.

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::actionDictionary):

Source/WebKit2:

When navigation action is triggered by an untrusted event, we should be more restricted of
what information should be passed to the clients to lower the risk that clients could
be fooled by the untrusted event.

In this patch, we drop the modifiers for key state events and set the mouse button to NoButton
for mouse events.

* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.mm: Added.
(-[WKNavigationActionDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(TestWebKitAPI::TEST):
(-[NavigationActionDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
* TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.html: Added.

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

4 years agoChange ASSERT to RELEASE_ASSERT in SOFT_LINK_CLASS() macro
ddkilzer@apple.com [Fri, 26 Feb 2016 01:00:24 +0000 (01:00 +0000)]
Change ASSERT to RELEASE_ASSERT in SOFT_LINK_CLASS() macro

Follow-up fix noted by Andy Estes for:

    [Cocoa] Always check the return value of dlopen() and dlsym() in Release builds
    <http://webkit.org/b/154364>

* platform/mac/SoftLinking.h:
(SOFT_LINK_CLASS): Change ASSERT to RELEASE_ASSERT to check the
return value of objc_getClass().  This matches what we do for
SOFT_LINK_CLASS_FOR_SOURCE().

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

4 years ago[iOS Simulator] http/tests/security/contentSecurityPolicy/1.1/plugintypes tests failing
dbates@webkit.org [Fri, 26 Feb 2016 00:58:11 +0000 (00:58 +0000)]
[iOS Simulator] http/tests/security/contentSecurityPolicy/1.1/plugintypes tests failing
https://bugs.webkit.org/show_bug.cgi?id=154652

Skip Content Security Policy plugin-types tests when run in the iOS simulator app because
plugins are not supported on iOS.

* platform/ios-simulator/TestExpectations:

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

4 years agoReplace RefCounter::Token implementation with RefPtr
barraclough@apple.com [Fri, 26 Feb 2016 00:54:13 +0000 (00:54 +0000)]
Replace RefCounter::Token implementation with RefPtr
https://bugs.webkit.org/show_bug.cgi?id=154698

Reviewed by Anders Carlsson.

* wtf/RefCounter.h:
(WTF::RefCounter::RefCounter):
(WTF::RefCounter::count):
(WTF::RefCounter::value):
(WTF::RefCounter<T>::~RefCounter):
(WTF::RefCounter::Token::Token): Deleted.
(WTF::RefCounter::Token::operator bool): Deleted.
(WTF::RefCounter<T>::Token::Token): Deleted.
(WTF::=): Deleted.
    - Delete.

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

4 years agoShould template RefCounter instead of RefCounter::Token
barraclough@apple.com [Fri, 26 Feb 2016 00:45:35 +0000 (00:45 +0000)]
Should template RefCounter instead of RefCounter::Token
https://bugs.webkit.org/show_bug.cgi?id=154691

Speculative windows build fix.

* wtf/RefCounter.h:
(WTF::RefCounter::RefCounter):
(WTF::RefCounter::count):

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

4 years ago[Win] [SVG -> OTF Converter] Support the SVG -> OTF Font Converter
mmaxfield@apple.com [Fri, 26 Feb 2016 00:33:39 +0000 (00:33 +0000)]
[Win] [SVG -> OTF Converter] Support the SVG -> OTF Font Converter
https://bugs.webkit.org/show_bug.cgi?id=143402

Reviewed by Alex Christensen.

.:

Turn on by default, and turn on for Windows.

EFL and GTK already explicitly disable it in OptionsEfl.cmake and OptionsGTK.cmake.

* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:

LayoutTests:

Rebaseline many tests.

There are some known bugs (which are marked in platform/win/TestExpecations):
webkit.org/b/137204 The SVG -> OTF Font converter outputs 'kern' tables instead of 'GPOS' tables
webkit.org/b/154690 SVG Fonts don't draw multibyte characters
webkit.org/b/137096 The SVG -> OTF Font Converter does not work with SVG's "altglyph" facility
webkit.org/b/137093 Same thing with the "lang" attribute

* platform/win/svg/W3C-SVG-1.1/fonts-desc-02-t-expected.txt: Added.
* platform/win/svg/W3C-SVG-1.1/text-text-06-t-expected.txt: Added.
* platform/win/TestExpectations:
* platform/win/svg/W3C-SVG-1.1-SE/color-prop-05-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/filters-felem-01-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/interact-pointer-03-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/pservers-pattern-04-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/struct-use-14-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/text-tref-03-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/text-tspan-02-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/types-dom-07-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1/animate-elem-03-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/animate-elem-24-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/animate-elem-36-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/animate-elem-40-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/filters-light-04-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1/filters-turb-02-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1/fonts-elem-05-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/fonts-elem-06-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1/masking-mask-01-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1/render-elems-06-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/render-elems-07-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/render-elems-08-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/render-groups-01-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1/render-groups-03-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/text-fonts-03-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt:
* platform/win/svg/batik/text/textEffect-expected.txt:
* platform/win/svg/batik/text/textEffect3-expected.txt:
* platform/win/svg/custom/glyph-selection-arabic-forms-expected.txt:
* platform/win/svg/custom/svg-fonts-in-html-expected.txt:
* platform/win/svg/custom/svg-fonts-with-no-element-reference-expected.txt: Added.
* platform/win/svg/custom/svg-fonts-word-spacing-expected.txt:
* platform/win/svg/foreignObject/text-tref-02-b-expected.txt:
* platform/win/svg/hixie/intrinsic/003-expected.txt:
* platform/win/svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures-expected.txt:
* platform/win/svg/text/text-text-04-t-expected.txt:
* platform/win/svg/text/text-text-05-t-expected.txt:
* platform/win/svg/text/text-text-06-t-expected.txt:
* platform/win/svg/wicd/test-rightsizing-b-expected.txt:
* platform/win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt:
* platform/win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:

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

4 years ago[ES6] for...in iteration doesn't comply with the specification
sbarati@apple.com [Fri, 26 Feb 2016 00:15:58 +0000 (00:15 +0000)]
[ES6] for...in iteration doesn't comply with the specification
https://bugs.webkit.org/show_bug.cgi?id=154665

Reviewed by Michael Saboff.

If you read ForIn/OfHeadEvaluation inside the spec:
https://tc39.github.io/ecma262/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind
It calls EnumerateObjectProperties(obj) to get a set of properties
to enumerate over (it models this "set" as en ES6 generator function).
EnumerateObjectProperties is defined in section 13.7.5.15:
https://tc39.github.io/ecma262/#sec-enumerate-object-properties
The implementation calls Reflect.getOwnPropertyDescriptor(.) on the
properties it sees. We must do the same by modeling the operation as
a [[GetOwnProperty]] instead of a [[HasProperty]] internal method call.

* jit/JITOperations.cpp:
* jit/JITOperations.h:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/JSObject.cpp:
(JSC::JSObject::hasProperty):
(JSC::JSObject::hasPropertyGeneric):
* runtime/JSObject.h:
* tests/stress/proxy-get-own-property.js:
(assert):
(let.handler.getOwnPropertyDescriptor):
(i.set assert):

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

4 years agoUnreviewed, rolling out r197137.
commit-queue@webkit.org [Thu, 25 Feb 2016 23:59:21 +0000 (23:59 +0000)]
Unreviewed, rolling out r197137.
https://bugs.webkit.org/show_bug.cgi?id=154700

broke windows build (Requested by alexchristensen on #webkit).

Reverted changeset:

"Replace RefCounter::Token implementation with RefPtr"
https://bugs.webkit.org/show_bug.cgi?id=154698
http://trac.webkit.org/changeset/197137

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

4 years agoCSP: Remove SecurityPolicy script interface
dbates@webkit.org [Thu, 25 Feb 2016 23:52:07 +0000 (23:52 +0000)]
CSP: Remove SecurityPolicy script interface
https://bugs.webkit.org/show_bug.cgi?id=154694
<rdar://problem/24846482>

Reviewed by Andy Estes.

Source/WebCore:

Remove the Content Security Policy script interface, SecurityPolicy. This interface was only
enabled when building with ENABLE(CSP_NEXT) (disabled by default).

For completeness, the SecurityPolicy interface was removed from the Content Security Policy 1.1 spec.
in <https://github.com/w3c/webappsec/commit/18882953ce2d8afca25f685557fef0e0471b2c9a> (12/26/2013).

* CMakeLists.txt: Remove files to DOMSecurityPolicy.{cpp, idl}.
* DerivedSources.cpp: Remove file JSDOMSecurityPolicy.cpp.
* DerivedSources.make: Remove file DOMSecurityPolicy.idl.
* PlatformGTK.cmake: Ditto.
* PlatformMac.cmake: Ditto.
* WebCore.xcodeproj/project.pbxproj: Remove files DOMSecurityPolicy files.
* bindings/scripts/CodeGeneratorGObject.pm: Remove reference to DOMSecurityPolicy.
* dom/Document.cpp:
(WebCore::Document::securityPolicy): Deleted.
* dom/Document.h:
* dom/Document.idl: Remove attribute securityPolicy.
* page/DOMSecurityPolicy.cpp: Removed.
* page/DOMSecurityPolicy.h: Removed.
* page/DOMSecurityPolicy.idl: Removed.

LayoutTests:

Remove SecurityPolicy tests and update platform-specific expected results as needed.

* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowconnectionto-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowconnectionto.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-alloweval-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-alloweval.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowfontfrom-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowfontfrom.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowformaction-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowformaction.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowframefrom-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowframefrom.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowimagefrom-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowimagefrom.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinescript-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinescript.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinestyle-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinestyle.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowmediafrom-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowmediafrom.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowobjectfrom-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowobjectfrom.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowplugintype-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowplugintype.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowscriptfrom-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowscriptfrom.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowstylefrom-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowstylefrom.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-isactive-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-isactive.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-reporturi-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-reporturi.html: Removed.
* http/tests/security/contentSecurityPolicy/resources/securitypolicy-tests-base.js: Removed.
* platform/gtk/js/dom/global-constructors-attributes-expected.txt: Update expected result as needed.
* platform/win/js/dom/global-constructors-attributes-expected.txt: Ditto.

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

4 years agoDon't clear the weak JSString cache on memory pressure.
akling@apple.com [Thu, 25 Feb 2016 23:24:41 +0000 (23:24 +0000)]
Don't clear the weak JSString cache on memory pressure.
<https://webkit.org/b/154693>

Reviewed by Antti Koivisto.

This was stupid. The cache is a WeakGCMap, so all the JSStrings pointed to are
still alive anyway. This way we keep the ability to deduplicate common strings.

* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseNoncriticalMemory): Deleted.

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

4 years agoDrop [TreatReturnedNullStringAs=Undefined] WebKit-specific IDL attribute
cdumez@apple.com [Thu, 25 Feb 2016 23:24:14 +0000 (23:24 +0000)]
Drop [TreatReturnedNullStringAs=Undefined] WebKit-specific IDL attribute
https://bugs.webkit.org/show_bug.cgi?id=154662

Reviewed by Darin Adler.

Source/WebCore:

Drop [TreatReturnedNullStringAs=Undefined] WebKit-specific IDL attribute.
This has no standard equivalent and all uses in WebKit are either useless
or wrong.

Test: fast/frames/detached-frame-document-defaultCharset.html

* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Deleted.
* bindings/scripts/IDLAttributes.txt:
Drop support for [TreatReturnedNullStringAs=X] entirely.

* dom/Document.cpp:
(WebCore::Document::defaultCharset):
Fall back to return "UTF-8" instead of the null string, similarly to
what is done in for Document.characterSet. Note that this attribute
is non-standard and is an IE extension. Firefox never supported it
and Chrome dropped it last year.

* dom/Document.idl:
- Drop extended attribute for Document.defaultCharset as the
  implementation has been updated to never return a null String.
- Drop extended attribute for Document.readyState. It was useless
  because the implementation could never return a null String.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::getAllResponseHeaders):
Update implementation to return emptyString() instead of "" in case
of error.

* xml/XMLHttpRequest.idl:
Drop extended attribute from XMLHttpRequest.getAllResponseHeaders().
It was useless because the implementation could never return a
null String.

* xml/XSLTProcessor.idl:
Drop extended attribute from XSLTProcessor.getParameter(). The
operation is already marked as [Custom] so the extended attribute
had no effect.

LayoutTests:

Add layout test to cover the return value of document.defaultCharset before
and after its frame is detached.

* fast/frames/detached-frame-document-defaultCharset-expected.txt: Added.
* fast/frames/detached-frame-document-defaultCharset.html: Added.

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

4 years agoUnreviewed test gardening.
beidson@apple.com [Thu, 25 Feb 2016 23:12:50 +0000 (23:12 +0000)]
Unreviewed test gardening.

Fix a test flake where order doesn't matter.

* platform/wk2/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt: Removed.
* storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt:
* storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private-expected.txt:
* storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js:
(prepareDatabase.request.onblocked):
(onOpenSuccess):

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

4 years agoReplace RefCounter::Token implementation with RefPtr
barraclough@apple.com [Thu, 25 Feb 2016 23:10:31 +0000 (23:10 +0000)]
Replace RefCounter::Token implementation with RefPtr
https://bugs.webkit.org/show_bug.cgi?id=154698

Reviewed by Anders Carlsson.

* wtf/RefCounter.h:
(WTF::RefCounter::RefCounter):
(WTF::RefCounter::count):
(WTF::RefCounter::value):
(WTF::RefCounter<T>::~RefCounter):
(WTF::RefCounter::Token::Token): Deleted.
(WTF::RefCounter::Token::operator bool): Deleted.
(WTF::RefCounter<T>::Token::Token): Deleted.
(WTF::=): Deleted.
    - Delete.

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

4 years ago[ES6] Implement Proxy.[[Set]]
sbarati@apple.com [Thu, 25 Feb 2016 22:58:23 +0000 (22:58 +0000)]
[ES6] Implement Proxy.[[Set]]
https://bugs.webkit.org/show_bug.cgi?id=154511

Reviewed by Filip Pizlo.

This patch is mostly an implementation of
Proxy.[[Set]] with respect to section 9.5.9
of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver

This patch also changes JSObject::putInline and JSObject::putByIndex
to be aware that a Proxy in the prototype chain will intercept
property accesses.

* runtime/JSObject.cpp:
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
* runtime/JSObject.h:
* runtime/JSObjectInlines.h:
(JSC::JSObject::canPerformFastPutInline):
(JSC::JSObject::putInline):
* runtime/JSType.h:
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::getOwnPropertySlotByIndex):
(JSC::ProxyObject::performPut):
(JSC::ProxyObject::put):
(JSC::ProxyObject::putByIndexCommon):
(JSC::ProxyObject::putByIndex):
(JSC::performProxyCall):
(JSC::ProxyObject::getCallData):
(JSC::performProxyConstruct):
(JSC::ProxyObject::deletePropertyByIndex):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
(JSC::ProxyObject::create):
(JSC::ProxyObject::createStructure):
(JSC::ProxyObject::target):
(JSC::ProxyObject::handler):
* tests/es6.yaml:
* tests/stress/proxy-set.js: Added.
(assert):
(throw.new.Error.let.handler.set 45):
(throw.new.Error):
(let.target.set x):
(let.target.get x):
(set let):

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

4 years agoRemoving failure expectation for 26 editing tests that now pass on ios-simulator
ryanhaddad@apple.com [Thu, 25 Feb 2016 22:44:30 +0000 (22:44 +0000)]
Removing failure expectation for 26 editing tests that now pass on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152131

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:

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

4 years ago[JSC] Remove a useless "Move" in the lowering of Select
commit-queue@webkit.org [Thu, 25 Feb 2016 22:37:44 +0000 (22:37 +0000)]
[JSC] Remove a useless "Move" in the lowering of Select
https://bugs.webkit.org/show_bug.cgi?id=154670

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-02-25
Reviewed by Geoffrey Garen.

I left the Move instruction when creating the aliasing form
of Select.

On ARM64, that meant a useless move for any case that can't
be coalesced.

On x86, that meant an extra constraint on child2, making it
stupidly hard to alias child1.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createSelect): Deleted.

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

4 years agoHook up fullscreenMayReturnToInline() in WKPageUIClient
adachan@apple.com [Thu, 25 Feb 2016 22:37:15 +0000 (22:37 +0000)]
Hook up fullscreenMayReturnToInline() in WKPageUIClient
https://bugs.webkit.org/show_bug.cgi?id=154661

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:

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

4 years agoShould template RefCounter instead of RefCounter::Token
barraclough@apple.com [Thu, 25 Feb 2016 22:24:32 +0000 (22:24 +0000)]
Should template RefCounter instead of RefCounter::Token
https://bugs.webkit.org/show_bug.cgi?id=154691

Reviewed by Anders Carlsson.

Source/WebCore:

Mechanical update per RefCounter interface change.

* page/PageThrottler.cpp:
(WebCore::PageThrottler::mediaActivityToken):
(WebCore::PageThrottler::pageLoadActivityToken):
(WebCore::PageThrottler::setActivityFlag):
* page/PageThrottler.h:
* platform/VNodeTracker.h:

Source/WebKit2:

Mechanical update per RefCounter interface change.

* UIProcess/Plugins/PluginProcessManager.h:
(WebKit::PluginProcessManager::processSuppressionDisabledToken):
(WebKit::PluginProcessManager::processSuppressionDisabled):
* UIProcess/ProcessThrottler.h:
(WebKit::ProcessThrottler::foregroundActivityToken):
(WebKit::ProcessThrottler::backgroundActivityToken):
* UIProcess/WebProcessPool.h:

Source/WTF:

My real goal here is to make the counter accurate. Currently returning a Token from token<>()
results in ref-count churn. Fixing this either means changing the return value, or improving
Token (which will probably mean replacing it with RefPtr). Either way would break the current
type checking. Move type tag to RefCount so this can still be enforced.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/RefCounter.cpp: Removed.
    - Removed RefCounter.cpp.
* wtf/RefCounter.h:
(WTF::RefCounter::Token::Token):
(WTF::RefCounter::Token::operator bool):
(WTF::RefCounter::RefCounter):
(WTF::RefCounter::count):
(WTF::RefCounter::value):
(WTF::RefCounter<T>::Count::ref):
(WTF::RefCounter<T>::Count::deref):
(WTF::RefCounter<T>::RefCounter):
(WTF::RefCounter<T>::~RefCounter):
(WTF::RefCounter<T>::Token::Token):
(WTF::=):
(WTF::RefCounter::token): Deleted.
(WTF::RefCounter::Token<T>::Token): Deleted.
    - RefCounter -> RefCounter<T>,
    - Token<T> -> Token,
    - renamed token<>() -> count().

Tools:

Mechanical update per RefCounter interface change.

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

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

4 years agoRemove LegacyIDB.
beidson@apple.com [Thu, 25 Feb 2016 22:19:06 +0000 (22:19 +0000)]
Remove LegacyIDB.
https://bugs.webkit.org/show_bug.cgi?id=150854

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (No change in behavior).

* CMakeLists.txt:
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):
* Modules/indexeddb/IDBDatabaseMetadata.cpp: Removed.
* Modules/indexeddb/IDBDatabaseMetadata.h: Removed.
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBIndexMetadata.h: Removed.
* Modules/indexeddb/IDBObjectStoreMetadata.h: Removed.
* Modules/indexeddb/IDBOperation.h: Removed.
* Modules/indexeddb/IDBServerConnection.h: Removed.
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
(WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
* Modules/indexeddb/legacy/IDBCallbacks.h: Removed.
* Modules/indexeddb/legacy/IDBCursorBackend.cpp: Removed.
* Modules/indexeddb/legacy/IDBCursorBackend.h: Removed.
* Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp: Removed.
* Modules/indexeddb/legacy/IDBCursorBackendOperations.h: Removed.
* Modules/indexeddb/legacy/IDBDatabaseBackend.cpp: Removed.
* Modules/indexeddb/legacy/IDBDatabaseBackend.h: Removed.
* Modules/indexeddb/legacy/IDBDatabaseCallbacks.h: Removed.
* Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp: Removed.
* Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h: Removed.
* Modules/indexeddb/legacy/IDBFactoryBackendInterface.h: Removed.
* Modules/indexeddb/legacy/IDBPendingDeleteCall.h: Removed.
* Modules/indexeddb/legacy/IDBPendingOpenCall.h: Removed.
* Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp: Removed.
* Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h: Removed.
* Modules/indexeddb/legacy/IDBTransactionBackend.cpp: Removed.
* Modules/indexeddb/legacy/IDBTransactionBackend.h: Removed.
* Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp: Removed.
* Modules/indexeddb/legacy/IDBTransactionBackendOperations.h: Removed.
* Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp: Removed.
* Modules/indexeddb/legacy/IDBTransactionCoordinator.h: Removed.
* Modules/indexeddb/legacy/LegacyAny.cpp: Removed.
* Modules/indexeddb/legacy/LegacyAny.h: Removed.
* Modules/indexeddb/legacy/LegacyCursor.cpp: Removed.
* Modules/indexeddb/legacy/LegacyCursor.h: Removed.
* Modules/indexeddb/legacy/LegacyCursorWithValue.cpp: Removed.
* Modules/indexeddb/legacy/LegacyCursorWithValue.h: Removed.
* Modules/indexeddb/legacy/LegacyDatabase.cpp: Removed.
* Modules/indexeddb/legacy/LegacyDatabase.h: Removed.
* Modules/indexeddb/legacy/LegacyFactory.cpp: Removed.
* Modules/indexeddb/legacy/LegacyFactory.h: Removed.
* Modules/indexeddb/legacy/LegacyIndex.cpp: Removed.
* Modules/indexeddb/legacy/LegacyIndex.h: Removed.
* Modules/indexeddb/legacy/LegacyObjectStore.cpp: Removed.
* Modules/indexeddb/legacy/LegacyObjectStore.h: Removed.
* Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp: Removed.
* Modules/indexeddb/legacy/LegacyOpenDBRequest.h: Removed.
* Modules/indexeddb/legacy/LegacyRequest.cpp: Removed.
* Modules/indexeddb/legacy/LegacyRequest.h: Removed.
* Modules/indexeddb/legacy/LegacyTransaction.cpp: Removed.
* Modules/indexeddb/legacy/LegacyTransaction.h: Removed.
* Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp: Removed.
* Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Removed.
* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
(WebCore::IDBServer::SQLiteIDBCursor::establishStatement):
(WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
* Modules/indexeddb/server/SQLiteIDBCursor.h:
* Modules/indexeddb/shared/IDBIndexInfo.h:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::generateIndexKeysForValue): Deleted.
* bindings/js/IDBBindingUtilities.h:
* bindings/js/JSMainThreadExecState.cpp:
(WebCore::JSMainThreadExecState::didLeaveScriptContext): Deleted.
* inspector/InspectorIndexedDBAgent.cpp:
* loader/EmptyClients.cpp:
* page/DatabaseProvider.cpp:
(WebCore::DatabaseProvider::idbFactoryBackend): Deleted.
* page/DatabaseProvider.h:
* platform/CrossThreadCopier.cpp:
(WebCore::IDBDatabaseMetadata>::copy): Deleted.
(WebCore::IDBIndexMetadata>::copy): Deleted.
(WebCore::IDBObjectStoreMetadata>::copy): Deleted.
* platform/CrossThreadCopier.h:

Source/WebKit:

* Storage/WebDatabaseProvider.cpp:
(WebDatabaseProvider::createIDBFactoryBackend): Deleted.
* Storage/WebDatabaseProvider.h:

Source/WebKit2:

* CMakeLists.txt:
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::getOrCreateLegacyUniqueIDBDatabase): Deleted.
(WebKit::DatabaseProcess::removeLegacyUniqueIDBDatabase): Deleted.
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didClose):
(WebKit::DatabaseToWebProcessConnection::didReceiveMessage): Deleted.
(WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage): Deleted.
(WebKit::DatabaseToWebProcessConnection::establishIDBConnection): Deleted.
(WebKit::DatabaseToWebProcessConnection::removeDatabaseProcessIDBConnection): Deleted.
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* DatabaseProcess/DatabaseToWebProcessConnection.messages.in:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp: Removed.
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h: Removed.
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in: Removed.
* DatabaseProcess/IndexedDB/IDBIdentifier.h: Removed.
* DatabaseProcess/IndexedDB/IDBSerialization.cpp: Removed.
* DatabaseProcess/IndexedDB/IDBSerialization.h: Removed.
* DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabase.cpp: Removed.
* DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabase.h: Removed.
* DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabaseIdentifier.cpp: Removed.
* DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabaseIdentifier.h: Removed.
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h: Removed.
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp: Removed.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h: Removed.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp: Removed.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h: Removed.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp: Removed.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h: Removed.
* DerivedSources.make:
* Shared/WebCrossThreadCopier.cpp:
(WebCore::LegacyUniqueIDBDatabaseIdentifier>::copy): Deleted.
(WebCore::IDBIdentifier>::copy): Deleted.
* Shared/WebCrossThreadCopier.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp: Removed.
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h: Removed.
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp: Removed.
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h: Removed.
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in: Removed.
* WebProcess/Databases/WebDatabaseProvider.cpp:
(WebKit::WebDatabaseProvider::createIDBFactoryBackend): Deleted.
* WebProcess/Databases/WebDatabaseProvider.h:
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::didReceiveMessage): Deleted.
(WebKit::WebToDatabaseProcessConnection::registerWebIDBServerConnection): Deleted.
(WebKit::WebToDatabaseProcessConnection::removeWebIDBServerConnection): Deleted.
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

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

4 years agoUnreviewed test gardening.
beidson@apple.com [Thu, 25 Feb 2016 21:38:46 +0000 (21:38 +0000)]
Unreviewed test gardening.

* TestExpectations: Skip a web inspector IndexedDB test for now.

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

4 years agoRemoving a pass expectation for inspector/indexeddb/requestDatabaseNames.html that...
ryanhaddad@apple.com [Thu, 25 Feb 2016 20:32:35 +0000 (20:32 +0000)]
Removing a pass expectation for inspector/indexeddb/requestDatabaseNames.html that overrides the skip r197122

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoUnreviewed, move Aleksandr Skachkov to committers list
gskachkov@gmail.com [Thu, 25 Feb 2016 20:23:57 +0000 (20:23 +0000)]
Unreviewed, move Aleksandr Skachkov to committers list

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

4 years agoREGRESSION (r196268): Many assertion failures and crashes on SVG path animation tests...
said@apple.com [Thu, 25 Feb 2016 19:55:55 +0000 (19:55 +0000)]
REGRESSION (r196268): Many assertion failures and crashes on SVG path animation tests when JS garbage collection happens quickly
https://bugs.webkit.org/show_bug.cgi?id=154331

Reviewed by Darin Adler.

This is not an actual regression. The bug did exist before r196268 but
the whole document was leaking once an SVGAnimatedProperty was created
so there was no way to produce this bug. After fixing the leak, one crash
and one assert got uncovered. Both of them happen because of the fact:
"if an SVGAnimatedProperty is not referenced it will be deleted."

* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::lookupOrCreateDWrapper):
The code in this function was assuming that the wrapper will be created
only once which happens when SVGAnimatedProperty::lookupOrCreateWrapper()
is called. Before making this single call, lookupOrCreateDWrapper() was
building an initial SVGPathSegList from byte stream. But now
SVGAnimatedProperty::lookupWrapper() can return false even after creating
the SVGAnimatedProperty because it was deleted later. Calling
buildSVGPathSegListFromByteStream() more than once was causing
SVGAnimatedListPropertyTearOff::animationStarted() to fire the assertion
ASSERT(m_values.size() == m_wrappers.size()) because the path segments were
appended twice to m_values which is in fact SVGPathElement::m_pathSegList.value.
The fix is to build the initial SVGPathSegList only once which should happen
when m_pathSegList.value.isEmpty().

(WebCore::SVGPathElement::animatedPropertyWillBeDeleted):
* svg/SVGPathElement.h:
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::~SVGAnimatedPathSegListPropertyTearOff):
SVGPathElement is assuming the following equivalence relation:
m_pathSegList.shouldSynchronize ~ SVGAnimatedProperty_is_created_and_not_null.
SVGPathElement::animatedPathSegList() and animatedNormalizedPathSegList()
set m_pathSegList.shouldSynchronize to true when SVGAnimatedProperty is
created but nothing sets m_pathSegList.shouldSynchronize back to false.
This was not a problem when the SVGAnimatedProperty was leaking but after
ensuring it is deleted when it is not referenced this equivalence relation
becomes untrue sometimes. This caused SVGPathElement::svgAttributeChanged()
to crash when we check m_pathSegList.shouldSynchronize and if it is true we
assume that SVGAnimatedProperty::lookupWrapper() will return a non-null pointer
and therefore we deference this pointer and call SVGAnimatedProperty::isAnimating().
To fix this crash we need to set m_pathSegList.shouldSynchronize back to false
when the associated SVGAnimatedProperty is deleted.

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

4 years ago[Win][CMake] Don't use incremental linking
bfulgham@apple.com [Thu, 25 Feb 2016 19:36:52 +0000 (19:36 +0000)]
[Win][CMake] Don't use incremental linking
https://bugs.webkit.org/show_bug.cgi?id=154684
<rdar://problem/24747822>

Reviewed by Alex Christensen.

* PlatformWin.cmake: Make sure the "/INCREMENTAL:NO" flag is used
(overriding "/INCREMENTAL:YES").

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

4 years agoSource/WTF:
weinig@apple.com [Thu, 25 Feb 2016 19:28:42 +0000 (19:28 +0000)]
Source/WTF:
HashMap::ensure() should return an AddResult like all the other add-like functions.
https://bugs.webkit.org/show_bug.cgi?id=154680

Reviewed by Anders Carlsson.

While adopting HashMap::ensure(), I found it was useful in some circumstances to know
if the value was added or not. While I could discern this information by setting a bool
in the passed in lambda, it seemed clearer and more idiomatic to just have ensure return
an AddResult like all the other add-like functions do.

* wtf/HashMap.h:
Change return type of HashMap::ensure() to be an AddResult.

Tools:
HashMap::ensure() should return an AddResult like all the other add-like functions
https://bugs.webkit.org/show_bug.cgi?id=154680

Reviewed by Anders Carlsson.

* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):
Update tests to use/test the new AddResult result.

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

4 years agoModern IDB: WebKit 2 IPC layer.
beidson@apple.com [Thu, 25 Feb 2016 19:21:49 +0000 (19:21 +0000)]
Modern IDB: WebKit 2 IPC layer.
https://bugs.webkit.org/show_bug.cgi?id=153808

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by over 1,000 existing tests).

* Modules/indexeddb/IDBKeyData.h:
(WebCore::IDBKeyData::encode): It's okay to encode Min and Max.
(WebCore::IDBKeyData::decode): It's okay to decode Min and Max.

Source/WebKit2:

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad): This ASSERT fires on most WK2 tests. Alex said remove it.

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::putOrAdd): Properly encode the overwrite flag.

* WebProcess/Databases/WebDatabaseProvider.h: Enable Modern IDB.

LayoutTests:

- Consolidate all test failures to the platform agnostic TestExpectations file.
- Remove all existing WK2-specific results.
- Add one new WK2-specific result.
- Skip two WK2-only failures.

* TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/wk2/TestExpectations:
* platform/wk2/imported/w3c/indexeddb/abort-in-initial-upgradeneeded-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor-advance-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor_advance_index5-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor_advance_index9-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor_advance_objectstore5-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index5-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index6-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index8-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor_continue_invalid-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor_continue_objectstore6-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor_delete_index4-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbcursor_delete_objectstore4-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbdatabase_close2-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbdatabase_deleteObjectStore4-not_reused-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbfactory_deleteDatabase3-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbfactory_open12-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbindex-multientry-big-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbindex_get3-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbindex_get7-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbindex_getKey7-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbindex_openCursor2-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbindex_openKeyCursor3-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbobjectstore_add4-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex2-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex4-deleteIndex-event_order-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbobjectstore_put4-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbtransaction_abort-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/idbversionchangeevent-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/keygenerator-constrainterror-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/keygenerator-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/keygenerator-overflow-expected.txt: Removed.
* platform/wk2/imported/w3c/indexeddb/transaction-requestqueue-expected.txt: Removed.
* platform/wk2/storage/indexeddb/aborted-versionchange-closes-expected.txt: Removed.
* platform/wk2/storage/indexeddb/bad-keypath-expected.txt: Removed.
* platform/wk2/storage/indexeddb/basics-expected.txt: Removed.
* platform/wk2/storage/indexeddb/clear-expected.txt: Removed.
* platform/wk2/storage/indexeddb/create-and-remove-object-store-expected.txt: Removed.
* platform/wk2/storage/indexeddb/create-objectstore-basics-expected.txt: Removed.
* platform/wk2/storage/indexeddb/cursor-continue-dir-expected.txt: Removed.
* platform/wk2/storage/indexeddb/cursor-continue-expected.txt: Removed.
* platform/wk2/storage/indexeddb/cursor-finished-expected.txt: Removed.
* platform/wk2/storage/indexeddb/cursors-expected.txt: Removed.
* platform/wk2/storage/indexeddb/database-basics-expected.txt: Removed.
* platform/wk2/storage/indexeddb/deleteIndex-bug110792-expected.txt: Removed.
* platform/wk2/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt: Added.
* platform/wk2/storage/indexeddb/index-count-expected.txt: Removed.
* platform/wk2/storage/indexeddb/intversion-abort-in-initial-upgradeneeded-expected.txt: Removed.
* platform/wk2/storage/indexeddb/intversion-close-in-oncomplete-expected.txt: Removed.
* platform/wk2/storage/indexeddb/intversion-close-in-upgradeneeded-expected.txt: Removed.
* platform/wk2/storage/indexeddb/invalid-keys-expected.txt: Removed.
* platform/wk2/storage/indexeddb/key-requirements-delete-null-key-expected.txt: Removed.
* platform/wk2/storage/indexeddb/key-requirements-inline-and-passed-expected.txt: Removed.
* platform/wk2/storage/indexeddb/key-requirements-put-no-key-expected.txt: Removed.
* platform/wk2/storage/indexeddb/key-requirements-put-null-key-expected.txt: Removed.
* platform/wk2/storage/indexeddb/key-type-array-expected.txt: Removed.
* platform/wk2/storage/indexeddb/keypath-arrays-expected.txt: Removed.
* platform/wk2/storage/indexeddb/keypath-edges-expected.txt: Removed.
* platform/wk2/storage/indexeddb/keyrange-expected.txt: Removed.
* platform/wk2/storage/indexeddb/mozilla/bad-keypath-expected.txt: Removed.
* platform/wk2/storage/indexeddb/mozilla/clear-expected.txt: Removed.
* platform/wk2/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt: Removed.
* platform/wk2/storage/indexeddb/mozilla/cursors-expected.txt: Removed.
* platform/wk2/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt: Removed.
* platform/wk2/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt: Removed.
* platform/wk2/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt: Removed.
* platform/wk2/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt: Removed.
* platform/wk2/storage/indexeddb/mozilla/readonly-transactions-expected.txt: Removed.
* platform/wk2/storage/indexeddb/object-lookups-in-versionchange-expected.txt: Removed.
* platform/wk2/storage/indexeddb/objectstore-count-expected.txt: Removed.
* platform/wk2/storage/indexeddb/open-cursor-expected.txt: Removed.
* platform/wk2/storage/indexeddb/readonly-transactions-expected.txt: Removed.
* platform/wk2/storage/indexeddb/request-result-cache-expected.txt: Removed.
* platform/wk2/storage/indexeddb/transaction-abort-expected.txt: Removed.
* platform/wk2/storage/indexeddb/transaction-active-flag-expected.txt: Removed.
* platform/wk2/storage/indexeddb/transaction-after-close-expected.txt: Removed.
* platform/wk2/storage/indexeddb/transaction-read-only-expected.txt: Removed.
* platform/wk2/storage/indexeddb/version-change-exclusive-expected.txt: Removed.

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

4 years agoEnable MallocScribble when detecting leaks
ap@apple.com [Thu, 25 Feb 2016 19:10:04 +0000 (19:10 +0000)]
Enable MallocScribble when detecting leaks
https://bugs.webkit.org/show_bug.cgi?id=154679

Reviewed by Geoffrey Garen.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.setup_environ_for_server):
* Scripts/webkitpy/port/mac.py:
(MacPort.setup_environ_for_server):
* Scripts/webkitpy/port/mac_unittest.py:
(MacTest.test_setup_environ_for_server):

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

4 years agoUnreviewed, fix iOS builds after r197114.
eric.carlson@apple.com [Thu, 25 Feb 2016 16:35:00 +0000 (16:35 +0000)]
Unreviewed, fix iOS builds after r197114.

* WebKitTestRunner/TestController.cpp:
(WTR::createCanonicalUUIDString):
(WTR::TestController::saltForOrigin):

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

4 years agoWeb Inspector: Unify selected item colors
nvasilyev@apple.com [Thu, 25 Feb 2016 16:34:59 +0000 (16:34 +0000)]
Web Inspector: Unify selected item colors
https://bugs.webkit.org/show_bug.cgi?id=154668
<rdar://problem/24832178>

Reviewed by Timothy Hatcher.

Use the same CSS variable color for all selected items.

* UserInterface/Views/TreeOutline.css:
(.tree-outline:matches(:focus, .force-focus) .item.selected):
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item.selected):
* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(.item.visual-style-selector-item.selected):
* UserInterface/Views/VisualStyleTabbedPropertiesRow.css:
(.visual-style-tabbed-properties-row > .visual-style-tabbed-properties-row-container > button.selected):

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

4 years agoCSP: Make SecurityPolicyViolationEvent more closely conform to CSP spec and enable...
dbates@webkit.org [Thu, 25 Feb 2016 16:21:40 +0000 (16:21 +0000)]
CSP: Make SecurityPolicyViolationEvent more closely conform to CSP spec and enable it by default
https://bugs.webkit.org/show_bug.cgi?id=154522
<rdar://problem/24762078>

Reviewed by Brent Fulgham.

Source/WebCore:

Include attributes statusCode and columnNumber in a dispatched SecurityPolicyViolationEvent and
as part of the SecurityPolicyViolationEventInit dictionary as per section Violation DOM Events
of the Content Security Policy Level 3 spec., <https://w3c.github.io/webappsec-csp/> (24 February 2016).
Additionally, enable dispatching of this event when a Content Security Policy violation occurs regardless
of whether ENABLE(CSP_NEXT) is enabled.

Test: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-https.html

* WebCore.xcodeproj/project.pbxproj: Add files JSSecurityPolicyViolationEvent.{cpp, h}.
* dom/EventNames.in: Enable support for SecurityPolicyViolationEvent unconditionally.
* dom/SecurityPolicyViolationEvent.h: Remove ENABLE(CSP_NEXT)-guard so that we compile this
code unconditionally. Modified SecurityPolicyViolationEventInit and SecurityPolicyViolationEvent
to support attributes statusCode and columnNumebr.
* dom/SecurityPolicyViolationEvent.idl: Add attributes statusCode and columnNumber.
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation): Modified to both dispatch a SecurityPolicyViolationEvent
and send a violation report (if applicable).

LayoutTests:

Add new test http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-https.html
to ensure that SecurityPolicyViolationEvent.statusCode is 0 when dispatched for a violation on an HTTPS-served
document per section Reporting of the Content Security Policy 2.0 spec, <https://www.w3.org/TR/2015/CR-CSP2-20150721/>.
Update existing test results and mark more tests as PASS in file LayoutTests/TestExpectations.

* TestExpectations: Mark tests http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation*.html as PASS
so that we run them.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-basics-expected.txt: Update expected result to
reflect failing sub-test. We do not support the experimental JavaScript event listener onsecuritypolicyviolation when
building with ENABLE(CSP_NEXT) disabled.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-expected.txt: Update line and column numbers.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script-expected.txt: Ditto.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script.html: Ditto.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image.html: Ditto.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-expected.txt: Ditto.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script-expected.txt: Ditto.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script.html: Ditto.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-https-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-https.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image.html: Update line and column numbers.
* js/dom/global-constructors-attributes-expected.txt: Update expected results now that we expose SecurityPolicyViolationEvent.
* platform/efl/js/dom/global-constructors-attributes-expected.txt: Ditto.
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: Ditto.
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt: Ditto.
* platform/mac/js/dom/global-constructors-attributes-expected.txt: Ditto.

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

4 years ago[MediaStream] MediaDeviceInfo deviceId and groupId must be unique to the page's origin
eric.carlson@apple.com [Thu, 25 Feb 2016 15:18:21 +0000 (15:18 +0000)]
[MediaStream] MediaDeviceInfo deviceId and groupId must be unique to the page's origin
https://bugs.webkit.org/show_bug.cgi?id=153163
<rdar://problem/24334526>

Reviewed by Tim Horton.

Source/WebCore:

Tests: http/tests/media/media-stream/enumerate-devices-source-id-persistent.html
       http/tests/media/media-stream/enumerate-devices-source-id.html

* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::start): Don't check document.hasHadActiveMediaStreamTrack, do it
  in didCompleteTrackSourceInfoRequest where we need the information.
(WebCore::MediaDevicesRequest::didCompletePermissionCheck): Renamed from didCompleteCheck, save
  device ID hash string.
(WebCore::hashString): Hash a string with SHA1.
(WebCore::MediaDevicesRequest::hashID): Hash and ID.
(WebCore::MediaDevicesRequest::didCompleteTrackSourceInfoRequest): Hash deviceId and groupId.
(WebCore::MediaDevicesRequest::didCompleteCheck): Deleted.
(WebCore::MediaDevicesRequest::getTrackSources): Deleted.
(WebCore::MediaDevicesRequest::didCompleteRequest): Deleted.
* Modules/mediastream/MediaDevicesRequest.h:

* Modules/mediastream/UserMediaPermissionCheck.cpp:
(WebCore::UserMediaPermissionCheck::userMediaDocumentOrigin): Renamed from securityOrigin.
(WebCore::UserMediaPermissionCheck::topLevelDocumentOrigin): New, return the top level document origin.
(WebCore::UserMediaPermissionCheck::setUserMediaAccessInfo): Renamed from setHasPersistentPermission.
(WebCore::UserMediaPermissionCheck::securityOrigin): Deleted.
(WebCore::UserMediaPermissionCheck::setHasPersistentPermission): Deleted.
* Modules/mediastream/UserMediaPermissionCheck.h:

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::userMediaDocumentOrigin): Renamed from securityOrigin.
(WebCore::UserMediaRequest::topLevelDocumentOrigin): New, return the top level document origin.
(WebCore::UserMediaRequest::securityOrigin): Deleted.
* Modules/mediastream/UserMediaRequest.h:
(WebCore::UserMediaRequest::requiresAudio): Deleted, unused.
(WebCore::UserMediaRequest::requiresVideo): Ditto.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerMediaDeviceIdentifierStorageDirectory): Deleted, unused.
* html/HTMLMediaElement.h:

* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerMediaDeviceIdentifierStorageDirectory): Deleted.

* platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
(WebCore::MediaStreamTrackSourcesRequestClient::didCompleteTrackSourceInfoRequest): Renamed from didCompleteRequest.

* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::getMediaStreamTrackSources): Ditto.

* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources): Ditto.

Source/WebKit/mac:

* WebCoreSupport/WebUserMediaClient.mm:
(WebUserMediaClient::requestUserMediaAccess):
(WebUserMediaClient::checkUserMediaPermission):
(-[WebUserMediaPolicyCheckerListener allow]):
(-[WebUserMediaPolicyCheckerListener deny]):

Source/WebKit2:

* CMakeLists.txt: Add WKFrameHandleRef.cpp.

* Shared/API/c/WKBase.h: Add WKFrameHandleRef.
* UIProcess/API/APIUIClient.h:
(API::UIClient::decidePolicyForUserMediaPermissionRequest): Add parameter top level document
  security context.
(API::UIClient::checkUserMediaPermissionForOrigin): Ditto.

* UIProcess/API/C/WKAPICast.h: Add FrameHandle.

* UIProcess/API/C/WKFrameHandleRef.cpp: Added.
* UIProcess/API/C/WKFrameHandleRef.h: Added.

* UIProcess/API/C/WKFrameInfoRef.cpp:
(WKFrameInfoGetFrameHandleRef): Added.
* UIProcess/API/C/WKFrameInfoRef.h:

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Add parameters to decidePolicyForUserMediaPermissionRequest and
  checkUserMediaPermissionForOrigin for top level document security context.

* UIProcess/API/C/WKPageUIClient.h: Ditto.

* UIProcess/API/C/WKUserMediaPermissionCheck.cpp:
(WKUserMediaPermissionCheckSetUserMediaAccessInfo): Renamed from WKUserMediaPermissionCheckSetHasPersistentPermission,
  add parameter for top level document security context.
(WKUserMediaPermissionCheckSetHasPersistentPermission): Deleted.
* UIProcess/API/C/WKUserMediaPermissionCheck.h:

* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
(webkitUserMediaPermissionRequestCreate): Add top level document origin.

* UIProcess/UserMediaPermissionCheckProxy.cpp:
(WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): Renamed from setHasPersistentPermission.
(WebKit::UserMediaPermissionCheckProxy::setHasPersistentPermission): Deleted.
* UIProcess/UserMediaPermissionCheckProxy.h:

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Add parameter
 for device id hash salt.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::requiresAudio): Deleted, unused.
(WebKit::UserMediaPermissionRequestProxy::requiresVideo): Ditto.
(WebKit::UserMediaPermissionRequestProxy::firstVideoDeviceUID): Ditto.
(WebKit::UserMediaPermissionRequestProxy::firstAudioDeviceUID): Ditto.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Pass through parameter for top
  level document security context.
(WebKit::WebPageProxy::checkUserMediaPermissionForFrame): Ditto.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

* WebKit2.xcodeproj/project.pbxproj: Add WKFrameHandleRef.cpp|.h.

* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): Pass through parameter for top
  level document security context.
(WebKit::UserMediaPermissionRequestManager::startUserMediaPermissionCheck): Ditto.
(WebKit::UserMediaPermissionRequestManager::didCompleteUserMediaPermissionCheck): Pass through
  device id hash salt.
* WebProcess/MediaStream/UserMediaPermissionRequestManager.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCompleteUserMediaPermissionCheck): Ditto.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::setUserMediaPermissionForOrigin): Take top level document origin.
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setUserMediaPermissionForOrigin): Ditto.
* WebKitTestRunner/InjectedBundle/TestRunner.h:

* WebKitTestRunner/TestController.cpp:
(WTR::decidePolicyForUserMediaPermissionRequest): Pass through top level document origin.
(WTR::checkUserMediaPermissionForOrigin): Ditto.
(WTR::TestController::resetStateToConsistentValues): m_userMediaOriginPermissions -> m_cahcedUserMediaPermissions.
(WTR::originUserVisibleName): Return a String.
(WTR::userMediaOriginHash): Create a hash of the origin plus top level document origin.
(WTR::TestController::saltForOrigin): Return salt for an origin.
(WTR::TestController::setUserMediaPermissionForOrigin): Return permission for an origin.
(WTR::TestController::handleCheckOfUserMediaPermissionForOrigin):
(WTR::TestController::handleUserMediaPermissionRequest):
(WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible):
(WTR::OriginSettings::OriginSettings): New, class to cache settings for an origin.
(WTR::OriginSettings::persistentPermission): Persistent permissions for origin.
(WTR::OriginSettings::setPersistentPermission): Set permissions for origin.
(WTR::OriginSettings::persistentSalt): Return the persistent salt for the origin, if any.
(WTR::OriginSettings::setPersistentSalt): Set the persistent salt for the origin
(WTR::OriginSettings::ephemeralSalts): Return hashmap used to store per-frame salts.
* WebKitTestRunner/TestController.h:

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

LayoutTests:

* fast/mediastream/MediaDevices-enumerateDevices-expected.txt:
* fast/mediastream/MediaDevices-enumerateDevices.html:
* http/tests/media/media-stream/enumerate-devices-source-id-expected.txt: Added.
* http/tests/media/media-stream/enumerate-devices-source-id-persistent-expected.txt: Added.
* http/tests/media/media-stream/enumerate-devices-source-id-persistent.html: Added.
* http/tests/media/media-stream/enumerate-devices-source-id.html: Added.
* http/tests/media/media-stream/resources/enumerate-devices-source-id-frame.html: Added.

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

4 years agoMove streams tests from web-platform-tests/streams-api to web-platform-tests/streams
youenn.fablet@crf.canon.fr [Thu, 25 Feb 2016 10:35:50 +0000 (10:35 +0000)]
Move streams tests from web-platform-tests/streams-api to web-platform-tests/streams
https://bugs.webkit.org/show_bug.cgi?id=154671

Reviewed by Xabier Rodriguez-Calvar.

This will allow preparing resyncing web-platform-tests.

* web-platform-tests/streams/README.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/README.txt.
* web-platform-tests/streams/byte-length-queuing-strategy-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt.
* web-platform-tests/streams/byte-length-queuing-strategy.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/byte-length-queuing-strategy.html.
* web-platform-tests/streams/byte-length-queuing-strategy.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/byte-length-queuing-strategy.js.
* web-platform-tests/streams/count-queuing-strategy-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/count-queuing-strategy-expected.txt.
* web-platform-tests/streams/count-queuing-strategy.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/count-queuing-strategy.html.
* web-platform-tests/streams/count-queuing-strategy.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/count-queuing-strategy.js.
* web-platform-tests/streams/readable-streams/bad-strategies-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt.
* web-platform-tests/streams/readable-streams/bad-strategies.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies.html.
* web-platform-tests/streams/readable-streams/bad-strategies.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies.js.
* web-platform-tests/streams/readable-streams/bad-underlying-sources-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt.
* web-platform-tests/streams/readable-streams/bad-underlying-sources.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-underlying-sources.html.
* web-platform-tests/streams/readable-streams/bad-underlying-sources.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-underlying-sources.js.
* web-platform-tests/streams/readable-streams/brand-checks-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt.
* web-platform-tests/streams/readable-streams/brand-checks.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/brand-checks.html.
* web-platform-tests/streams/readable-streams/brand-checks.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/brand-checks.js.
* web-platform-tests/streams/readable-streams/cancel-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel-expected.txt.
* web-platform-tests/streams/readable-streams/cancel.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel.html.
* web-platform-tests/streams/readable-streams/cancel.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel.js.
* web-platform-tests/streams/readable-streams/count-queuing-strategy-integration-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt.
* web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration.html.
* web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration.js.
* web-platform-tests/streams/readable-streams/garbage-collection-1-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-1-expected.txt.
* web-platform-tests/streams/readable-streams/garbage-collection-1.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-1.html.
* web-platform-tests/streams/readable-streams/garbage-collection-2-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-2-expected.txt.
* web-platform-tests/streams/readable-streams/garbage-collection-2.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-2.html.
* web-platform-tests/streams/readable-streams/garbage-collection-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt.
* web-platform-tests/streams/readable-streams/garbage-collection.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection.html.
* web-platform-tests/streams/readable-streams/garbage-collection.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection.js.
* web-platform-tests/streams/readable-streams/general-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/general-expected.txt.
* web-platform-tests/streams/readable-streams/general.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/general.html.
* web-platform-tests/streams/readable-streams/general.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/general.js.
* web-platform-tests/streams/readable-streams/pipe-through-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt.
* web-platform-tests/streams/readable-streams/pipe-through.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/pipe-through.html.
* web-platform-tests/streams/readable-streams/pipe-through.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/pipe-through.js.
* web-platform-tests/streams/readable-streams/readable-stream-reader-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt.
* web-platform-tests/streams/readable-streams/readable-stream-reader.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/readable-stream-reader.html.
* web-platform-tests/streams/readable-streams/readable-stream-reader.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/readable-stream-reader.js.
* web-platform-tests/streams/readable-streams/tee-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/tee-expected.txt.
* web-platform-tests/streams/readable-streams/tee.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/tee.html.
* web-platform-tests/streams/readable-streams/tee.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/tee.js.
* web-platform-tests/streams/readable-streams/templated-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/templated-expected.txt.
* web-platform-tests/streams/readable-streams/templated.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/templated.html.
* web-platform-tests/streams/readable-streams/templated.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/templated.js.
* web-platform-tests/streams/resources/rs-test-templates.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/resources/rs-test-templates.js.
* web-platform-tests/streams/resources/rs-utils.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/resources/rs-utils.js.
* web-platform-tests/streams/resources/test-initializer.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/resources/test-initializer.js.
* web-platform-tests/streams/resources/test-utils.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/streams-api/resources/test-utils.js.

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

4 years ago[GTK] Tearing when entering AC mode
carlosgc@webkit.org [Thu, 25 Feb 2016 07:37:40 +0000 (07:37 +0000)]
[GTK] Tearing when entering AC mode
https://bugs.webkit.org/show_bug.cgi?id=150955

Reviewed by Michael Catanzaro.

Source/WebCore:

* platform/gtk/GtkUtilities.cpp:
(WebCore::widgetIsOnscreenToplevelWindow): Allow passing nullptr.

Source/WebKit2:

When entering accelerated compositing mode, we keep rendering the
non accelerated contents until we have the first frame of
accelerated compositing contents. When the view is created hidden,
for example when the browser opens a link in a new tab, the view
is not realized until it is mapped. The native surface handle for
compositing, needed by the web process to render accelerated
compositing contents, is not available until the view is realized,
because it depends on the properties of the parent. When a web
view is mapped for the first time, and then realized, we send the
native surface handle for compositing to the web process, and keep
rendering the non composited contents until we get the first
frame, but in this case we never had non composited contents and
we end up rendering an untinitalized surface. This sometimes just
produces flickering and sometimes rendering artifacts.
We can prevent this from happening by realizing the web view as
soon as possible. A GtkWidget can't be realized until it has been
added to a toplevel, so we can realize our view right after it is
added to a toplevel window, and wait until the view is actually
mapped to notify the web process that it has been added to a
window. This way can we enter accelerated compositing mode before
the web view is mapped, so that when mapped we don't try to paint
the previous contents and don't need to wait for the first frame.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(toplevelWindowFocusInEvent): Handle the case of the window being
hidden when receiving focus in. According to
gtk_window_focus_in_event, this can happen.
(webkitWebViewBaseSetToplevelOnScreenWindow): When the web view is
removed from its toplevel parent, update the IsInWindow and
WindowIsActive flags accordingly. When the view is added to a
toplevel, realize it and don't update the window flags, they will be
updated when the view is mapped the first time.
(webkitWebViewBaseMap): Also update IsInWindow and WindowIsActive
flags if needed. This way, if for example you open a youtube video
in a new tab, the video won't start playing until you visit the
tab, like we did when the view was realized on map.
(webkitWebViewBaseHierarchyChanged): Use hierarchy-changed signal
instead of parent-set to be notified when the view is added to or
removed from a toplevel.
(webkit_web_view_base_class_init): Implement hierarchy-changed
instead of parent-set.
(webkitWebViewBaseRealize): Do not call
webkitWebViewBaseSetToplevelOnScreenWindow on realize, it's now
webkitWebViewBaseSetToplevelOnScreenWindow the one realizing the view.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend): Do not realize the view
here, it should be realized already at this point. If it's not
realized at this point is because it hasn't been added to a
toplevel and gtk_widget_realize will not work anyway.
(WebKit::BackingStore::paint): This is changing the cairo source
operator, so save/restore the cairo context to ensure it doesn't
affect other drawing done after this.

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

4 years agoWeb Inspector: Expose Proxy target and handler internal properties to Inspector
commit-queue@webkit.org [Thu, 25 Feb 2016 04:59:18 +0000 (04:59 +0000)]
Web Inspector: Expose Proxy target and handler internal properties to Inspector
https://bugs.webkit.org/show_bug.cgi?id=154663

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

Source/JavaScriptCore:

* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::getInternalProperties):
Expose the ProxyObject's target and handler.

Source/WebInspectorUI:

* UserInterface/Models/NativeFunctionParameters.js:
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
Improve the native parameter list for the global Reflect object methods.
Include "enumerate" even though it is deprecated, because we implement it.

LayoutTests:

* inspector/model/remote-object.html:
* platform/mac/inspector/model/remote-object-expected.txt:
Test that a Proxy object includes the internal properties.

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

4 years agoDrop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute
cdumez@apple.com [Thu, 25 Feb 2016 02:39:19 +0000 (02:39 +0000)]
Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute
https://bugs.webkit.org/show_bug.cgi?id=154659

Reviewed by Sam Weinig.

Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute and
use nullable DOMString types instead:
http://heycam.github.io/webidl/#idl-nullable-type

This is the standard way of doing things. We already had support
in the bindings generator for nullable DOMString attributes so
we now just leverage this support. However, our IDL parser did
not correctly parse nullable DOMString return values for operations.
This patch fixes this.

This patch also drops [TreatNullAs=NullString] and
[TreatUndefinedAs=NullString] for writable DOMString attributes that
are now marked as nullable because they are implied.

* Modules/fetch/FetchHeaders.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/mediasource/DOMURLMediaSource.idl:
* Modules/mediastream/DOMURLMediaStream.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Deleted.
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseAttributeOrOperationRest):
(parseOperationOrIterator):
(parseSpecialOperation):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_nullable_string_method):
(webkit_dom_test_obj_nullable_string_special_method):
(webkit_dom_test_obj_conditional_method3): Deleted.
(webkit_dom_test_obj_convert1): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::getOwnPropertySlot):
(WebCore::JSTestObj::getOwnPropertySlotByIndex):
(WebCore::JSTestObj::getOwnPropertyNames):
(WebCore::jsTestObjPrototypeFunctionNullableStringMethod):
(WebCore::jsTestObjConstructorFunctionNullableStringStaticMethod):
(WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence): Deleted.
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2): Deleted.
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj nullableStringMethod]):
(-[DOMTestObj nullableStringStaticMethod]):
(-[DOMTestObj nullableStringSpecialMethod:]):
(-[DOMTestObj overloadedMethod1:]): Deleted.
(-[DOMTestObj getSVGDocument]): Deleted.
* bindings/scripts/test/TestObj.idl:
* css/CSSCharsetRule.idl:
* css/CSSImportRule.idl:
* css/CSSKeyframesRule.idl:
* css/CSSPageRule.idl:
* css/CSSRule.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleRule.idl:
* css/CSSValue.idl:
* css/MediaList.idl:
* css/StyleSheet.idl:
* dom/Attr.idl:
* dom/CharacterData.idl:
* dom/DOMStringList.idl:
* dom/Document.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/Entity.idl:
* dom/MutationRecord.idl:
* dom/Node.idl:
* dom/ProcessingInstruction.idl:
* html/DOMSettableTokenList.idl:
* html/DOMTokenList.idl:
* html/DOMURL.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLRenderingContextBase.idl:
* page/DOMWindow.idl:
* storage/Storage.idl:
* storage/StorageEvent.idl:
* xml/XMLHttpRequest.idl:
* xml/XPathNSResolver.idl:

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

4 years agoWeb Inspector: Visual Styles sidebar should support multiple animations
commit-queue@webkit.org [Thu, 25 Feb 2016 01:28:51 +0000 (01:28 +0000)]
Web Inspector: Visual Styles sidebar should support multiple animations
https://bugs.webkit.org/show_bug.cgi?id=154546
<rdar://problem/24773861>

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

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection):
Set additional flags on the optional properties of transition to ensure
that the initial value of a new row is not considered invalid.

(WebInspector.VisualStyleDetailsPanel.prototype._populateAnimationSection):
Added a comma-separated keyword list to provide support for multiple
animations per rule.

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

4 years ago[web-animations] Add AnimationTimeline, DocumentTimeline and add extensions to Docume...
dino@apple.com [Thu, 25 Feb 2016 01:11:54 +0000 (01:11 +0000)]
[web-animations] Add AnimationTimeline, DocumentTimeline and add extensions to Document interface
https://bugs.webkit.org/show_bug.cgi?id=151688

Patch by Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> on 2016-02-24
Reviewed by Dean Jackson.

.:

Enables the WEB_ANIMATIONS compiler switch.

* Source/cmake/OptionsWin.cmake:

Source/JavaScriptCore:

Enables the WEB_ANIMATIONS compiler switch.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

- Adds DocumentTimeline interface and class implementation
- Implements the DocumentAnimation extension to the Document Interface that contains a default DocumentTimeline
- Add AnimationTimeline interface stub (i.e. without getAnimations and currentTime)
- Adds AnimationTimeline class implementation for AnimationTimeline interface stub
- Adds Javascript bindings for the above classes and interfaces
- Enables the WEB_ANIMATIONS compiler switch

No tests yet.  Tests will be added as class functionality is added incrementally.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/WebCoreIncludeCommon.props:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:
* animation/AnimationTimeline.cpp: Added.
(WebCore::AnimationTimeline::AnimationTimeline):
(WebCore::AnimationTimeline::~AnimationTimeline):
(WebCore::AnimationTimeline::destroy):
* animation/AnimationTimeline.h: Added.
(WebCore::AnimationTimeline::deref):
(WebCore::AnimationTimeline::isDocumentTimeline):
(WebCore::AnimationTimeline::classType):
* animation/AnimationTimeline.idl: Added.
* animation/DocumentAnimation.cpp: Added.
(WebCore::DocumentAnimation::DocumentAnimation):
(WebCore::DocumentAnimation::~DocumentAnimation):
(WebCore::DocumentAnimation::timeline):
(WebCore::DocumentAnimation::supplementName):
(WebCore::DocumentAnimation::from):
* animation/DocumentAnimation.h: Added.
* animation/DocumentAnimation.idl: Added.
* animation/DocumentTimeline.cpp: Added.
(WebCore::DocumentTimeline::create):
(WebCore::DocumentTimeline::DocumentTimeline):
(WebCore::DocumentTimeline::~DocumentTimeline):
* animation/DocumentTimeline.h: Added.
* animation/DocumentTimeline.idl: Added.
* bindings/js/JSAnimationTimelineCustom.cpp: Added.
(WebCore::toJS):
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/scripts/CodeGeneratorGObject.pm:
* dom/Document.h:

Source/WebKit/mac:

Enables the WEB_ANIMATIONS compiler switch.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Enables the WEB_ANIMATIONS compiler switch.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Enables the WEB_ANIMATIONS compiler switch.

* wtf/FeatureDefines.h:

Tools:

Enables the WEB_ANIMATIONS compiler switch by default.

* Scripts/webkitperl/FeatureList.pm:

WebKitLibraries:

Enables the WEB_ANIMATIONS compiler switch.

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

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

4 years agoModern IDB: Some w3c objectstore tests crash under GuardMalloc.
beidson@apple.com [Thu, 25 Feb 2016 00:23:38 +0000 (00:23 +0000)]
Modern IDB: Some w3c objectstore tests crash under GuardMalloc.
https://bugs.webkit.org/show_bug.cgi?id=154460

Reviewed by Alex Christensen.

No new tests (Covered by existing tests).

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):  Don't delete the UniqueIDBDatabase yet
  if there are still any connections pending close.
(WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted): It's possible that with this
  transaction completing, and a connection finished its close process, that the UniqueIDBDatabase is
  now ready to be deleted.

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:

* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::abortWithoutCallback):

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

4 years ago[cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
commit-queue@webkit.org [Wed, 24 Feb 2016 23:47:25 +0000 (23:47 +0000)]
[cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
https://bugs.webkit.org/show_bug.cgi?id=154651

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-02-24
Reviewed by Alex Christensen.

.:

* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

* CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

Source/WebCore:

No new tests needed.

* CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

Source/WTF:

* CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

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

4 years agoUse more references in FocusNavigationScope
rniwa@webkit.org [Wed, 24 Feb 2016 23:37:51 +0000 (23:37 +0000)]
Use more references in FocusNavigationScope
https://bugs.webkit.org/show_bug.cgi?id=154637

Reviewed by Chris Dumez.

Use references in various functions of FocusNavigationScope as well as m_treeScope.

* page/FocusController.cpp:
(WebCore::FocusNavigationScope::FocusNavigationScope): Takes TreeScope& instead of TreeScope*.
(WebCore::FocusNavigationScope::rootNode): Returns ContainerNode& instead of ContainerNode*.
(WebCore::FocusNavigationScope::owner):
(WebCore::FocusNavigationScope::scopeOf): Takes Node& instead of Node*. Renamed from focusNavigationScopeOf.
(WebCore::FocusNavigationScope::scopeOwnedByShadowHost): Ditto. Renamed from focusNavigationScopeOwnedByShadowHost.
(WebCore::FocusNavigationScope::scopeOwnedByIFrame): Ditto. Renamed from focusNavigationScopeOwnedByIFrame.
(WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
(WebCore::FocusController::advanceFocusInDocumentOrder):
(WebCore::FocusController::findFocusableElementAcrossFocusScope): Define currentScope inside the loop now that
the copy constructor of FocusNavigationScope no longer exists (since m_treeScope is a reference).
(WebCore::FocusController::findFocusableElementRecursively):
(WebCore::nextElementWithGreaterTabIndex):
(WebCore::FocusController::nextFocusableElement):
(WebCore::FocusController::previousFocusableElement):

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

4 years agoAdd WKPreference for HiddenPageDOMTimerThrottlingAutoIncreases
barraclough@apple.com [Wed, 24 Feb 2016 23:19:18 +0000 (23:19 +0000)]
Add WKPreference for HiddenPageDOMTimerThrottlingAutoIncreases
https://bugs.webkit.org/show_bug.cgi?id=154655

Reviewed by Geoff Garen.

Just plumbing WebCore.settings.setHiddenPageDOMTimerThrottlingAutoIncreases through as
WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases):
(WKPreferencesGetHiddenPageDOMTimerThrottlingAutoIncreases):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _hiddenPageDOMTimerThrottlingAutoIncreases]):
(-[WKPreferences _setHiddenPageDOMTimerThrottlingAutoIncreases:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

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

4 years agoWebRTC: Add MediaEndpoint interface (WebRTC backend abstraction)
adam.bergkvist@ericsson.com [Wed, 24 Feb 2016 22:23:53 +0000 (22:23 +0000)]
WebRTC: Add MediaEndpoint interface (WebRTC backend abstraction)
https://bugs.webkit.org/show_bug.cgi?id=150165

Reviewed by Eric Carlson.

Add the MediaEndpoint interface along with its companion objects.

MediaEndpoint interface: A WebRTC platform abstraction that is used to
configure how the the WebRTC backend sends and receives. It also abstracts
ICE functionality such as generating local candidates and doing
checking on remote candidates. The RTCPeerConnection API, and other API
objects such as RTCRtpSender/Receiver, live above MediaEndpoint.

MediaEndpointConfiguration: A settings object used to configure a
MediaEndpoint with, for example, ICE helper servers and other polices.
A MediaEndpointConfiguration is used to initialize a MediaEndpoint, but
can also be used to update settings.

MediaEndpointSessionConfiguration: An object that describes how the
MediaEndpoint should send and receive. Contains PeerMediaDescription,
MediaPayload and IceCandidate objects.

Tests: The MediaEndpoint platform interface has no implementations yet.

* CMakeLists.txt:
* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::gotDtlsFingerprint):
(WebCore::MediaEndpointPeerConnection::gotIceCandidate):
(WebCore::MediaEndpointPeerConnection::doneGatheringCandidates):
(WebCore::MediaEndpointPeerConnection::gotRemoteSource):
* Modules/mediastream/MediaEndpointPeerConnection.h:
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/IceCandidate.h: Added.
(WebCore::IceCandidate::create):
(WebCore::IceCandidate::~IceCandidate):
(WebCore::IceCandidate::type):
(WebCore::IceCandidate::setType):
(WebCore::IceCandidate::foundation):
(WebCore::IceCandidate::setFoundation):
(WebCore::IceCandidate::componentId):
(WebCore::IceCandidate::setComponentId):
(WebCore::IceCandidate::transport):
(WebCore::IceCandidate::setTransport):
(WebCore::IceCandidate::priority):
(WebCore::IceCandidate::setPriority):
(WebCore::IceCandidate::address):
(WebCore::IceCandidate::setAddress):
(WebCore::IceCandidate::port):
(WebCore::IceCandidate::setPort):
(WebCore::IceCandidate::tcpType):
(WebCore::IceCandidate::setTcpType):
(WebCore::IceCandidate::relatedAddress):
(WebCore::IceCandidate::setRelatedAddress):
(WebCore::IceCandidate::relatedPort):
(WebCore::IceCandidate::setRelatedPort):
(WebCore::IceCandidate::clone):
(WebCore::IceCandidate::IceCandidate):
* platform/mediastream/MediaEndpoint.cpp: Added.
(WebCore::createMediaEndpoint):
* platform/mediastream/MediaEndpoint.h: Added.
(WebCore::MediaEndpointClient::~MediaEndpointClient):
(WebCore::MediaEndpoint::~MediaEndpoint):
* platform/mediastream/MediaEndpointConfiguration.cpp: Added.
(WebCore::IceServerInfo::IceServerInfo):
(WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
* platform/mediastream/MediaEndpointConfiguration.h: Added.
(WebCore::IceServerInfo::create):
(WebCore::IceServerInfo::~IceServerInfo):
(WebCore::IceServerInfo::urls):
(WebCore::IceServerInfo::credential):
(WebCore::IceServerInfo::username):
(WebCore::MediaEndpointConfiguration::create):
(WebCore::MediaEndpointConfiguration::iceServers):
(WebCore::MediaEndpointConfiguration::iceTransportPolicy):
(WebCore::MediaEndpointConfiguration::bundlePolicy):
* platform/mediastream/MediaEndpointSessionConfiguration.h: Added.
(WebCore::MediaEndpointSessionConfiguration::create):
(WebCore::MediaEndpointSessionConfiguration::~MediaEndpointSessionConfiguration):
(WebCore::MediaEndpointSessionConfiguration::sessionId):
(WebCore::MediaEndpointSessionConfiguration::setSessionId):
(WebCore::MediaEndpointSessionConfiguration::sessionVersion):
(WebCore::MediaEndpointSessionConfiguration::setSessionVersion):
(WebCore::MediaEndpointSessionConfiguration::mediaDescriptions):
(WebCore::MediaEndpointSessionConfiguration::addMediaDescription):
(WebCore::MediaEndpointSessionConfiguration::clone):
(WebCore::MediaEndpointSessionConfiguration::MediaEndpointSessionConfiguration):
* platform/mediastream/MediaPayload.h: Added.
(WebCore::MediaPayload::create):
(WebCore::MediaPayload::~MediaPayload):
(WebCore::MediaPayload::type):
(WebCore::MediaPayload::setType):
(WebCore::MediaPayload::encodingName):
(WebCore::MediaPayload::setEncodingName):
(WebCore::MediaPayload::clockRate):
(WebCore::MediaPayload::setClockRate):
(WebCore::MediaPayload::channels):
(WebCore::MediaPayload::setChannels):
(WebCore::MediaPayload::ccmfir):
(WebCore::MediaPayload::setCcmfir):
(WebCore::MediaPayload::nackpli):
(WebCore::MediaPayload::setNackpli):
(WebCore::MediaPayload::nack):
(WebCore::MediaPayload::setNack):
(WebCore::MediaPayload::parameters):
(WebCore::MediaPayload::addParameter):
(WebCore::MediaPayload::clone):
(WebCore::MediaPayload::MediaPayload):
* platform/mediastream/PeerMediaDescription.h: Added.
(WebCore::PeerMediaDescription::create):
(WebCore::PeerMediaDescription::~PeerMediaDescription):
(WebCore::PeerMediaDescription::type):
(WebCore::PeerMediaDescription::setType):
(WebCore::PeerMediaDescription::port):
(WebCore::PeerMediaDescription::setPort):
(WebCore::PeerMediaDescription::address):
(WebCore::PeerMediaDescription::setAddress):
(WebCore::PeerMediaDescription::mode):
(WebCore::PeerMediaDescription::setMode):
(WebCore::PeerMediaDescription::payloads):
(WebCore::PeerMediaDescription::addPayload):
(WebCore::PeerMediaDescription::setPayloads):
(WebCore::PeerMediaDescription::rtcpMux):
(WebCore::PeerMediaDescription::setRtcpMux):
(WebCore::PeerMediaDescription::rtcpAddress):
(WebCore::PeerMediaDescription::setRtcpAddress):
(WebCore::PeerMediaDescription::rtcpPort):
(WebCore::PeerMediaDescription::setRtcpPort):
(WebCore::PeerMediaDescription::mediaStreamId):
(WebCore::PeerMediaDescription::setMediaStreamId):
(WebCore::PeerMediaDescription::mediaStreamTrackId):
(WebCore::PeerMediaDescription::setMediaStreamTrackId):
(WebCore::PeerMediaDescription::dtlsSetup):
(WebCore::PeerMediaDescription::setDtlsSetup):
(WebCore::PeerMediaDescription::dtlsFingerprintHashFunction):
(WebCore::PeerMediaDescription::setDtlsFingerprintHashFunction):
(WebCore::PeerMediaDescription::dtlsFingerprint):
(WebCore::PeerMediaDescription::setDtlsFingerprint):
(WebCore::PeerMediaDescription::cname):
(WebCore::PeerMediaDescription::setCname):
(WebCore::PeerMediaDescription::ssrcs):
(WebCore::PeerMediaDescription::addSsrc):
(WebCore::PeerMediaDescription::clearSsrcs):
(WebCore::PeerMediaDescription::iceUfrag):
(WebCore::PeerMediaDescription::setIceUfrag):
(WebCore::PeerMediaDescription::icePassword):
(WebCore::PeerMediaDescription::setIcePassword):
(WebCore::PeerMediaDescription::iceCandidates):
(WebCore::PeerMediaDescription::addIceCandidate):
(WebCore::PeerMediaDescription::source):
(WebCore::PeerMediaDescription::setSource):
(WebCore::PeerMediaDescription::clone):
(WebCore::PeerMediaDescription::PeerMediaDescription):

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

4 years agoMarking storage/indexeddb/odd-strings.html as flaky on mac-wk1
ryanhaddad@apple.com [Wed, 24 Feb 2016 22:22:12 +0000 (22:22 +0000)]
Marking storage/indexeddb/odd-strings.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=154619

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

4 years agoMarking imported/w3c/indexeddb/idbcursor-advance.htm as flaky on Yosemite Release WK2
ryanhaddad@apple.com [Wed, 24 Feb 2016 22:11:49 +0000 (22:11 +0000)]
Marking imported/w3c/indexeddb/idbcursor-advance.htm as flaky on Yosemite Release WK2
https://bugs.webkit.org/show_bug.cgi?id=154618

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agoFix downloads when using NetworkSession
achristensen@apple.com [Wed, 24 Feb 2016 21:44:00 +0000 (21:44 +0000)]
Fix downloads when using NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154620

Reviewed by Brady Eidson.

This fixes all the _WKDownload API tests when using NetworkSession.

* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::willDecidePendingDownloadDestination):
When we store the NetworkDataTask in m_downloadsWaitingForDestination, we want to remove its owner
from m_pendingDownloads to prevent memory leaks.
(WebKit::DownloadManager::continueDecidePendingDownloadDestination):
If a file exists and the UIProcess has told us to overwrite the file, delete the file
before starting a new download in its place.  This used to be done by CFNetwork in
NSURLDownload's setDestination:allowOverwrite:, but the NSURLSession equivalent (setting
NSURLSessionDataTask's _pathToDownloadTaskFile attribute) does not overwrite the file for us.
(WebKit::DownloadManager::cancelDownload):
If a download is canceled while it is waiting for its destination from the UIProcess, the Download
object does not exist yet.  Instead, we have a completion handler stored in m_downloadsWaitingForDestination.
In this case, we want to send the UIProcess a DownloadProxy::DidCancel message, which I did through
NetworkProcess::pendingDownloadCanceled because the DownloadManager is not a MessageSender, and then
call the completion handler with PolicyIgnore to cancel the download.
(WebKit::DownloadManager::downloadFinished):
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::PendingDownload::didBecomeDownload):
(WebKit::PendingDownload::didFailLoading):
(WebKit::PendingDownload::messageSenderConnection):
(WebKit::PendingDownload::didConvertToDownload): Deleted.
* NetworkProcess/Downloads/PendingDownload.h:
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::cancel):
Send a didCancel message to the UIProcess when a download was cancelled.
Use cancelByProducingResumeData so we can resume canceled downloads.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
didConvertToDownload is needed when using NetworkSession to tell the NetworkResourceLoader
not to call cancel on the NetworkLoad after converting it to a download.
* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTask::setPendingDownload):
(WebKit::NetworkDataTask::pendingDownloadLocation):
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::convertTaskToDownload):
(WebKit::NetworkLoad::setPendingDownloadID):
(WebKit::NetworkLoad::didReceiveResponseNetworkSession):
Don't call findPendingDownloadLocation as a method on the NetworkDataTask to avoid memory leaks
in DownloadManager.m_pendingDownloads.
(WebKit::NetworkLoad::didBecomeDownload):
Call m_client.didBecomeDownload which is being separated from didConvertToDownload.  The former is
called after the NetworkDataTask becomes a Download, the latter is called as soon as
convertMainResourceLoadToDownload is called.
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::continueWillSendRequest):
(WebKit::NetworkProcess::pendingDownloadCanceled):
Send a DownloadProxy::DidCancel message when a pending download is canceled.
(WebKit::NetworkProcess::findPendingDownloadLocation):
(WebKit::NetworkProcess::continueDecidePendingDownloadDestination):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didConvertToDownload):
(WebKit::NetworkResourceLoader::didBecomeDownload):
Separate setting m_didConvertToDownload, which needs to happen before the didReceiveResponse completion
handler is called to tell the NetworkResourceLoader not to call cancel in NetworkResourceLoader::abort,
from deleting the NetworkLoad, which can be done after the NSURLSessionDataTask has been converted to a
NSURLSessionDownloadTask.
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::failureTimerFired):
(WebKit::NetworkDataTask::setPendingDownloadLocation):
(WebKit::NetworkDataTask::transferSandboxExtensionToDownload):
(WebKit::NetworkDataTask::suggestedFilename):
(WebKit::NetworkDataTask::currentRequest):
(WebKit::NetworkDataTask::findPendingDownloadLocation): Deleted.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
Take the downloadID if it failed because we will report that download as failed and not use it again.
(WebKit::NetworkSession::takeDownloadID):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):

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

4 years ago[Fetch API] Implement Fetch API Response
youenn.fablet@crf.canon.fr [Wed, 24 Feb 2016 21:41:51 +0000 (21:41 +0000)]
[Fetch API] Implement Fetch API Response
https://bugs.webkit.org/show_bug.cgi?id=154536

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

New tests covering fetch API.

* web-platform-tests/fetch/api/response/response-clone-expected.txt: Added.
* web-platform-tests/fetch/api/response/response-clone.html: Added.
* web-platform-tests/fetch/api/response/response-consume-expected.txt: Added.
* web-platform-tests/fetch/api/response/response-consume.html: Added.
* web-platform-tests/fetch/api/response/response-error-expected.txt: Added.
* web-platform-tests/fetch/api/response/response-error.html: Added.
* web-platform-tests/fetch/api/response/response-idl-expected.txt: Added.
* web-platform-tests/fetch/api/response/response-idl.html: Added.
* web-platform-tests/fetch/api/response/response-init-001-expected.txt: Added.
* web-platform-tests/fetch/api/response/response-init-001.html: Added.
* web-platform-tests/fetch/api/response/response-init-002-expected.txt: Added.
* web-platform-tests/fetch/api/response/response-init-002.html: Added.
* web-platform-tests/fetch/api/response/response-static-error-expected.txt: Added.
* web-platform-tests/fetch/api/response/response-static-error.html: Added.
* web-platform-tests/fetch/api/response/response-static-redirect-expected.txt: Added.
* web-platform-tests/fetch/api/response/response-static-redirect.html: Added.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/fetch/api/response/response-clone.html
       imported/w3c/web-platform-tests/fetch/api/response/response-consume.html
       imported/w3c/web-platform-tests/fetch/api/response/response-error.html
       imported/w3c/web-platform-tests/fetch/api/response/response-idl.html
       imported/w3c/web-platform-tests/fetch/api/response/response-init-001.html
       imported/w3c/web-platform-tests/fetch/api/response/response-init-002.html
       imported/w3c/web-platform-tests/fetch/api/response/response-static-error.html
       imported/w3c/web-platform-tests/fetch/api/response/response-static-redirect.html

Adding Fetch Response as FetchResponse class.
Constructor uses a built-in to pre-process the parameters.
Support of body as ReadableStream is missing.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/fetch/FetchBody.h:
(WebCore::FetchBody::empty):
* Modules/fetch/FetchResponse.cpp: Added.
(WebCore::JSFetchResponse::body):
(WebCore::isRedirectStatus):
(WebCore::isNullBodyStatus):
(WebCore::FetchResponse::error):
(WebCore::FetchResponse::redirect):
(WebCore::FetchResponse::initializeWith):
(WebCore::FetchResponse::FetchResponse):
(WebCore::FetchResponse::clone):
(WebCore::FetchResponse::type):
* Modules/fetch/FetchResponse.h: Added.
(WebCore::FetchResponse::create):
(WebCore::FetchResponse::redirect):
(WebCore::FetchResponse::url):
(WebCore::FetchResponse::redirected):
(WebCore::FetchResponse::status):
(WebCore::FetchResponse::ok):
(WebCore::FetchResponse::statusText):
(WebCore::FetchResponse::headers):
(WebCore::FetchResponse::isDisturbed):
(WebCore::FetchResponse::arrayBuffer):
(WebCore::FetchResponse::formData):
(WebCore::FetchResponse::blob):
(WebCore::FetchResponse::json):
(WebCore::FetchResponse::text):
* Modules/fetch/FetchResponse.idl: Added.
* Modules/fetch/FetchResponse.js: Added.
(initializeFetchResponse):
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreJSBuiltins.cpp:
* bindings/js/WebCoreJSBuiltins.h:
(WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
(WebCore::JSBuiltinFunctions::fetchResponseBuiltins):

LayoutTests:

Adding Response as constructor in global and worker scopes.

* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

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

4 years agoWeb Inspector: Remove unused Profile.png images
timothy@apple.com [Wed, 24 Feb 2016 21:29:53 +0000 (21:29 +0000)]
Web Inspector: Remove unused Profile.png images

https://bugs.webkit.org/show_bug.cgi?id=154647
rdar://problem/24820825

Reviewed by Brian Burg.

* UserInterface/Images/Profile.png: Removed.
* UserInterface/Images/Profile@2x.png: Removed.
* UserInterface/Images/gtk/Profile.png: Removed.
* UserInterface/Images/gtk/Profile@2x.png: Removed.
* UserInterface/Views/TimelineIcons.css:
(.profile-icon .icon): Deleted.

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

4 years agoVersioning.
bshafiei@apple.com [Wed, 24 Feb 2016 21:01:34 +0000 (21:01 +0000)]
Versioning.

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

4 years agoUnreviewed, rolling out r197033.
commit-queue@webkit.org [Wed, 24 Feb 2016 20:46:44 +0000 (20:46 +0000)]
Unreviewed, rolling out r197033.
https://bugs.webkit.org/show_bug.cgi?id=154649

"It broke JSC tests when 'this' was loaded from global scope"
(Requested by saamyjoon on #webkit).

Reverted changeset:

"[ES6] Arrow function syntax. Emit loading&putting this/super
only if they are used in arrow function"
https://bugs.webkit.org/show_bug.cgi?id=153981
http://trac.webkit.org/changeset/197033

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

4 years ago[ES6] Implement Proxy.[[Delete]]
sbarati@apple.com [Wed, 24 Feb 2016 20:43:21 +0000 (20:43 +0000)]
[ES6] Implement Proxy.[[Delete]]
https://bugs.webkit.org/show_bug.cgi?id=154607

Reviewed by Mark Lam.

This patch implements Proxy.[[Delete]] with respect to section 9.5.10 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-delete-p

* runtime/ProxyObject.cpp:
(JSC::ProxyObject::getConstructData):
(JSC::ProxyObject::performDelete):
(JSC::ProxyObject::deleteProperty):
(JSC::ProxyObject::deletePropertyByIndex):
* runtime/ProxyObject.h:
* tests/es6.yaml:
* tests/stress/proxy-delete.js: Added.
(assert):
(throw.new.Error.let.handler.get deleteProperty):
(throw.new.Error):
(assert.let.handler.deleteProperty):
(let.handler.deleteProperty):

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

4 years agoAdd more WebKitAdditions extension points
andersca@apple.com [Wed, 24 Feb 2016 20:31:40 +0000 (20:31 +0000)]
Add more WebKitAdditions extension points
https://bugs.webkit.org/show_bug.cgi?id=154648
rdar://problem/24820040

Reviewed by Beth Dakin.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

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

4 years agoA function named canTakeNextToken executing blocking scripts is misleading
rniwa@webkit.org [Wed, 24 Feb 2016 20:26:01 +0000 (20:26 +0000)]
A function named canTakeNextToken executing blocking scripts is misleading
https://bugs.webkit.org/show_bug.cgi?id=154636

Reviewed by Darin Adler.

Merged canTakeNextToken into pumpTokenizer and extracted pumpTokenizerLoop out of pumpTokenizer.

Inlined m_parserChunkSize in HTMLParserScheduler into checkForYieldBeforeToken, and removed needsYield
from PumpSession in favor of making checkForYieldBeforeToken and checkForYieldBeforeScript return a bool.

No new tests since this is a pure refactoring.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::canTakeNextToken): Deleted.
(WebCore::HTMLDocumentParser::pumpTokenizerLoop): Extracted from pumpTokenizer. We don't have to check
isStopped() at the beginning since pumpTokenizer asserts that. Return true when session.needsYield would
have been set to true in the old code and return false elsewhere (for stopping or incomplete token).
(WebCore::HTMLDocumentParser::pumpTokenizer):
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLParserScheduler.cpp:
(WebCore::PumpSession::PumpSession):
(WebCore::HTMLParserScheduler::HTMLParserScheduler):
(WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript): Renamed from checkForYieldBeforeScript.
* html/parser/HTMLParserScheduler.h:
(WebCore::HTMLParserScheduler::shouldYieldBeforeToken): Renamed from checkForYieldBeforeToken.
(WebCore::HTMLParserScheduler::isScheduledForResume):
(WebCore::HTMLParserScheduler::checkForYield): Extracted from checkForYieldBeforeToken. Reset
processedTokens to 1 instead of setting it to 0 here and incrementing it later as done in the old code.

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

4 years agoWeb Inspector: TimelineViews should use the recording's end time when entire ruler...
mattbaker@apple.com [Wed, 24 Feb 2016 20:19:47 +0000 (20:19 +0000)]
Web Inspector: TimelineViews should use the recording's end time when entire ruler range is selected
https://bugs.webkit.org/show_bug.cgi?id=154644
<rdar://problem/24818442>

Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
Update current timeline view when entire range selected.

(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
Live-update the OverviewTimelineView during recording when entire range selected.

(WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewSelection):
Update timeline view start and end times. When entire range selected, use the recording
end time or current time (while capturing).

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

4 years agoCSP: Enable plugin-types directive by default
dbates@webkit.org [Wed, 24 Feb 2016 18:51:58 +0000 (18:51 +0000)]
CSP: Enable plugin-types directive by default
https://bugs.webkit.org/show_bug.cgi?id=154420
<rdar://problem/24730322>

Reviewed by Brent Fulgham.

Source/WebCore:

* page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::isExperimentalDirectiveName): Move plugin-types from the directives considered
experimental to...
(WebCore::isCSPDirectiveName): ...the list of standard directives.
(WebCore::ContentSecurityPolicyDirectiveList::addDirective): Move logic to parse the plugin-types
directive outside the ENABLE(CSP_NEXT) macro guarded section/experimental feature runtime flag.

LayoutTests:

* TestExpectations: Mark http/tests/security/contentSecurityPolicy/1.1/plugintypes*.html tests as PASS so that we run them.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-invalid-expected.txt: Update expected result.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-invalid.html: Call runTests() following changes to multiple-iframe-plugin-test.js.
Also add closing tags for <body> and <html> to make the document well-formed.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-mismatched-data.html: Substitute "Content-Security-Policy" for "X-WebKit-CSP";
no behavior change.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-mismatched-url.html: Ditto.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html: Ditto.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-url-expected.txt: Update expected result.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-url.html: Substitute "Content-Security-Policy" for "X-WebKit-CSP";
no behavior change.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-allowed.html: Ditto.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html: Ditto.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-url-01.html: Call runTests() following changes to multiple-iframe-plugin-test.js.
Also add closing tags for <body> and <html> to make the document well-formed.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-url-02.html: Ditto.
* http/tests/security/contentSecurityPolicy/resources/echo-object-data.pl: Remove logic to support Content Security Policy header X-WebKit-CSP
as it is sufficient to make use of the standardized header Content-Security-Policy.
* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js: Simplify code now that we do not pass query string parameter
experimental to script echo-object-data.pl.
(runTests): Runs all the sub-tests.
(runNextTest.iframe.onload): Formerly named testImpl.iframe.onload.
(runNextTest): Formerly named testImpl. Runs the next sub-test.
(testExperimentalPolicy): Deleted.
(test): Deleted.
(testImpl.iframe.onload): Deleted.
(testImpl): Deleted.
(finishTesting): Deleted.
* http/tests/security/contentSecurityPolicy/source-list-parsing-no-semicolon-expected.txt: Update expected result based on change to test (below).
* http/tests/security/contentSecurityPolicy/source-list-parsing-no-semicolon.html: Modified to test that we emit
a console warning when plugin-types is used as a source expression.

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

4 years agoStackmaps have problems with double register constraints
fpizlo@apple.com [Wed, 24 Feb 2016 18:49:45 +0000 (18:49 +0000)]
Stackmaps have problems with double register constraints
https://bugs.webkit.org/show_bug.cgi?id=154643

Reviewed by Geoffrey Garen.

This is currently a benign bug. I found it while playing.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::fillStackmap):
* b3/testb3.cpp:
(JSC::B3::testURShiftSelf64):
(JSC::B3::testPatchpointDoubleRegs):
(JSC::B3::zero):
(JSC::B3::run):

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

4 years agoRebaseline two W3C tests for ios-simulator after r197014
ryanhaddad@apple.com [Wed, 24 Feb 2016 18:14:41 +0000 (18:14 +0000)]
Rebaseline two W3C tests for ios-simulator after r197014

Unreviewed test gardening.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:

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

4 years agoFollow up fix for the TimelineRuler "select all" mode to fix zeroTime.
timothy@apple.com [Wed, 24 Feb 2016 17:56:11 +0000 (17:56 +0000)]
Follow up fix for the TimelineRuler "select all" mode to fix zeroTime.

https://bugs.webkit.org/show_bug.cgi?id=154561
rdar://problem/24779872

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.set zeroTime): Change selectionStartTime
before _zeroTime so the check for entireRangeSelected still works.

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

4 years agoWeb Inspector: TimelineRuler should have a "select all" mode
mattbaker@apple.com [Wed, 24 Feb 2016 17:41:42 +0000 (17:41 +0000)]
Web Inspector: TimelineRuler should have a "select all" mode
https://bugs.webkit.org/show_bug.cgi?id=154561
<rdar://problem/24779872>

Reviewed by Timothy Hatcher.

TimelineRuler is initialized with a selected range of [0, Number.MAX_VALUE),
indicating the entire timeline is selected. This patch makes it possible to
return the ruler to this state, after being overwritten by a custom selection.
When no custom selection exists, the selection handles are hidden.

* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler.selection-hidden > :matches(.selection-drag, .selection-handle, .shaded-area)):
Style for hiding selection controls as needed.

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler):
Represent unbounded selection interval as [0, Number.MAX_VALUE).

(WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
Register double-click event listener.

(WebInspector.TimelineRuler.prototype.set zeroTime):
(WebInspector.TimelineRuler.prototype.get entireRangeSelected):
(WebInspector.TimelineRuler.prototype.selectEntireRange):
Let clients check and set the selection of the entire range without needing
to use the internal sentinel values 0 and Number.MAX_VALUE.

(WebInspector.TimelineRuler.prototype._updateSelection):
Update ruler styles and dispatch selection change event when entire
range is selected.

(WebInspector.TimelineRuler.prototype._handleDoubleClick):
If a user-defined selection exists, select the entire range.

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

4 years ago[ES6] Arrow function syntax. Emit loading&putting this/super only if they are used...
commit-queue@webkit.org [Wed, 24 Feb 2016 17:36:12 +0000 (17:36 +0000)]
[ES6] Arrow function syntax. Emit loading&putting this/super only if they are used in arrow function
https://bugs.webkit.org/show_bug.cgi?id=153981

Patch by Skachkov Oleksandr <gskachkov@gmail.com> on 2016-02-24
Reviewed by Saam Barati.
Source/JavaScriptCore:

In first iteration of implemenation arrow function, we emit load and store variables 'this', 'arguments',
'super', 'new.target' in case if arrow function is exist even variables are not used in arrow function.
Current patch added logic that prevent from emiting those varibles if they are not used in arrow function.
During syntax analyze parser store information about using variables in arrow function inside of
the ordinary function scope and then put to BytecodeGenerator through UnlinkedCodeBlock

* bytecode/ExecutableInfo.h:
(JSC::ExecutableInfo::ExecutableInfo):
(JSC::ExecutableInfo::arrowFunctionCodeFeatures):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::arrowFunctionCodeFeatures):
(JSC::UnlinkedCodeBlock::doAnyInnerArrowFunctionsUseArguments):
(JSC::UnlinkedCodeBlock::doAnyInnerArrowFunctionsUseSuperCall):
(JSC::UnlinkedCodeBlock::doAnyInnerArrowFunctionsUseSuperProperty):
(JSC::UnlinkedCodeBlock::doAnyInnerArrowFunctionsUseEval):
(JSC::UnlinkedCodeBlock::doAnyInnerArrowFunctionsUseThis):
(JSC::UnlinkedCodeBlock::doAnyInnerArrowFunctionsUseNewTarget):
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::generateUnlinkedFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
* bytecode/UnlinkedFunctionExecutable.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::emitLoadArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadThisFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadNewTargetFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::isThisUsedInInnerArrowFunction):
(JSC::BytecodeGenerator::isArgumentsUsedInInnerArrowFunction):
(JSC::BytecodeGenerator::isNewTargetUsedInInnerArrowFunction):
(JSC::BytecodeGenerator::isSuperUsedInInnerArrowFunction):
(JSC::BytecodeGenerator::emitPutNewTargetToArrowFunctionContextScope):
(JSC::BytecodeGenerator::emitPutDerivedConstructorToArrowFunctionContextScope):
(JSC::BytecodeGenerator::emitPutThisToArrowFunctionContextScope):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ThisNode::emitBytecode):
(JSC::EvalFunctionCallNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionNode::emitBytecode):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createFunctionMetadata):
* parser/Nodes.cpp:
(JSC::FunctionMetadataNode::FunctionMetadataNode):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseFunctionBody):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::isArrowFunctionBoundary):
(JSC::Scope::innerArrowFunctionFeatures):
(JSC::Scope::setInnerArrowFunctionUseSuperCall):
(JSC::Scope::setInnerArrowFunctionUseSuperProperty):
(JSC::Scope::setInnerArrowFunctionUseEval):
(JSC::Scope::setInnerArrowFunctionUseThis):
(JSC::Scope::setInnerArrowFunctionUseNewTarget):
(JSC::Scope::setInnerArrowFunctionUseArguments):
(JSC::Scope::setInnerArrowFunctionUseEvalAndUseArgumentsIfNeeded):
(JSC::Scope::collectFreeVariables):
(JSC::Scope::mergeInnerArrowFunctionFeatures):
(JSC::Scope::fillParametersForSourceProviderCache):
(JSC::Scope::restoreFromSourceProviderCache):
(JSC::Scope::setIsFunction):
(JSC::Scope::setIsArrowFunction):
(JSC::Parser::closestParentNonArrowFunctionNonLexicalScope):
(JSC::Parser::pushScope):
(JSC::Parser::popScopeInternal):
* parser/ParserModes.h:
* parser/SourceProviderCacheItem.h:
(JSC::SourceProviderCacheItem::SourceProviderCacheItem):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createFunctionMetadata):
* tests/stress/arrowfunction-lexical-bind-arguments-non-strict-1.js:
* tests/stress/arrowfunction-lexical-bind-arguments-strict.js:
* tests/stress/arrowfunction-lexical-bind-newtarget.js:
* tests/stress/arrowfunction-lexical-bind-superproperty.js:
* tests/stress/arrowfunction-lexical-bind-this-8.js: Added.

LayoutTests:

Added new benchmark tests for invoking arrow function within function, class's constructor and method

* js/regress/arrowfunction-call-in-class-constructor-expected.txt: Added.
* js/regress/arrowfunction-call-in-class-constructor.html: Added.
* js/regress/arrowfunction-call-in-class-method-expected.txt: Added.
* js/regress/arrowfunction-call-in-class-method.html: Added.
* js/regress/arrowfunction-call-in-function-expected.txt: Added.
* js/regress/arrowfunction-call-in-function.html: Added.
* js/regress/script-tests/arrowfunction-call-in-class-constructor.js: Added.
* js/regress/script-tests/arrowfunction-call-in-class-method.js: Added.
* js/regress/script-tests/arrowfunction-call-in-function.js: Added.
* js/regress/script-tests/arrowfunction-call.js:

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

4 years agoSpeculative fix for ios build.
ryanhaddad@apple.com [Wed, 24 Feb 2016 17:26:52 +0000 (17:26 +0000)]
Speculative fix for ios build.

Unreviewed build fix.

* bindings/objc/DOM.mm:
(-[DOMNode nextFocusNode]):
(-[DOMNode previousFocusNode]):

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

4 years ago[WinCairo] Mark layer as non composited.
peavo@outlook.com [Wed, 24 Feb 2016 17:19:23 +0000 (17:19 +0000)]
[WinCairo] Mark layer as non composited.
https://bugs.webkit.org/show_bug.cgi?id=154640

Reviewed by Alex Christensen.

We need to mark the non composited layer as being non composited.

* WebCoreSupport/AcceleratedCompositingContext.cpp:
(AcceleratedCompositingContext::initialize):
(AcceleratedCompositingContext::flushPendingLayerChanges):

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

4 years agoBackground of an absolutely positioned inline element inside text-indented parent...
zalan@apple.com [Wed, 24 Feb 2016 17:13:33 +0000 (17:13 +0000)]
Background of an absolutely positioned inline element inside text-indented parent is positioned statically.
https://bugs.webkit.org/show_bug.cgi?id=154019

Reviewed by Simon Fraser.

This patch ensures that statically positioned out-of-flow renderers are also text-aligned
even when none of the renderers on the first line generate a linebox (so we end up with no bidi runs at all).
The fix is to pass IndentTextOrNot information to startAlignedOffsetForLine through updateStaticInlinePositionForChild
so that we can compute the left position for this statically positioned out of flow renderer.

Source/WebCore:

Test: fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustPositionedBlock):
(WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipTrailingWhitespace):
(WebCore::LineBreaker::skipLeadingWhitespace):
* rendering/line/LineInlineHeaders.h: webkit.org/b/154628 fixes the bool vs IndentTextOrNot issue.
(WebCore::setStaticPositions):

LayoutTests:

* fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child-expected.html: Added.
* fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html: Added.

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

4 years agoWeb Inspector: Dim selected items when docked Inspector window is inactive
nvasilyev@apple.com [Wed, 24 Feb 2016 17:06:50 +0000 (17:06 +0000)]
Web Inspector: Dim selected items when docked Inspector window is inactive
https://bugs.webkit.org/show_bug.cgi?id=154526
<rdar://problem/24764365>

Abstract selected item and SVG glyph colors into CSS variables.

Reviewed by Timothy Hatcher.

* UserInterface/Views/BezierEditor.css:
(.bezier-editor > .bezier-preview > div):
* UserInterface/Views/ButtonNavigationItem.css:
(.navigation-bar .item.button > .glyph):
(.navigation-bar .item.button:not(.disabled):active > .glyph):
(.navigation-bar .item.button:not(.disabled):matches(:focus, .activate.activated, .radio.selected) > .glyph):
(.navigation-bar .item.button:not(.disabled):active:matches(:focus, .activate.activated, .radio.selected) > .glyph):
(.navigation-bar .item.button.disabled > .glyph):
* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph):
(.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover):
* UserInterface/Views/ConsoleMessageView.css:
(.console-user-command.special-user-log > .console-message-text):
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li.pseudo-class-enabled > .selection::before):
* UserInterface/Views/Main.css:
(input[type=range]::-webkit-slider-runnable-track::before):
* UserInterface/Views/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only:hover):
(.navigation-bar .item.radio.button.text-only.selected):
(.navigation-bar .item.radio.button.text-only:active):
(.navigation-bar .item.radio.button.text-only.selected:active):
* UserInterface/Views/ScopeBar.css:
(.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows):
(.scope-bar > li:hover):
(.scope-bar > li.selected):
(.scope-bar > li:active):
(.scope-bar > li.selected:active):
* UserInterface/Views/Variables.css:
(:root):
(body.window-inactive):
* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section .details-section.has-set-property > .header > span::after):
* UserInterface/Views/VisualStyleKeywordIconList.css:
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon:matches(.computed, .selected)):
(.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected):

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

4 years agoRemove IteratorKey and IteratorValue declarations from JSXX class declarations.
youenn.fablet@crf.canon.fr [Wed, 24 Feb 2016 14:17:48 +0000 (14:17 +0000)]
Remove IteratorKey and IteratorValue declarations from JSXX class declarations.
https://bugs.webkit.org/show_bug.cgi?id=154577

Reviewed by Myles C. Maxfield.

No change of behavior.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Deleted declaration of IteratorKey and IteratorValue.
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::createStructure): Rebasing of binding test expectation.

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

4 years agoW3C importer should generate all web-platform-tests submodules descriptions
youenn.fablet@crf.canon.fr [Wed, 24 Feb 2016 12:14:30 +0000 (12:14 +0000)]
W3C importer should generate all web-platform-tests submodules descriptions
https://bugs.webkit.org/show_bug.cgi?id=154587

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* resources/TestRepositories: Reactivated submodules description generation.
* resources/web-platform-tests-modules.json: Updated according modified scripts.

Tools:

Updated submodules description format (removing submodule name as it is the last string of the path really).
Added git subroutines.

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.origin_url):
(Git):
(Git.init_submodules):
(Git.submodules_status):
(Git.deinit_submodules):
* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer._install_modules): Updated to submodule name removal.
* Scripts/webkitpy/w3c/test_downloader.py:
(TestDownloader._git_submodules_description): Updated to cope with recursive submodules (use of submodule init/deinit).
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.test_submodules_generation): Reactivated partially this test.

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

4 years ago[Fetch API] Refactor FetchHeaders initialization with iterators
youenn.fablet@crf.canon.fr [Wed, 24 Feb 2016 12:11:15 +0000 (12:11 +0000)]
[Fetch API] Refactor FetchHeaders initialization with iterators
https://bugs.webkit.org/show_bug.cgi?id=154537

Reviewed by Darin Adler.

Covered by existing tests.

* Modules/fetch/FetchHeaders.cpp:
(WebCore::initializeWith): Deleted.
* Modules/fetch/FetchHeaders.h: Removed FetchHeaders::initializeWith.
* Modules/fetch/FetchHeaders.idl: Ditto.
* Modules/fetch/FetchHeaders.js:
(initializeFetchHeaders): Making use of iterators to fill headers.

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

4 years agoUnreviewed. Fix GObject DOM bindings API break after r196998.
carlosgc@webkit.org [Wed, 24 Feb 2016 11:13:58 +0000 (11:13 +0000)]
Unreviewed. Fix GObject DOM bindings API break after r196998.

webkit_dom_node_clone_node can now raise exceptions, so rename it
as webkit_dom_node_clone_node_with_error and deprecate the old one
that calls the new one ignoring the error.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_node_clone_node):
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols:
* bindings/gobject/webkitdom.symbols:
* bindings/scripts/CodeGeneratorGObject.pm:
(FunctionUsedToNotRaiseException):
(GenerateFunction):

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

4 years agoREGRESSION(r195949): [GTK] Test /webkit2/WebKitWebView/insert/link is failing since...
carlosgc@webkit.org [Wed, 24 Feb 2016 10:41:11 +0000 (10:41 +0000)]
REGRESSION(r195949): [GTK] Test /webkit2/WebKitWebView/insert/link is failing since r195949
https://bugs.webkit.org/show_bug.cgi?id=153747

Reviewed by Michael Catanzaro.

Source/WebCore:

Do not return early when reaching a boundary if there's a range
selection. In that case, the selection will be cleared and
accessibility will be notified.

Test: editing/selection/move-to-line-boundary-clear-selection.html

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::modify):

LayoutTests:

Add test to check that moving to line boundary clears the
selection even if the cursor is already at the boundary.

* editing/selection/move-to-line-boundary-clear-selection-expected.txt: Added.
* editing/selection/move-to-line-boundary-clear-selection.html: Added.

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

4 years ago[Gstreamer] Mediaplayer should observe the tracks and not the source
commit-queue@webkit.org [Wed, 24 Feb 2016 10:12:54 +0000 (10:12 +0000)]
[Gstreamer] Mediaplayer should observe the tracks and not the source
https://bugs.webkit.org/show_bug.cgi?id=154582

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

We have to observe the track objects that define the
mediastream. Replace the source attributes with the new tracks and
use them properly in the class.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
(WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
Make sure we are not observing anymore the tracks after
destruction.
(WebCore::MediaPlayerPrivateGStreamerOwr::hasVideo): Used the track
instead of the source.
(WebCore::MediaPlayerPrivateGStreamerOwr::hasAudio): Ditto.
(WebCore::MediaPlayerPrivateGStreamerOwr::currentTime): Ditto.
(WebCore::MediaPlayerPrivateGStreamerOwr::internalLoad): Ditto.
(WebCore::MediaPlayerPrivateGStreamerOwr::stop): Ditto.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): Added, new
track observer API, make sure we disable the ended tracks.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackMutedChanged):
Added, new track observer API.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackSettingsChanged):
Added, new track observer API.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
Added, new track observer API.
(WebCore::MediaPlayerPrivateGStreamerOwr::sourceStopped): Deleted,
source observer API.
(WebCore::MediaPlayerPrivateGStreamerOwr::sourceMutedChanged):
Deleted, source observer API.
(WebCore::MediaPlayerPrivateGStreamerOwr::sourceSettingsChanged):
Deleted, source observer API.
(WebCore::MediaPlayerPrivateGStreamerOwr::preventSourceFromStopping):
Deleted, source observer API.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
Replaced the attributes representing the source with the tracks
and added the new track observer functions.

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

4 years ago[css-grid] Swap the order of columns/rows in grid-gap shorthand
svillar@igalia.com [Wed, 24 Feb 2016 10:03:25 +0000 (10:03 +0000)]
[css-grid] Swap the order of columns/rows in grid-gap shorthand
https://bugs.webkit.org/show_bug.cgi?id=154584

Source/WebCore:

The latest editor's draft have just changed the order. Now it
should be <grid-row-gap> <grid-column-gap>?.

Reviewed by Darin Adler.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridGapShorthand):
* css/CSSPropertyNames.in:

LayoutTests:

Reviewed by Darin Adler.

* fast/css-grid-layout/grid-gutters-get-set-expected.txt:
* fast/css-grid-layout/grid-gutters-get-set.html:

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

4 years agoMove FocusNavigationScope into FocusController.cpp
rniwa@webkit.org [Wed, 24 Feb 2016 09:36:12 +0000 (09:36 +0000)]
Move FocusNavigationScope into FocusController.cpp
https://bugs.webkit.org/show_bug.cgi?id=154630

Reviewed by Darin Adler.

Source/WebCore:

Moved FocusNavigationScope from FocusController.h to FocusController.cpp.

* bindings/objc/DOM.mm:
(-[DOMNode nextFocusNode]):
(-[DOMNode previousFocusNode]):
* page/FocusController.cpp:
(WebCore::parentInScope):
(WebCore::FocusNavigationScope::firstChildInScope): Moved into FocusNavigationScope.
(WebCore::FocusNavigationScope::lastChildInScope): Ditto.
(WebCore::FocusNavigationScope::nextInScope): Ditto.
(WebCore::FocusNavigationScope::previousInScope): Ditto.
(WebCore::FocusController::findFocusableElementAcrossFocusScope):
(WebCore::FocusController::findFocusableElementRecursively):
(WebCore::FocusController::findFocusableElement):
(WebCore::nextElementWithGreaterTabIndex):
(WebCore::previousElementWithLowerTabIndex):
(WebCore::FocusController::nextFocusableElement): Added a variant for DOM.mm and WebPageIOS.mm.
(WebCore::FocusController::previousFocusableElement): Ditto.
(WebCore::FocusController::nextFocusableElement):
(WebCore::FocusController::previousFocusableElement): Use if instead of for loop for clarity.
* page/FocusController.h:

Source/WebKit2:

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::nextAssistableElement):

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

4 years agoWebRTC: RTCPeerConnection: Sort out responsibilities of close() and stop()
adam.bergkvist@ericsson.com [Wed, 24 Feb 2016 08:14:58 +0000 (08:14 +0000)]
WebRTC: RTCPeerConnection: Sort out responsibilities of close() and stop()
https://bugs.webkit.org/show_bug.cgi?id=154581

Reviewed by Eric Carlson.

Source/WebCore:

Let RTCPeerConnection::close() contain all teardown logic be called by stop().
close() is also responisble for stopping the PeerConnectionBackend and stopping
all RTCRtpSender objects.

Test coverage:
fast/mediastream/RTCRtpSender-replaceTrack.html (updated)
fast/mediastream/RTCPeerConnection-closed-state.html

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::close):
(WebCore::RTCPeerConnection::stop):
(WebCore::RTCPeerConnection::RTCPeerConnection): Deleted.
* Modules/mediastream/RTCPeerConnection.h:

LayoutTests:

Updated test with replaceTrack() call after the RTCPeerConnection object, that
created the RTCRtpSender, is closed.

* fast/mediastream/RTCRtpSender-replaceTrack-expected.txt:
* fast/mediastream/RTCRtpSender-replaceTrack.html:

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

4 years agoWebRTC: Add addReceiver() function to PeerConnectionBackendClient interface
adam.bergkvist@ericsson.com [Wed, 24 Feb 2016 08:12:14 +0000 (08:12 +0000)]
WebRTC: Add addReceiver() function to PeerConnectionBackendClient interface
https://bugs.webkit.org/show_bug.cgi?id=154583

Reviewed by Eric Carlson.

The addRecevier() notifies the PeerConnectionBackendClient that a new RTCRtpReceiver,
representing an MediaStreamTrack received from a remote peer, is added.

* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addReceiver):
* Modules/mediastream/RTCPeerConnection.h:

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

4 years agoSupport building LocaleICU with light ICU (UCONFIG_NO_FORMATTING)
commit-queue@webkit.org [Wed, 24 Feb 2016 07:20:30 +0000 (07:20 +0000)]
Support building LocaleICU with light ICU (UCONFIG_NO_FORMATTING)
https://bugs.webkit.org/show_bug.cgi?id=154484

Patch by Olivier Blin <olivier.blin@softathome.com> on 2016-02-23
Reviewed by Darin Adler.

In this mode, this makes LocaleICU with UCONFIG_NO_FORMATTING
essentially the same as LocaleNone, but allows to keep using ICU for
other features.

* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::LocaleICU):
(WebCore::LocaleICU::~LocaleICU):
(WebCore::LocaleICU::initializeLocaleData):
* platform/text/LocaleICU.h:

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

4 years agoWeb Inspector: don't run the protocol generator once per output file
bburg@apple.com [Wed, 24 Feb 2016 07:11:35 +0000 (07:11 +0000)]
Web Inspector: don't run the protocol generator once per output file
https://bugs.webkit.org/show_bug.cgi?id=154635

Reviewed by Myles C. Maxfield.

* DerivedSources.make: Use $(firstword, ...) to take just one file as
the target to be built so that the generator runs only once. Make isn't
really designed to coalesce multiple file outputs to one production rule.

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