WebKit-https.git
6 years agoReproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
timothy_horton@apple.com [Tue, 17 Mar 2015 19:15:54 +0000 (19:15 +0000)]
Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
https://bugs.webkit.org/show_bug.cgi?id=142776
<rdar://problem/18921338>

Reviewed by Alexey Proskuryakov.

Test: fast/animation/request-animation-frame-unparented-iframe-crash.html

In some cases (like the new test), we can end up trying to start
requestAnimationFrame on a Document that has no Page. Most paths null-checked
the Page and did the right thing, but one failed to do so. In addition,
the current fallback (when Page is null) can result in us constructing
the wrong kind of DisplayRefreshMonitor, which could lead to trouble
down the road when it's reused. Instead, just completely avoid making a
DisplayRefreshMonitor in the null-page case.

* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
If the page is null, bail.

* dom/ScriptedAnimationController.h:
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::create):
Use Optional<> to make it easy to distinguish between ChromeClient
being unreachable (because we don't have a Page for some reason) and
ChromeClient declaring that it doesn't want to override the type of
DisplayRefreshMonitor that is created.

If ChromeClient was unreachable for some reason, we'll get back an engaged
nullptr and return it (instead of creating a DisplayRefreshMonitor based
on the platform). This avoids creating the wrong type of DisplayRefreshMonitor
in the rare case where we can't reach the ChromeClient (e.g. a freshly unparented
IFrame).

If instead the client returns a disengaged Nullopt, we'll interpret that as
"construct the default type", which falls back on the platform #ifdefs to
decide what to make.

* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
(WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
Silently handle the case where we failed to make a DisplayRefreshMonitor.

* platform/graphics/DisplayRefreshMonitor.h:
* platform/graphics/DisplayRefreshMonitorClient.h:
* platform/graphics/GraphicsLayerUpdater.cpp:
(WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
* platform/graphics/GraphicsLayerUpdater.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
* rendering/RenderLayerCompositor.h:
Adjust to the new signature of createDisplayRefreshMonitor, and return
an engaged (nullptr) Optional if we can't get to ChromeClient for any reason.

* page/ChromeClient.h:
Return Nullopt (indicating a lack of override) by default.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createDisplayRefreshMonitor):
* WebProcess/WebCoreSupport/WebChromeClient.h:
Adjust to the new signature.

* fast/animation/request-animation-frame-unparented-iframe-crash-expected.txt: Added.
* fast/animation/request-animation-frame-unparented-iframe-crash.html: Added.
Add a test that ensures that calling requestAnimationFrame on a recently-unparented
frame doesn't crash.

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

6 years agoImplement Scroll Container Animation Triggers
dino@apple.com [Tue, 17 Mar 2015 19:01:46 +0000 (19:01 +0000)]
Implement Scroll Container Animation Triggers
https://bugs.webkit.org/show_bug.cgi?id=142732

Reviewed by Simon Fraser.

Source/WebCore:

Test: animations/trigger-container-scroll-simple.html

Basic implementation of container-scroll. It only checks
the page scroll position for trigger values (not the scrolling
container in an overflow).

* css/CSSComputedStyleDeclaration.cpp: Add CSSPropertyWebkitAnimationTrigger
so that this property will appear in the inspector.

* page/FrameView.cpp:
(WebCore::FrameView::sendScrollEvent): If the page has scrolled, let the animation
controller know about it.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::updateStateMachine): Whitespace fix.
(WebCore::AnimationBase::fireAnimationEventsIfNeeded): If there is a trigger,
and the scroll position is past it, then tell the state machine that
we should start.
(WebCore::AnimationBase::timeToNextService): Use the scroll position as
an input to the update timer if a trigger is involved.

* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Add whitespace.
(WebCore::AnimationControllerPrivate::scrollWasUpdated): Call updateAnimations.
(WebCore::AnimationController::scrollWasUpdated): Call into AnimationControllerPrivate.
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:

* page/animation/CompositeAnimation.cpp: Keep a record of whether we have a scroll
triggered animation.
(WebCore::CompositeAnimation::CompositeAnimation):
(WebCore::CompositeAnimation::updateKeyframeAnimations):
* page/animation/CompositeAnimation.h:
(WebCore::CompositeAnimation::hasScrollTriggeredAnimation):
* platform/animation/Animation.cpp:
(WebCore::Animation::operator=):

LayoutTests:

Test that checks if an animation only triggers when the page
is scrolled.

* animations/trigger-container-scroll-simple-expected.txt: Added.
* animations/trigger-container-scroll-simple.html: Added.

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

6 years agoMove some code from LogicalSelectionOffsetCaches into RenderElement
simon.fraser@apple.com [Tue, 17 Mar 2015 18:58:59 +0000 (18:58 +0000)]
Move some code from LogicalSelectionOffsetCaches into RenderElement
https://bugs.webkit.org/show_bug.cgi?id=142758

Reviewed by Myles C. Maxfield.

LogicalSelectionOffsetCaches had some useful code regarding containing blocks etc
that should be used in more places, so move it into RenderElement.

No behavior change.

* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
(WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): Deleted.
(WebCore::isNonRenderBlockInline): Deleted.
(WebCore::containingBlockForFixedPosition): Deleted.
(WebCore::containingBlockForAbsolutePosition): Deleted.
(WebCore::containingBlockForObjectInFlow): Deleted.
* rendering/RenderBlock.cpp: No need to initialize static data.
(WebCore::RenderBlock::positionedObjects): nullptr
* rendering/RenderElement.cpp:
(WebCore::RenderElement::containingBlockForFixedPosition):
(WebCore::RenderElement::containingBlockForAbsolutePosition):
(WebCore::isNonRenderBlockInline):
(WebCore::RenderElement::containingBlockForObjectInFlow):
* rendering/RenderElement.h:
(WebCore::RenderElement::canContainAbsolutelyPositionedObjects):
* rendering/RenderLayer.cpp:
(WebCore::isContainerForPositioned):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):

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

6 years ago[WinCairo] Unreviewed build fix after r181640.
achristensen@apple.com [Tue, 17 Mar 2015 18:02:56 +0000 (18:02 +0000)]
[WinCairo] Unreviewed build fix after r181640.

* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
Tell Windows how to find ShaderLang.h.

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

6 years ago[Win] Skip some IndexDB tests that don't apply on Windows.
bfulgham@apple.com [Tue, 17 Mar 2015 17:50:45 +0000 (17:50 +0000)]
[Win] Skip some IndexDB tests that don't apply on Windows.

* platform/win/TestExpectations:

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

6 years agoDisk cache should support Vary: Cookie
antti@apple.com [Tue, 17 Mar 2015 16:09:06 +0000 (16:09 +0000)]
Disk cache should support Vary: Cookie
https://bugs.webkit.org/show_bug.cgi?id=142770
Source/WebKit2:

rdar://problem/19764945

Reviewed by Anders Carlsson.

Cookies are not part of the original request but are added by the networking layer when submitting the request.
Fetch them explicitly when resolving Vary: Cookie.

The implementation is not perfect as it fetches the cookie for the cache entry when saving a Vary:Cookie response,
not when making the request. In principle the cookie may have changed in-between. This should be enough to handle
reasonable cases though. Fetching cookies for every request might be too expensive for this rarely used feature.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::headerValueForVary):
(WebKit::NetworkCache::encodeStorageEntry):
(WebKit::NetworkCache::verifyVaryingRequestHeaders):

LayoutTests:

Reviewed by Anders Carlsson.

* http/tests/cache/disk-cache-vary-cookie-expected.txt: Added.
* http/tests/cache/disk-cache-vary-cookie.html: Added.

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

6 years agoDFG IR shouldn't have a separate node for every kind of put hint that could be descri...
fpizlo@apple.com [Tue, 17 Mar 2015 15:50:44 +0000 (15:50 +0000)]
DFG IR shouldn't have a separate node for every kind of put hint that could be described using PromotedLocationDescriptor
https://bugs.webkit.org/show_bug.cgi?id=142769

Reviewed by Michael Saboff.

When we sink an object allocation, we need to have some way of tracking what stores would
have happened had the allocation not been sunk, so that we know how to rematerialize the
object on OSR exit. Prior to this change, trunk had two ways of describing such a "put
hint":

- The PutStrutureHint and PutByOffsetHint node types.
- The PromotedLocationDescriptor class, which has an enum with cases StructurePLoc and
  NamedPropertyPLoc.

We also had ways of converting from a Node with those two node types to a
PromotedLocationDescriptor, and we had a way of converting a PromotedLocationDescriptor to
a Node.

This change removes the redundancy. We now have just one node type that corresponds to a
put hint, and it's called PutHint. It has a PromotedLocationDescriptor as metadata.
Converting between a PutHint node and a PromotedLocationDescriptor and vice-versa is now
trivial.

This means that if we add new kinds of sunken objects, we'll have less pro-forma to write
for the put hints to those objects. This is mainly to simplify the implementation of
arguments elimination in bug 141174.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::mergeRelevantToOSR):
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToPutHint):
(JSC::DFG::Node::convertToPutStructureHint):
(JSC::DFG::Node::convertToPutByOffsetHint):
(JSC::DFG::Node::promotedLocationDescriptor):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasIdentifier):
(JSC::DFG::Node::hasPromotedLocationDescriptor):
(JSC::DFG::Node::convertToPutByOffsetHint): Deleted.
(JSC::DFG::Node::convertToPutStructureHint): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::run):
(JSC::DFG::ObjectAllocationSinkingPhase::lowerNonReadingOperationsOnPhantomAllocations):
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGPromoteHeapAccess.h:
(JSC::DFG::promoteHeapAccess):
* dfg/DFGPromotedHeapLocation.cpp:
(JSC::DFG::PromotedHeapLocation::createHint):
* dfg/DFGPromotedHeapLocation.h:
(JSC::DFG::PromotedLocationDescriptor::imm1):
(JSC::DFG::PromotedLocationDescriptor::imm2):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validateCPS):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):

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

6 years ago'pageLoaded' diagnostic logging is too verbose
cdumez@apple.com [Tue, 17 Mar 2015 15:48:32 +0000 (15:48 +0000)]
'pageLoaded' diagnostic logging is too verbose
https://bugs.webkit.org/show_bug.cgi?id=142727
<rdar://problem/18937048>

Reviewed by Eric Carlson.

Make 'pageLoaded' diagnostic logging less verbose:
- Log once per main frame instead of once for subframe
- Apply sampling

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

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

6 years ago[l10n] Updated Hebrew translation of WebKitGTK+
commit-queue@webkit.org [Tue, 17 Mar 2015 12:38:38 +0000 (12:38 +0000)]
[l10n] Updated Hebrew translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=142781

Patch by Yosef Or Boczko <yoseforb@gnome.org> on 2015-03-17
Reviewed by Carlos Garcia Campos.

* he.po:

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

6 years ago[GTK] Wrong transfer annotations used in GObject DOM bindings
carlosgc@webkit.org [Tue, 17 Mar 2015 12:22:06 +0000 (12:22 +0000)]
[GTK] Wrong transfer annotations used in GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=142780

Reviewed by Gustavo Noronha Silva.

We are using transfer none for all methods returning a GObject DOM
Object. That's not true. Only objects derived from Node are
automatically released by the DOM object cache and can be transfer
none. All other objects are added to the cache only to avoid
creating the same wrapper twice for the same core object, but
caller should release the returned reference.

* bindings/gobject/WebKitDOMCustomUnstable.h:
* bindings/scripts/CodeGeneratorGObject.pm:
(GetTransferTypeForReturnType):
(GenerateFunction):

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

6 years ago[l10n] Updated Polish translation of WebKitGTK+
berto@igalia.com [Tue, 17 Mar 2015 11:57:40 +0000 (11:57 +0000)]
[l10n] Updated Polish translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=142306

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2015-03-17
Reviewed by Carlos Garcia Campos.

* pl.po:

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

6 years ago[GTK] WebKitDOM objects leaking
carlosgc@webkit.org [Tue, 17 Mar 2015 11:10:13 +0000 (11:10 +0000)]
[GTK] WebKitDOM objects leaking
https://bugs.webkit.org/show_bug.cgi?id=118788

Reviewed by Darin Adler and Sergio Villar Senin.

Source/WebCore:

Use a DOMwindowObserver class, derived from DOMWindowProperty to
be notified when the window object is detached from the frame to
clear the DOM objects associated to that frame in that case too.

* bindings/gobject/DOMObjectCache.cpp:

Tools:

Update DOMObjectCache unit test to check that DOM objects are also
released when new contents are loaded in the web view, and the old
document is detached from the frame.

* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp:
(testWebKitDOMObjectCache):
* TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp:
(runTest):

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

6 years ago[WK2] Use C++ lambdas in IPC::Connection
zandobersek@gmail.com [Tue, 17 Mar 2015 10:04:34 +0000 (10:04 +0000)]
[WK2] Use C++ lambdas in IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=138018

Reviewed by Anders Carlsson.

Replace uses of WTF::bind() in the IPC::Connection class with C++ lambdas.

* Platform/IPC/Connection.cpp:
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::invalidate):
(IPC::Connection::sendMessage):
(IPC::Connection::processIncomingMessage): Simplify the error messages so we
don't have to format strings on-the-fly, removing the issues of cross-thread
string copying altogether.
(IPC::Connection::dispatchDidReceiveInvalidMessage): The parameters are now
of the StringReference type.
(IPC::Connection::enqueueIncomingMessage):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::receiveSourceEventHandler):
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::open):

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

6 years ago[CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE...
zandobersek@gmail.com [Tue, 17 Mar 2015 09:45:55 +0000 (09:45 +0000)]
[CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
https://bugs.webkit.org/show_bug.cgi?id=142530

Reviewed by Darin Adler.

Source/ThirdParty/ANGLE:

* ANGLE/ShaderLang.h: Added. Includes include/GLSLANG/ShaderLang.h. Used in WebCore
so we can avoid using ANGLE's EGL headers and use the system-default headers instead.

Source/WebCore:

Include the ANGLE's ShaderLang.h through the new forwarding header. This allows
us to not list Source/ThirdParty/ANGLE/include in the list of inclusion directories
and thus avoid ANGLE's EGL and GLES2/GLES3 headers, defaulting to the system-provided
headers instead.

Source/ThirdParty/ANGLE/include/KHR is still used because ANGLE's khrplatform.h is
required by the ShaderLang.h header. Source/ThirdParty/ANGLE/src is not used for the
whole WebCore library anymore, only the ANGLESupport library.

* CMakeLists.txt:
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:

Source/WebKit2:

* CMakeLists.txt: Replace the Source/ThirdParty/ANGLE/include/GLSLANG entry
in the list of inclusion directories for WebKit2 with Source/ThirdParty/ANGLE,
possible due to the new forwarding header for ANGLE's ShaderLang.h.

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

6 years agoWindows X86-64 should use the fixed executable allocator
msaboff@apple.com [Tue, 17 Mar 2015 09:33:30 +0000 (09:33 +0000)]
Windows X86-64 should use the fixed executable allocator
https://bugs.webkit.org/show_bug.cgi?id=142749

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Added jit/ExecutableAllocatorFixedVMPool.cpp to Windows build.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* jit/ExecutableAllocatorFixedVMPool.cpp: Don't include unistd.h on Windows.

Source/WTF:

Set ENABLE_EXECUTABLE_ALLOCATOR_FIXED for Windows.
Needed to export MetaAllocator::currentStatistics() for use in JavaScriptCore.

* wtf/MetaAllocator.h:
* wtf/Platform.h:

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

6 years agoW3C test importer default import folder should be LayoutTests/imported/w3c
youenn.fablet@crf.canon.fr [Tue, 17 Mar 2015 09:03:15 +0000 (09:03 +0000)]
W3C test importer default import folder should be LayoutTests/imported/w3c
https://bugs.webkit.org/show_bug.cgi?id=142728

Reviewed by Bem Jones-Bey.

* Scripts/webkitpy/w3c/test_importer.py:
(parse_args): Updating the default destination option value to 'imported/w3c'.

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

6 years agoWeb Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
commit-queue@webkit.org [Tue, 17 Mar 2015 08:43:30 +0000 (08:43 +0000)]
Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
https://bugs.webkit.org/show_bug.cgi?id=142029

Patch by Matt Baker <mattbaker@apple.com> on 2015-03-17
Reviewed by Timothy Hatcher.

Add UI for showing runloop records and their child records as a frame histogram,
with the recording time on the x-axis and the frame duration on the y-axis. Each frame
is comprised of colored regions representing the time spent in various activities (script,
layout, etc).

Eventually the Frames timeline will replace the Layout & Rendering timeline. Until the views
for the new timeline are finalized the Layout & Rendering timeline will remain in place.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New string and files.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype.pageDidLoad):
(WebInspector.TimelineManager.prototype._processNestedRecords):
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._processEvent):
(WebInspector.TimelineManager.prototype._loadNewRecording):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Deleted.
Added support for new runloop record type and nested record handling.

* UserInterface/Images/Frames.png: Added.
* UserInterface/Images/Frames@2x.png: Added.
* UserInterface/Images/FramesLarge.png: Added.
* UserInterface/Images/FramesLarge@2x.png: Added.
New images for runloop timeline overview graph and runloop tree records.

* UserInterface/Models/RunLoopTimelineRecord.js: Added.
(WebInspector.RunLoopTimelineRecord):
(WebInspector.RunLoopTimelineRecord.prototype.get children):
(WebInspector.RunLoopTimelineRecord.prototype.get durationRemainder):
(WebInspector.RunLoopTimelineRecord.prototype.durationForRecords.get var):
Extends TimelineRecord to add child records and subframe duration details.

* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.get displayName):
(WebInspector.Timeline.prototype.get iconClassName):
New UI strings and icons.

* UserInterface/Models/TimelineRecord.js:
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
Added support for new runloop record type.

* UserInterface/Views/RunLoopTimelineOverviewGraph.css: Added.
(.timeline-overview-graph.runloop > .divider):
(.timeline-overview-graph.runloop > .divider > span):
New styles for runloop timeline graph.

* UserInterface/Views/RunLoopTimelineOverviewGraph.js: Added.
(WebInspector.RunLoopTimelineOverviewGraph):
(WebInspector.RunLoopTimelineOverviewGraph.prototype.updateLayout.createFrame):
(WebInspector.RunLoopTimelineOverviewGraph.prototype.get graphHeightSeconds.this):
(WebInspector.RunLoopTimelineOverviewGraph.prototype.get graphHeightSeconds):
(WebInspector.RunLoopTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition.get if):
New overview graph for displaying TimelineRecordFrames and horizontal frame budget dividers.

* UserInterface/Views/TimelineIcons.css:
(.runloop-icon .icon):
(.runloop-icon.large .icon):
(.runloop-record .icon):
* UserInterface/Views/TimelineSidebarPanel.js:
New runloop icon styles.

* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph):
Updated factory to support creation of the new overview graph.

* UserInterface/Views/TimelineRecordFrame.css: Added.
(.timeline-record-frame):
(.timeline-record-frame > .frame):
(.timeline-record-frame > .dropped):
(.timeline-record-frame > .frame > .duration):
(.timeline-record-frame > .frame > .duration:first-child):
(.timeline-record-frame > .frame > .duration:last-child):
(.timeline-record-frame > .frame > .duration.timeline-record-type-network):
(.timeline-record-frame > .frame > .duration.timeline-record-type-layout):
(.timeline-record-frame > .frame > .duration.timeline-record-type-script):
New styles for frame bars in the runloop timeline graph.

* UserInterface/Views/TimelineRecordFrame.js: Added.
(WebInspector.TimelineRecordFrame):
(WebInspector.TimelineRecordFrame.createCombinedFrames):
(WebInspector.TimelineRecordFrame.prototype.get element):
(WebInspector.TimelineRecordFrame.prototype.get duration):
(WebInspector.TimelineRecordFrame.prototype.get records):
(WebInspector.TimelineRecordFrame.prototype.set records):
(WebInspector.TimelineRecordFrame.prototype._updateChildElements.createDurationElement):
New view representing a single frame within the runloop overview graph.

* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
New files.

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

6 years agoWeb Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
commit-queue@webkit.org [Tue, 17 Mar 2015 08:41:19 +0000 (08:41 +0000)]
Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
https://bugs.webkit.org/show_bug.cgi?id=142029

Patch by Matt Baker <mattbaker@apple.com> on 2015-03-17
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/Timeline.json:
Added new event type for runloop timeline records.

Source/WebCore:

Add new functionality to the Inspector timelines backend to add runloop data to timeline recordings.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::currentRunLoop):
(WebCore::InspectorTimelineAgent::internalStart):
(WebCore::InspectorTimelineAgent::internalStop):
(WebCore::toProtocol):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
Install observers for the begining and end of the runloop when recording begins. All other
instrumented timeline events get added as children of the current runloop record, which is
sent to the frontend once the runloop completes.

* inspector/InspectorTimelineAgent.h:

* platform/cf/RunLoopObserver.cpp:
(WebCore::RunLoopObserver::schedule):
Wrapper changed to allow observing arbitrary runloop activities.

* platform/cf/RunLoopObserver.h:

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

6 years ago[GTK] basic OpenWebRTC build support
philn@webkit.org [Tue, 17 Mar 2015 08:39:05 +0000 (08:39 +0000)]
[GTK] basic OpenWebRTC build support
https://bugs.webkit.org/show_bug.cgi?id=142393

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/FindOpenWebRTC.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Look for OpenWebRTC library if
mediastream build is enabled.

Source/WebCore:

* PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.

Tools:

* gtk/jhbuild.modules: Add OpenWebRTC and its dependencies. This
is not the upstream OpenWebRTC repository. This temporary fork
contains a few patches needed by WebKit for audio/video rendering.

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

6 years ago[CMake][EFL] Build test tools only for developer mode
gyuyoung.kim@samsung.com [Tue, 17 Mar 2015 07:55:37 +0000 (07:55 +0000)]
[CMake][EFL] Build test tools only for developer mode
https://bugs.webkit.org/show_bug.cgi?id=142761

Reviewed by Csaba Osztrogonác.

Do not build EFL MiniBrowser, WebKitTestRunner, and ImageDiff on production mode.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake: Move ENABLE_MINIBROWSER to common place.
* Source/cmake/WebKitFeatures.cmake: Define ENABLE_MINIBROWSER variable.
* Source/cmakeconfig.h.cmake:

Tools:

* CMakeLists.txt:

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

6 years agoREGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor
yoon@igalia.com [Tue, 17 Mar 2015 07:31:38 +0000 (07:31 +0000)]
REGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor

Unreviewed build fix.

* WebProcess/WebPage/LayerTreeHost.h:
Remove duplicated declaration of setNativeSurfaceHandleForCompositing.

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

6 years agoRemove never used "useLayerOnTop" bindings generator argument
commit-queue@webkit.org [Tue, 17 Mar 2015 07:15:26 +0000 (07:15 +0000)]
Remove never used "useLayerOnTop" bindings generator argument
https://bugs.webkit.org/show_bug.cgi?id=142773

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-17
Reviewed by Darin Adler.

Source/WebCore:

* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorObjC.pm:
* bindings/scripts/generate-bindings.pl:

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
(new):

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

6 years agoEnable ES6 classes by default
rniwa@webkit.org [Tue, 17 Mar 2015 05:55:46 +0000 (05:55 +0000)]
Enable ES6 classes by default
https://bugs.webkit.org/show_bug.cgi?id=142774

Reviewed by Gavin Barraclough.

.:

* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

Enabled the feature and unskipped tests.

* Configurations/FeatureDefines.xcconfig:
* tests/stress/class-syntax-no-loop-tdz.js:
* tests/stress/class-syntax-no-tdz-in-catch.js:
* tests/stress/class-syntax-no-tdz-in-conditional.js:
* tests/stress/class-syntax-no-tdz-in-loop-no-inline-super.js:
* tests/stress/class-syntax-no-tdz-in-loop.js:
* tests/stress/class-syntax-no-tdz.js:
* tests/stress/class-syntax-tdz-in-catch.js:
* tests/stress/class-syntax-tdz-in-conditional.js:
* tests/stress/class-syntax-tdz-in-loop.js:
* tests/stress/class-syntax-tdz.js:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

Unskipped tests and also fixed tests so that they can run under run-javascript-tests.

* TestExpectations: Unskipped tests.
* js/class-syntax-call-expected.txt:
* js/class-syntax-declaration-expected.txt:
* js/class-syntax-default-constructor-expected.txt:
* js/class-syntax-expression-expected.txt:
* js/class-syntax-extends-expected.txt:
* js/class-syntax-super-expected.txt:
* js/dom/reserved-words-as-property-expected.txt: Rebaselined now that "class" is a non-reserved keyword.
* js/script-tests/class-syntax-call.js: Don't refer to "window" object as it doesn't exit when ran inside jsc.
* js/script-tests/class-syntax-declaration.js: Rebaselined after r181611, which added default constructor support.
* js/script-tests/class-syntax-default-constructor.js: Don't refer to "window" object. Also replaced shouldNotBe
by an explicit !== check as the former is not supported when ran inside jsc.
* js/script-tests/class-syntax-expression.js: Rebaselined after r181611.
* js/script-tests/class-syntax-extends.js: Ditto. Also replaced evalAndLog by shouldNotThrow as the former is not
supported inside jsc.
* js/script-tests/class-syntax-super.js: Don't refer to "window" object as it doesn't exist inside jsc.
* sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.11-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.27-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.5-expected.txt:

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

6 years agoUpdate the debug overlays after layout
simon.fraser@apple.com [Tue, 17 Mar 2015 05:30:46 +0000 (05:30 +0000)]
Update the debug overlays after layout
https://bugs.webkit.org/show_bug.cgi?id=142768

Reviewed by Zalan Bujtas.

The debug overlays need to be updated after layout, in case elements with wheel event handlers
moved around.

DebugPageOverlays::didLayout() is cheap if there are no overlays.

Call DebugPageOverlays::didLayout() for all frames, not just the main frame, since subframes can contribute
to the main frame's event handler region.

* page/DebugPageOverlays.cpp:
(WebCore::DebugPageOverlays::regionChanged):
* page/DebugPageOverlays.h:
(WebCore::DebugPageOverlays::didLayout):
(WebCore::DebugPageOverlays::didChangeEventHandlers):
* page/FrameView.cpp:
(WebCore::FrameView::layout):

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

6 years agoUnreviewed fix for crash after r181608.
jonlee@apple.com [Tue, 17 Mar 2015 05:15:41 +0000 (05:15 +0000)]
Unreviewed fix for crash after r181608.

* WebCore.xcodeproj/project.pbxproj: Include it in the WebCore framework.

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

6 years agoGeneralize the Document code that maintains a set of nodes with event handlers
simon.fraser@apple.com [Tue, 17 Mar 2015 04:43:52 +0000 (04:43 +0000)]
Generalize the Document code that maintains a set of nodes with event handlers
https://bugs.webkit.org/show_bug.cgi?id=142762

Reviewed by Zalan Bujtas, Darin Adler.

Document.h defines a TouchEventTargetSet type, which will in future be used for
other event types too (wheel events), so rename it to EventTargetSet.

Take didRemoveEventTargetNode() outside the TOUCH_EVENTS #ifdef, and change it
to take a reference.

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): References
(WebCore::Document::didAddTouchEventHandler): Ditto.
(WebCore::Document::didRemoveEventTargetNode): Ditto.
* dom/Document.h:
(WebCore::Document::touchEventTargets): No-one calls this; just remove the non
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement): Pass a ref.
(WebCore::HTMLInputElement::didMoveToNewDocument): Pass a ref.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::removeAllEventListeners): Pass a ref.

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

6 years agoWeb Inspector: Add more DOM Native Function parameter strings
joepeck@webkit.org [Tue, 17 Mar 2015 04:41:36 +0000 (04:41 +0000)]
Web Inspector: Add more DOM Native Function parameter strings
https://bugs.webkit.org/show_bug.cgi?id=142760

Reviewed by Timothy Hatcher.

* UserInterface/Models/NativeFunctionParameters.js:
Add native parameter strings generated and hand modified
for DOM built-in classes.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
For native constructors "FooConstructor" the description is just
the name of the Constructor not the function string.

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

6 years agoWeb Inspector: Object Previews in Indexed DB tables
joepeck@webkit.org [Tue, 17 Mar 2015 04:41:34 +0000 (04:41 +0000)]
Web Inspector: Object Previews in Indexed DB tables
https://bugs.webkit.org/show_bug.cgi?id=140813

Reviewed by Timothy Hatcher.

Source/WebCore:

* inspector/InspectorIndexedDBAgent.cpp:
Include previews with object store objects.

Source/WebInspectorUI:

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
Add a boolean param for ObjectTree construction if it should force allowing object expansion.

* UserInterface/Views/IndexedDatabaseEntryDataGridNode.js:
(WebInspector.IndexedDatabaseEntryDataGridNode.prototype.createCellContent):
Switch to creating an ObjectTree or FormattedValue.

* UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
(.content-view.indexed-database-object-store > .data-grid tr.selected):
Change row selection color to match the console's lighter blue instead of dark blue.

(.content-view.indexed-database-object-store > .data-grid .object-tree > :matches(.title, .object-preview)::before):
Adjust object tree disclosure triangle placement for larger line heights.

(.content-view.indexed-database-object-store > .data-grid td .section .header): Deleted.
(.content-view.indexed-database-object-store > .data-grid td .section .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid td .section .header .title): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section.expanded .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent.expanded::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li *): Deleted.
Remove now unnecessary styles.

* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree .object-tree-array-index > .icon):
Increase the specificity to override ".data-grid td .icon" styles.

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

6 years agoWeb Inspector: Better Console Previews for Arrays / Small Objects
joepeck@webkit.org [Tue, 17 Mar 2015 04:41:31 +0000 (04:41 +0000)]
Web Inspector: Better Console Previews for Arrays / Small Objects
https://bugs.webkit.org/show_bug.cgi?id=142322

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
Create deep valuePreviews for simple previewable objects,
such as arrays with 5 values, or basic objects with
3 properties.

Source/WebInspectorUI:

* UserInterface/Views/ObjectPreviewView.js:
If there is a sub-preview, show the sub-preview.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
For an ObjectTree that is not a root (e.g. one inside of
an array/set/map property tree element) allow it to be
expanded even if the preview is lossless.

LayoutTests:

* inspector/model/remote-object-expected.txt:
* inspector/model/remote-object.html:
Include a test with cyclic values, and update
results which now have sub-previews.

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

6 years agoSource/JavaScriptCore:
rniwa@webkit.org [Tue, 17 Mar 2015 04:02:52 +0000 (04:02 +0000)]
Source/JavaScriptCore:
Add support for default constructor
https://bugs.webkit.org/show_bug.cgi?id=142388

Reviewed by Filip Pizlo.

Added the support for default constructors. They're generated by ClassExprNode::emitBytecode
via BuiltinExecutables::createDefaultConstructor.

UnlinkedFunctionExecutable now has the ability to override SourceCode provided by the owner
executable. We can't make store SourceCode in UnlinkedFunctionExecutable since CodeCache can use
the same UnlinkedFunctionExecutable to generate code blocks for multiple functions.

Parser now has the ability to treat any function expression as a constructor of the kind specified
by m_defaultConstructorKind member variable.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createDefaultConstructor): Added.
(JSC::BuiltinExecutables::createExecutableInternal): Generalized from createBuiltinExecutable.
Parse default constructors as normal non-builtin functions. Override SourceCode in the unlinked
function executable since the Miranda function's code is definitely not in the owner executable's
source code. That's the whole point.
* builtins/BuiltinExecutables.h:
(UnlinkedFunctionExecutable::createBuiltinExecutable): Added. Wraps createExecutableInternal.
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::linkInsideExecutable):
(JSC::UnlinkedFunctionExecutable::linkGlobalCode):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedFunctionExecutable::create):
(JSC::UnlinkedFunctionExecutable::symbolTable): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewDefaultConstructor): Added.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ClassExprNode::emitBytecode): Generate the default constructor if needed.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseFunctionInfo): Override ownerClassKind and assume the function as
a constructor if we're parsing a default constructor.
(JSC::Parser<LexerType>::parseClass): Allow omission of the class constructor.
* parser/Parser.h:
(JSC::parse):

LayoutTests:
Implement default constructor

Add support for default constructor
https://bugs.webkit.org/show_bug.cgi?id=142388

Reviewed by Filip Pizlo.

Added tests for default constructors.

* TestExpectations: Skipped the test since ES6 class syntax isn't enabled by default.
* js/class-syntax-default-constructor-expected.txt: Added.
* js/class-syntax-default-constructor.html: Added.
* js/script-tests/class-syntax-default-constructor.js: Added.

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

6 years agoWeb Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage...
nvasilyev@apple.com [Tue, 17 Mar 2015 03:56:18 +0000 (03:56 +0000)]
Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage and LegacyConsoleMessageImpl respectively
https://bugs.webkit.org/show_bug.cgi?id=142712

As a first step of ConsoleMessage refactoring (https://bugs.webkit.org/show_bug.cgi?id=142599):

  - Rename WebInspector.ConsoleMessage class to WebInspector.LegacyConsoleMessage
  - Rename WebInspector.ConsoleMessageImpl class to WebInspector.LegacyConsoleMessageImpl
  - Rename ConsoleMessage.js file to LegacyConsoleMessage.js
  - Rename ConsoleMessageImpl file to LegacyConsoleMessageImpl.js

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
* UserInterface/Main.html:
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
* UserInterface/Views/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
(WebInspector.ConsoleCommandResult.prototype.toMessageElement):
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.render):
* UserInterface/Views/LegacyConsoleMessage.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessage.js.
(WebInspector.LegacyConsoleMessage):
(WebInspector.LegacyConsoleMessage.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessage.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessage.prototype.clone):
(WebInspector.LegacyConsoleMessage.create):
* UserInterface/Views/LegacyConsoleMessageImpl.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js.
(WebInspector.LegacyConsoleMessageImpl):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldDumpStackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldHideURL):
(WebInspector.LegacyConsoleMessageImpl.prototype._firstNonNativeCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.get message):
(WebInspector.LegacyConsoleMessageImpl.prototype.get formattedMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyLocation):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessageImpl.prototype._format):
(WebInspector.LegacyConsoleMessageImpl.prototype._isExpandable):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameter):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsValue):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.LegacyConsoleMessageImpl.prototype._rootPropertyPathForObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._userProvidedColumnNames):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsTable):
(WebInspector.LegacyConsoleMessageImpl.prototype.):
(WebInspector.LegacyConsoleMessageImpl.prototype.stringFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.floatFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.integerFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.styleFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.isWhitelistedProperty):
(WebInspector.LegacyConsoleMessageImpl.prototype.append):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatWithSubstitutionString):
(WebInspector.LegacyConsoleMessageImpl.prototype.decorateMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.toMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype._populateStackTraceTreeElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessageImpl.prototype.toString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get text):
(WebInspector.LegacyConsoleMessageImpl.prototype.isEqual):
(WebInspector.LegacyConsoleMessageImpl.prototype.get stackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype.clone):
(WebInspector.LegacyConsoleMessageImpl.prototype.get levelString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get clipboardPrefixString):
(WebInspector.LegacyConsoleMessageImpl.prototype.toClipboardString):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._filterMessages):
(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

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

6 years ago[EFL] fast/css/outline-auto-empty-rects.html is failing
commit-queue@webkit.org [Tue, 17 Mar 2015 03:31:45 +0000 (03:31 +0000)]
[EFL] fast/css/outline-auto-empty-rects.html is failing
https://bugs.webkit.org/show_bug.cgi?id=142570

Unreviewed EFL Gardening. Rebaseline the fast/css/outline-auto-empty-rects.html.

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-03-16

* platform/efl/TestExpectations:
* platform/efl/fast/css/outline-auto-empty-rects-expected.txt: Added.

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

6 years ago[Mac] Update missing image UI
jer.noble@apple.com [Tue, 17 Mar 2015 03:28:10 +0000 (03:28 +0000)]
[Mac] Update missing image UI
https://bugs.webkit.org/show_bug.cgi?id=142592

Reviewed by Darin Adler.

Update the broken image glyphs with new art (including a 3x image).

Test: fast/hidpi/broken-image-icon-very-hidpi.html

* Resources/missingImage.png:
* Resources/missingImage@2x.png:
* Resources/missingImage@3x.png: Added.
* WebCore.xcodeproj/project.pbxproj:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::brokenImage):

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

6 years agoDon't pass nil as a fireDate for NSTimer
conrad_shultz@apple.com [Tue, 17 Mar 2015 02:58:07 +0000 (02:58 +0000)]
Don't pass nil as a fireDate for NSTimer
https://bugs.webkit.org/show_bug.cgi?id=142765

Reviewed by Dan Bernstein.

While we're here, switch to a selector that conforms to documented NSTimer API.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController cancelOperation:]):
Set the timer's fireDate as the future date matching the former interval; update the selector.
(-[WKFullScreenWindowController _watchdogTimerFired:]):
Timer callback; wrap -exitFullScreen.

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

6 years ago[EFL] Unreviewed EFL gardening on 17th Mar.
gyuyoung.kim@samsung.com [Tue, 17 Mar 2015 02:27:03 +0000 (02:27 +0000)]
[EFL] Unreviewed EFL gardening on 17th Mar.

Register new crash, flaky, and timeout tests to EFL TestExpectations files.
Additionally some test related to video, form, accessibility tests are marked as failure.

* platform/efl/TestExpectations:

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

6 years agoParsing and Style Resolution of Container-based Animation Triggers
dino@apple.com [Tue, 17 Mar 2015 00:33:00 +0000 (00:33 +0000)]
Parsing and Style Resolution of Container-based Animation Triggers
https://bugs.webkit.org/show_bug.cgi?id=142687
<rdar://problem/20170007>

Reviewed by Simon Fraser.

Source/WebCore:

Take 2 after the previous patch was rolled out.

This is the beginning of a prototype implementation of
CSS Animation Triggers, as described by
https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html

In this patch we parse and resolve the value of a new
CSS property "-webkit-animation-trigger". At the moment it
only accepts one function value "container-scroll", which
will trigger the animation at an absolute position within
an element's scrolling container. We expect the syntax to
change in the near future, as the spec is written.

Tests: animations/trigger-computed-style.html
       animations/trigger-parsing.html

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

* css/CSSAnimationTriggerScrollValue.cpp: Added.
(WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
(WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
* css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
scroll trigger. This name may change in the future to better represent the
type of trigger, but it is good enough for now.
(WebCore::CSSAnimationTriggerScrollValue::create):
(WebCore::CSSAnimationTriggerScrollValue::startValue):
(WebCore::CSSAnimationTriggerScrollValue::endValue):
(WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
(WebCore::getAnimationTriggerValue): Gets the current computed style.
(WebCore::ComputedStyleExtractor::propertyValue):

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
and record the value as a CSSAnimationTriggerScrollValue.
(WebCore::CSSParser::parseAnimationProperty): Handle the new property.
* css/CSSParser.h:

* css/CSSPropertyNames.in: Add "-webkit-animation-trigger".

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
an Animation object.
* css/CSSToStyleMap.h:

* css/CSSValue.cpp: Handle the new CSSValue type.
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isAnimationTriggerScrollValue):

* platform/animation/Animation.cpp: Make sure to initialise m_trigger and m_triggerSet,
and use them in the operator==.
* platform/animation/Animation.h: Add AnimationTrigger as a new field.
(WebCore::Animation::isTriggerSet):
(WebCore::Animation::isEmpty):

* platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
"auto" and the scrolling trigger.
(WebCore::AnimationTrigger::~AnimationTrigger):
(WebCore::AnimationTrigger::type):
(WebCore::AnimationTrigger::isAutoAnimationTrigger):
(WebCore::AnimationTrigger::isScrollAnimationTrigger):
(WebCore::AnimationTrigger::AnimationTrigger):
(WebCore::AutoAnimationTrigger::create):
(WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
(WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
(WebCore::ScrollAnimationTrigger::create):
(WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
(WebCore::ScrollAnimationTrigger::startValue):
(WebCore::ScrollAnimationTrigger::setStartValue):
(WebCore::ScrollAnimationTrigger::endValue):
(WebCore::ScrollAnimationTrigger::setEndValue):
(WebCore::ScrollAnimationTrigger::hasEndValue):
(WebCore::ScrollAnimationTrigger::setHasEndValue):
(WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):

LayoutTests:

Take 2.

New tests that exercise the parser and computed style
of -webkit-animation-trigger.

* animations/script-tests/trigger-computed-style.js: Added.
(testComputedTriggerRule):
* animations/script-tests/trigger-parsing.js: Added.
(testTriggerRule):
* animations/trigger-computed-style-expected.txt: Added.
* animations/trigger-computed-style.html: Added.
* animations/trigger-parsing-expected.txt: Added.
* animations/trigger-parsing.html: Added.

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

6 years agoProgress towards CMake on Mac
achristensen@apple.com [Tue, 17 Mar 2015 00:29:55 +0000 (00:29 +0000)]
Progress towards CMake on Mac
https://bugs.webkit.org/show_bug.cgi?id=142747

Reviewed by Chris Dumez.

Source/JavaScriptCore:

* CMakeLists.txt:
Include AugmentableInspectorController.h in CMake build.

Source/WebCore:

* CMakeLists.txt:
* PlatformMac.cmake:
Added more directories, interfaces, and forwarding headers.
Temporarily disabled the generating of ObjC bindings in CMake builds.
* platform/mac/PasteboardMac.mm:
Removed unused include.

Source/WebKit2:

* PlatformMac.cmake:
Started adding Mac-specific directories and headers.

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

6 years agoAX: Crash viewing http://www.last.fm/
jdiggs@igalia.com [Tue, 17 Mar 2015 00:12:06 +0000 (00:12 +0000)]
AX: Crash viewing http://www.last.fm/
https://bugs.webkit.org/show_bug.cgi?id=142309

Reviewed by Chris Fleizach.

Source/WebCore:

The crash occurs when a not-yet-rendered object emits a children-changed
signal. If an assistive technology is listening, AT-SPI2 will attempt to
create and cache the state set for the child being added and the creation
of the state set assumes a rendered object.

Test: platform/gtk/accessibility/no-notification-for-unrendered-iframe-children.html

* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::attachWrapper):

LayoutTests:

This test doesn't verify the absence of the crash because the crash seems
to require that an assistive technology is listening for events, and that
AT-SPI2 is caching the tree for that assistive technology -- something we
cannot count on being the case on our bots. (I suspect that the reason non-
assistive technology users of Epiphany were getting hit by this is because
Caribou was listening for events in the background, thus they were AT users
without realizing it. That Caribou issue is in theory now resolved.) What
this test does verify is the absence of children-changed:add accessibility
signals for non-rendered objects, which is the source of the crash given
the aforementioned environment.

* platform/gtk/accessibility/no-notification-for-unrendered-iframe-children-expected.txt: Added.
* platform/gtk/accessibility/no-notification-for-unrendered-iframe-children.html: Added.

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

6 years agoASSERT(m_plugin) on plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image...
ap@apple.com [Mon, 16 Mar 2015 23:58:15 +0000 (23:58 +0000)]
ASSERT(m_plugin) on plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
https://bugs.webkit.org/show_bug.cgi?id=142637

Reviewed by Dean Jackson.

* WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginSnapshotTimerFired):
m_plugin can be legitimately null.

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

6 years agoFix webkitpy tests after r181585.
ap@apple.com [Mon, 16 Mar 2015 23:58:09 +0000 (23:58 +0000)]
Fix webkitpy tests after r181585.

Looks like "me" cannot be anyone's email, it's a special case.

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

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

6 years agoUnreviewed, rolling out r181492.
commit-queue@webkit.org [Mon, 16 Mar 2015 23:55:50 +0000 (23:55 +0000)]
Unreviewed, rolling out r181492.
https://bugs.webkit.org/show_bug.cgi?id=142756

May have regressed PLT (Requested by anttik on #webkit).

Reverted changeset:

"Cache glyph widths to GlyphPages"
https://bugs.webkit.org/show_bug.cgi?id=142028
http://trac.webkit.org/changeset/181492

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

6 years ago[WebGL2] Instancing draw calls.
roger_fong@apple.com [Mon, 16 Mar 2015 23:46:43 +0000 (23:46 +0000)]
[WebGL2] Instancing draw calls.
https://bugs.webkit.org/show_bug.cgi?id=126939.
<rdar://problem/15002379>

Reviewed by Dean Jackson.

Tested by a modified version of the 1.0.3 conformance tests:
conformance/extensions/angle-instanced-arrays.html
conformance/extensions/angle-instanced-arrays-out-of-bounds.html

These tests will be landed along with other modified extension conformance tests
once approval from Khronos is received.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::clear): Generate error if clearing an integer color buffer.
(WebCore::WebGL2RenderingContext::vertexAttribDivisor): Call method from base class.
(WebCore::WebGL2RenderingContext::drawArraysInstanced): Ditto.
(WebCore::WebGL2RenderingContext::drawElementsInstanced): Ditto.
(WebCore::WebGL2RenderingContext::isIntegerFormat): Ditto.
(WebCore::WebGL2RenderingContext::validateDrawElements): Deleted. Move back to base class.
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGL2RenderingContext.idl: Add a missing enum.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::clear): Copied from WebGLRenderingContextBase.
(WebCore::WebGLRenderingContext::validateDrawElements): Deleted. Move back to base class.
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::clear): Deleted. Moved to WebGLRenderingContext.
(WebCore::WebGLRenderingContextBase::getVertexAttrib): Check for WebGL2 context.
(WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
* html/canvas/WebGLRenderingContextBase.h:

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

6 years agoUnreviewed, rolling out r181572.
commit-queue@webkit.org [Mon, 16 Mar 2015 23:26:29 +0000 (23:26 +0000)]
Unreviewed, rolling out r181572.
https://bugs.webkit.org/show_bug.cgi?id=142755

Caused weird test failures in transitions and animations
(Requested by dino on #webkit).

Reverted changeset:

"Parsing and Style Resolution of Container-based Animation
Triggers"
https://bugs.webkit.org/show_bug.cgi?id=142687
http://trac.webkit.org/changeset/181572

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

6 years agoUnreviewed, unskip inspector-protocol/dom-debugger/node-removed.html.
cdumez@apple.com [Mon, 16 Mar 2015 23:19:05 +0000 (23:19 +0000)]
Unreviewed, unskip inspector-protocol/dom-debugger/node-removed.html.

It looks like it was an actual failure caused by a patch being
processed by EWS.

* TestExpectations:

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

6 years agoRemove setCachedImage from HTMLImageElement since it is not used
yoav@yoav.ws [Mon, 16 Mar 2015 23:12:56 +0000 (23:12 +0000)]
Remove setCachedImage from HTMLImageElement since it is not used
https://bugs.webkit.org/show_bug.cgi?id=142740

Reviewed by Chris Dumez.

No new tests since this patch is just removing dead code.

HTMLImageElement::setCachedImage is not being called by anyone.
This patch removes it, since it's dead code.

* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::setCachedImage): Deleted.

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

6 years ago[Win] Unreviewed build fix after r181571.
roger_fong@apple.com [Mon, 16 Mar 2015 23:11:53 +0000 (23:11 +0000)]
[Win] Unreviewed build fix after r181571.

* include/GLES2/gl2softlinking.h:

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

6 years agoUnreviewed. Move myself from reviewers to commiters. I was added to reviewers by...
nvasilyev@apple.com [Mon, 16 Mar 2015 23:11:03 +0000 (23:11 +0000)]
Unreviewed. Move myself from reviewers to commiters. I was added to reviewers by mistake.

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

6 years agoWebKit1 Clients Are Not Reliably Repainted
bfulgham@apple.com [Mon, 16 Mar 2015 23:01:21 +0000 (23:01 +0000)]
WebKit1 Clients Are Not Reliably Repainted
https://bugs.webkit.org/show_bug.cgi?id=142750
<rdar://problem/20042453>

Reviewed by Simon Fraser.

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
the early return so we can see when this happening in debug builds.
* page/FrameView.h:
(WebCore::FrameView::inPaintableState): Added.

Source/WebKit/mac:

Check with the FrameView to see if we are in an immediately paintable state. If we are not,
mark the view as dirty once the _immediateScrollToPoint operation is complete so that the
region will be painted properly.

* WebView/WebClipView.mm:
(-[WebClipView _immediateScrollToPoint:]):

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

6 years agoUnreviewed. Add myself as a committer.
nvasilyev@apple.com [Mon, 16 Mar 2015 22:49:56 +0000 (22:49 +0000)]
Unreviewed. Add myself as a committer.

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

6 years agoOne more URTBF after r181578.
ossy@webkit.org [Mon, 16 Mar 2015 22:47:19 +0000 (22:47 +0000)]
One more URTBF after r181578.

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

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

6 years agoinspector-protocol/dom-debugger/node-removed.html crashes on EWS
ap@apple.com [Mon, 16 Mar 2015 22:44:48 +0000 (22:44 +0000)]
inspector-protocol/dom-debugger/node-removed.html crashes on EWS
https://bugs.webkit.org/show_bug.cgi?id=142753

* TestExpectations: Skiped it.

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

6 years agoURTBF after r181578.
ossy@webkit.org [Mon, 16 Mar 2015 22:37:16 +0000 (22:37 +0000)]
URTBF after r181578.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setCSSAnimationTriggersEnabled): Copy/paste error fixed.

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

6 years agoUpdate results of fast/text/international/bidi-mirror-he-ar.html after <http://trac...
ap@apple.com [Mon, 16 Mar 2015 22:25:04 +0000 (22:25 +0000)]
Update results of fast/text/international/bidi-mirror-he-ar.html after <trac.webkit.org/changeset/181569>

Yosemite results now match Mavericks. I'm not 100% sure why the results changed
(probably different order of font fallback), but the test clearly still passes.

* platform/mac-mavericks/fast/text/international/bidi-mirror-he-ar-expected.txt: Removed.
* platform/mac/fast/text/international/bidi-mirror-he-ar-expected.txt:

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

6 years agoAdd tolerance to WebAudio tests
ap@apple.com [Mon, 16 Mar 2015 21:52:40 +0000 (21:52 +0000)]
Add tolerance to WebAudio tests
https://bugs.webkit.org/show_bug.cgi?id=142676

Reviewed by Tim Horton.

Tools:

* Scripts/webkitpy/common/wavediff.py: Added. Based on Jer Noble's work.

* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(TestResultWriter.create_audio_diff_and_write_result):
* Scripts/webkitpy/layout_tests/models/test_failures.py:
(FailureAudio.write_failure):
* Scripts/webkitpy/port/base.py:
(Port.do_audio_results_differ):
Diff audio failures.

* Scripts/webkitpy/port/test.py: Added a test for the tolerance, fixed existing
tests to use real parseable WAV data, and got rid of base64, which there didn't
seem to have been any reason for.

LayoutTests:

* fast/harness/results.html: Display a diff link for audio tests, as we now have the diff.

* platform/mac/TestExpectations: Unmark tests that should now pass everywhere.

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

6 years agoExpose WK2 preference for Animation Triggers runtime flag
dino@apple.com [Mon, 16 Mar 2015 21:24:48 +0000 (21:24 +0000)]
Expose WK2 preference for Animation Triggers runtime flag
https://bugs.webkit.org/show_bug.cgi?id=142744

Reviewed by Anders Carlsson.

Expose CSSAnimationTriggersEnabled, linking it to the runtime enabled
feature flag.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCSSAnimationTriggersEnabled):
(WKPreferencesGetCSSAnimationTriggersEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setCSSAnimationTriggersEnabled):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

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

6 years agoMake DatabaseContext suspendable if there is no pending database activity
cdumez@apple.com [Mon, 16 Mar 2015 20:20:27 +0000 (20:20 +0000)]
Make DatabaseContext suspendable if there is no pending database activity
https://bugs.webkit.org/show_bug.cgi?id=142716
<rdar://problem/19923085>

Reviewed by Andreas Kling.

Source/WebCore:

Make DatabaseContext suspendable if there is no pending database
activity, i.e:
- No pending Database creation JS callback
- No pending transaction(s)

Suspending is safe in this case because we are not going to interrupt
any database activity, nor fire any JS event.

This greatly increases the likelihood of pages using websql to enter
the PageCache.

Tests: fast/history/page-cache-webdatabase-no-transaction-db.html
       fast/history/page-cache-webdatabase-pending-transaction.html

* Modules/webdatabase/Database.cpp:
(WebCore::Database::hasPendingTransaction):
* Modules/webdatabase/Database.h:
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::canSuspend):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabase):
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::hasPendingDatabaseActivity):
* Modules/webdatabase/DatabaseThread.h:

LayoutTests:

Add layout tests to check page-cacheability when WebSQL is used,
depending if there is pending database activity or not.

* fast/history/page-cache-webdatabase-no-transaction-db-expected.txt: Added.
* fast/history/page-cache-webdatabase-no-transaction-db.html: Copied from LayoutTests/fast/history/page-cache-webdatabase-opened-db.html.
* fast/history/page-cache-webdatabase-pending-transaction-expected.txt: Renamed from LayoutTests/fast/history/page-cache-webdatabase-opened-db-expected.txt.
* fast/history/page-cache-webdatabase-pending-transaction.html: Renamed from LayoutTests/fast/history/page-cache-webdatabase-opened-db.html.

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

6 years agoFix bug referenced in ChangeLog
beidson@apple.com [Mon, 16 Mar 2015 20:06:42 +0000 (20:06 +0000)]
Fix bug referenced in ChangeLog

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

6 years agoAddressing additional review feedback after http://trac.webkit.org/changeset/181565
beidson@apple.com [Mon, 16 Mar 2015 20:05:14 +0000 (20:05 +0000)]
Addressing additional review feedback after trac.webkit.org/changeset/181565
https://bugs.webkit.org/show_bug.cgi?id=142604

Reviewed by Darin Adler.

* loader/icon/IconController.cpp:
(WebCore::IconController::startLoader): Null check page()

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

6 years ago[Win] Unreviewed build fix attempt after r181571.
roger_fong@apple.com [Mon, 16 Mar 2015 19:40:10 +0000 (19:40 +0000)]
[Win] Unreviewed build fix attempt after r181571.

* WebCore.vcxproj/WebCore.vcxproj:

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

6 years ago[WebGL2] Multiple Render Targets.
roger_fong@apple.com [Mon, 16 Mar 2015 19:30:20 +0000 (19:30 +0000)]
[WebGL2] Multiple Render Targets.
https://bugs.webkit.org/show_bug.cgi?id=126994.
<rdar://problem/15815766>
Reviewed by Dean Jackson.
Tested by a modified version of the 1.0.3 conformance test:
conformance/extensions/webgl-draw-buffers.html
This test will be landed along with other modified extension conformance tests
once approval from Khronos is received.
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::drawBuffers): Mostly the same as WebGLDrawBuffers::drawBuffersWEBGL.
Returns different error messages, uses non EXT enums.
(WebCore::WebGL2RenderingContext::clearBufferiv): This actually does nothing for now but the validation has been implemented.
(WebCore::WebGL2RenderingContext::clearBufferuiv): Ditto.
(WebCore::WebGL2RenderingContext::clearBufferfv): Ditto.
(WebCore::WebGL2RenderingContext::clearBufferfi): Ditto.
(WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Removes the extension object check.
(WebCore::WebGL2RenderingContext::getMaxDrawBuffers):
(WebCore::WebGL2RenderingContext::getMaxColorAttachments): Must return the same thing as getMaxDrawBuffers.
(WebCore::WebGL2RenderingContext::getParameter): Remove extension object checks.
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Copied from WebGLRenderingContextBase.
(WebCore::WebGLRenderingContext::getMaxDrawBuffers): Ditto.
(WebCore::WebGLRenderingContext::getMaxColorAttachments): Ditto.
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::validateFramebufferFuncParameters): Deleted.
* html/canvas/WebGLRenderingContextBase.h:

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

6 years agoParsing and Style Resolution of Container-based Animation Triggers
dino@apple.com [Mon, 16 Mar 2015 19:08:40 +0000 (19:08 +0000)]
Parsing and Style Resolution of Container-based Animation Triggers
https://bugs.webkit.org/show_bug.cgi?id=142687
<rdar://problem/20170007>

Reviewed by Simon Fraser.

Source/WebCore:

This is the beginning of a prototype implementation of
CSS Animation Triggers, as described by
https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html

In this patch we parse and resolve the value of a new
CSS property "-webkit-animation-trigger". At the moment it
only accepts one function value "container-scroll", which
will trigger the animation at an absolute position within
an element's scrolling container. We expect the syntax to
change in the near future, as the spec is written.

Tests: animations/trigger-computed-style.html
       animations/trigger-parsing.html

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

* css/CSSAnimationTriggerScrollValue.cpp: Added.
(WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
(WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
* css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
scroll trigger. This name may change in the future to better represent the
type of trigger, but it is good enough for now.
(WebCore::CSSAnimationTriggerScrollValue::create):
(WebCore::CSSAnimationTriggerScrollValue::startValue):
(WebCore::CSSAnimationTriggerScrollValue::endValue):
(WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
(WebCore::getAnimationTriggerValue): Gets the current computed style.
(WebCore::ComputedStyleExtractor::propertyValue):

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
and record the value as a CSSAnimationTriggerScrollValue.
(WebCore::CSSParser::parseAnimationProperty): Handle the new property.
* css/CSSParser.h:

* css/CSSPropertyNames.in: Add "-webkit-animation-trigger".

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
an Animation object.
* css/CSSToStyleMap.h:

* css/CSSValue.cpp: Handle the new CSSValue type.
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isAnimationTriggerScrollValue):

* platform/animation/Animation.h: Add AnimationTrigger as a new field.
(WebCore::Animation::isTriggerSet):
(WebCore::Animation::isEmpty):

* platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
"auto" and the scrolling trigger.
(WebCore::AnimationTrigger::~AnimationTrigger):
(WebCore::AnimationTrigger::type):
(WebCore::AnimationTrigger::isAutoAnimationTrigger):
(WebCore::AnimationTrigger::isScrollAnimationTrigger):
(WebCore::AnimationTrigger::AnimationTrigger):
(WebCore::AutoAnimationTrigger::create):
(WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
(WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
(WebCore::ScrollAnimationTrigger::create):
(WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
(WebCore::ScrollAnimationTrigger::startValue):
(WebCore::ScrollAnimationTrigger::setStartValue):
(WebCore::ScrollAnimationTrigger::endValue):
(WebCore::ScrollAnimationTrigger::setEndValue):
(WebCore::ScrollAnimationTrigger::hasEndValue):
(WebCore::ScrollAnimationTrigger::setHasEndValue):
(WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):

LayoutTests:

New tests that exercise the parser and computed style
of -webkit-animation-trigger.

* animations/script-tests/trigger-computed-style.js: Added.
(testComputedTriggerRule):
* animations/script-tests/trigger-parsing.js: Added.
(testTriggerRule):
* animations/trigger-computed-style-expected.txt: Added.
* animations/trigger-computed-style.html: Added.
* animations/trigger-parsing-expected.txt: Added.
* animations/trigger-parsing.html: Added.

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

6 years ago[WebGL2] Vertex Array Objects.
roger_fong@apple.com [Mon, 16 Mar 2015 19:03:26 +0000 (19:03 +0000)]
[WebGL2] Vertex Array Objects.
https://bugs.webkit.org/show_bug.cgi?id=126944.
<rdar://problem/15002455>
Reviewed by Dean Jackson.
Tested by a modified version of the 1.0.3 conformance test:
conformance/extensions/oes-vertex-array-object.html
This test will be landed along with other modified extension conformance tests
once approval from Khronos is received.
* html/canvas/OESVertexArrayObject.cpp: Associate extension calls only with WebGLRenderingContext.
(WebCore::OESVertexArrayObject::deleteVertexArrayOES):
(WebCore::OESVertexArrayObject::bindVertexArrayOES):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
(WebCore::WebGLRenderingContext::getParameter):
* html/canvas/WebGL2RenderingContext.cpp: Implement vertex array object calls as part WebGL2 context.
(WebCore::WebGL2RenderingContext::createVertexArray):
(WebCore::WebGL2RenderingContext::deleteVertexArray):
(WebCore::WebGL2RenderingContext::isVertexArray):
(WebCore::WebGL2RenderingContext::bindVertexArray):
(WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
(WebCore::WebGL2RenderingContext::getParameter):
Duplicate extension object vertex array object extension methods in GraphicsContext3D.
Implementation may change after we upgrade to newer GL headers and profile.
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::createVertexArray):
(WebCore::GraphicsContext3D::deleteVertexArray):
(WebCore::GraphicsContext3D::isVertexArray):
(WebCore::GraphicsContext3D::bindVertexArray):
Have WebGLVertexArrayObjectOES and WebGLVertexArrayObject inherit from WebGLRenderingContextBase.
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* html/canvas/WebGLVertexArrayObject.cpp:
(WebCore::WebGLVertexArrayObject::create):
(WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): Use GraphicsContext3D implementation of createVertexArray.
(WebCore::WebGLVertexArrayObject::deleteObjectImpl):
* html/canvas/WebGLVertexArrayObject.h:
* html/canvas/WebGLVertexArrayObjectBase.cpp: Added.
(WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase):
(WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer):
(WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):
(WebCore::WebGLVertexArrayObjectBase::unbindBuffer):
(WebCore::WebGLVertexArrayObjectBase::setVertexAttribDivisor):
* html/canvas/WebGLVertexArrayObjectBase.h: Added.
(WebCore::WebGLVertexArrayObjectBase::~WebGLVertexArrayObjectBase):
(WebCore::WebGLVertexArrayObjectBase::VertexAttribState::VertexAttribState):
(WebCore::WebGLVertexArrayObjectBase::VertexAttribState::isBound):
(WebCore::WebGLVertexArrayObjectBase::VertexAttribState::validateBinding):
(WebCore::WebGLVertexArrayObjectBase::isDefaultObject):
(WebCore::WebGLVertexArrayObjectBase::hasEverBeenBound):
(WebCore::WebGLVertexArrayObjectBase::setHasEverBeenBound):
(WebCore::WebGLVertexArrayObjectBase::getElementArrayBuffer):
(WebCore::WebGLVertexArrayObjectBase::getVertexAttribState):
* html/canvas/WebGLVertexArrayObjectOES.cpp:
(WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
(WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
(WebCore::WebGLVertexArrayObjectOES::setElementArrayBuffer): Deleted.
(WebCore::WebGLVertexArrayObjectOES::setVertexAttribState): Deleted.
(WebCore::WebGLVertexArrayObjectOES::unbindBuffer): Deleted.
(WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Deleted.
* html/canvas/WebGLVertexArrayObjectOES.h:
* html/canvas/WebGLRenderingContextBase.cpp: Use WebGLVertexArrayObjectBase class.
(WebCore::WebGLRenderingContextBase::initializeNewContext):
(WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
(WebCore::WebGLRenderingContextBase::validateVertexAttributes):
(WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
(WebCore::WebGLRenderingContextBase::getVertexAttrib):
(WebCore::WebGLRenderingContextBase::initVertexAttrib0):
(WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
(WebCore::WebGLRenderingContextBase::restoreStatesAfterVertexAttrib0Simulation):
* html/canvas/WebGLRenderingContextBase.h:
(WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject):
Handle construction of WebGLGetInfo using WebGLVertexArrayObject.
* bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
(WebCore::toJS):
* html/canvas/WebGLGetInfo.cpp:
(WebCore::WebGLGetInfo::WebGLGetInfo):
(WebCore::WebGLGetInfo::getWebGLVertexArrayObjectOES):
(WebCore::WebGLGetInfo::getWebGLVertexArrayObject):
* html/canvas/WebGLGetInfo.h:

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

6 years ago[ARM] Enable generating idiv instructions if it is supported
ossy@webkit.org [Mon, 16 Mar 2015 18:44:46 +0000 (18:44 +0000)]
[ARM] Enable generating idiv instructions if it is supported
https://bugs.webkit.org/show_bug.cgi?id=142725

Reviewed by Michael Saboff.

Source/JavaScriptCore:

* assembler/ARMAssembler.h: Added sdiv and udiv implementation for ARM Traditional instruction set.
(JSC::ARMAssembler::sdiv):
(JSC::ARMAssembler::udiv):
* assembler/ARMv7Assembler.h: Use HAVE(ARM_IDIV_INSTRUCTIONS) instead of CPU(APPLE_ARMV7S).
* assembler/AbstractMacroAssembler.h:
(JSC::isARMv7IDIVSupported):
(JSC::optimizeForARMv7IDIVSupported):
(JSC::isARMv7s): Renamed to isARMv7IDIVSupported().
(JSC::optimizeForARMv7s): Renamed to optimizeForARMv7IDIVSupported().
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithDiv):
(JSC::DFG::SpeculativeJIT::compileArithMod):

Source/WTF:

* wtf/Platform.h: Set HAVE_ARM_IDIV_INSTRUCTIONS based on GCC macro too.

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

6 years ago[Mac] fast/forms/text-control-intrinsic-widths.html fails when MS Office is installed
ap@apple.com [Mon, 16 Mar 2015 18:30:34 +0000 (18:30 +0000)]
[Mac] fast/forms/text-control-intrinsic-widths.html fails when MS Office is installed
https://bugs.webkit.org/show_bug.cgi?id=142720

Reviewed by Myles C. Maxfield.

Tools:

Activate system copies of Microsoft fonts for the current process, thus overriding
any other ones that could be preferred by the system otherwise.

* DumpRenderTree/mac/DumpRenderTree.mm:
(activateSystemCoreWebFonts):
(adjustFonts):
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
(WTR::activateSystemCoreWebFonts):
(WTR::activateFonts):

LayoutTests:

* platform/mac-mavericks/fast/forms/text-control-intrinsic-widths-expected.txt: Removed.
Mavericks result is no different from Yosemite.

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

6 years agoPotentially uninitialized Inspector values
bfulgham@apple.com [Mon, 16 Mar 2015 18:23:54 +0000 (18:23 +0000)]
Potentially uninitialized Inspector values
https://bugs.webkit.org/show_bug.cgi?id=142730

Reviewed by Joseph Pecoraro.

* inspector/InspectorDOMAgent.cpp:
(WebCore::parseColor): Make sure color values are given an initial value.

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

6 years agoUnreviewed, rolling out r181517.
commit-queue@webkit.org [Mon, 16 Mar 2015 18:11:59 +0000 (18:11 +0000)]
Unreviewed, rolling out r181517.
https://bugs.webkit.org/show_bug.cgi?id=142718

This patch broke GTK+ build (Requested by NVI on #webkit).

Reverted changeset:

"Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl
to LegacyConsoleMessage and LegacyConsoleMessageImpl
respectively"
https://bugs.webkit.org/show_bug.cgi?id=142712
http://trac.webkit.org/changeset/181517

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

6 years ago[Win] Document more debug assertions.
bfulgham@apple.com [Mon, 16 Mar 2015 17:55:15 +0000 (17:55 +0000)]
[Win] Document more debug assertions.

* platform/win/TestExpectations:

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

6 years agoURLs visited during private browsing show up in WebpageIcons.db
beidson@apple.com [Mon, 16 Mar 2015 17:52:30 +0000 (17:52 +0000)]
URLs visited during private browsing show up in WebpageIcons.db
rdar://problem/11254910 and https://bugs.webkit.org/show_bug.cgi?id=142733

Patch by Sam Weinig. Reviewed by Brady Eidson.

* loader/icon/IconController.cpp:
(WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
(WebCore::IconController::continueLoadWithDecision): Instead of here.

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

6 years ago[Win] APNG is not supported on Windows (but it IS supported on WinCairo)
bfulgham@apple.com [Mon, 16 Mar 2015 17:42:31 +0000 (17:42 +0000)]
[Win] APNG is not supported on Windows (but it IS supported on WinCairo)

* platform/win/TestExpectations:

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

6 years agoDFG::PutStackSinkingPhase should eliminate GetStacks that have an obviously known...
fpizlo@apple.com [Mon, 16 Mar 2015 17:39:07 +0000 (17:39 +0000)]
DFG::PutStackSinkingPhase should eliminate GetStacks that have an obviously known source, and emit GetStacks when the stack's value is needed and none is deferred
https://bugs.webkit.org/show_bug.cgi?id=141624

Reviewed by Geoffrey Garen.

Not eliminating GetStacks was an obvious omission from the original PutStackSinkingPhase.
Previously, we would treat GetStacks conservatively and assume that the stack slot
escaped. That's pretty dumb, since a GetStack is a local load of the stack. This change
makes GetStack a no-op from the standpoint of this phase's deferral analysis. At the end
we either keep the GetStack (if there was no concrete deferral) or we replace it with an
identity over the value that would have been stored by the deferred PutStack. Note that
this might be a Phi that the phase creates, so this is strictly stronger than what GCSE
could do.

But this change revealed the fact that this phase never correctly handled side effects in
case that we had done a GetStack, then a side-effect, and then found ourselves wanting the
value on the stack due to (for example) a Phi on a deferred PutStack and that GetStack.
Basically, it's only correct to use the SSA converter's incoming value mapping if we have
a concrete deferral - since anything but a concrete deferral may imply that the value has
been clobbered.

This has no performance change. I believe that the bug was previously benign because we
have so few operations that clobber the stack anymore, and most of those get used in a
very idiomatic way. The GetStack elimination will be very useful for the varargs
simplification that is part of bug 141174.

This includes a test for the case that Speedometer hit, plus tests for the other cases I
thought of once I realized the deeper issue.

* dfg/DFGPutStackSinkingPhase.cpp:
* tests/stress/get-stack-identity-due-to-sinking.js: Added.
(foo):
(bar):
* tests/stress/get-stack-mapping-with-dead-get-stack.js: Added.
(bar):
(foo):
* tests/stress/get-stack-mapping.js: Added.
(bar):
(foo):
* tests/stress/weird-put-stack-varargs.js: Added.
(baz):
(foo):
(fuzz):
(bar):

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

6 years agoAllow clients to selectively disable plug-ins
conrad_shultz@apple.com [Mon, 16 Mar 2015 17:13:04 +0000 (17:13 +0000)]
Allow clients to selectively disable plug-ins
https://bugs.webkit.org/show_bug.cgi?id=142506

Reviewed by Anders Carlsson.

Source/WebCore:

Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
from the page). As part of this:

1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
   set of plug-ins.

2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
   down the stack.

3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
   a concrete implementation thereof in WebPlatformStrategies in WebKit2.

4) Add messaging infrastructure to allow clients to set and clear plug-in policies.

While currently only used in a very limited manner, the new declarative plug-in policies are written generically
so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
Update to reflect function rename.

* loader/SubframeLoader.cpp:
(WebCore::findPluginMIMETypeFromURL):
Adopt getWebVisibleMimesAndPluginIndices().
(WebCore::logPluginRequest):
Update to reflect function rename.
(WebCore::SubframeLoader::shouldUsePlugin):
Ditto.

* platform/PlatformStrategies.h:
Export platformStrategies(), since it is now used in WebProcess.cpp.

* plugins/DOMMimeType.cpp:
(WebCore::DOMMimeType::type):
(WebCore::DOMMimeType::description):
(WebCore::DOMMimeType::mimeClassInfo):
Adopt getWebVisibleMimesAndPluginIndices().
(WebCore::DOMMimeType::enabledPlugin):
Ditto.

* plugins/DOMMimeType.h:
Don't return references in a few places where it is no longer safe to do so.
(WebCore::DOMMimeType::mimeClassInfo): Deleted.

* plugins/DOMMimeTypeArray.cpp:
(WebCore::DOMMimeTypeArray::length):
Adopt getWebVisibleMimesAndPluginIndices().
(WebCore::DOMMimeTypeArray::item):
Ditto.
(WebCore::DOMMimeTypeArray::canGetItemsForName):
Ditto.
(WebCore::DOMMimeTypeArray::namedItem):
Ditto.

* plugins/DOMPlugin.cpp:
(WebCore::DOMPlugin::pluginInfo):
Adopt getWebVisiblePlugins().
(WebCore::DOMPlugin::item):
Adopt getWebVisibleMimesAndPluginIndices().
(WebCore::DOMPlugin::canGetItemsForName):
Ditto.
(WebCore::DOMPlugin::namedItem):
Ditto.

* plugins/DOMPlugin.h:
(WebCore::DOMPlugin::pluginInfo): Deleted.

* plugins/DOMPluginArray.cpp:
(WebCore::DOMPluginArray::length):
Adopt getWebVisiblePlugins().
(WebCore::DOMPluginArray::item):
Ditto.
(WebCore::DOMPluginArray::canGetItemsForName):
Ditto.
(WebCore::DOMPluginArray::namedItem):
Ditto.

* plugins/PluginData.cpp:
(WebCore::PluginData::PluginData):
Stash the passed-in Page and call initPlugins().
(WebCore::PluginData::getWebVisiblePlugins):
New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
(WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
limited to the web-visible plug-ins.
(WebCore::PluginData::supportsWebVisibleMimeType):
Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
(WebCore::PluginData::pluginInfoForWebVisibleMimeType):
Renamed from pluginInfoForMimeType(); ditto.
(WebCore::PluginData::pluginNameForWebVisibleMimeType):
Renamed from pluginNameForMimeType(); ditto.
(WebCore::PluginData::pluginFileForWebVisibleMimeType):
Renamed from pluginFileForMimeType(); ditto.
(WebCore::PluginData::initPlugins):
(WebCore::PluginData::supportsMimeType): Deleted.
(WebCore::PluginData::pluginInfoForMimeType): Deleted.
(WebCore::PluginData::pluginNameForMimeType): Deleted.
(WebCore::PluginData::pluginFileForMimeType): Deleted.

* plugins/PluginData.h:
Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
new members to PluginInfo for the clientLoadPolicy and bundle information.
(WebCore::PluginData::PluginData):
Replace some member functions with new ones that will hide plug-ins upon request from the client;
(WebCore::PluginData::mimes): Deleted.
(WebCore::PluginData::mimePluginIndices): Deleted.

* plugins/PluginStrategy.h:
Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.

* replay/SerializationMethods.cpp:
(JSC::EncodingTraits<PluginData>::encodeValue):
Remove now-obsolete code for handling MIME types and add a FIXME.
(JSC::DeserializedPluginData::DeserializedPluginData):
(JSC::EncodingTraits<PluginData>::decodeValue):
Ditto.
(JSC::EncodingTraits<PluginInfo>::encodeValue):
Handle the new members in PluginInfo.
(JSC::EncodingTraits<PluginInfo>::decodeValue):
Ditto.

* replay/WebInputs.json:
Teach Replay about PluginLoadClientPolicy.

Source/WebKit/mac:

Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
from the page). As part of this:

1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
   set of plug-ins.

2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
   down the stack.

3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
   a concrete implementation thereof in WebPlatformStrategies in WebKit2.

4) Add messaging infrastructure to allow clients to set and clear plug-in policies.

While currently only used in a very limited manner, the new declarative plug-in policies are written generically
so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.

* Plugins/WebBasePluginPackage.mm:
(-[WebBasePluginPackage getPluginInfoFromPLists]):
Set new members in PluginInfo.

* Plugins/WebNetscapePluginPackage.mm:
(-[WebNetscapePluginPackage getPluginInfoFromResources]):
Set new members in PluginInfo.

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::getWebVisiblePluginInfo):
Override to wrap getPluginInfo().
(WebPlatformStrategies::setPluginLoadClientPolicy):
Override to do nothing.
(WebPlatformStrategies::clearPluginClientPolicies):
Ditto.

* WebView/WebFrame.mm:
(-[WebFrame _canProvideDocumentSource]):
Update to reflect function rename.

Source/WebKit/win:

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::getWebVisiblePluginInfo):
Wrap getPluginInfo();

* WebView.cpp:
(WebView::canShowMIMEType):
Update to reflect function rename.

Source/WebKit2:

Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
from the page). As part of this:

1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
   set of plug-ins.

2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
   down the stack.

3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
   a concrete implementation thereof in WebPlatformStrategies in WebKit2.

4) Add messaging infrastructure to allow clients to set and clear plug-in policies.

While currently only used in a very limited manner, the new declarative plug-in policies are written generically
so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):
Set new PluginInfo members.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<PluginInfo>::encode):
Handle new PluginInfo members.
(IPC::ArgumentCoder<PluginInfo>::decode):
Ditto.

* Shared/WebProcessCreationParameters.h:
Declare a member to store client plug-in policies.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
Encode the policies.
(WebKit::WebProcessCreationParameters::decode):
Decode the policies.

* UIProcess/API/C/WKAPICast.h:
(WebKit::toWKPluginLoadClientPolicy):
Teach how to cast between WebCore and WebKit2 policy definitions.
(WebKit::toPluginLoadClientPolicy):
Ditto.

* UIProcess/API/C/WKPluginLoadPolicy.h:
Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.

* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextSetPluginLoadClientPolicy):
New function; wrap WebProcessPool::setPluginLoadClientPolicy().
(WKContextClearPluginClientPolicies):
New function; wrap WebProcessPool::clearPluginClientPolicies().

* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
Copy any client plug-in policies to the new process' creation parameters.
(WebKit::WebProcessPool::setPluginLoadClientPolicy):
Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
(WebKit::WebProcessPool::clearPluginClientPolicies):
Send ClearPluginClientPolicies to all processes and clear any stashed policy info.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pluginInfo):
Set new PluginInfo member.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::pluginSupportsExtension):
Adopt getWebVisibleMimesAndPluginIndices().
(WebKit::WebFrameLoaderClient::objectContentType):
Update to reflect reflect function rename.

* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPluginInfo):
Pass the Page to populatePluginCache().
(WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
to block on the current page.
(WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
(WebKit::WebPlatformStrategies::clearPluginClientPolicies):
New member function; empty m_hostsToPluginIdentifierData.
(WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
New member function; look up the most specific policy for the given plug-in and host.
(WebKit::WebPlatformStrategies::populatePluginCache):
If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
been populated since the Page, and therefore host, may change.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::canShowMIMEType):
Update to reflect function rename.

* WebProcess/WebProcess.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Enumerate and process the client plug-in policies in the creation parameters.
(WebKit::WebProcess::setPluginLoadClientPolicy):
New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
(WebKit::WebProcess::clearPluginClientPolicies):
New member function; wrap PluginStrategy::clearPluginClientPolicies().

* WebProcess/WebProcess.messages.in:
Add messages for setting and clearing policies.

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

6 years agoVersioning.
bshafiei@apple.com [Mon, 16 Mar 2015 16:49:51 +0000 (16:49 +0000)]
Versioning.

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

6 years agoMark fast/images/animated-png.html as [ Crash ImageOnlyFailure ]
cdumez@apple.com [Mon, 16 Mar 2015 16:47:23 +0000 (16:47 +0000)]
Mark fast/images/animated-png.html as [ Crash ImageOnlyFailure ]

It seems to fail instead of crash on Yosemite WK1.

* platform/mac/TestExpectations:

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

6 years agoFix StringView after r181525
benjamin@webkit.org [Mon, 16 Mar 2015 16:32:27 +0000 (16:32 +0000)]
Fix StringView after r181525
Unreviewed.

Fix 2 silly mistakes I made in r181525.

* wtf/text/StringView.cpp:
(WTF::StringView::startsWith):
(WTF::StringView::startsWithIgnoringASCIICase):
(WTF::StringView::endsWith):
(WTF::StringView::endsWithIgnoringASCIICase):
The implementation was inside the #ifdef.

* wtf/text/StringView.h:
The symbols were not exported.

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

6 years agoUnreviewed, mark fast/images/animated-png.html as crashing
cdumez@apple.com [Mon, 16 Mar 2015 16:32:14 +0000 (16:32 +0000)]
Unreviewed, mark fast/images/animated-png.html as crashing

Mark fast/images/animated-png.html as crashing on Yosemite. This test
was introduced in r181553.

* platform/mac/TestExpectations:

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

6 years agoUpdate Map/Set to treat -0 and 0 as the same value
commit-queue@webkit.org [Mon, 16 Mar 2015 15:45:54 +0000 (15:45 +0000)]
Update Map/Set to treat -0 and 0 as the same value
https://bugs.webkit.org/show_bug.cgi?id=142709

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-16
Reviewed by Csaba Osztrogonác.

Source/JavaScriptCore:

* runtime/MapData.h:
(JSC::MapDataImpl<Entry>::KeyType::KeyType):
No longer special case -0. It will be treated as the same as 0.

LayoutTests:

* js/basic-map-expected.txt:
* js/basic-set-expected.txt:
* js/script-tests/basic-map.js:
* js/script-tests/basic-set.js:
Update tests now that -0 and 0 are treated the same.

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

6 years agoUnreviewed. Add new Notification classes to GTK+ API documentation.
carlosgc@webkit.org [Mon, 16 Mar 2015 14:58:26 +0000 (14:58 +0000)]
Unreviewed. Add new Notification classes to GTK+ API documentation.

Add WebKitNotification and WebKitNotificationPermissionRequest to
the documentation and fix some other typos causing warnings when
generating HTML documentation.

* UIProcess/API/gtk/WebKitUserContent.cpp:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:

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

6 years ago[EFL][WK2] REGRESSION(r178526): test_ewk2_storage_manager has been failed for a long...
commit-queue@webkit.org [Mon, 16 Mar 2015 14:32:38 +0000 (14:32 +0000)]
[EFL][WK2] REGRESSION(r178526): test_ewk2_storage_manager has been failed for a long time
https://bugs.webkit.org/show_bug.cgi?id=141249

Patch by Przemyslaw Piorkowski <p.piorkowski@samsung.com> on 2015-03-16
Reviewed by Gyuyoung Kim.

* PlatformEfl.cmake: Enable test_ewk2_storage_manager for EFL port - it is passing now.

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

6 years agoAdd APNG support
commit-queue@webkit.org [Mon, 16 Mar 2015 14:24:46 +0000 (14:24 +0000)]
Add APNG support
https://bugs.webkit.org/show_bug.cgi?id=17022

Patch by Max Stepin <maxstepin@gmail.com> on 2015-03-16
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Test: fast/images/animated-png.html

* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageFrame::divide255):
(WebCore::ImageFrame::overRGBA):
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::frameHeader):
(WebCore::readChunks):
(WebCore::PNGImageReader::PNGImageReader):
(WebCore::PNGImageDecoder::PNGImageDecoder):
(WebCore::PNGImageDecoder::frameBufferAtIndex):
(WebCore::PNGImageDecoder::headerAvailable):
(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::pngComplete):
(WebCore::PNGImageDecoder::readChunks):
(WebCore::PNGImageDecoder::frameHeader):
(WebCore::PNGImageDecoder::init):
(WebCore::PNGImageDecoder::clearFrameBufferCache):
(WebCore::PNGImageDecoder::initFrameBuffer):
(WebCore::PNGImageDecoder::frameComplete):
(WebCore::PNGImageDecoder::processingStart):
(WebCore::PNGImageDecoder::processingFinish):
(WebCore::PNGImageDecoder::fallbackNotAnimated):
* platform/image-decoders/png/PNGImageDecoder.h:
(WebCore::PNGImageDecoder::frameCount):
(WebCore::PNGImageDecoder::repetitionCount):
(WebCore::PNGImageDecoder::isComplete):

Source/WTF:

* wtf/FeatureDefines.h:

LayoutTests:

* fast/images/animated-png-expected.html: Added.
* fast/images/animated-png.html: Added.
* fast/images/resources/apng00-ref.png: Added.
* fast/images/resources/apng00.png: Added.
* fast/images/resources/apng01-ref.png: Added.
* fast/images/resources/apng01.png: Added.
* fast/images/resources/apng02-ref.png: Added.
* fast/images/resources/apng02.png: Added.
* fast/images/resources/apng04-ref.png: Added.
* fast/images/resources/apng04.png: Added.
* fast/images/resources/apng08-ref.png: Added.
* fast/images/resources/apng08.png: Added.
* fast/images/resources/apng10-ref.png: Added.
* fast/images/resources/apng10.png: Added.
* fast/images/resources/apng11-ref.png: Added.
* fast/images/resources/apng11.png: Added.
* fast/images/resources/apng12-ref.png: Added.
* fast/images/resources/apng12.png: Added.
* fast/images/resources/apng14-ref.png: Added.
* fast/images/resources/apng14.png: Added.
* fast/images/resources/apng18-ref.png: Added.
* fast/images/resources/apng18.png: Added.
* fast/images/resources/apng24-ref.png: Added.
* fast/images/resources/apng24.png: Added.
* fast/images/resources/apng26-ref.png: Added.
* fast/images/resources/apng26.png: Added.
* platform/mac/TestExpectations:

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

6 years ago[iOS] REGRESSION (r181511): Most layout tests crash with a NULL deref
ddkilzer@apple.com [Mon, 16 Mar 2015 12:15:22 +0000 (12:15 +0000)]
[iOS] REGRESSION (r181511): Most layout tests crash with a NULL deref

Follow-up fix for:
[iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
<http://webkit.org/b/142702>

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive): Add NULL check for m_webView.
(WebKit::PageClientImpl::isViewFocused): Ditto.

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

6 years ago[CMake][EFL] Rearrange OptionEFL.cmake to improve readability
gyuyoung.kim@samsung.com [Mon, 16 Mar 2015 10:27:14 +0000 (10:27 +0000)]
[CMake][EFL] Rearrange OptionEFL.cmake to improve readability
https://bugs.webkit.org/show_bug.cgi?id=142722

Reviewed by Csaba Osztrogonác.

Categorize to define cmake variables, to find necessary packages,
use upper case for "glib_conponents" cmake variable name, re-arrange
wrong alphabet sorting, and so on.

* CMakeLists.txt: Remove WinCE port.
* Source/cmake/OptionsEfl.cmake:

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

6 years agoCreated Streams API watchlist
calvaris@igalia.com [Mon, 16 Mar 2015 10:00:59 +0000 (10:00 +0000)]
Created Streams API watchlist
https://bugs.webkit.org/show_bug.cgi?id=142684

Reviewed by Benjamin Poulain.

* Scripts/webkitpy/common/config/watchlist: Created StreamsAPI
watchlist and added Benjamin, Youenn and me to it.

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

6 years ago[EFL] Unreviewed EFL gardening on 16th Mar.
gyuyoung.kim@samsung.com [Mon, 16 Mar 2015 07:21:45 +0000 (07:21 +0000)]
[EFL] Unreviewed EFL gardening on 16th Mar.

Mark attachment tests to missing, Set writing mode tests to failure.
Unskip fast/forms/textfield-overflow-by-value-update.html which is
passing on EFL bot.

* platform/efl/TestExpectations:

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

6 years agoCSS: fix the case-insensitive matching of the attribute selectors Begin, End and...
benjamin@webkit.org [Mon, 16 Mar 2015 06:51:44 +0000 (06:51 +0000)]
CSS: fix the case-insensitive matching of the attribute selectors Begin, End and Hyphen
https://bugs.webkit.org/show_bug.cgi?id=142715

Reviewed by Brent Fulgham.

Source/WebCore:

Fix attribute matching with:
-Begin: [a^=b].
-End: [a$=b].
-Hyphen: [a|=b].

Tests: fast/selectors/attribute-endswith-value-matching-is-ascii-case-insensitive.html
       fast/selectors/attribute-hyphen-value-matching-is-ascii-case-insensitive.html
       fast/selectors/attribute-startswith-value-matching-is-ascii-case-insensitive.html

* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches):
I forgot to change CSSSelector::Exact in my last patch.
The tests could not catch that since we use the CSS JIT almost everywhere.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::attributeValueBeginsWith):
(WebCore::SelectorCompiler::attributeValueEndsWith):
(WebCore::SelectorCompiler::attributeValueMatchHyphenRule):

Source/WTF:

Add the necessary infrastructure to test startsWith() and endsWith() with
ASCII case-insentive comparisons.

* wtf/text/AtomicString.h:
(WTF::AtomicString::startsWith):
(WTF::AtomicString::startsWithIgnoringASCIICase):
(WTF::AtomicString::endsWith):
(WTF::AtomicString::endsWithIgnoringASCIICase):

* wtf/text/StringCommon.h:
(WTF::loadUnaligned):
(WTF::equal):
I moved the low level equal() code from StringImpl to StringCommon
since it is used by both StringImpl and StringView.

(WTF::equalCommon):
(WTF::equalIgnoringASCIICaseCommon):
Ideally we should drop the "Common" part of the name but StringView
wants this inline for some reason. I prefered keeping the current behavior
since I don't know how StringView's matching performance was evaluated.

(WTF::startsWith):
(WTF::startsWithIgnoringASCIICase):
(WTF::endsWith):
(WTF::endsWithIgnoringASCIICase):
Make all that code shared between StringView and Stringimpl.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::startsWith):
(WTF::StringImpl::startsWithIgnoringASCIICase):
(WTF::StringImpl::endsWith):
(WTF::StringImpl::endsWithIgnoringASCIICase):
(WTF::equal):
(WTF::stringImplContentEqual): Deleted.
* wtf/text/StringImpl.h:
(WTF::loadUnaligned): Deleted.
(WTF::equal): Deleted.

* wtf/text/StringView.cpp:
(WTF::StringView::startsWith):
(WTF::StringView::startsWithIgnoringASCIICase):
(WTF::StringView::endsWith):
(WTF::StringView::endsWithIgnoringASCIICase):
* wtf/text/StringView.h:
Since those are new, we can safely make them out-of-line and
evaluate the inlining impact as needed.

* wtf/text/WTFString.h:
(WTF::String::startsWithIgnoringASCIICase):
(WTF::String::endsWith):
(WTF::String::endsWithIgnoringASCIICase):

Tools:

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

LayoutTests:

* fast/selectors/attribute-endswith-value-matching-is-ascii-case-insensitive-expected.txt: Added.
* fast/selectors/attribute-endswith-value-matching-is-ascii-case-insensitive.html: Added.
* fast/selectors/attribute-hyphen-value-matching-is-ascii-case-insensitive-expected.txt: Added.
* fast/selectors/attribute-hyphen-value-matching-is-ascii-case-insensitive.html: Added.
* fast/selectors/attribute-startswith-value-matching-is-ascii-case-insensitive-expected.txt: Added.
* fast/selectors/attribute-startswith-value-matching-is-ascii-case-insensitive.html: Added.

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

6 years agoFixed the iOS build after r181522.
mitz@apple.com [Mon, 16 Mar 2015 06:28:46 +0000 (06:28 +0000)]
Fixed the iOS build after r181522.

* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):

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

6 years ago[Content Filtering] Adopt new NEFilterSource SPI
aestes@apple.com [Mon, 16 Mar 2015 05:44:03 +0000 (05:44 +0000)]
[Content Filtering] Adopt new NEFilterSource SPI
https://bugs.webkit.org/show_bug.cgi?id=142710
rdar://problem/19023855

Reviewed by Dan Bernstein.

Teach NetworkExtensionContentFilter to use a new, alternate NEFilterSource SPI on platforms where it is available.

* platform/ContentFilter.cpp:
(WebCore::ContentFilter::types): Renamed HAVE(NE_FILTER_SOURCE) to HAVE(NETWORK_EXTENSION).
* platform/cocoa/NetworkExtensionContentFilter.h: Renamed member variables to remove redundancy, forward-declared NEFilterSourceStatus,
added a dispatch_semaphore member variable to avoid creating and destroying multiple semaphores, and made m_originalData a SharedBuffer.
* platform/cocoa/NetworkExtensionContentFilter.mm:
(decisionInfoReplacementData): Returned the replacement data from a decision handler info dictionary.
(WebCore::createNEFilterSource): Created either an old-style or new-style NEFilterSource object.
(WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Called receivedResponse:decisionHandler: when using the new SPI.
(WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Released the dispatch_semaphore.
(WebCore::NetworkExtensionContentFilter::addData): Appended the copied NSData to m_originalData, avoiding an additional copy previously
being made by NSMutableData. Used the new receivedData:decisionHandler: SPI when appropriate.
(WebCore::NetworkExtensionContentFilter::finishedAddingData): Used the new finishedLoadingWithDecisionHandler: SPI when appropriate.
(WebCore::NetworkExtensionContentFilter::needsMoreData): Changed m_neFilterSourceStatus to m_status.
(WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
(WebCore::NetworkExtensionContentFilter::getReplacementData): Returned the replacement data from NEFilterSource if the load was blocked.
Otherwise, returned the original data.
(WebCore::NetworkExtensionContentFilter::handleDecision): Added a helper to set m_status and m_replacementData, and to signal m_semaphore.
* platform/spi/cocoa/NEFilterSourceSPI.h: Declared the new NEFilterSource SPI on platforms that support it.

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

6 years agoScroll snap points are not supported on iframe content
bfulgham@apple.com [Mon, 16 Mar 2015 05:34:27 +0000 (05:34 +0000)]
Scroll snap points are not supported on iframe content
https://bugs.webkit.org/show_bug.cgi?id=142582
<rdar://problem/20121319>

Source/WebCore:

Tested by css3/scroll-snap/scroll-snap-iframe.html

Reviewed by Simon Fraser.

The scroll snap points were not being applied to the iframe contents because the code
that sets up the scroll snap point content is not called for iframes.

To correct this, we need to make sure the snap offsets are set during post-frame layout
for iframes. We also need to make sure (on Mac) that the scroll animator and timers are updated.

* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks): Call 'updateSnapOffsets' if the frame is not a
MainFrame. Also notify scroll animators they need to update their snap point settings.

LayoutTests:

Reviewed by Simon Fraser.

* css3/scroll-snap/resources: Added.
* css3/scroll-snap/resources/iframe-content.html: Added.
* css3/scroll-snap/scroll-snap-iframe-expected.txt: Added.
* css3/scroll-snap/scroll-snap-iframe.html: Added.

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

6 years agoAdd the same is<RenderBox> test to KeyframeAnimation::computeExtentOfTransformAnimation()
simon.fraser@apple.com [Mon, 16 Mar 2015 05:31:28 +0000 (05:31 +0000)]
Add the same is<RenderBox> test to KeyframeAnimation::computeExtentOfTransformAnimation()
that ImplicitAnimation::computeExtentOfTransformAnimation() has, and change the latter
to the more canonical is<RenderBox>() form.

Fixes an assertion in animations/animation-on-inline-crash.html

* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):

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

6 years agoAnd another fix. Thanks to Hunseop Jeong for the fix.
simon.fraser@apple.com [Mon, 16 Mar 2015 02:26:47 +0000 (02:26 +0000)]
And another fix. Thanks to Hunseop Jeong for the fix.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::didMoveToNewDocument):

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

6 years agoFix the touch-event build.
simon.fraser@apple.com [Mon, 16 Mar 2015 02:24:10 +0000 (02:24 +0000)]
Fix the touch-event build.

* dom/Document.cpp:
(WebCore::Document::didAddTouchEventHandler):
(WebCore::Document::didRemoveTouchEventHandler):

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

6 years agoWeb Inspector: Console Scrolls Unexpectedly when Clicking inside un-selected Expandin...
nvasilyev@apple.com [Mon, 16 Mar 2015 00:40:59 +0000 (00:40 +0000)]
Web Inspector: Console Scrolls Unexpectedly when Clicking inside un-selected Expanding Object
https://bugs.webkit.org/show_bug.cgi?id=142655

Don't scroll when selection change is triggered by clicking, e.g.
only scroll on arrow up and down key press events.

Reviewed by Joseph Pecoraro.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._mousemove):
(WebInspector.LogContentView.prototype._updateMessagesSelection):
(WebInspector.LogContentView.prototype._upArrowWasPressed):
(WebInspector.LogContentView.prototype._downArrowWasPressed):

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

6 years agoWeb Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage...
nvasilyev@apple.com [Mon, 16 Mar 2015 00:19:49 +0000 (00:19 +0000)]
Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage and LegacyConsoleMessageImpl respectively
https://bugs.webkit.org/show_bug.cgi?id=142712

As a first step of ConsoleMessage refactoring (https://bugs.webkit.org/show_bug.cgi?id=142599):

  - Rename WebInspector.ConsoleMessage class to WebInspector.LegacyConsoleMessage
  - Rename WebInspector.ConsoleMessageImpl class to WebInspector.LegacyConsoleMessageImpl
  - Rename ConsoleMessage.js file to LegacyConsoleMessage.js
  - Rename ConsoleMessageImpl file to LegacyConsoleMessageImpl.js

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
* UserInterface/Main.html:
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
* UserInterface/Views/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
(WebInspector.ConsoleCommandResult.prototype.toMessageElement):
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.render):
* UserInterface/Views/LegacyConsoleMessage.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessage.js.
(WebInspector.LegacyConsoleMessage):
(WebInspector.LegacyConsoleMessage.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessage.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessage.prototype.clone):
(WebInspector.LegacyConsoleMessage.create):
* UserInterface/Views/LegacyConsoleMessageImpl.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js.
(WebInspector.LegacyConsoleMessageImpl):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldDumpStackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldHideURL):
(WebInspector.LegacyConsoleMessageImpl.prototype._firstNonNativeCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.get message):
(WebInspector.LegacyConsoleMessageImpl.prototype.get formattedMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyLocation):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessageImpl.prototype._format):
(WebInspector.LegacyConsoleMessageImpl.prototype._isExpandable):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameter):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsValue):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.LegacyConsoleMessageImpl.prototype._rootPropertyPathForObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._userProvidedColumnNames):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsTable):
(WebInspector.LegacyConsoleMessageImpl.prototype.):
(WebInspector.LegacyConsoleMessageImpl.prototype.stringFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.floatFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.integerFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.styleFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.isWhitelistedProperty):
(WebInspector.LegacyConsoleMessageImpl.prototype.append):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatWithSubstitutionString):
(WebInspector.LegacyConsoleMessageImpl.prototype.decorateMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.toMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype._populateStackTraceTreeElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessageImpl.prototype.toString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get text):
(WebInspector.LegacyConsoleMessageImpl.prototype.isEqual):
(WebInspector.LegacyConsoleMessageImpl.prototype.get stackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype.clone):
(WebInspector.LegacyConsoleMessageImpl.prototype.get levelString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get clipboardPrefixString):
(WebInspector.LegacyConsoleMessageImpl.prototype.toClipboardString):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._filterMessages):
(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

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

6 years agoWeb Inspector: Better handle displaying -0
commit-queue@webkit.org [Mon, 16 Mar 2015 00:16:30 +0000 (00:16 +0000)]
Web Inspector: Better handle displaying -0
https://bugs.webkit.org/show_bug.cgi?id=142708

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

Source/JavaScriptCore:

Modeled after a blink change:

Patch by <aandrey@chromium.org>
DevTools: DevTools: Show -0 for negative zero in console
https://src.chromium.org/viewvc/blink?revision=162605&view=revision

* inspector/InjectedScriptSource.js:
When creating a description string, or preview value string
for -0, be sure the string is "-0" and not "0".

LayoutTests:

Add tests for -0 in different places.
I don't understand yet why the test says "0" for
the property previews of "-0". Everything behaves
correctly, but I can't see to make the test show
the right value appear in the test. That is worth
investigating separately though.

* inspector/model/remote-object-expected.txt:
* inspector/model/remote-object.html:

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

6 years agoReduce the side-effects of animations turning off overlap testing
simon.fraser@apple.com [Sun, 15 Mar 2015 23:07:37 +0000 (23:07 +0000)]
Reduce the side-effects of animations turning off overlap testing
https://bugs.webkit.org/show_bug.cgi?id=92791

Reviewed by Dean Jackson.

Source/WebCore:

When a layer is running a transition or animation of the transform property,
we would simply disable overlap testing for later layers, which had the side-effect
of promoting lots of unrelated elements into layers temporarily.

Fix by maintaining overlap, but computing an overlap extent that takes the animation
into account.

Rotations are currently treated as full rotations. If an extent for the overlap is
hard to compute (e.g. 3d transforms, or matrix animations with a rotation component),
then we fall back to the current behavior.

Tests: compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html
       compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html
       compositing/layer-creation/mismatched-transform-transition-overlap.html
       compositing/layer-creation/multiple-keyframes-animation-overlap.html
       compositing/layer-creation/scale-rotation-animation-overlap.html
       compositing/layer-creation/scale-rotation-transition-overlap.html
       compositing/layer-creation/translate-animation-overlap.html
       compositing/layer-creation/translate-scale-animation-overlap.html
       compositing/layer-creation/translate-scale-transition-overlap.html
       compositing/layer-creation/translate-transition-overlap.html

* page/animation/AnimationBase.cpp:
(WebCore::containsRotation):
(WebCore::AnimationBase::computeTransformedExtentViaTransformList): When we have matched
transform lists, we can map a rectangle through the various operations. Transform-origin
is used to shift the origin of the box first, and then unshift after. If we encounter
a rotation, for now assume it's a full rotation (a future patch could tighten this up).
(WebCore::AnimationBase::computeTransformedExtentViaMatrix): If we're using matrix
interpolation, we have to decompose the matrix to see if there's any rotation component,
and, if there is, fall back to current behavior.
* page/animation/AnimationBase.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
(WebCore::AnimationController::computeExtentOfAnimation):
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::computeExtentOfTransformAnimation): Ask active keyframe
animations and transitions to compute the bounds extent.
* page/animation/CompositeAnimation.h:
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::computeExtentOfTransformAnimation): Compute the extent
of the start and end transforms, and union them.
* page/animation/ImplicitAnimation.h:
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate):
(WebCore::KeyframeAnimation::getAnimatedStyle): Some nullptr goodness.
(WebCore::KeyframeAnimation::computeExtentOfTransformAnimation): Compute an extent
for each keyframe, and take their union.
* page/animation/KeyframeAnimation.h:
* platform/graphics/GeometryUtilities.cpp:
(WebCore::euclidianDistance): Use Pythagoras to compute a distance.
(WebCore::boundsOfRotatingRect): Given a rect whose location is relative
to the rotation origin, compute a bounds for the rotated rect by computing
the furthest corner from the origin, and sweeping out a circle.
* platform/graphics/GeometryUtilities.h:
* platform/graphics/transforms/Matrix3DTransformOperation.h:
* platform/graphics/transforms/MatrixTransformOperation.h:
* platform/graphics/transforms/PerspectiveTransformOperation.h:
* platform/graphics/transforms/RotateTransformOperation.h:
* platform/graphics/transforms/ScaleTransformOperation.h:
* platform/graphics/transforms/SkewTransformOperation.h:
* platform/graphics/transforms/TransformOperation.h:
(WebCore::TransformOperation::isAffectedByTransformOrigin):
* platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::affectedByTransformOrigin): Ask all the operations if
they are affected by transform-origin.
(WebCore::TransformOperations::blendByMatchingOperations): nullptr.
* platform/graphics/transforms/TransformOperations.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::pushMappingToContainer): Comment fix. Only take transforms into account
if the geometry map says so (which is most of the time).
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::mapToContainer): RenderLayerCompositor is now using the
geometry map in a way that is incompatible with this assertion; it deliberately ignores
transforms sometimes, so we can't easily verify that the mapping matches mapping through
renderers.
(WebCore::RenderGeometryMap::pushMappingsToAncestor): Save and restore the UseTransforms
bit.
* rendering/RenderGeometryMap.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::boundingBox): Whitespace.
(WebCore::RenderLayer::getOverlapBoundsIncludingChildrenAccountingForTransformAnimations): Helper
function to get the bounds of a layer, including descendants, when a transform animation is running.
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::CompositingState::CompositingState): Add a ancestorHasTransformAnimation
flag to detect nested animated transforms.
(WebCore::RenderLayerCompositor::OverlapExtent::knownToBeHaveExtentUncertainty): This returns true when
the layer is animating transform, and the transition/animation is such that we can't easily compute the
bounds of the animation.
(WebCore::RenderLayerCompositor::computeExtent): const RenderLayer&.
Compute the animated bounds if there's a transform animation running.
(WebCore::RenderLayerCompositor::addToOverlapMap): const RenderLayer&
(WebCore::RenderLayerCompositor::addToOverlapMapRecursive): const RenderLayer&
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
Delay the call to pushMappingsToAncestor() until knowing if there's a transform animation running, and
if there is, push the mapping while ignoring transforms (since the transform is implicitly taken into account
for overlap via the computed animated bounds).
If this layer is running a transform animation, set the childState.ancestorHasTransformAnimation flag so
that descendants will know (nested transform animations fall back to current behavior).
The if (.... && isRunningAcceleratedTransformAnimation()) is what previously caused us to turn off overlap
testing in the face of animations. That now only happens if we were unable to easily compute the animation bounds.
(WebCore::RenderLayerCompositor::isRunningTransformAnimation): This previously tested whether an accelerated animation
was running, but that's timing sensitive; AnimationController can start the transform animation, but it's not yet
considered accelerated until we get an async callback from GraphicsLayer, yet this code needed to know if the
animation was running.
Since transform animations are always accelerated, we can just test for a running transform animation.
(WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation): Deleted.
* rendering/RenderLayerCompositor.h:
* rendering/style/RenderStyle.cpp:
(WebCore::requireTransformOrigin): Some FIXME comments.

LayoutTests:

These test overlay an animated element with a grid of position: relative squares.
These reveal the overlap area by selectively getting composited.

* compositing/layer-creation/animation-overlap-with-children-expected.txt:
* compositing/layer-creation/mismatched-rotated-transform-animation-overlap-expected.txt: Added.
* compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html: Added.
* compositing/layer-creation/mismatched-rotated-transform-transition-overlap-expected.txt: Added.
* compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html: Added.
* compositing/layer-creation/mismatched-transform-transition-overlap-expected.txt: Added.
* compositing/layer-creation/mismatched-transform-transition-overlap.html: Added.
* compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt: Added.
* compositing/layer-creation/multiple-keyframes-animation-overlap.html: Added.
* compositing/layer-creation/scale-rotation-animation-overlap-expected.txt: Added.
* compositing/layer-creation/scale-rotation-animation-overlap.html: Added.
* compositing/layer-creation/scale-rotation-transition-overlap-expected.txt: Added.
* compositing/layer-creation/scale-rotation-transition-overlap.html: Added.
* compositing/layer-creation/translate-animation-overlap-expected.txt: Added.
* compositing/layer-creation/translate-animation-overlap.html: Added.
* compositing/layer-creation/translate-scale-animation-overlap-expected.txt: Added.
* compositing/layer-creation/translate-scale-animation-overlap.html: Added.
* compositing/layer-creation/translate-scale-transition-overlap-expected.txt: Added.
* compositing/layer-creation/translate-scale-transition-overlap.html: Added.
* compositing/layer-creation/translate-transition-overlap-expected.txt: Added.
* compositing/layer-creation/translate-transition-overlap.html: Added.

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

6 years agoClean up related to wheelEvent names
simon.fraser@apple.com [Sun, 15 Mar 2015 22:47:08 +0000 (22:47 +0000)]
Clean up related to wheelEvent names
https://bugs.webkit.org/show_bug.cgi?id=142713

Reviewed by Anders Carlsson.

Add EventNames::isWheelEventType() and use it in places that test for the
two wheel event names.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::didAddWheelEventHandler):
(WebCore::Document::didRemoveWheelEventHandler):
* dom/Document.h: No need for exports (I grepped). Pass the Node*, which
will be used in a later patch.
* dom/EventNames.h:
(WebCore::EventNames::isWheelEventType):
* dom/Node.cpp:
(WebCore::Node::didMoveToNewDocument):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::defaultEventHandler):
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsAppleEventListener::handleEvent):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::removeEventListener):
* page/ios/FrameIOS.mm:
(WebCore::ancestorRespondingToScrollWheelEvents): Remove dead code.

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):

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

6 years agoRemove a redundant repaint when a layer becomes composited
simon.fraser@apple.com [Sun, 15 Mar 2015 20:42:44 +0000 (20:42 +0000)]
Remove a redundant repaint when a layer becomes composited
https://bugs.webkit.org/show_bug.cgi?id=142711

Reviewed by Anders Carlsson.

RenderLayerCompositor::computeCompositingRequirements() doesn't need to call
repaintOnCompositingChange() when a layer is going to become composited,
because updateBacking() does exactly the same thing. I used an assertion
and ran the tests to ensure this wasn't a behavior change.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):

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

6 years agoChange the exact attribute matching to be ASCII case-insensitive
benjamin@webkit.org [Sun, 15 Mar 2015 19:43:18 +0000 (19:43 +0000)]
Change the exact attribute matching to be ASCII case-insensitive
https://bugs.webkit.org/show_bug.cgi?id=142609

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-03-15
Reviewed by Darin Adler.

Source/WebCore:

In CSS, testing attribute values should be ASCII case-insensitive,
previously we were using full unicode case conversion.

Test: fast/selectors/attribute-exact-value-match-is-ascii-case-insensitive.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseKeyframeSelector):
The CSS parser has its own fast version for ASCII case insensitive.
This code was using the general equalIgnoringASCIICase() which was causing name conflicts,
change that to the normal CSS parser version.

* css/SelectorCheckerTestFunctions.h:
(WebCore::equalIgnoringASCIICase): Deleted.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):

Source/WTF:

Add support for ASCII case insensitive comparisons to all the string
classes.

The new file StringCommon.h has the common algorithm to avoid repeating
the same code with different types.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* wtf/ASCIICType.h:
(WTF::toASCIILower):
* wtf/CMakeLists.txt:
* wtf/text/AtomicString.h:
(WTF::equalIgnoringASCIICase):
* wtf/text/StringCommon.h: Added.
(WTF::equalIgnoringASCIICase):
(WTF::equalIgnoringASCIICaseCommon):
* wtf/text/StringImpl.cpp:
(WTF::equalIgnoringASCIICase):
(WTF::equalIgnoringASCIICaseNonNull):
(WTF::StringImpl::utf8Impl):
(WTF::StringImpl::defaultWritingDirection): Deleted.
(WTF::StringImpl::adopt): Deleted.
(WTF::StringImpl::sizeInBytes): Deleted.
(WTF::putUTF8Triple): Deleted.
(WTF::StringImpl::utf8): Deleted.
* wtf/text/StringImpl.h:
(WTF::StringImpl::isSubString): Deleted.
(WTF::find): Deleted.

Tools:

* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
* TestWebKitAPI/Tests/WTF/StringView.cpp:

LayoutTests:

* fast/selectors/attribute-exact-value-match-is-ascii-case-insensitive-expected.txt: Added.
* fast/selectors/attribute-exact-value-match-is-ascii-case-insensitive.html: Added.

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

6 years ago[iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, activ...
mitz@apple.com [Sun, 15 Mar 2015 19:30:09 +0000 (19:30 +0000)]
[iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
https://bugs.webkit.org/show_bug.cgi?id=142702

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView becomeFirstResponder]): Override to delegate first responder status to the
WKContentView if possible.
(-[WKWebView _retainActiveFocusedState]): New SPI that prevents view hierarchy changes from
affecting the active and focused state of the view. Increments a counter ivar and returns a
completion block (which callers must call when they’re done) that decrements it back.
* UIProcess/API/Cocoa/WKWebViewInternal.h: Declared new _activeFocusedStateRetainCount ivar
with @package access.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new method.

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive): Return true if active/focused state is to be
maintained despite not being visible.
(WebKit::PageClientImpl::isViewFocused): Return true if active/focused state is to be
maintained despite not being active.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView resignFirstResponder]): Don’t blur the assisted node if active/focused
state is to be maintained.

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

6 years agoscroll snap points do not properly account for zoomed pages
bfulgham@apple.com [Sun, 15 Mar 2015 19:13:36 +0000 (19:13 +0000)]
scroll snap points do not properly account for zoomed pages
https://bugs.webkit.org/show_bug.cgi?id=142706
<rdar://problem/20165771>

Reviewed by Anders Carlsson.

When a WebView is zoomed (such that it has a non-unity pageScaleFactor), we need to account for this
scaling value when selecting our correct scroll snap point target, as well as when specifying the
pixel location for our animation to target.

* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::pageScaleFactor): Added new delegate method.
* platform/cocoa/ScrollController.h:
(WebCore::ScrollControllerClient::pageScaleFactor): Added new default delegate.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::beginScrollSnapAnimation): Calculate the correct scroll target
based on the page scale factor.

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

6 years ago[Win] Document more debug assertions for later review.
bfulgham@apple.com [Sun, 15 Mar 2015 17:52:03 +0000 (17:52 +0000)]
[Win] Document more debug assertions for later review.

* platform/win/TestExpectations:

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