WebKit-https.git
5 years agoUnreviewed build fix.
rniwa@webkit.org [Wed, 13 May 2015 05:44:07 +0000 (05:44 +0000)]
Unreviewed build fix.

Added the missing metric name and wrapped values in an array as done in SunSpider.patch.

* Scripts/webkitpy/benchmark_runner/data/patches/Kraken.patch:

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

5 years agoTemporarily disable the test on Windows. The failure is tracked in webkit.org/b/144897.
rniwa@webkit.org [Wed, 13 May 2015 05:39:50 +0000 (05:39 +0000)]
Temporarily disable the test on Windows. The failure is tracked in webkit.org/b/144897.

* tests/stress/arith-mul-with-constants.js:

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

5 years agoReindent DIBPixelData.h for consistency.
commit-queue@webkit.org [Wed, 13 May 2015 05:31:25 +0000 (05:31 +0000)]
Reindent DIBPixelData.h for consistency.
https://bugs.webkit.org/show_bug.cgi?id=144942

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-05-12
Reviewed by Darin Adler.

No new tests, no behavior change.

* platform/graphics/win/DIBPixelData.h:
(WebCore::DIBPixelData::DIBPixelData):
(WebCore::DIBPixelData::buffer):
(WebCore::DIBPixelData::bufferLength):
(WebCore::DIBPixelData::size):
(WebCore::DIBPixelData::bytesPerRow):
(WebCore::DIBPixelData::bitsPerPixel):

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

5 years agofast/text/simple-line-layout-text-stroke-width.html fails on Windows
ap@apple.com [Wed, 13 May 2015 05:25:52 +0000 (05:25 +0000)]
fast/text/simple-line-layout-text-stroke-width.html fails on Windows

* platform/win/TestExpectations: Mark it as such. The tets likely needs to be
improved to work cross-platform.

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

5 years agojs/dom/stack-trace.html fails with eager compilation
fpizlo@apple.com [Wed, 13 May 2015 05:21:16 +0000 (05:21 +0000)]
js/dom/stack-trace.html fails with eager compilation
https://bugs.webkit.org/show_bug.cgi?id=144853

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

All of our escape analyses were mishandling Check(). They were assuming that this is a
non-escaping operation. But, if we do for example a Check(Int32:@x) and @x is an escape
candidate, then we need to do something: if we eliminate or sink @x, then the check no
longer makes any sense since a phantom allocation has no type. This will make us forget
that this operation would have exited. This was causing us to not call a valueOf method in
js/dom/stack-trace.html with eager compilation enabled, because it was doing something like
+o where o had a valueOf method, and o was otherwise sinkable.

This changes our escape analyses to basically pretend that any Check() that isn't obviously
unnecessary is an escape. We don't have to be super careful here. Most checks will be
completely eliminated by constant-folding. If that doesn't run in time, then the most
common check we will see is CellUse. So, we just recognize some very obvious check kinds
that we know would have passed, and for all of the rest we just assume that it's an escape.

This was super tricky to test. The obvious way to test it is to use +o like
stack-trace.html, except that doing so relies on the fact that we still haven't implemented
the optimal behavior for op_to_number. So, I take four approaches in testing this patch:

1) Use +o. These will test what we want it to test for now, but at some point in the future
   these tests will just be a good sanity-check that our op_to_number implementation is
   right.

2) Do fancy control flow tricks to fool the profiling into thinking that some arithmetic
   operation always sees integers even though we eventually feed it an object and that
   object is a sink candidate.

3) Introduce a new jsc.cpp intrinsic called isInt32() which returns true if the incoming
   value is an int32. This intrinsic is required to be implemented by DFG by
   unconditionally speculating that the input is int32. This allows us to write much more
   targetted tests of the underlying issue.

4) I made a version of stack-trace.html that runs in run-jsc-stress-tests, so that we can
   get regression test coverage of this test in eager mode.

* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsic):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
* dfg/DFGVarargsForwardingPhase.cpp:
* ftl/FTLExitValue.cpp:
(JSC::FTL::ExitValue::dumpInContext):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::buildExitArguments):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileFTLOSRExit):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionIsInt32):
* runtime/Intrinsic.h:
* tests/stress/sink-arguments-past-invalid-check-dfg.js: Added.
* tests/stress/sink-arguments-past-invalid-check-int32-dfg.js: Added.
* tests/stress/sink-arguments-past-invalid-check-int32.js: Added.
* tests/stress/sink-arguments-past-invalid-check-sneakier.js: Added.
* tests/stress/sink-arguments-past-invalid-check.js: Added.
* tests/stress/sink-function-past-invalid-check-sneakier.js: Added.
* tests/stress/sink-function-past-invalid-check-sneaky.js: Added.
* tests/stress/sink-object-past-invalid-check-int32.js: Added.
* tests/stress/sink-object-past-invalid-check-sneakier.js: Added.
* tests/stress/sink-object-past-invalid-check-sneaky.js: Added.
* tests/stress/sink-object-past-invalid-check.js: Added.

LayoutTests:

Make a copy of the stack-trace test that only runs in run-jsc-stress-tests. Sadly, we don't
have a good way of having different expectation files for when a test runs in RJST versus
RWT. So, the approach I take is that I make a copy of the test just for RJST and I exclude
the .html file, which makes RWT overlook it. The test has different expectations in the
two harnesses because it does some small DOM things.

* js/script-tests/stack-trace.js: Added.
* js/stack-trace-expected.txt: Added.

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

5 years agoUnreviewed, rolling out r184224.
commit-queue@webkit.org [Wed, 13 May 2015 05:18:01 +0000 (05:18 +0000)]
Unreviewed, rolling out r184224.
https://bugs.webkit.org/show_bug.cgi?id=144946

Made inspector/page/main-frame-resource.html assert every time
(Requested by ap on #webkit).

Reverted changeset:

"Web Inspector: REGRESSION (r181625): Timeline recording
started from console.profile is always empty"
https://bugs.webkit.org/show_bug.cgi?id=144882
http://trac.webkit.org/changeset/184224

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

5 years agoIn Safari, Debug > Get Bytecode Profile crashes the Web Content process
mitz@apple.com [Wed, 13 May 2015 04:38:39 +0000 (04:38 +0000)]
In Safari, Debug > Get Bytecode Profile crashes the Web Content process
https://bugs.webkit.org/show_bug.cgi?id=144944

Reviewed by Darin Adler.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getBytecodeProfile): Don’t assert that m_perBytecodeProfiler isn’t null,
because it is when the profiler is disabled, which is the default. In that case, return
after sending back the empty string, rather than continuing to dereference a null pointer.

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

5 years ago[Mac] Hang in MediaPlayerPrivateAVFoundationObjC::audioSourceProvider() - 'tracks...
jer.noble@apple.com [Wed, 13 May 2015 04:10:54 +0000 (04:10 +0000)]
[Mac] Hang in MediaPlayerPrivateAVFoundationObjC::audioSourceProvider() - 'tracks' property not yet loaded
https://bugs.webkit.org/show_bug.cgi?id=144937

Reviewed by Eric Carlson.

Querying for the -[AVAsset tracks] property blocks for network loading; and could
block forever if the asset in question is not reachable. Add a "safe" mechanism for
querying the list of audible tracks, and use that when providing the audioSourceProvider()
with an audible track.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeAVAssetTracksForAudibleMedia):

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

5 years agoIf JSC cannot get executable memory, it shouldn't call madvise
msaboff@apple.com [Wed, 13 May 2015 04:02:09 +0000 (04:02 +0000)]
If JSC cannot get executable memory, it shouldn't call madvise
https://bugs.webkit.org/show_bug.cgi?id=144931

Reviewed by Mark Lam.

Made calling madvise conditional on really getting mmapped memory.

* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):

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

5 years agoCrash when using <input type=file>
jhoneycutt@apple.com [Wed, 13 May 2015 03:51:19 +0000 (03:51 +0000)]
Crash when using <input type=file>

<https://bugs.webkit.org/show_bug.cgi?id=144939>
<rdar://problem/20172315>

Reviewed by Andy Estes.

* UIProcess/ios/forms/WKFileUploadPanel.mm:
Use a RefPtr to hold the WebOpenPanelResultListenerProxy, because the
WKFileUploadPanel can outlive it.

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

5 years agoAX: [Win] REGRESSION(r184213) breaks aria-menubar-menuitems.html
jdiggs@igalia.com [Wed, 13 May 2015 03:42:25 +0000 (03:42 +0000)]
AX: [Win] REGRESSION(r184213) breaks aria-menubar-menuitems.html
https://bugs.webkit.org/show_bug.cgi?id=144936

Unreviewed gardening.

Adding the platform-specific expectations for Windows now that the
accessibility tree is being correctly generated for this test.

* platform/win/accessibility/aria-menubar-menuitems-expected.txt: Added.

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

5 years agoMac build fix after r184228.
rniwa@webkit.org [Wed, 13 May 2015 03:08:50 +0000 (03:08 +0000)]
Mac build fix after r184228.

* bindings/scripts/CodeGeneratorJS.pm:

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

5 years agoTurn antialiased font dilation off by default
simon.fraser@apple.com [Wed, 13 May 2015 02:01:22 +0000 (02:01 +0000)]
Turn antialiased font dilation off by default
https://bugs.webkit.org/show_bug.cgi?id=144940
rdar://problem/20923031

Reviewed by Sam Weinig.
Source/WebCore:

Turn antialised font dilation off by default.

* page/Settings.cpp:
(WebCore::Settings::Settings):
* platform/graphics/FontCascade.cpp:

Source/WebKit/mac:

Turn antialised font dilation off by default.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

Source/WebKit2:

Turn antialised font dilation off by default.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:

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

5 years agoFix the iteration count of arith-modulo-node-behaviors.js
benjamin@webkit.org [Wed, 13 May 2015 01:52:52 +0000 (01:52 +0000)]
Fix the iteration count of arith-modulo-node-behaviors.js

* tests/stress/arith-modulo-node-behaviors.js:
No need for big numbers for the real testing.

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

5 years agoWindows: Cannot use HANDLE from GetCurrentThread() to get the CONTEXT of another...
mark.lam@apple.com [Wed, 13 May 2015 01:47:15 +0000 (01:47 +0000)]
Windows: Cannot use HANDLE from GetCurrentThread() to get the CONTEXT of another thread.
https://bugs.webkit.org/show_bug.cgi?id=144924

Reviewed by Alex Christensen.

The present stack scanning code in the Windows port is expecting that the
GetCurrentThread() API will provide a unique HANDLE for each thread.  The code
then saves and later uses that HANDLE with GetThreadContext() to get the
runtime state of the target thread from the GC thread.  According to
https://msdn.microsoft.com/en-us/library/windows/desktop/ms683182(v=vs.85).aspx,
GetCurrentThread() does not provide this unique HANDLE that we expect:

    "The function cannot be used by one thread to create a handle that can
    be used by other threads to refer to the first thread. The handle is
    always interpreted as referring to the thread that is using it. A
    thread can create a "real" handle to itself that can be used by other
    threads, or inherited by other processes, by specifying the pseudo
    handle as the source handle in a call to the DuplicateHandle function."

As a result of this, GetCurrentThread() always returns the same HANDLE value, and
we end up never scanning the stacks of other threads because we wrongly think that
they are all equal (in identity) to the scanning thread.  This, in turn, results
in crashes due to objects that are incorrectly collected.

The fix is to call DuplicateHandle() to create a HANDLE that we can use.  The
MachineThreads::Thread class already accurately tracks the period of time when
we need that HANDLE for the VM.  Hence, the life-cycle of the HANDLE can be tied
to the life-cycle of the MachineThreads::Thread object for the corresponding thread.

* heap/MachineStackMarker.cpp:
(JSC::getCurrentPlatformThread):
(JSC::MachineThreads::Thread::Thread):
(JSC::MachineThreads::Thread::~Thread):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::Thread::resume):
(JSC::MachineThreads::Thread::getRegisters):

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

5 years agoDon't export all JS bindings classes.
achristensen@apple.com [Wed, 13 May 2015 01:47:00 +0000 (01:47 +0000)]
Don't export all JS bindings classes.
https://bugs.webkit.org/show_bug.cgi?id=144932

Reviewed by Dan Bernstein.

This change is good if it compiles and links successfully.

* bindings/scripts/CodeGeneratorJS.pm:
(ExportLabelForClass):
Add a list of the JS bindings classes that need WEBCORE_EXPORT to prevent exporting too many symbols from WebCore.
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.h:
Update bindings tests to remove WEBCORE_EXPORT from most of the tests,
but keep one test with WEBCORE_EXPORT and one test with WEBCORE_TESTSUPPORT_EXPORT.

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

5 years agoAX: [Win] REGRESSION(r184213) breaks aria-menubar-menuitems.html
jdiggs@igalia.com [Wed, 13 May 2015 01:43:26 +0000 (01:43 +0000)]
AX: [Win] REGRESSION(r184213) breaks aria-menubar-menuitems.html
https://bugs.webkit.org/show_bug.cgi?id=144936

Reviewed by Chris Fleizach.

Use focusedElement + childAtIndex rather than accessibleElementById
as the latter seems to be failing, and the former worked on Windows
to get the menubar in the original version of this test.

* accessibility/aria-menubar-menuitems.html: Modified.

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

5 years ago[Win] Update DXSDK_DIR settings for build system.
bfulgham@apple.com [Wed, 13 May 2015 00:57:16 +0000 (00:57 +0000)]
[Win] Update DXSDK_DIR settings for build system.

Unreviewed build fix.

* WebCore.vcxproj/WebCore.proj: Add DXSDK_DIR definition for builder.

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

5 years agoReturn Ref instead of PassRefPtr in create() factory functions of WebCore/dom
gyuyoung.kim@webkit.org [Wed, 13 May 2015 00:30:29 +0000 (00:30 +0000)]
Return Ref instead of PassRefPtr in create() factory functions of WebCore/dom
https://bugs.webkit.org/show_bug.cgi?id=144904

Reviewed by Andreas Kling.

We return Ref when we're sure if pointer can't be null. If not, we use RefPtr instead PassRefPtr.

No new tests, no behavior changes.

* dom/AutocompleteErrorEvent.h:
* dom/DOMNamedFlowCollection.h:
(WebCore::DOMNamedFlowCollection::create):
* dom/MessageChannel.h:
(WebCore::MessageChannel::create):
* dom/MessagePort.h:
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::create):
* dom/MutationObserver.h:
* dom/NamedFlowCollection.h:
* dom/NodeFilter.h:
(WebCore::NodeFilter::create):
* dom/NodeIterator.h:
(WebCore::NodeIterator::create):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::create):
* dom/ProcessingInstruction.h:
* dom/ScriptedAnimationController.h:
(WebCore::ScriptedAnimationController::create):
* dom/SecurityPolicyViolationEvent.h:
* dom/StaticNodeList.h:
* dom/TemplateContentDocumentFragment.h:
* dom/Touch.cpp:
(WebCore::Touch::cloneWithNewTarget):
* dom/Touch.h:
(WebCore::Touch::create):
* dom/TouchEvent.h:
* dom/TouchList.h:
(WebCore::TouchList::create):
* dom/TreeWalker.h:
(WebCore::TreeWalker::create):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::create):
* dom/WebKitNamedFlow.h:
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::create):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::MessagePortQueue::create):

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

5 years agoWeb Inspector: REGRESSION (r181625): Timeline recording started from console.profile...
mattbaker@apple.com [Tue, 12 May 2015 23:13:01 +0000 (23:13 +0000)]
Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty
https://bugs.webkit.org/show_bug.cgi?id=144882

Reviewed by Brian Burg.

A timeline recording will always be stopped before the end of the current run loop is observed. Before
dispatching the recording stopped event, the last run loop record must be completed and sent to the frontend
to prevent it from being discarded.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStop):

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

5 years agoMake {Network, Web}ProcessProxy inherit from ProcessThrottleClient privately
dbates@webkit.org [Tue, 12 May 2015 22:06:44 +0000 (22:06 +0000)]
Make {Network, Web}ProcessProxy inherit from ProcessThrottleClient privately
https://bugs.webkit.org/show_bug.cgi?id=144886

Reviewed by Darin Adler.

{Network, Web}ProcessProxy are implemented in terms of ProcessThrottleClient, an
interface that defines the callbacks that ProcessThrottler makes to a client. We
do not want to allow arbitrary callers to make use of the interface ProcessThrottleClient.
So, we should use private inheritance to represent the relationship between
{Network, Web}ProcessProxy and ProcessThrottleClient instead of public inheritance.

Additionally make ProcessThrottler a instance variable of {Network, Web}ProcessProxy instead
of holding a smart pointer to a ProcessThrottler instance because we always want to
have a ProcessThrottler for each instance of {Network, Web}ProcessProxy.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::NetworkProcessProxy): Update code to work now that m_throttler
is an instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
(WebKit::NetworkProcessProxy::didFinishLaunching): Update code to access functions of
m_throttler by reference instead of by pointer.
(WebKit::NetworkProcessProxy::didCancelProcessSuspension): Ditto.
(WebKit::NetworkProcessProxy::processReadyToSuspend): Ditto.
(WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): Ditto.
* UIProcess/Network/NetworkProcessProxy.h: Inherit from ProcessThrottleClient privately.
(WebKit::NetworkProcessProxy::throttler): Update code to work now that m_throttler is an
instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler): Update code to work now that m_process is
a lvalue reference instead of a pointer.
(WebKit::ProcessThrottler::updateAssertion): Ditto.
(WebKit::ProcessThrottler::assertionWillExpireImminently): Ditto.
* UIProcess/ProcessThrottler.h: Ditto.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy): Update code to work now that m_throttler is an
instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
(WebKit::WebProcessProxy::didFinishLaunching): Update code to access functions of
m_throttler by reference instead of by pointer.
(WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
(WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
(WebKit::WebProcessProxy::setIsHoldingLockedFiles): Ditto.
* UIProcess/WebProcessProxy.h: Inherit from ProcessThrottleClient privately.
(WebKit::WebProcessProxy::throttler): Update code to work now that m_throttler is an
instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.

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

5 years agoFix the previous commit, which made both bubbles green.
rniwa@webkit.org [Tue, 12 May 2015 21:50:16 +0000 (21:50 +0000)]
Fix the previous commit, which made both bubbles green.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
(.status-line.good .bubble):
(.status-line.bad .bubble):
(.status-line.good .message):

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

5 years agoPeople with Deuteranopia can't tell red and green apart on bot watcher's dashboard
rniwa@webkit.org [Tue, 12 May 2015 21:30:21 +0000 (21:30 +0000)]
People with Deuteranopia can't tell red and green apart on bot watcher's dashboard
https://bugs.webkit.org/show_bug.cgi?id=144929

Reviewed by Eric Carlson.

Tweaked colors as I see fit.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
(.status-line.good .bubble):
(.status-line.bad .bubble):

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

5 years ago[JSC] Make the NegZero backward propagated flags of ArithMod stricter
benjamin@webkit.org [Tue, 12 May 2015 21:28:43 +0000 (21:28 +0000)]
[JSC] Make the NegZero backward propagated flags of ArithMod stricter
https://bugs.webkit.org/show_bug.cgi?id=144897

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-05-12
Reviewed by Geoffrey Garen.

The NegZero flags of ArithMod were the same as ArithDiv: both children were
marked as needing to handle NegativeZero.

Lucky for us, ArithMod is quite a bit different than ArithDiv.

First, the sign of the result is completely independent from
the sign of the divisor. A zero on the divisor always produces a NaN.
That's great, we can remove the NodeBytecodeNeedsNegZero
from the flags propagated to child2.

Second, the sign of the result is always the same as the sign of
the dividend. A dividend of zero produces a zero of same sign
unless the divisor is zero (in which case the result is NaN).
This is great too: we can just pass the flags we got into
ArithMod.

With those two out of the way, we can make a faster version of ArithRound
for Kraken's oscillator. Since we no longer care about negative zero,
rounding becomes cast<int32>(value + 0.5). This gives ~3% faster runtime
on the benchmark.

Unfortunatelly, most of the time is spent in FTL and the same optimization
does not apply well just yet: rdar://problem/20904149.

* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
Never add NodeBytecodeNeedsNegZero unless needed by the users of this node.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithRound):
Faster Math.round() when negative zero is not important.

* tests/stress/arith-modulo-node-behaviors.js: Added.
(moduloWithNegativeZeroDividend):
(moduloWithUnusedNegativeZeroDividend):
(moduloWithNegativeZeroDivisor):

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

5 years agoREGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
zalan@apple.com [Tue, 12 May 2015 21:24:37 +0000 (21:24 +0000)]
REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
https://bugs.webkit.org/show_bug.cgi?id=144917
rdar://problem/20545878

Reviewed by Andreas Kling.

This patch ensures that text stroke width value is taken into account while
calculating visual overflow for simple line layout.
Ceiling the text stroke width value matches the normal text layout behaviour.

Source/WebCore:

Test: fast/text/simple-line-layout-text-stroke-width.html

* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):

LayoutTests:

* fast/text/simple-line-layout-text-stroke-width-expected.txt: Added.
* fast/text/simple-line-layout-text-stroke-width.html: Added.

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

5 years agoRefactor MachineStackMarker.cpp so that it's easier to reason about MachineThreads...
mark.lam@apple.com [Tue, 12 May 2015 21:20:26 +0000 (21:20 +0000)]
Refactor MachineStackMarker.cpp so that it's easier to reason about MachineThreads::Thread.
https://bugs.webkit.org/show_bug.cgi?id=144925

Reviewed by Michael Saboff.

Currently, the code in MachineStackMarker.cpp is written as a bunch of functions that
operate on the platformThread value in the MachineThreads::Thread struct.  Instead, we
can apply better OO encapsulation and convert all these functions into methods of the
MachineThreads::Thread struct.

This will also make it easier to reason about the fix for
https://bugs.webkit.org/show_bug.cgi?id=144924 later.

* heap/MachineStackMarker.cpp:
(JSC::getCurrentPlatformThread):
(JSC::MachineThreads::Thread::createForCurrentThread):
(JSC::MachineThreads::Thread::operator!=):
(JSC::MachineThreads::Thread::operator==):
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::removeThreadIfFound):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::Thread::resume):
(JSC::MachineThreads::Thread::getRegisters):
(JSC::MachineThreads::Thread::Registers::stackPointer):
(JSC::MachineThreads::Thread::freeRegisters):
(JSC::MachineThreads::Thread::captureStack):
(JSC::MachineThreads::tryCopyOtherThreadStack):
(JSC::MachineThreads::tryCopyOtherThreadStacks):
(JSC::equalThread): Deleted.
(JSC::suspendThread): Deleted.
(JSC::resumeThread): Deleted.
(JSC::getPlatformThreadRegisters): Deleted.
(JSC::otherThreadStackPointer): Deleted.
(JSC::freePlatformThreadRegisters): Deleted.
(JSC::otherThreadStack): Deleted.

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

5 years agoArray.slice should have a fast path like Array.splice
rniwa@webkit.org [Tue, 12 May 2015 21:04:10 +0000 (21:04 +0000)]
Array.slice should have a fast path like Array.splice
https://bugs.webkit.org/show_bug.cgi?id=144901

Reviewed by Geoffrey Garen.

Add a fast memcpy path to Array.prototype.slice as done for Array.prototype.splice.
In Kraken, this appears to be 30% win on stanford-crypto-ccm and 10% win on stanford-crypto-pbkdf2.

* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSlice):
* runtime/JSArray.cpp:
(JSC::JSArray::fastSlice): Added.
* runtime/JSArray.h:

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

5 years agoBuild fix.
ap@apple.com [Tue, 12 May 2015 21:02:41 +0000 (21:02 +0000)]
Build fix.

* platform/spi/cf/CFNetworkSPI.h:

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

5 years agoProduction builds should link against the shims directly
andersca@apple.com [Tue, 12 May 2015 20:46:34 +0000 (20:46 +0000)]
Production builds should link against the shims directly
https://bugs.webkit.org/show_bug.cgi?id=144922
rdar://problem/19708579

Reviewed by Dan Bernstein.

* Configurations/NetworkService.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against SecItemShim.dylib where possible.

* Configurations/PluginProcessShim.xcconfig:
Set the install name and install path.

* Configurations/PluginService.32.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against PluginProcessShim.dylib where possible.

* Configurations/PluginService.64.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against PluginProcessShim.dylib where possible.

* Configurations/SecItemShim.xcconfig:
Set the install name and install path.

* Configurations/WebContentService.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against WebProcessShim.dylib where possible.

* Configurations/WebProcessShim.xcconfig:
Set the install name and install path.

* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.

* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Copied from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist.
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.

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

* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist.
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.

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

5 years agoROLLOUT [Win] Unreviewed build fix for older DirectX build environments.
bfulgham@apple.com [Tue, 12 May 2015 19:49:16 +0000 (19:49 +0000)]
ROLLOUT [Win] Unreviewed build fix for older DirectX build environments.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

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

5 years agoAX: [ATK] ARIA menu items should not have anonymous block children
jdiggs@igalia.com [Tue, 12 May 2015 19:44:37 +0000 (19:44 +0000)]
AX: [ATK] ARIA menu items should not have anonymous block children
https://bugs.webkit.org/show_bug.cgi?id=144653

Reviewed by Chris Fleizach.

Source/WebCore:

Exclude anonymous block children of menu items from the accessible tree
for ATK. Exclude list markers from the accessibility tree if the parent
is not being exposed as an accessible list item.

No new tests. Instead, modified the existing tests to reflect the correct
behavior.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):

LayoutTests:

The existing test was not cross-platform friendly and was rewritten as
part of the fix for this bug. New expectations were generated for Mac,
Efl, and Gtk. The shared expectations and the Windows expectations were
removed so as not to break the Win port. The search-predicate test also
was updated because it included an ARIA treeitem which had a listmarker
child it should not have, and no longer has as a result of the bug fix.

* accessibility/aria-menubar-menuitems-expected.txt: Removed. Platform hierarchies vary vastly.
* accessibility/aria-menubar-menuitems.html: Rewritten to work better as a shared test.
* platform/efl/accessibility/aria-menubar-menuitems-expected.txt: Added.
* platform/gtk/accessibility/aria-menubar-menuitems-expected.txt: Added.
* platform/mac/accessibility/aria-menubar-menuitems-expected.txt: Modified as result of rewrite.
* platform/mac/accessibility/search-predicate.html: Modified to reflect correct treeitem children.
* platform/mac/accessibility/search-predicate-expected.txt: Modified to reflect correct treeitem children.
* platform/win/accessibility/aria-menubar-menuitems-expected.txt: Removed. New file should be generated.
* resources/accessibility-helper.js: Added an argument so dumpAccessibilityTree can print title rather than value.
(dumpAccessibilityTree):

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

5 years agoUndo a mistaken part of r184211.
ap@apple.com [Tue, 12 May 2015 19:42:01 +0000 (19:42 +0000)]
Undo a mistaken part of r184211.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::cookieStorageDirectory):
* UIProcess/WebProcessPool.h:
cookieStorageDirectory() is used on iOS, so bring it back.

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

5 years ago[Mac] Share cookie storage between UI process and secondary processes
ap@apple.com [Tue, 12 May 2015 19:37:31 +0000 (19:37 +0000)]
[Mac] Share cookie storage between UI process and secondary processes
https://bugs.webkit.org/show_bug.cgi?id=144820
rdar://problem/20572830

Reviewed by Darin Adler.

Source/WebCore:

* platform/network/mac/CookieJarMac.mm:
* platform/spi/cf/CFNetworkSPI.h:
Moved SPIs into an SPI header, so that WebKit2 could use them too without duplication.

Source/WebKit2:

Pass a cookie storage descriptor that includes file path as well as other data that
CFNetwork needs to use the same cookies storage as in another process (session cookies
are still separate).

While at it, started to clean up code that passes cookie storage path. It was mostly
dead and unimplemented, only used in child processes when USE(SECCOMP_FILTERS) was enabled.

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::cookieStorageDirectory):
* UIProcess/WebProcessPool.h:
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize):
Don't set cookie storage directory, as it's a no-op, we use an ephemeral session
for testing.

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

5 years ago[WK2] Log using diagnostic logging how far back in history we navigate
cdumez@apple.com [Tue, 12 May 2015 19:29:42 +0000 (19:29 +0000)]
[WK2] Log using diagnostic logging how far back in history we navigate
https://bugs.webkit.org/show_bug.cgi?id=144919
<rdar://problem/20920043>

Reviewed by Gavin Barraclough.

Source/WebCore:

Add diagnostic logging keys for logging back history navigation delta.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::deltaKey):
(WebCore::DiagnosticLoggingKeys::backNavigationKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Log using diagnostic logging how far back in history we navigate.
When a back navigation or a backward indexed navigation occurs, we
log the delta: (HistoryListSize - 1) - NewHistoryItemIndex.

* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::goToItem):

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

5 years agoFix internal build configuration issues
jacob_nielsen@apple.com [Tue, 12 May 2015 19:23:51 +0000 (19:23 +0000)]
Fix internal build configuration issues
https://bugs.webkit.org/show_bug.cgi?id=144762

Reviewed by David Kilzer.

Modifies DumpRenderTree's xcconfig files to use SDK selectors.

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
* DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig:
* DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig:
* DumpRenderTree/mac/Configurations/ImageDiff.xcconfig:
* DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig:
* DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig:

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

5 years agoAvoid CSSPrimitiveValue allocation when parsing sizes
yoav@yoav.ws [Tue, 12 May 2015 18:40:38 +0000 (18:40 +0000)]
Avoid CSSPrimitiveValue allocation when parsing sizes
https://bugs.webkit.org/show_bug.cgi?id=144910

Reviewed by Darin Adler.

Turn non-calc length calculation logic into a static method,
so that it can be called without a CSSPrimitiveValue object.
Then, call that method to calculate the default source-size length.

No new tests, since no functionality change.

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble): Split out the logic for everything that's not calc into a static method.
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble): Static length computation logic for everything that is not calc.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isFontRelativeLength): Turn into static.
* css/SourceSizeList.cpp:
(WebCore::defaultLength): Use the new static method to compute the length.
(WebCore::computeLength): Use the calc length computation methods directly.

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

5 years ago[Win] Unreviewed build fix for older DirectX build environments.
bfulgham@apple.com [Tue, 12 May 2015 18:07:19 +0000 (18:07 +0000)]
[Win] Unreviewed build fix for older DirectX build environments.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Switch back to our
d3d stub header to avoid build failures on July 2004 DXSDK build environments.

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

5 years agoOSR availability analysis would be more scalable (and correct) if it did more livenes...
fpizlo@apple.com [Tue, 12 May 2015 18:01:28 +0000 (18:01 +0000)]
OSR availability analysis would be more scalable (and correct) if it did more liveness pruning
https://bugs.webkit.org/show_bug.cgi?id=143078

Reviewed by Andreas Kling.

In https://bugs.webkit.org/show_bug.cgi?id=144883, we found an example of where liveness
pruning is actually necessary. Well, not quite: we just need to prune out keys from the
heap availability map where the base node doesn't dominate the point where we are asking
for availability. If we don't do this, then eventually the IR gets corrupt because we'll
insert PutHints that reference the base node in places where the base node doesn't
dominate. But if we're going to do any pruning, then it makes sense to prune by bytecode
liveness. This is the strongest possible pruning we can do, and it should be sound. We
shouldn't have a node available for a virtual register if that register is live and the
node doesn't dominate.

Making this work meant reusing the prune-to-liveness algorithm from the FTL backend. So, I
abstracted this a bit better. You can now availabilityMap.pruneByLiveness(graph, origin).

* dfg/DFGAvailabilityMap.cpp:
(JSC::DFG::AvailabilityMap::pruneHeap):
(JSC::DFG::AvailabilityMap::pruneByLiveness):
(JSC::DFG::AvailabilityMap::prune): Deleted.
* dfg/DFGAvailabilityMap.h:
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::OSRAvailabilityAnalysisPhase::run):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::buildExitArguments):
* tests/stress/liveness-pruning-needed-for-osr-availability.js: Added. This is a proper regression test.
* tests/stress/liveness-pruning-needed-for-osr-availability-eager.js: Added. This is the original reduced test case, requires eager-no-cjit to fail prior to this changeset.

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

5 years agofast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemit...
ap@apple.com [Tue, 12 May 2015 17:30:56 +0000 (17:30 +0000)]
fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=144155

* platform/mac-wk2/TestExpectations: Marking as flaky for now.

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

5 years ago[Mac] Refine media playback target client configuration
eric.carlson@apple.com [Tue, 12 May 2015 16:41:48 +0000 (16:41 +0000)]
[Mac] Refine media playback target client configuration
https://bugs.webkit.org/show_bug.cgi?id=144892

Reviewed by Brent Fulgham.

Client and target picker state changes fequently happen several times in quick succession, so
don't react to immediately so we can batch callbacks to the web process.
* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::ClientState::ClientState): Store the client as a reference rather than a pointer
because it can never be NULL.
(WebCore::ClientState::operator == ): New.
(WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): Schedule the initial client
configuration and a target configuration check.
(WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): Schedule a target monitoring
update, and a target configuration check.
(WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Ditto.
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Schedule a target monitoring update.
(WebCore::WebMediaSessionManager::clientStateDidChange): If the client whose state has changed
can play to a target, tell it to start using the target even if it isn't playing as long as
no other client is actively using a target.
(WebCore::WebMediaSessionManager::setPlaybackTarget): Configure clients after a pause.
(WebCore::WebMediaSessionManager::configureNewClients): New, do new client configuration.
(WebCore::WebMediaSessionManager::configurePlaybackTargetClients): New, configure target clients.
(WebCore::WebMediaSessionManager::scheduleDelayedTask): Schedule the timer.
(WebCore::WebMediaSessionManager::taskTimerFired): Execute delayed tasks.
(WebCore::WebMediaSessionManager::find):
* Modules/mediasession/WebMediaSessionManager.h:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted): Call updateMediaState.
(WebCore::HTMLMediaElement::setPlaying): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Expand logging.
(WebCore::HTMLMediaElement::updateMediaState): New, don't broadcast a media state change
unless something actually changed.
* html/HTMLMediaElement.h:

* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange): Update logging.
(WebCore::HTMLMediaSession::setShouldPlayToPlaybackTarget): Ditto.
(WebCore::HTMLMediaSession::mediaEngineUpdated): Cleanup.

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Remove the call to
deprecated API and the "-Wdeprecated-declarations".

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

5 years agoChildProcess should take an os_activity
weinig@apple.com [Tue, 12 May 2015 16:25:32 +0000 (16:25 +0000)]
ChildProcess should take an os_activity
https://bugs.webkit.org/show_bug.cgi?id=141781

Reviewed by Ryosuke Niwa.

* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
(DatabaseServiceInitializer):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(PluginServiceInitializer):
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):
Start an os_activity in the initializer for each XPC service.

* config.h:
Add HAVE_OS_ACTIVITY where available.

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

5 years agoSwitch to launching iOS Simulator using bundle ID
ddkilzer@apple.com [Tue, 12 May 2015 14:31:05 +0000 (14:31 +0000)]
Switch to launching iOS Simulator using bundle ID
<rdar://problem/20916096>

This is required to fix the layout tests on internal bots.

* Scripts/webkitdirs.pm:
(relaunchIOSSimulator): Switch to use bundle ID to launch iOS
Simulator.  Add FIXME.
(quitIOSSimulator): Add FIXME.
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.setup_test_run): Switch to use bundle ID to
launch iOS Simulator.  Add FIXME.
(IOSSimulatorPort.check_sys_deps): Add FIXME.

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

5 years agoFix run-javascriptcore-tests step on the WinCairo bot
peavo@outlook.com [Tue, 12 May 2015 14:22:52 +0000 (14:22 +0000)]
Fix run-javascriptcore-tests step on the WinCairo bot
https://bugs.webkit.org/show_bug.cgi?id=144866

Reviewed by Csaba Osztrogonác.

Catch exception when failing to create soft link, so we can fall back to copy.

* Scripts/run-jsc-stress-tests:

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

5 years agoUnreviewed. Fix GTK+ debug build after r184197.
carlosgc@webkit.org [Tue, 12 May 2015 13:28:47 +0000 (13:28 +0000)]
Unreviewed. Fix GTK+ debug build after r184197.

* UIProcess/gtk/RedirectedXCompositeWindow.cpp: Add missing include.

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

5 years agoAX: [GTK] Defer to WebCore Accessibility for table exposure
jdiggs@igalia.com [Tue, 12 May 2015 12:01:50 +0000 (12:01 +0000)]
AX: [GTK] Defer to WebCore Accessibility for table exposure
https://bugs.webkit.org/show_bug.cgi?id=144896

Reviewed by Chris Fleizach.

Source/WebCore:

Stop unconditionally exposing all HTMLTableElement nodes as AccessibilityTables
for WebKitGtk.

No new tests. Several existing tests already cover table exposure. They have
been updated accordingly.

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):

LayoutTests:

Several platform tests are testing accessibility of tables. In order to ensure
that those tables continue to be exposed as tables, a border was added so that
they are not judged to be layout tables. For the remainder of the tests, the
expectations were updated to reflect the fact that layout tables are no longer
exposed as AccessibilityTables in WebKitGtk.

* platform/gtk/accessibility/caret-offsets.html: Added border to table.
* platform/gtk/accessibility/table-detection-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/table-hierarchy-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/table-one-cell-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/table-with-rules-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/text-for-range-table-cells.html: Added border to table.
* platform/gtk/accessibility/text-for-table.html: Added border to table.

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

5 years ago[GTK][WK2] rowAtIndex is not implemented in DRT/WKTR
jdiggs@igalia.com [Tue, 12 May 2015 11:59:46 +0000 (11:59 +0000)]
[GTK][WK2] rowAtIndex is not implemented in DRT/WKTR
https://bugs.webkit.org/show_bug.cgi?id=116971

Reviewed by Chris Fleizach.

Source/WebCore:

Because ATK lacks API to directly get an accessible row via its index,
the implementation of rowAtIndex gets a cell in the indexed row and
returns the parent row. The failing test continued to fail because
AccessibilityARIAGridCell::parentTable called parentObjectUnignored at
most twice, the second call in place to handle rows which are included
in the tree. However, given a well-formed ARIA grid with a rowgroup that
is interactive, that rowgroup also needs to be in the tree necessitating
parentObjectUnignored be called a third time to get to the grid. Given a
poorly-formed ARIA grid, there may additional objects which pass the test
for inclusion standing in between the cell and grid necessitating more
calls still. Therefore, ascend the hierarchy to find the parent grid.

No new tests. The failing test now passes.

* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable):

Tools:

Implement rowAtIndex for ATK.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::rowAtIndex):

LayoutTests:

* platform/gtk/TestExpectations: Removed previously-failing test.

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

5 years ago[X11] Add XUniquePtr and XUniqueResource to automatically free X resources
carlosgc@webkit.org [Tue, 12 May 2015 11:11:00 +0000 (11:11 +0000)]
[X11] Add XUniquePtr and XUniqueResource to automatically free X resources
https://bugs.webkit.org/show_bug.cgi?id=144521

Reviewed by Darin Adler.

Source/WebCore:

Add XUniquePtr as a template alias of std:unique_ptr to handle X
resources using pointers and XUniqueResource as a new class to
handle X resources using a long unsigned identifier. This
simplifies the code and makes it more difficult to leak X resources.

* PlatformEfl.cmake: Add new files to compilation.
* PlatformGTK.cmake: Ditto.
* platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:
(WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
Remove the display member, and use XUnique for Pixmap and GC.
(WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
Remove code to explicitly free Pixmap and GC.
(WebCore::BackingStoreBackendCairoX11::scroll):
* platform/graphics/cairo/BackingStoreBackendCairoX11.h:
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::createWindowContext): Use XUnique and the
new constructor that receives a XID, since there's no longer
conflict with the one receiving a Pbuffer.
(WebCore::GLContextGLX::createPbufferContext): Use XUnique and the
new constructor that receives a XUniqueGLXPbuffer&&.
(WebCore::GLContextGLX::createPixmapContext):
(WebCore::GLContextGLX::createContext):
(WebCore::GLContextGLX::GLContextGLX):
(WebCore::GLContextGLX::~GLContextGLX): Remove code to explicitly
free X resources.
(WebCore::GLContextGLX::makeContextCurrent):
(WebCore::GLContextGLX::cairoDevice):
(WebCore::GLContextGLX::platformContext):
* platform/graphics/glx/GLContextGLX.h:
* platform/graphics/surfaces/egl/EGLXSurface.cpp:
(WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
(WebCore::EGLXTransportSurfaceClient::destroy):
(WebCore::EGLXTransportSurfaceClient::prepareTexture):
* platform/graphics/surfaces/egl/EGLXSurface.h:
* platform/graphics/surfaces/glx/GLXConfigSelector.h:
(WebCore::GLXConfigSelector::findMatchingConfig): Use XUnique
instead of the custom std::unique X11Deleter.
(WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
(WebCore::GLXOffScreenSurface::initialize):
* platform/graphics/surfaces/glx/X11Helper.cpp:
(WebCore::X11Helper::createOffScreenWindow): Ditto.
(WebCore::X11Helper::createPixmap): Ditto.
* platform/graphics/surfaces/glx/X11Helper.h:
* platform/graphics/x11/XUniquePtr.h: Remove X11Deleter.
(WebCore::XPtrDeleter::operator()):
* platform/graphics/x11/XUniqueResource.cpp: Added.
(WebCore::XUniqueResource<XResource::Colormap>::deleteXResource):
(WebCore::XUniqueResource<XResource::Damage>::deleteXResource):
(WebCore::XUniqueResource<XResource::Pixmap>::deleteXResource):
(WebCore::XUniqueResource<XResource::Window>::deleteXResource):
(WebCore::XUniqueResource<XResource::GLXPbuffer>::deleteXResource):
(WebCore::XUniqueResource<XResource::GLXPixmap>::deleteXResource):
* platform/graphics/x11/XUniqueResource.h: Added.
(WebCore::XUniqueResource::XUniqueResource):
(WebCore::XUniqueResource::operator=):
(WebCore::XUniqueResource::~XUniqueResource):
(WebCore::XUniqueResource::get):
(WebCore::XUniqueResource::release):
(WebCore::XUniqueResource::reset):
(WebCore::XUniqueResource::operator!):
(WebCore::XUniqueResource::operator UnspecifiedBoolType*):

Source/WebKit2:

Use XUniquePtr and XUniqueResource to free X resources.

* PlatformEfl.cmake: Add Source/WebCore/platform/graphics/x11 dir
to the include dir list.
* PlatformGTK.cmake: Ditto.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend): Do not pass the display to
the BackingStoreBackendCairoX11 constructor.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
(WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
(WebKit::RedirectedXCompositeWindow::resize):
(WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
(WebKit::RedirectedXCompositeWindow::surface):
* UIProcess/gtk/RedirectedXCompositeWindow.h:
(WebKit::RedirectedXCompositeWindow::windowID):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitializeWindowless):
(WebKit::NetscapePlugin::platformDestroy):
(WebKit::NetscapePlugin::platformGeometryDidChange):
(WebKit::NetscapePlugin::platformPaint):

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

5 years agoMove TransformOperation-based classes off of PassRefPtr
zandobersek@gmail.com [Tue, 12 May 2015 09:53:27 +0000 (09:53 +0000)]
Move TransformOperation-based classes off of PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=144876

Reviewed by Darin Adler.

Remove uses of PassRefPtr from the TransformOperation class and its
derivatives, operating on Ref and RefPtr objects instead.

* platform/graphics/transforms/IdentityTransformOperation.h:
* platform/graphics/transforms/Matrix3DTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::blend):
* platform/graphics/transforms/Matrix3DTransformOperation.h:
* platform/graphics/transforms/MatrixTransformOperation.cpp:
(WebCore::MatrixTransformOperation::blend):
* platform/graphics/transforms/MatrixTransformOperation.h:
* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::PerspectiveTransformOperation::blend):
* platform/graphics/transforms/PerspectiveTransformOperation.h:
* platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::blend):
* platform/graphics/transforms/RotateTransformOperation.h:
* platform/graphics/transforms/ScaleTransformOperation.cpp:
(WebCore::ScaleTransformOperation::blend):
* platform/graphics/transforms/ScaleTransformOperation.h:
* platform/graphics/transforms/SkewTransformOperation.cpp:
(WebCore::SkewTransformOperation::blend):
* platform/graphics/transforms/SkewTransformOperation.h:
* platform/graphics/transforms/TransformOperation.h:
* platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::blendByMatchingOperations):
* platform/graphics/transforms/TranslateTransformOperation.cpp:
(WebCore::TranslateTransformOperation::blend):
* platform/graphics/transforms/TranslateTransformOperation.h:

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

5 years agoWorkaround for Cortex-A53 erratum 843419
loki@webkit.org [Tue, 12 May 2015 08:15:27 +0000 (08:15 +0000)]
Workaround for Cortex-A53 erratum 843419
https://bugs.webkit.org/show_bug.cgi?id=144680

Reviewed by Michael Saboff.

This patch is about to give simple workaround for Cortex-A53 erratum 843419.
It inserts nops after ADRP instruction to avoid wrong address accesses.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::adrp):
(JSC::ARM64Assembler::nopCortexA53Fix843419):

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

5 years agoLinker fails without -DDEVELOPER_MODE=ON
ryuan.choi@navercorp.com [Tue, 12 May 2015 07:59:14 +0000 (07:59 +0000)]
Linker fails without -DDEVELOPER_MODE=ON
https://bugs.webkit.org/show_bug.cgi?id=144117

Reviewed by Gyuyoung Kim.

* Source/cmake/OptionsEfl.cmake:
Remove fvisibility flags. linker script will cover the functionality for ewebkit2.so in release mode,
* Source/cmake/eflsymbols.filter: Updated symbol patterns which should be exposed for ewebkit2.

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

5 years ago[EFL] Rebaseline some editing tests
jinwoo7.song@samsung.com [Tue, 12 May 2015 07:35:27 +0000 (07:35 +0000)]
[EFL] Rebaseline some editing tests

Also add some missing baselines.

* platform/efl/editing/execCommand/5142012-1-expected.png:
* platform/efl/editing/execCommand/5142012-1-expected.txt:
* platform/efl/editing/inserting/insert-at-end-02-expected.png:
* platform/efl/editing/inserting/insert-at-end-02-expected.txt:

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

5 years ago[Streams API] ReadableStream reader should not be disposable when having pending...
youenn.fablet@crf.canon.fr [Tue, 12 May 2015 07:15:37 +0000 (07:15 +0000)]
[Streams API] ReadableStream reader should not be disposable when having pending promises
https://bugs.webkit.org/show_bug.cgi?id=144869

Reviewed by Darin Adler.

Source/WebCore:

Made error promise callback to take a ref to the reader so that the reader is not disposed as long as the promise callback is not resolved.

Covered by tests added to streams/readable-stream-gc.html.

* Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::ReadableStreamReader): Moved initialize() call outside constructor as it can ref/unref.
(WebCore::ReadableStreamReader::releaseStreamAndClean): Added protector.
* Modules/streams/ReadableStreamReader.h:
* bindings/js/JSReadableStreamReaderCustom.cpp:
(WebCore::JSReadableStreamReader::closed): Lambda for error now takes a ref to the reader.
* bindings/js/ReadableJSStream.cpp:
(WebCore::ReadableJSStream::Reader::create): Calling initialize() after adoptRef().

LayoutTests:

* streams/readable-stream-gc.html:
* streams/readable-stream-gc-expected.txt:

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

5 years agoClean up redundant resources in case of failure in GLContextEGL context creation...
zandobersek@gmail.com [Tue, 12 May 2015 06:39:37 +0000 (06:39 +0000)]
Clean up redundant resources in case of failure in GLContextEGL context creation methods
https://bugs.webkit.org/show_bug.cgi?id=144878

Reviewed by Martin Robinson.

GLContextEGL::createWindowContext() and GLContextEGL::createPixmapContext() methods
should clean up the freshly-created resources when prematurely returning due to a
failure.

* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createWindowContext):
(WebCore::GLContextEGL::createPixmapContext):

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

5 years agoUnreviewed, rolling out r184009.
commit-queue@webkit.org [Tue, 12 May 2015 05:51:21 +0000 (05:51 +0000)]
Unreviewed, rolling out r184009.
https://bugs.webkit.org/show_bug.cgi?id=144900

Caused crashes on inspector tests (Requested by ap on
#webkit).

Reverted changeset:

"MapDataImpl::add() shouldn't do the same hash lookup twice."
https://bugs.webkit.org/show_bug.cgi?id=144759
http://trac.webkit.org/changeset/184009

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

5 years agoUnreviewed, rolling out r184123.
commit-queue@webkit.org [Tue, 12 May 2015 05:48:57 +0000 (05:48 +0000)]
Unreviewed, rolling out r184123.
https://bugs.webkit.org/show_bug.cgi?id=144899

Seems to have introduced flaky crashes in many JS tests
(Requested by rniwa on #webkit).

Reverted changeset:

"REGRESSION(r180595): same-callee profiling no longer works"
https://bugs.webkit.org/show_bug.cgi?id=144787
http://trac.webkit.org/changeset/184123

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

5 years agoSource/WebCore:
mitz@apple.com [Tue, 12 May 2015 05:38:11 +0000 (05:38 +0000)]
Source/WebCore:
WebCore part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL

Reviewed by Alexey Proskuryakov.

Test: TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm

In some cases, trying to navigate to an invalid URL results in navigation to about:blank.
When the about:blank load is committed, the UI process still thinks that the provisional
URL is the original, invalid URL, and updates its state to reflect that that’s the URL that
has been committed.

The provisional URL changes (1) when a provisional load begins, (2) when a server redirect
happens, (3) when the client changes the request in willSendRequest, and (4) in this
about:blank case. For (1) and (2), there are frame loader client callbacks. (3) is client-
initiated. So this patch addresses (4).

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::maybeLoadEmpty): If our request URL is changing to about:blank and
while loading the main resource, call FrameLoaderClient::dispatchDidChangeProvisionalURL.
* loader/FrameLoaderClient.h: Added dispatchDidChangeProvisionalURL with an empty
implementation.

Source/WebKit2:
WebKit2 part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL

Reviewed by Alexey Proskuryakov.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame): Added. Update internal state the
same way we update it for server redirects, but don’t make client callbacks. Clients
observing the URL property will see it change.
* UIProcess/WebPageProxy.h:

* UIProcess/WebPageProxy.messages.in: Added DidChangeProvisionalURLForFrame.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL): Override this new
FrameLoaderClient function to send a DidChangeProvisionalURLForFrame message to the UI
process.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:
Test for <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL

Reviewed by Alexey Proskuryakov.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/LoadAlternateHTMLString.mm: Fixed copyright header.
* TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm: Added.
(-[ProvisionalURLChangeController webView:didFinishNavigation:]):

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

5 years agoText is misplaced when custom font does not have space glyph.
zalan@apple.com [Tue, 12 May 2015 04:01:50 +0000 (04:01 +0000)]
Text is misplaced when custom font does not have space glyph.
https://bugs.webkit.org/show_bug.cgi?id=144879

Reviewed by Myles C. Maxfield

This patch ensures that we use fallback font for the missing space glyph only when the rendered text has space in it.

If a font does not provide all the glyphs required to render the associated text, we initiate fallback fonts. It is done while
measuring the text at layout time. However due to the fact that we always pre-measure space, a font with no space glyph in it is never sufficient.
(even when the text does not require space at all)
Fallback fonts impact line positions through ascent/descent calculation.

Source/WebCore:

Test: fast/text/font-with-no-space-glyph.html

* rendering/RenderText.cpp:
(WebCore::RenderText::computePreferredLogicalWidths):
* rendering/line/BreakingContext.h:
(WebCore::WordTrailingSpace::WordTrailingSpace):
(WebCore::WordTrailingSpace::width):
(WebCore::BreakingContext::handleText):

LayoutTests:

* fast/ruby/ruby-expansion-cjk-2-expected.html: progression
* fast/ruby/ruby-expansion-cjk-3-expected.html: progression
* fast/ruby/ruby-expansion-cjk-4-expected.html: progression
* fast/ruby/ruby-expansion-cjk-5-expected.html: progression
* fast/ruby/ruby-expansion-cjk-expected.html: progression
* fast/text/font-with-no-space-glyph-expected.html: Added.
* fast/text/font-with-no-space-glyph.html: Added.
* platform/mac/svg/fonts/svg-font-general-expected.html: progression

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

5 years ago<rdar://problem/19773721> [iOS] Find on page feels like it zooms in too much
mitz@apple.com [Tue, 12 May 2015 02:45:47 +0000 (02:45 +0000)]
<rdar://problem/19773721> [iOS] Find on page feels like it zooms in too much
https://bugs.webkit.org/show_bug.cgi?id=144891

Reviewed by Darin Adler.

Sometimes, Find on Page’s constant 1.6 scale factor is too much. Smart magnification is
designed to choose a scale factor that is just right.

* UIProcess/ios/SmartMagnificationController.h:
* UIProcess/ios/SmartMagnificationController.messages.in: Added Magnify message.
* UIProcess/ios/SmartMagnificationController.mm:
(WebKit::SmartMagnificationController::magnify): Added. Handle the new message using
-[WKContentView _soomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:].
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::updateFindIndicator): Instead of zooming to the selection rect,
get the surrounding render rect (the area we would target for a double-tap at the beginning
of the selection), and tell the magnification controller to target it. Use the center of the
start of the selection as the origin.

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

5 years agoSmall tidyup in animations code
simon.fraser@apple.com [Tue, 12 May 2015 02:39:37 +0000 (02:39 +0000)]
Small tidyup in animations code
https://bugs.webkit.org/show_bug.cgi?id=144893

Reviewed by Eric Carlson.

Reading progress(1, 0, 0) in callers of AnimationBase::progress() was confusing,
particularly as the last parameter is a TimingFunction*. Put default values
in the header (with nullptr) and fix the callers. Also fix variable names in
the implementation.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::progress):
* page/animation/AnimationBase.h:
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::animate):
(WebCore::ImplicitAnimation::getAnimatedStyle):
(WebCore::ImplicitAnimation::blendPropertyValueInStyle):

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

5 years agoPurge PassRefPtr in WebCore/rendering
gyuyoung.kim@webkit.org [Tue, 12 May 2015 02:06:54 +0000 (02:06 +0000)]
Purge PassRefPtr in WebCore/rendering
https://bugs.webkit.org/show_bug.cgi?id=144872

Patch by Gyuyoung Kim <gyuyoung.kim@webkit.org> on 2015-05-11
Reviewed by Darin Adler.

As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref in WebCore/rendering.

No new tests, no behavior changes.

* rendering/HitTestingTransformState.h:
(WebCore::HitTestingTransformState::create):
* rendering/RenderLayer.cpp:
(WebCore::ClipRects::create):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::create):
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeGtk.h:
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderTheme::themeForPage):
(WebCore::RenderThemeIOS::create):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderTheme::themeForPage):
(WebCore::RenderThemeMac::create):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::create):
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::create):
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeWin.h:
* rendering/TextAutoSizing.h:
(WebCore::TextAutoSizingValue::create):
* rendering/style/ShapeValue.h:
(WebCore::ShapeValue::createShapeValue):
(WebCore::ShapeValue::createBoxShapeValue):
(WebCore::ShapeValue::createImageValue):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCachedImageSet.h:
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StylePendingImage.h:
* rendering/style/StyleReflection.h:
(WebCore::StyleReflection::create):

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

5 years agoFix internal build configuration issues
jacob_nielsen@apple.com [Tue, 12 May 2015 01:54:51 +0000 (01:54 +0000)]
Fix internal build configuration issues
https://bugs.webkit.org/show_bug.cgi?id=144762

Reviewed by Darin Adler.

Modifies TestWebKitAPI and WebKitTestRunner's xcconfig files to use SDK selectors.

* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/InjectedBundle.xcconfig:
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
* WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig:

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

5 years ago[Mac] Update device picker icon when video tracks change
eric.carlson@apple.com [Tue, 12 May 2015 01:13:30 +0000 (01:13 +0000)]
[Mac] Update device picker icon when video tracks change
https://bugs.webkit.org/show_bug.cgi?id=144889
<rdar://problem/20907253>

Reviewed by Brent Fulgham.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateHasVideo):

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

5 years agoScroll snap logic should be triggered when resizing the WebView
bfulgham@apple.com [Tue, 12 May 2015 01:12:01 +0000 (01:12 +0000)]
Scroll snap logic should be triggered when resizing the WebView
https://bugs.webkit.org/show_bug.cgi?id=142590
<rdar://problem/20125088>

Reviewed by Simon Fraser.

Source/WebCore:

Tests coming in a second patch.

Resizing of the main frame or overflow regions was properly recalculating the scroll snap points,
but there was no code to honor these values when window resizing was occurring. The correction was
handled in two ways:
1. Scrolling thread operations that moved to new snap points needed to notify the main thread that
   it had shifted to a new snap point, so that the resize code (which happens on the main thread)
   could ensure that we stayed clamped to the correct 'tile' in the snap region.
2. Main thread (overflow) resizes were likewise missing code to honor the current snap position
   after resizing calculations were complete.

This change also required the addition of two indices to the scrollable area to track which scroll
snap point was currently being used. We don't bother with a 'none' case because you cannot have a
'none' state when you have an active set of scroll snap points, and we do not execute this code
if the scroll snap points are null.

The FrameView code was computing updated snap offsets after it had dispatched frame view layout
information to the scrolling thread, which was wrong. This was also corrected.

I think it might be possible to track all of this state inside the ScrollController, but the current
scroll snap architecture destroys and recreates the state each time a new set of interactions starts.
This should be fixed in the future, which would allow us to remove some of this local state.

* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks): Make sure 'updateSnapOffsets' is called prior to
calling 'frameViewLayoutUpdated' so the scrolling thread gets correct updated points. Add a new
call to 'scrollToNearestActiveSnapPoint', which will keep us on our current snap point during
resize (if appropriate).
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollSnapOffsetIndices): Added. This finds and notifies
the correct scroll region when a new snap position (index) has been selected by user interaction on
the scrolling thread.
(WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added an assertion for 'isMainThread'.
(WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto.
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/AxisScrollSnapOffsets.h:
(WebCore::closestSnapOffset): Modified to also return the selected snap point index so we can track
it to handle resize operations.
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::updateScrollSnapOffsetIndices):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::updateScrollSnapOffsetIndices): Added method to dispatch the active
horizontal and vertical scroll snap indices back to the main thread.
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): After the scroll controller processes
the current event, notify the main thread of any change in the active scroll snap index.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::activeScrollSnapOffsetIndexDidChange): Added method to allow ScrollAnimator
clients to find out about the current scroll snap state, which is only known by the ScrollController.
(WebCore::ScrollAnimator::activeScrollSnapOffsetIndexForAxis): Ditto.
* platform/ScrollAnimator.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollToNearestActiveSnapPoint): Added method that allows us to set scroll position
to one of our active scroll snap offsets.
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::handleWheelEvent): If the active scroll snap offset has changed, make sure we
keep track of the new values for potential resize operations.
(WebCore::ScrollableArea::clearHorizontalSnapOffsets): Make sure to also clear out the current snap index.
(WebCore::ScrollableArea::clearVerticalSnapOffsets): Ditto.
(WebCore::ScrollableArea::nearestActiveSnapPoint): New method that returns an updated IntPoint reflecting
the proper scroll position based on the active scroll snap offset.
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::currentHorizontalSnapPointIndex): Added.
(WebCore::ScrollableArea::setCurrentHorizontalSnapPointIndex): Added.
(WebCore::ScrollableArea::currentVerticalSnapPointIndex): Added.
(WebCore::ScrollableArea::setCurrentVerticalSnapPointIndex): Added.
(WebCore::ScrollableArea::scrollToNearestActiveSnapPoint): Added.
* platform/cocoa/ScrollController.h:
(WebCore::ScrollControllerClient::activeScrollOffsetIndex): Added new method for clients to implement.
(WebCore::ScrollController::activeScrollSnapOffsetIndexDidChange): Added.
(WebCore::ScrollController::setScrollSnapOffsetIndexDidChange): Added.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::activeScrollSnapOffsetIndexForAxis): Helper method to return current active
index (if applicable).
(WebCore::ScrollController::setActiveScrollSnapOffsetIndexForAxis): Helper function to safely set
the current active index.
(WebCore::ScrollController::beginScrollSnapAnimation): Updated to keep track of the new active scroll snap
index, as well as whether the current animation actually changed the active snap point offset.
* platform/cocoa/ScrollSnapAnimatorState.h: Revise to use modern C++ initializers, and to track a new index
that represents the current scroll snap offset.
* platform/cocoa/ScrollSnapAnimatorState.mm:
(WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState): Update for modern C++ syntax.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollToNearestActiveSnapPoint): New method to set scroll position to be one of our
active scroll snap points.
(WebCore::RenderLayer::updateScrollInfoAfterLayout): Add a new call to 'scrollToNearestActiveSnapPoint' so that
we stay on the current scroll snap offset during resizing.
* rendering/RenderLayer.h:

Source/WebKit2:

* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Modify use of 'closestSnapOffset' to satisfy the additional
argument I added. This is currently not used for anything on iOS.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Ditto.

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

5 years agoAddressing post-review comments after r184037.
mmaxfield@apple.com [Tue, 12 May 2015 01:06:59 +0000 (01:06 +0000)]
Addressing post-review comments after r184037.

Unreviewed.

No new tests because there is no behavior change.

* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):

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

5 years ago[Win] Move Windows build target to Windows 7 (or newer)
bfulgham@apple.com [Tue, 12 May 2015 00:58:07 +0000 (00:58 +0000)]
[Win] Move Windows build target to Windows 7 (or newer)
https://bugs.webkit.org/show_bug.cgi?id=144890
<rdar://problem/20707307>

Reviewed by Anders Carlsson.

Update linked SDK and minimal Windows level to be compatible with
Windows 7 or newer.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
* JavaScriptCore.vcxproj/jsc/jscLauncher.vcxproj:
* JavaScriptCore.vcxproj/libllvmForJSC/libllvmForJSC.vcxproj:
* JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncher.vcxproj:
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj:
* JavaScriptCore.vcxproj/testapi/testapiLauncher.vcxproj:
* config.h:

Source/ThirdParty:

* gtest/msvc/gtest-md.vcxproj:

Source/ThirdParty/ANGLE:

* ANGLE.vcxproj/libEGL.vcxproj:
* ANGLE.vcxproj/libGLESv2.vcxproj:
* ANGLE.vcxproj/preprocessor.vcxproj:
* ANGLE.vcxproj/translator_common.vcxproj:
* ANGLE.vcxproj/translator_glsl.vcxproj:
* ANGLE.vcxproj/translator_hlsl.vcxproj:

Source/WebCore:

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreGenerated.vcxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCorePrefix.h:
* config.h:
* testing/js/WebCoreTestSupportPrefix.h:

Source/WebInspectorUI:

* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:

Source/WebKit:

* WebKit.vcxproj/Interfaces/Interfaces.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj:

Source/WebKit/win:

* WebKitPrefix.h:

Source/WTF:

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFGenerated.vcxproj:
* config.h:

Tools:

* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
* DumpRenderTree/config.h:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
* WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj:
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
* WinLauncher/stdafx.h:

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

5 years agoAX: [ATK] Always include rows in the tree of accessible tables
jdiggs@igalia.com [Tue, 12 May 2015 00:09:26 +0000 (00:09 +0000)]
AX: [ATK] Always include rows in the tree of accessible tables
https://bugs.webkit.org/show_bug.cgi?id=144885

Reviewed by Chris Fleizach.

Source/WebCore:

Remove the code that excluded rows from the tree of accessible tables for
Gtk and Efl, the latter of which inherited the exclusion from the former.

No new tests. We already have several tests which cover table hierarchy.
The associated expectations have been updated as part of this fix.

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildrenFromSection):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetParent):

LayoutTests:

Update the expectations to reflect the rows which are now included in the tree.

* platform/efl/accessibility/table-attributes-expected.txt: Updated.
* platform/efl/accessibility/table-cell-spans-expected.txt: Updated.
* platform/efl/accessibility/table-cells-expected.txt: Updated.
* platform/efl/accessibility/table-sections-expected.txt: Updated.
* platform/gtk/accessibility/table-attributes-expected.txt: Updated.
* platform/gtk/accessibility/table-cell-spans-expected.txt: Updated.
* platform/gtk/accessibility/table-cells-expected.txt: Updated.
* platform/gtk/accessibility/table-sections-expected.txt: Updated.

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

5 years agoUnreviewed, rolling out r184119.
commit-queue@webkit.org [Mon, 11 May 2015 23:41:35 +0000 (23:41 +0000)]
Unreviewed, rolling out r184119.
https://bugs.webkit.org/show_bug.cgi?id=144888

broke JSC tests on Apple Windows bots (Requested by kling on
#webkit).

Reverted changeset:

"Fix run-javascriptcore-tests step on the WinCairo bot"
https://bugs.webkit.org/show_bug.cgi?id=144866
http://trac.webkit.org/changeset/184119

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

5 years agoForce a rebuild of JSNPObject.cpp on bots.
akling@apple.com [Mon, 11 May 2015 23:27:21 +0000 (23:27 +0000)]
Force a rebuild of JSNPObject.cpp on bots.

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::callMethod):

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

5 years agorun-benchmark should support Dromaeo
rniwa@webkit.org [Mon, 11 May 2015 23:21:43 +0000 (23:21 +0000)]
run-benchmark should support Dromaeo
https://bugs.webkit.org/show_bug.cgi?id=144849

Reviewed by Chris Dumez.

Added the benchmark plans for Dromaeo DOM tests. We only run these tests once since
they can take as much as 15 minutes to run each.

* Scripts/webkitpy/benchmark_runner/data/patches/Dromaeo.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-cssquery.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-dom.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-jslib.plan: Added.

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

5 years agoWeb Inspector: REGRESSION (Tabs): Issues reloading a resource with breakpoints
timothy@apple.com [Mon, 11 May 2015 23:18:14 +0000 (23:18 +0000)]
Web Inspector: REGRESSION (Tabs): Issues reloading a resource with breakpoints
https://bugs.webkit.org/show_bug.cgi?id=144650

Fix a number of issues with Debugger tab and navigation/reloading:
- Close old content views in the Debugger tab when main frame navigates.
- Prune old resource tree elements before attempting to restore a cookie that might match an old resource.
- Allow breakpoint selections to be restored from a saved cookie.
- Fix an assert when closing a content view that isn't the current index, but is the current view.
- Avoid calling closed() multiple times when a ContentView is in the back/forward list more than once.
- Make restoreStateFromCookie properly set and use the causedByNavigation argument for a longer restore delay.
- Create a new cookie object per tab instead of it being cumulative from the previous cookie.

Reviewed by Brian Burg.

* UserInterface/Base/Main.js:
(WebInspector._mainResourceDidChange): Delay calling _restoreCookieForOpenTabs to give time for sidebars
and tabs to respond to the main resource change.
(WebInspector._restoreCookieForOpenTabs): Rename causedByReload to causedByNavigation. Nothing special about
reload since we restore on all navigation.

* UserInterface/Views/ContentView.js:
(WebInspector.ContentView): Support Breakpoint as a represented object, which happens during a cookie restore.
(WebInspector.ContentView.isViewable): Ditto.

* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.closeAllContentViews): Disassociate if the view is current and not just
the current entry index. This matches other close functions. This fixes an assert in _disassociateFromContentView.
(WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Don't disassociate multiple times. This
avoids calling the closed() function on a view more than once.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie):
(WebInspector.DebuggerSidebarPanel.prototype._mainResourceDidChange): Renamed from _mainResourceChanged.
Close all content views if this is the main frame. Also prune all old resources. Doing this now avoids a flash
of having old and new resources in the tree caused by the default delay in NavigationSidebarPanel's _checkForOldResources.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Set _autoPruneOldTopLevelResourceTreeElements for later.
(WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineToAutoPrune): Deleted.
(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentView): Fix typo.
(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement): Fix whitespace.
(WebInspector.NavigationSidebarPanel.prototype.pruneOldResourceTreeElements): Added. Broken out from
_checkForOldResources.delayedWork so it can be called manually. Also check all visible tree outlines.
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Pass treeElement in an array.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResourcesIfNeeded): Added.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResources): Call pruneOldResourceTreeElements on a delay.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResources.delayedWork): Deleted.
(WebInspector.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie): Call _checkForOldResourcesIfNeeded.
(WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie): Remove array folding code.

* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView.prototype.restoreStateFromCookie): Rename causedByReload to causedByNavigation.
(WebInspector.TabContentView.prototype.saveStateToCookie): Don't allow the cookie to build on the old cookie.

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

5 years agoUnreviewed build fix. Add "Duration" as a time metric.
rniwa@webkit.org [Mon, 11 May 2015 22:51:37 +0000 (22:51 +0000)]
Unreviewed build fix. Add "Duration" as a time metric.

* public/js/helper-classes.js:
* public/v2/data.js:
(RunsData.unitFromMetricName):

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

5 years agoCPS rethreading phase's flush detector flushes way too many SetLocals
fpizlo@apple.com [Mon, 11 May 2015 22:42:49 +0000 (22:42 +0000)]
CPS rethreading phase's flush detector flushes way too many SetLocals
https://bugs.webkit.org/show_bug.cgi?id=144819

Reviewed by Geoffrey Garen.

After probably unrelated changes, this eventually caused some arguments elimination to stop
working because it would cause more SetLocals to turn into PutStacks. But it was a bug for
a long time. Basically, we don't want the children of a SetLocal to be flushed. Flushing is
meant to only affect the SetLocal itself.

This is a speed-up on Octane/earley.

* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::computeIsFlushed):

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

5 years agogmail and google maps fail to load with eager compilation: Failed to insert inline...
fpizlo@apple.com [Mon, 11 May 2015 22:41:36 +0000 (22:41 +0000)]
gmail and google maps fail to load with eager compilation: Failed to insert inline cache for varargs call (specifically, CallForwardVarargs) because we thought the size would be 250 but it ended up being 262 prior to compaction.
https://bugs.webkit.org/show_bug.cgi?id=144854

Reviewed by Oliver Hunt.

This is easy: just lift the threshold. Also remove the need for some duplicate thresholds.
It used to be that Construct required less code, but that's not the case for now.

* ftl/FTLInlineCacheSize.cpp:
(JSC::FTL::sizeOfCallForwardVarargs):
(JSC::FTL::sizeOfConstructVarargs):
(JSC::FTL::sizeOfConstructForwardVarargs):

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

5 years agoBuild fix. jetstream has a local copy, not remote archive.
rniwa@webkit.org [Mon, 11 May 2015 22:36:51 +0000 (22:36 +0000)]
Build fix. jetstream has a local copy, not remote archive.

* Scripts/webkitpy/benchmark_runner/data/plans/jetstream.plan:

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

5 years agoSimplify shim path computation
andersca@apple.com [Mon, 11 May 2015 22:31:33 +0000 (22:31 +0000)]
Simplify shim path computation
https://bugs.webkit.org/show_bug.cgi?id=144884
Part of rdar://problem/19708579.

Reviewed by Sam Weinig.

Factor the code that computes the shim path out into a separate function. Also make this mac only
since we don't have any shims on iOS.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::computeProcessShimPath):
(WebKit::addDYLDEnvironmentAdditions):

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

5 years agorun-benchmark should support SunSpider, Kraken and Octane
rniwa@webkit.org [Mon, 11 May 2015 21:40:52 +0000 (21:40 +0000)]
run-benchmark should support SunSpider, Kraken and Octane
https://bugs.webkit.org/show_bug.cgi?id=144840

Reviewed by Darin Adler.

Added the support for SunSpider, Kraken, and Octane. Because of the licensing issues, we can't commit the
Kraken source code into the WebKit repository as done for other benchmarks. Instead, we'll dynamically
download it from the remote server using newly added RemoteZipBenchmarkBuilder. We do the same for Octane
for simplicity. Use newly added --local-copy option to specify the location of a local copy if there is any.

Renamed "original_benchmark in the plan file to "local_copy" and added a new optional "remote_archive" to
specify the URL to a remote ZIP file. This optional field is used by Kraken and Octane benchmark plans.

In addition, generalized the ability to run a "create script" in JetStreamBenchmarkBuilder since it's also
needed for SunSpider and Kraken. This feature has now been folded into GenericBenchmarkBuilder.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builders.json: Added
RemoteZipBenchmarkBuilder for Kraken and removed JetStreamBenchmarkBuilder since GenericBenchmarkBuilder
now has the ability to run an arbitrary "create script".

* Scripts/run-benchmark:
(main): Added an optional argument, --local-copy, to override the location of the benchmark's local copy.
This also overrides the remote archive URL specified in the plan.

* Scripts/webkitpy/benchmark_runner/README.md: Updated the description.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builders.json: Deleted the entry for
JetStreamBenchmarkBuilder.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py:
(GenericBenchmarkBuilder.prepare): Call _fetchRemoteArchive if local_copy is not specified in the plan or
by --local-copy option but remote_archive is specified. Also call self.clean() here instead of relying on
_runCreateScript and _applyPatch to clean after themselves.
(GenericBenchmarkBuilder._runCreateScript): Moved from JetStreamBenchmarkBuilder._runCreateScript since
JetStream, SunSpider, Kraken all use this feature.
(GenericBenchmarkBuilder._copyBenchmarkToTempDir): Use self.name as the destination location instead of
the leaf directory name since the latter is not available when a remote ZIP file is used.
(GenericBenchmarkBuilder._fetchRemoteArchive): Added.
(GenericBenchmarkBuilder._applyPatch): Apply the patch inside destination directory to avoid hard coding
the benchmark name in the patches.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/jetstream_benchmark_builder.py: Removed.

* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__): Set self.planName. Also override 'local_copy' when --local-copy option is used.
(BenchmarkRunner.execute): Exit early if neither local_copy nor remote_archive is specified. Prefix the URL
the browser opens by planName as the plan file no longer contains that.

* Scripts/webkitpy/benchmark_runner/data/patches/JetStream.patch: Changed the path to be relative against
the top directory of JetStream instead of its parent.
* Scripts/webkitpy/benchmark_runner/data/patches/Kraken.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/patches/Octane.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/patches/Speedometer.patch: Changed the path to be relative against
the top directory of JetStream instead of its parent.
* Scripts/webkitpy/benchmark_runner/data/patches/SunSpider.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/jetstream.plan: Uses GenericBenchmarkBuilder and specifies
the script to run. The entry point was changed to the relative path from the top directory of JetStream as
done in JetStream.patch.
* Scripts/webkitpy/benchmark_runner/data/plans/kraken.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/octane.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/speedometer.plan: The entry point was changed to the relative
path from the top directory of JetStream as done in JetStream.patch.
* Scripts/webkitpy/benchmark_runner/data/plans/sunspider.plan: Added.

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

5 years agoREGRESSION(r180595): same-callee profiling no longer works
rniwa@webkit.org [Mon, 11 May 2015 21:21:17 +0000 (21:21 +0000)]
REGRESSION(r180595): same-callee profiling no longer works
https://bugs.webkit.org/show_bug.cgi?id=144787

Reviewed by Michael Saboff.

This patch introduces a DFG optimization to use NewObject node when the callee of op_create_this is
always the same JSFunction. This condition doesn't hold when the byte code creates multiple
JSFunction objects at runtime as in: function y() { return function () {} }; new y(); new y();

To enable this optimization, LLint and baseline JIT now store the last callee we saw in the newly
added fourth operand of op_create_this. We use this JSFunction's structure in DFG after verifying
our speculation that the callee is the same. To avoid recompiling the same code for different callee
objects in the polymorphic case, the special value of seenMultipleCalleeObjects() is set in
LLint and baseline JIT when multiple callees are observed.

Tests: stress/create-this-with-callee-variants.js

* bytecode/BytecodeList.json: Increased the number of operands to 5.
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset): op_create_this uses 2nd (constructor) and 4th (callee cache)
operands.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode): Dump the newly added callee cache.
(JSC::CodeBlock::finalizeUnconditionally): Clear the callee cache if the callee is no longer alive.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCreateThis): Add the instruction to propertyAccessInstructions so that
we can clear the callee cache in CodeBlock::finalizeUnconditionally. Also initialize the newly added
operand.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock): Implement the optimization. Speculate the actual callee to
match the cache. Use the cached callee's structure if the speculation succeeds. Otherwise, OSR exit.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_this): Go to the slow path to update the cache unless it's already marked
as seenMultipleCalleeObjects() to indicate the polymorphic behavior.
(JSC::JIT::emitSlow_op_create_this):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_create_this): Ditto.
(JSC::JIT::emitSlow_op_create_this):
* llint/LowLevelInterpreter32_64.asm:
(_llint_op_create_this): Ditto.
* llint/LowLevelInterpreter64.asm:
(_llint_op_create_this): Ditto.
* runtime/CommonSlowPaths.cpp:
(slow_path_create_this): Set the callee cache to the actual callee if it's not set. If the cache has
been set to a JSFunction* different from the actual callee, set it to seenMultipleCalleeObjects().
* runtime/JSCell.h:
(JSC::JSCell::seenMultipleCalleeObjects): Added.
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::unvalidatedGet): Removed the compile guard around it.
* tests/stress/create-this-with-callee-variants.js: Added.

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

5 years agoAX: [ATK] Need expectation files for menu-list-crash2.html for Gtk and Efl
jdiggs@igalia.com [Mon, 11 May 2015 21:20:46 +0000 (21:20 +0000)]
AX: [ATK] Need expectation files for menu-list-crash2.html for Gtk and Efl
https://bugs.webkit.org/show_bug.cgi?id=144881

Unreviewed GTK+ and EFL gardening.

* platform/efl/accessibility/menu-list-crash2-expected.txt: Added.
* platform/gtk/accessibility/menu-list-crash2-expected.txt: Added.

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

5 years agoUnreviewed build fix
mmaxfield@apple.com [Mon, 11 May 2015 21:14:05 +0000 (21:14 +0000)]
Unreviewed build fix

Unreviewed.

* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::compiledToFile):

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

5 years agoPropertyNameArray should use a Vector when there are few entries.
akling@apple.com [Mon, 11 May 2015 21:13:53 +0000 (21:13 +0000)]
PropertyNameArray should use a Vector when there are few entries.
<https://webkit.org/b/144874>

Reviewed by Geoffrey Garen.

Bring back an optimization that was lost in the for-in refactoring.
PropertyNameArray now holds a Vector<AtomicStringImpl*> until there are
enough (20) entries to justify converting to a HashSet for contains().

Also inlined the code while we're here, since it has so few clients and
the call overhead adds up.

~5% progression on Kraken/json-stringify-tinderbox.

* runtime/PropertyNameArray.cpp: Removed.
* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::canAddKnownUniqueForStructure):
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::addKnownUnique):

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

5 years agoFix run-javascriptcore-tests step on the WinCairo bot
ossy@webkit.org [Mon, 11 May 2015 20:42:39 +0000 (20:42 +0000)]
Fix run-javascriptcore-tests step on the WinCairo bot
https://bugs.webkit.org/show_bug.cgi?id=144866

Reviewed by Darin Adler.

* Scripts/run-jsc-stress-tests:

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

5 years agoAdd a Windows-specific result for the new accessibility/menu-list-crash2.html test.
akling@apple.com [Mon, 11 May 2015 20:28:40 +0000 (20:28 +0000)]
Add a Windows-specific result for the new accessibility/menu-list-crash2.html test.

* platform/win/accessibility/menu-list-crash2-expected.txt: Added.

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

5 years agoWeb Inspector: REGRESSION (r175203): No profile information is shown in Inspector
mattbaker@apple.com [Mon, 11 May 2015 20:09:14 +0000 (20:09 +0000)]
Web Inspector: REGRESSION (r175203): No profile information is shown in Inspector
https://bugs.webkit.org/show_bug.cgi?id=144808

Reviewed by Darin Adler.

Source/JavaScriptCore:

Since a profile can be started after a timeline recording has already begun, we can't assume a zero start time.
The start time for the root node's call entry should be based on the stopwatch used by the ProfileGenerator.

* profiler/Profile.cpp:
(JSC::Profile::create):
(JSC::Profile::Profile):
* profiler/Profile.h:
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::ProfileGenerator):
(JSC::AddParentForConsoleStartFunctor::operator()):

Source/WebCore:

Profiles started from the console should always use the Inspector environment's shared stopwatch.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::startFromConsole):

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

5 years ago[Content Extensions] Support domain-specific rules and exceptions.
commit-queue@webkit.org [Mon, 11 May 2015 19:54:15 +0000 (19:54 +0000)]
[Content Extensions] Support domain-specific rules and exceptions.
https://bugs.webkit.org/show_bug.cgi?id=144833

Patch by Alex Christensen <achristensen@webkit.org> on 2015-05-11
Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/contentextensions/domain-rules.html
(And lots of API tests)

This patch adds if-domain and unless-domain to the trigger in the JSON format.
if-domain makes the rule apply only to domains in the list.
unless-domain makes the rule apply to domains that are not in the list.

All rules without if-domain or unless-domain are compiled into a set of DFAs.  This behavior is unchanged.
All rules with if-domain or unless-domain are compiled into a separate set of DFAs.
The domains are also compiled into another set of DFAs.  This makes 3 arrays of DFA bytecode instead of 1.

If there are no domain specific rules, there is no change in behavior.
If there are domain specific rules, the URL will be checked for matches in both
filtersWithoutDomainsBytecode and filtersWithDomainsBytecode.  If there are matches from
filtersWithDomainsBytecode then the domain of the main document will be checked with
domainFiltersBytecode to see which of the matches applies to this domain.

* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
(WebCore::ContentExtensions::CombinedURLFilters::addDomain):
* contentextensions/CombinedURLFilters.h:
Added addDomain, which adds characters from a domain to the prefix tree directly without using YARR.
* contentextensions/CompiledContentExtension.cpp:
(WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
* contentextensions/CompiledContentExtension.h:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):
(WebCore::ContentExtensions::compileRuleList):
Separate the rules into rules with domains and rules without domains and compile to bytecode.
* contentextensions/ContentExtensionCompiler.h:
Updated compiler interface to reflect the slightly more complicated structure.
* contentextensions/ContentExtensionError.cpp:
(WebCore::ContentExtensions::contentExtensionErrorCategory):
* contentextensions/ContentExtensionError.h:
Added new parsing errors.
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getDomainList):
(WebCore::ContentExtensions::loadTrigger):
(WebCore::ContentExtensions::loadEncodedRules):
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Trigger::operator==):
Parse the new domain structures from JSON into the Trigger structure.
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
Interpret as much bytecode as necessary to determine which rules apply to this URL and domain.
* contentextensions/DFABytecode.h:
(WebCore::ContentExtensions::instructionSizeWithArguments):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
* contentextensions/DFABytecodeCompiler.h:
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h:
* loader/ResourceLoadInfo.h:
Keep track of which actions have an if-domain trigger.  If an action is in the
filtersWithDomainsBytecode, then it either has an if-domain or an unless-domain in its trigger.
This requires additional information in the bytecode, so there are two new bytecode types.

Source/WebKit2:

* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength):
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength):
(WebKit::WebCompiledContentExtension::domainFiltersBytecode):
(WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength):
(WebKit::WebCompiledContentExtension::bytecode): Deleted.
(WebKit::WebCompiledContentExtension::bytecodeLength): Deleted.
* Shared/WebCompiledContentExtension.h:
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::ContentExtensionMetaData::fileSize):
(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
(API::compiledToFile):
(API::createExtension):
Keep track of 3 different types of bytecode to be able to handle domain-specific rules.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::InMemoryCompiledContentExtension::createFromFilter):
(TestWebKitAPI::InMemoryCompiledContentExtension::create):
(TestWebKitAPI::InMemoryCompiledContentExtension::InMemoryCompiledContentExtension):
Moved CompiledContentExtensionData from ContentExtensionCompiler.h because it is only used for testing.
(TestWebKitAPI::mainDocumentRequest):
(TestWebKitAPI::subResourceRequest):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::checkCompilerError):
Added tests for parsing and functionality of if-domain and unless-domain.

LayoutTests:

* http/tests/contentextensions/domain-rules-expected.txt: Added.
* http/tests/contentextensions/domain-rules.html: Added.
* http/tests/contentextensions/domain-rules.html.json: Added.

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

5 years agoAdd srcset, sizes and picture to the features json
yoav@yoav.ws [Mon, 11 May 2015 19:32:59 +0000 (19:32 +0000)]
Add srcset, sizes and picture to the features json
https://bugs.webkit.org/show_bug.cgi?id=144862

Reviewed by Benjamin Poulain.

Add the srcset w descriptor and sizes attribute as a new feature in the JSON file,
as well as adding the picture element and srcset's x descriptor as seperate features.

No new tests, since no new functionality added.

* features.json:

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

5 years agoFix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate()
cdumez@apple.com [Mon, 11 May 2015 19:01:26 +0000 (19:01 +0000)]
Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate()
https://bugs.webkit.org/show_bug.cgi?id=144873

Reviewed by Simon Fraser.

Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate().
checkingLogicalHeight should only be initialized to true when
"dimensionsCheck & WidthDimensionsCheck" if isVertical is true.

* dom/Document.cpp:
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):

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

5 years agoUnreviewed, remove unintended change.
basile_clement@apple.com [Mon, 11 May 2015 18:41:51 +0000 (18:41 +0000)]
Unreviewed, remove unintended change.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

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

5 years agoMake it easy to enable eager/non-concurrent JIT compilation
fpizlo@apple.com [Mon, 11 May 2015 18:30:18 +0000 (18:30 +0000)]
Make it easy to enable eager/non-concurrent JIT compilation
https://bugs.webkit.org/show_bug.cgi?id=144877

Reviewed by Michael Saboff.

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

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

5 years agoWe shouldn't promote LoadVarargs to a sequence of GetStacks and PutStacks if doing...
fpizlo@apple.com [Mon, 11 May 2015 18:18:10 +0000 (18:18 +0000)]
We shouldn't promote LoadVarargs to a sequence of GetStacks and PutStacks if doing so would exceed the LoadVarargs' limit
https://bugs.webkit.org/show_bug.cgi?id=144851

Reviewed by Michael Saboff.
Source/JavaScriptCore:

LoadVarargs loads arguments from some object and puts them on the stack. The region of
stack is controlled by a bunch of meta-data, including InlineCallFrame. InlineCallFrame
shouldn't really be edited after ByteCodeParser, so we cannot convert LoadVarargs to
something that uses more stack than the LoadVarargs wanted to.

This check was missing in the ArgumentsEliminationPhase's LoadVarargs->GetStack+PutStack
promoter. This is an important promotion rule for performance, and in cases where we are
compiling truly hot code, the LoadVarargs limit will be at least as big as the length of
the phantom arguments array that this phase sees. The LoadVarargs limit is based on
profiling and the phantom arguments array is a proof; in most cases the profiling is more
conservative.

But, you could write some crazy code where the statically obvious arguments array value is
bigger than what the profiling would have told you. When this happens, this promotion
effectively removes a bounds check. This either results in us clobbering a bunch of stack,
or it means that we never initialize a region of the stack that a later operation will read
(the uninitialization happens because PutStackSinkingPhase removes PutStacks that appear
unnecessary, and a GetMyArgumentByVal will claim not to use the region of the stack outside
the original LoadVarargs limit).

* dfg/DFGArgumentsEliminationPhase.cpp:
* tests/stress/load-varargs-elimination-bounds-check-barely.js: Added.
(foo):
(bar):
(baz):
* tests/stress/load-varargs-elimination-bounds-check.js: Added.
(foo):
(bar):
(baz):

LayoutTests:

* js/regress/load-varargs-elimination-expected.txt: Added.
* js/regress/load-varargs-elimination.html: Added.
* js/regress/script-tests/load-varargs-elimination.js: Added.
(foo):
(bar):
(baz):
* js/regress/sink-huge-activation-expected.txt: Added.
* js/regress/sink-huge-activation.html: Added.

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

5 years agorun-benchmark should support Chrome Canary and Firefox Nightly
rniwa@webkit.org [Mon, 11 May 2015 18:02:57 +0000 (18:02 +0000)]
run-benchmark should support Chrome Canary and Firefox Nightly
https://bugs.webkit.org/show_bug.cgi?id=144850

Reviewed by Darin Adler.

Added the support for Chrome Canary, Firefox (release), and Firefox Nightly.

This patch also extracts OSXBrowserDriver to launch and terminate processes on OS X.

* Scripts/webkitpy/benchmark_runner/browser_driver/browser_drivers.json:
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py: Added.
(OSXBrowserDriver):
(OSXBrowserDriver.prepareEnv): Extracted from ChromeBrowserDriver.prepareEnv.
(OSXBrowserDriver.closeBrowsers): Ditto.
(OSXBrowserDriver.launchProcess): Ditto.
(OSXBrowserDriver.terminateProcesses): Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver): Removed the unused self.chromePreferences.
(OSXChromeDriver.prepareEnv): Moved to OSXBrowserDriver.
(OSXChromeDriver.closeBrowsers): Ditto.
(OSXChromeDriver.launchUrl):
(OSXChromeCanaryDriver): Added.
(OSXChromeCanaryDriver.launchUrl):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py: Added.
(OSXFirefoxDriver): Added.
(OSXFirefoxDriver.launchUrl):
(OSXFirefoxNightlyDriver): Added.
(OSXFirefoxNightlyDriver.launchUrl):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver):
(OSXSafariDriver.closeBrowsers):

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

5 years agoWeb Inspector: NavigationSidebarPanel leaks some event listeners
timothy@apple.com [Mon, 11 May 2015 17:50:25 +0000 (17:50 +0000)]
Web Inspector: NavigationSidebarPanel leaks some event listeners
https://bugs.webkit.org/show_bug.cgi?id=144523

Reviewed by Joseph Pecoraro.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.closed):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.closed):
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.closed):
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype.closed):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.closed):

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

5 years agoJSON.stringify shouldn't use generic get() to access Array.length
akling@apple.com [Mon, 11 May 2015 17:47:55 +0000 (17:47 +0000)]
JSON.stringify shouldn't use generic get() to access Array.length
<https://webkit.org/b/144847>

Reviewed by Geoffrey Garen.

If the value being serialized is a JSArray object, we can downcast and call its
length() directly instead of doing a generic property lookup.

0.5% progression on Kraken/json-stringify-tinderbox.

* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::appendNextProperty):

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

5 years agoPage overlay action context override should indicate the source of the request
timothy_horton@apple.com [Mon, 11 May 2015 17:38:51 +0000 (17:38 +0000)]
Page overlay action context override should indicate the source of the request
https://bugs.webkit.org/show_bug.cgi?id=144832
<rdar://problem/20562594>

Reviewed by Darin Adler.

* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::WebPageOverlay::actionContextForResultAtPoint):
* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Add a parameter to WKBundlePageOverlayActionContextForResultAtPoint so that
clients can tell whether the requested action context should be targetted
at an action menu or immediate action.

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm:
(TestWebKitAPI::ActionMenuTest::actionContextForResultAtPoint):

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

5 years ago[iOS] Close all open databases in expiration handler of process assertion
dbates@webkit.org [Mon, 11 May 2015 17:27:13 +0000 (17:27 +0000)]
[iOS] Close all open databases in expiration handler of process assertion
https://bugs.webkit.org/show_bug.cgi?id=144661
<rdar://problem/20845052>

Reviewed by Darin Adler.

Source/WebCore:

Expose functionality in WebCore to close all open databases. Closing a SQLite database
will interrupt any in-progress database transactions.

* Modules/webdatabase/AbstractDatabaseServer.h:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseServer::closeAllDatabases().
* Modules/webdatabase/DatabaseManager.h: Export DatabaseManager::closeAllDatabases() so that
we can call in from WebKit2.
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::closeAllDatabases): Added; turns around and calls DatabaseTracker::closeAllDatabases().
* Modules/webdatabase/DatabaseServer.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::closeAllDatabases): Added; closes all open databases.
* Modules/webdatabase/DatabaseTracker.h: Export DatabaseTracker::closeAllDatabases() so that
we can call in from Legacy WebKit.

Source/WebKit/mac:

For Legacy WebKit, close all open databases when the process assertion expiration
handler is called.

* Storage/WebDatabaseManager.mm:
(+[WebDatabaseManager startBackgroundTask]): Call DatabaseTracker::tracker().closeAllDatabases()
in the expiration handler to close all open databases. As a side effect of closing
a database all in-progress database transactions are interrupted.

Source/WebKit2:

For WebKit2, close all open databases when the process assertion expiration
handler is called.

When the process assertion expiration handler is called we dispatch a synchronous
message called ProcessWillSuspendImminently to the {Web, Network} processes to inform
them that they will be suspended imminently. The {Web, Network} process will always
service this message regardless if they were waiting for another message. In the
WebProcess, we will close all open databases among other tasks upon receiving this
message. In the NetworkProcess, we will purge some data from memory.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didReceiveSyncMessage): Modified to call NetworkProcess::didReceiveSyncNetworkProcessMessage()
to process the synchronous ProcessWillSuspendImminently message.
(WebKit::NetworkProcess::processWillSuspendImminently): Added; free some memory.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
* Shared/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::sendSync): Added parameter sendSyncFlags so that we can send
a sync message with flag IPC::InterruptWaitingIfSyncMessageArrives to cause the {Web, Network}Process
to process the message regardless of whether it is waiting for another message.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
ProcessWillSuspendImminently to the NetworkProcess.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAndUIAssertion::setClient): Added.
* UIProcess/ProcessAssertion.h: Added abstract class ProcessAssertionClient.
(WebKit::ProcessAssertionClient::~ProcessAssertionClient): Added.
(WebKit::ProcessAssertion::setClient): Added.
(WebKit::ProcessAssertion::client): Added.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::didConnectToProcess):
(WebKit::ProcessThrottler::assertionWillExpireImminently): Added; implements the ProcessAssertionClient
interface. Notify the process throttler clients that the assertion is near expiration.
* UIProcess/ProcessThrottler.h:
* UIProcess/ProcessThrottlerClient.h: Added
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
ProcessWillSuspendImminently to the WebProcess.
* UIProcess/WebProcessProxy.h:
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager addClient:]): Added.
(-[WKProcessAssertionBackgroundTaskManager removeClient:]): Added.
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): Modified expiration handler
to notify ProcessAssertionClient clients that the assertion is near expiration.
(WebKit::ProcessAssertion::~ProcessAssertion): Remove the client on destruction.
(WebKit::ProcessAndUIAssertion::setClient): Added.
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseManager::closeAllDatabases().
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveSyncMessage): Call WebProcess::didReceiveSyncWebProcessMessage() to process
the synchronous ProcessWillSuspendImminently message. Removed logging for an unhandled synchronous message
since WebProcess::didReceiveSyncWebProcessMessage() will ASSERT_NOT_REACHED() for such a message.
(WebKit::WebProcess::prepareToSuspend): Extracted code from WebProcess::processWillSuspend() so that it can
be used from both WebProcess::processWillSuspend() and WebProcess::processWillSuspendImminently(). And modified
it to conditionally dispatch a ProcessReadyToSuspend message to the WebProcessProxy. We only want to dispatch
such a message as part of a coordinated suspension by the ProcessThrottler. That is, we do not want to dispatch
the ProcessReadyToSuspend message when the background assertion is near expiration (i.e. WebProcess::processWillSuspendImminently()
is called).
(WebKit::WebProcess::processWillSuspendImminently): Added. Suspend all open databases among other tasks.
(WebKit::WebProcess::processWillSuspend): Implemented in terms of WebProcess::prepareToSuspend().
(WebKit::WebProcess::processSuspensionCleanupTimerFired): Modified to conditionally dispatch a ProcessReadyToSuspend
message to the WebProcessProxy.
(WebKit::WebProcess::processDidResume): Stop the suspension cleanup timer, which may be active if the WebProcess
did not mark all its graphics layers as volatile before process suspension.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.

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

5 years agoWebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValue...
antti@apple.com [Mon, 11 May 2015 16:26:16 +0000 (16:26 +0000)]
WebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValueNone const + 6
https://bugs.webkit.org/show_bug.cgi?id=144870
rdar://problem/20727702

Reviewed by Simon Fraser.

No repro but we are seeing null pointer crashes like this:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore   0x00007fff92da5706 WebCore::WebKitCSSResourceValue::isCSSValueNone() const + 6
1   com.apple.WebCore   0x00007fff93382b48 WebCore::MaskImageOperation::isCSSValueNone() const + 24
2   com.apple.WebCore   0x00007fff92e0475e WebCore::FillLayer::hasNonEmptyMaskImage() const + 30

* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::MaskImageOperation):
(WebCore::MaskImageOperation::isCSSValueNone):

    This would crash like this if both m_styleImage and m_cssMaskImageValue are null.
    There are no obvious guarantees that this doesn't happen. Two of the constructor variants allow it
    and there is setImage which may turn m_styleImage null later too.

    Fix by making null m_cssMaskImageValue always signify CSSValueNone.

(WebCore::MaskImageOperation::cssValue):

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

5 years ago[GTK] Gardening 11th May.
commit-queue@webkit.org [Mon, 11 May 2015 15:40:47 +0000 (15:40 +0000)]
[GTK] Gardening 11th May.
https://bugs.webkit.org/show_bug.cgi?id=144863

Unreviewed.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-05-11

* platform/gtk/TestExpectations:

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

5 years agoAX: Crash at WebCore::AccessibilityMenuList::addChildren()
cfleizach@apple.com [Mon, 11 May 2015 15:08:00 +0000 (15:08 +0000)]
AX: Crash at WebCore::AccessibilityMenuList::addChildren()
https://bugs.webkit.org/show_bug.cgi?id=144860

Reviewed by Mario Sanchez Prada.

Source/WebCore:

There were some unsafe pointer accesses in AccessibilityMenuList code that needed to be cleaned up.

Test: accessibility/menu-list-crash2.html

* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::addChildren):

LayoutTests:

* accessibility/menu-list-crash2-expected.txt: Added.
* accessibility/menu-list-crash2.html: Added.

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

5 years ago[GTK] Gardening 7th May.
commit-queue@webkit.org [Mon, 11 May 2015 11:04:07 +0000 (11:04 +0000)]
[GTK] Gardening 7th May.
https://bugs.webkit.org/show_bug.cgi?id=144735

Unreviewed.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-05-11

* platform/gtk/TestExpectations:
* platform/gtk/media/video-controls-no-scripting-expected.txt: Added.

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

5 years ago[WebGL] Unnecessary condition check in the while loop
commit-queue@webkit.org [Mon, 11 May 2015 10:41:24 +0000 (10:41 +0000)]
[WebGL] Unnecessary condition check in the while loop
https://bugs.webkit.org/show_bug.cgi?id=125001

Patch by Przemyslaw Szymanski <p.szymanski3@samsung.com> on 2015-05-11
Reviewed by Csaba Osztrogonác.

While loop in this case needs to be optimized a little.
For now a conditional statement in while will execute two
times at begin. do-while loop avoids to check first statement.

No new tests. No behaviour changed.

* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):

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

5 years ago[GTK] WorkQueue objects are not released
carlosgc@webkit.org [Mon, 11 May 2015 10:21:40 +0000 (10:21 +0000)]
[GTK] WorkQueue objects are not released
https://bugs.webkit.org/show_bug.cgi?id=144824

Reviewed by Žan Doberšek.

Do not keep a reference of the WorkQueue for the entire life of
its worker thread, since every task scheduled on the WorkQueue
already takes a reference. Instead, take a reference of the main
loop to make sure that when the worker thread starts, the main
loop hasn't been released to avoid runtime warnings (see
webkit.org/b/140998). Also removed the g_main_context_pop_thread_default()
from the thread body, since the thread-specific context queue will
be freed anyway when the thread exits.
If the WorkQueue is released early, before the thread has started,
schedule a main loop quit in the context, to make sure it will
be the first thing run by the main loop and the thread will exit.

* wtf/WorkQueue.h: Remove unused event loop mutex.
* wtf/gtk/WorkQueueGtk.cpp:
(WTF::WorkQueue::platformInitialize):
(WTF::WorkQueue::platformInvalidate):

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