WebKit-https.git
5 years ago[iOS] ASSERTION FAILED: m_scriptExecutionContext->isContextThread() in ContextDestruc...
dbates@webkit.org [Mon, 2 Feb 2015 19:47:06 +0000 (19:47 +0000)]
[iOS] ASSERTION FAILED: m_scriptExecutionContext->isContextThread() in ContextDestructionObserver::observeContext
https://bugs.webkit.org/show_bug.cgi?id=141057
<rdar://problem/19068790>

Reviewed by Alexey Proskuryakov.

Source/JavaScriptCore:

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::receivedIndicateMessage): Modified to call WTF::callOnWebThreadOrDispatchAsyncOnMainThread().
(Inspector::dispatchAsyncOnQueueSafeForAnyDebuggable): Deleted; moved logic to common helper function,
WTF::callOnWebThreadOrDispatchAsyncOnMainThread() so that it can be called from both RemoteInspector::receivedIndicateMessage()
and CryptoKeyRSA::generatePair().

Source/WebCore:

Fixes an issue where we would create-/delete- the RSA crypto keys and dispatch callbacks on the wrong
thread in WebKit1 for iOS. In iOS WebKit1 we should perform such operations on thread WebThread.

This change is covered by existing layout tests.

* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::generatePair):

Source/WTF:

* wtf/MainThread.h:
* wtf/mac/MainThreadMac.mm:
(WTF::callOnWebThreadOrDispatchAsyncOnMainThread): Added.

LayoutTests:

Un-skip crypto tests. Also, group skip entries for tests crypto/subtle/{rsa-indexeddb, rsa-indexeddb-non-exportable}.html
with other skipped IndexedDB tests.

* platform/ios-simulator/TestExpectations:

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

5 years agoPrevent crash when accessing WebAVPlayerController.delegate.
commit-queue@webkit.org [Mon, 2 Feb 2015 19:40:57 +0000 (19:40 +0000)]
Prevent crash when accessing WebAVPlayerController.delegate.
https://bugs.webkit.org/show_bug.cgi?id=140893

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-02-02
Reviewed by Darin Adler.

Source/WebCore:

This patch aims to prevent a null delegate access during invalidation by adding null checks before accessing the delegate, by making explicit the recreation of m_playerController, and by consolidating and correcting the teardown sequence.

* WebCore.exp.in:
* platform/ios/WebVideoFullscreenInterface.h: add resetMediaState()
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: ditto.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Check for null before accessing delegate.
(-[WebAVPlayerController play:]): ditto.
(-[WebAVPlayerController pause:]): ditto.
(-[WebAVPlayerController togglePlayback:]): ditto.
(-[WebAVPlayerController setPlaying:]): ditto.
(-[WebAVPlayerController beginScrubbing:]): ditto.
(-[WebAVPlayerController endScrubbing:]): ditto.
(-[WebAVPlayerController seekToTime:]): ditto.
(-[WebAVPlayerController beginScanningForward:]): ditto.
(-[WebAVPlayerController endScanningForward:]): ditto.
(-[WebAVPlayerController beginScanningBackward:]): ditto.
(-[WebAVPlayerController endScanningBackward:]): ditto.
(-[WebAVPlayerController seekToBeginning:]): ditto.
(-[WebAVPlayerController seekToEnd:]): ditto.
(-[WebAVPlayerController setCurrentAudioMediaSelectionOption:]): ditto.
(-[WebAVPlayerController setCurrentLegibleMediaSelectionOption:]): ditto.
(-[WebAVPlayerController layoutSublayersOfLayer:]): ditto.
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): initialize m_playerController
(WebVideoFullscreenInterfaceAVKit::resetMediaState): Added.
(WebVideoFullscreenInterfaceAVKit::setDuration): remove playerController()
(WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto.
(WebVideoFullscreenInterfaceAVKit::setRate): ditto.
(WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto.
(WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto.
(WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse): ditto.
(WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto.
(WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto.
(WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto.
(WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): ditto.
(WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): ditto.
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): consolidated cleanup code from invalidate()
(WebVideoFullscreenInterfaceAVKit::invalidate): consolidate cleanup code.
(WebVideoFullscreenInterfaceAVKit::playerController): Deleted.
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setVideoElement): call resetMediaState()

Source/WebKit2:

Plumb new resetMediaState() through IPC interface WebVideoFullscreenManagerProxy.

* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::invalidate): remove redundant set to nullptr.
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::resetMediaState):

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

5 years agoCreate tests for JSC's Control Flow Profiler
saambarati1@gmail.com [Mon, 2 Feb 2015 19:05:46 +0000 (19:05 +0000)]
Create tests for JSC's Control Flow Profiler
https://bugs.webkit.org/show_bug.cgi?id=141123

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch creates a control flow profiler testing API in jsc.cpp
that accepts a function and a string as arguments. The string must
be a substring of the text of the function argument. The API returns
a boolean indicating whether or not the basic block that encloses the
substring has executed.

This patch uses this API to test that the control flow profiler
behaves as expected on basic block boundaries. These tests do not
provide full coverage for all JavaScript statements that can create
basic blocks boundaries. Full coverage will come in a later patch.

* jsc.cpp:
(GlobalObject::finishCreation):
(functionHasBasicBlockExecuted):
* runtime/ControlFlowProfiler.cpp:
(JSC::ControlFlowProfiler::hasBasicBlockAtTextOffsetBeenExecuted):
* runtime/ControlFlowProfiler.h:
* tests/controlFlowProfiler: Added.
* tests/controlFlowProfiler.yaml: Added.
* tests/controlFlowProfiler/driver: Added.
* tests/controlFlowProfiler/driver/driver.js: Added.
(assert):
* tests/controlFlowProfiler/if-statement.js: Added.
(testIf):
(noMatches):
* tests/controlFlowProfiler/loop-statements.js: Added.
(forRegular):
(forIn):
(forOf):
(whileLoop):
* tests/controlFlowProfiler/switch-statements.js: Added.
(testSwitch):
* tests/controlFlowProfiler/test-jit.js: Added.
(tierUpToBaseline):
(tierUpToDFG):
(baselineTest):
(dfgTest):

Tools:

* Scripts/run-javascriptcore-tests:
(runJSCStressTests):
* Scripts/run-jsc-stress-tests:

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

5 years agoPolymorphic call inlining should be based on polymorphic call inline caching rather...
fpizlo@apple.com [Mon, 2 Feb 2015 18:38:08 +0000 (18:38 +0000)]
Polymorphic call inlining should be based on polymorphic call inline caching rather than logging
https://bugs.webkit.org/show_bug.cgi?id=140660

Reviewed by Geoffrey Garen.

When we first implemented polymorphic call inlining, we did the profiling based on a call
edge log. The idea was to store each call edge (a tuple of call site and callee) into a
global log that was processed lazily. Processing the log would give precise counts of call
edges, and could be used to drive well-informed inlining decisions - polymorphic or not.
This was a speed-up on throughput tests but a slow-down for latency tests. It was a net win
nonetheless.

Experience with this code shows three things. First, the call edge profiler is buggy and
complex. It would take work to fix the bugs. Second, the call edge profiler incurs lots of
overhead for latency code that we care deeply about. Third, it's not at all clear that
having call edge counts for every possible callee is any better than just having call edge
counts for the limited number of callees that an inline cache would catch.

So, this patch removes the call edge profiler and replaces it with a polymorphic call inline
cache. If we miss the basic call inline cache, we inflate the cache to be a jump to an
out-of-line stub that cases on the previously known callees. If that misses again, then we
rewrite that stub to include the new callee. We do this up to some number of callees. If we
hit the limit then we switch to using a plain virtual call.

Substantial speed-up on V8Spider; undoes the slow-down that the original call edge profiler
caused. Might be a SunSpider speed-up (below 1%), depending on hardware.

Rolling this back in after fixing https://bugs.webkit.org/show_bug.cgi?id=141107.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CallEdge.h:
(JSC::CallEdge::count):
(JSC::CallEdge::CallEdge):
* bytecode/CallEdgeProfile.cpp: Removed.
* bytecode/CallEdgeProfile.h: Removed.
* bytecode/CallEdgeProfileInlines.h: Removed.
* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::unlink):
(JSC::CallLinkInfo::visitWeak):
* bytecode/CallLinkInfo.h:
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::CallLinkStatus):
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeFromCallLinkInfo):
(JSC::CallLinkStatus::isClosureCall):
(JSC::CallLinkStatus::makeClosureCall):
(JSC::CallLinkStatus::dump):
(JSC::CallLinkStatus::computeFromCallEdgeProfile): Deleted.
* bytecode/CallLinkStatus.h:
(JSC::CallLinkStatus::CallLinkStatus):
(JSC::CallLinkStatus::isSet):
(JSC::CallLinkStatus::variants):
(JSC::CallLinkStatus::size):
(JSC::CallLinkStatus::at):
(JSC::CallLinkStatus::operator[]):
(JSC::CallLinkStatus::canOptimize):
(JSC::CallLinkStatus::edges): Deleted.
(JSC::CallLinkStatus::canTrustCounts): Deleted.
* bytecode/CallVariant.cpp:
(JSC::variantListWithVariant):
(JSC::despecifiedVariantList):
* bytecode/CallVariant.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::linkIncomingPolymorphicCall):
(JSC::CodeBlock::unlinkIncomingCalls):
(JSC::CodeBlock::noticeIncomingCall):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::isIncomingCallAlreadyLinked): Deleted.
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleInlining):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasHeapPrediction):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
(JSC::DFG::TierUpCheckInjectionPhase::removeFTLProfiling): Deleted.
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* heap/Heap.cpp:
(JSC::Heap::collect):
* jit/BinarySwitch.h:
* jit/ClosureCallStubRoutine.cpp: Removed.
* jit/ClosureCallStubRoutine.h: Removed.
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCall):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
(JSC::operationLinkPolymorphicCallFor):
(JSC::operationLinkClosureCallFor): Deleted.
* jit/JITStubRoutine.h:
* jit/JITWriteBarrier.h:
* jit/PolymorphicCallStubRoutine.cpp: Added.
(JSC::PolymorphicCallNode::~PolymorphicCallNode):
(JSC::PolymorphicCallNode::unlink):
(JSC::PolymorphicCallCase::dump):
(JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine):
(JSC::PolymorphicCallStubRoutine::~PolymorphicCallStubRoutine):
(JSC::PolymorphicCallStubRoutine::variants):
(JSC::PolymorphicCallStubRoutine::edges):
(JSC::PolymorphicCallStubRoutine::visitWeak):
(JSC::PolymorphicCallStubRoutine::markRequiredObjectsInternal):
* jit/PolymorphicCallStubRoutine.h: Added.
(JSC::PolymorphicCallNode::PolymorphicCallNode):
(JSC::PolymorphicCallCase::PolymorphicCallCase):
(JSC::PolymorphicCallCase::variant):
(JSC::PolymorphicCallCase::codeBlock):
* jit/Repatch.cpp:
(JSC::linkSlowFor):
(JSC::linkFor):
(JSC::revertCall):
(JSC::unlinkFor):
(JSC::linkVirtualFor):
(JSC::linkPolymorphicCall):
(JSC::linkClosureCall): Deleted.
* jit/Repatch.h:
* jit/ThunkGenerators.cpp:
(JSC::linkPolymorphicCallForThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::linkPolymorphicCallThatPreservesRegsThunkGenerator):
(JSC::linkClosureCallForThunkGenerator): Deleted.
(JSC::linkClosureCallThunkGenerator): Deleted.
(JSC::linkClosureCallThatPreservesRegsThunkGenerator): Deleted.
* jit/ThunkGenerators.h:
(JSC::linkPolymorphicCallThunkGeneratorFor):
(JSC::linkClosureCallThunkGeneratorFor): Deleted.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):
* runtime/Options.h:
* runtime/VM.cpp:
(JSC::VM::prepareToDiscardCode):
(JSC::VM::ensureCallEdgeLog): Deleted.
* runtime/VM.h:

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

5 years agoConverting Flushes and PhantomLocals to Phantoms requires an OSR availability analysi...
fpizlo@apple.com [Mon, 2 Feb 2015 18:15:44 +0000 (18:15 +0000)]
Converting Flushes and PhantomLocals to Phantoms requires an OSR availability analysis rather than just using the SetLocal's child
https://bugs.webkit.org/show_bug.cgi?id=141107

Reviewed by Michael Saboff.

See the bugzilla for a discussion of the problem. This addresses the problem by ensuring
that Flushes are always strength-reduced to PhantomLocals, and CPS rethreading does a mini
OSR availability analysis to determine the right MovHint value to use for the Phantom.

* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::CPSRethreadingPhase):
(JSC::DFG::CPSRethreadingPhase::freeUnnecessaryNodes):
(JSC::DFG::CPSRethreadingPhase::clearVariables):
(JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor):
(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
(JSC::DFG::CPSRethreadingPhase::clearVariablesAtHeadAndTail): Deleted.
* dfg/DFGNode.h:
(JSC::DFG::Node::convertPhantomToPhantomLocal):
(JSC::DFG::Node::convertFlushToPhantomLocal):
(JSC::DFG::Node::convertToPhantomLocal): Deleted.
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* tests/stress/inline-call-that-doesnt-use-all-args.js: Added.
(foo):
(bar):
(baz):

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

5 years agoREGRESSION (r170576): Storage leaks in parsing of CSS image sizes
darin@apple.com [Mon, 2 Feb 2015 18:12:32 +0000 (18:12 +0000)]
REGRESSION (r170576): Storage leaks in parsing of CSS image sizes
https://bugs.webkit.org/show_bug.cgi?id=141026

Reviewed by Anders Carlsson.

* css/CSSGrammar.y.in: Fixed all the shift/reduce conflicts caused
by the ENABLE_PICTURE_SIZES code by removing all the redundant
maybe_space which caused them. Rearranged the productions for
ENABLE_PICTURE_SIZES to tighten up the code quite a bit. Changed
the code to build up the source size vector as a Vector instead of
a special class, and use the SourceSize struct from inside the
CSSParser class.'

* css/CSSParser.cpp:
(WebCore::CSSParser::setupParser): Changed this to take a StringView.
In the future we can change all the parsing functions to take StringView,
since they don't work with the String in place.
(WebCore::CSSParser::parseSizesAttribute): Changed to return a vector
of SourceSize instead of a SourceSizeList. This is better because it's
a real CSS data structure that does not contain a CSSParserValue.
(WebCore::CSSParser::sourceSize): Added. Helper that creates a
SourceSize, mapping parser data structures into real CSS ones.

* css/CSSParser.h: Updated for changes above.

* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery): Use std::make_unique and the copy
constructor directly instead of using a MediaQuery::copy function.

* css/MediaQueryExp.cpp: Streamlined the class a little bit.
* css/MediaQueryExp.h: Removed unneeded includes. Moved functions out
of the class body so the class is easier to read. Removed the unneeded
copy function.

* css/SourceSizeList.cpp:
(WebCore::SourceSize::match): Changed to use WTF::move instead
of releasing and then re-creating the unique_ptr.
(WebCore::computeLength): Added a comment to explain this function
is using an incorrect strategy. Also added some type checking code
to handle cases where a null or non-primitive CSS value might be
returned. Probably dead code, but we don't want to risk a bad cast.
Worthe cleaning up when we fix the strategy.
(WebCore::SourceSizeList::getEffectiveSize): Updated since the
vector now contains actual SourceSize objects rather than pointers
to SourceSize objects on the heap.

* css/SourceSizeList.h: Changed the CSSParserValue argument to be
an rvalue reference to make it clearer that we take ownership of it
when it's moved in. Added a move constructor and a destructor. Added
comments explaining that it's not correct design to use a
CSSParserValue here, outside the parser. Changed SourceSizeList's
append function to move a SourceSize in rather than a unique_ptr.
Made getEffectiveSize private. Moved the various inline functions to
the bottom of the file to make the class definitions easier to read.

* css/SourceSizeList.cpp: Made almost everything about this private
to this source file instead of public in the header.
(WebCore::match): Made this a free function instead of a member function
and made it take the media query expression as an argument.
(WebCore::computeLength): Changed the argument type to CSSValue*,
rather than using CSSParserValue here outside the parser.
(WebCore::parseSizesAttribute): Streamlined and simplified this.
Now that the parser builds the list in the correct order, there was
no need to iterate backwards any more so we could use a modern for
loop.

* css/SourceSizeList.h: Removed almost everything in this header.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Call the
parseSizesAttribute function as free function since it's no longer
a member of a SourceSizeList class.

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
Ditto.

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

5 years agoRemove copy/paste code from run-jsc-stress-tests to determine numberOfTests
ossy@webkit.org [Mon, 2 Feb 2015 17:06:19 +0000 (17:06 +0000)]
Remove copy/paste code from run-jsc-stress-tests to determine numberOfTests
https://bugs.webkit.org/show_bug.cgi?id=141158

Reviewed by Darin Adler.

* Scripts/run-jsc-stress-tests:

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

5 years ago[GTK] MiniBrowser should close itself on Ctrl+W or Ctrl+Q
commit-queue@webkit.org [Mon, 2 Feb 2015 08:48:37 +0000 (08:48 +0000)]
[GTK] MiniBrowser should close itself on Ctrl+W or Ctrl+Q
https://bugs.webkit.org/show_bug.cgi?id=141142

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2015-02-02
Reviewed by Carlos Garcia Campos.

* MiniBrowser/gtk/BrowserWindow.c:
(browser_window_init): Quit on Ctrl+W or Ctrl+Q

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

5 years agoFix some leaks found by the leak bot
darin@apple.com [Mon, 2 Feb 2015 08:27:03 +0000 (08:27 +0000)]
Fix some leaks found by the leak bot
https://bugs.webkit.org/show_bug.cgi?id=141149

Reviewed by Alexey Proskuryakov.

* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::importKey): Changed argument types to std::unique_ptr for better code clarity.
(WebCore::JSSubtleCrypto::importKey): Use WTF::move instead of release.
(WebCore::JSSubtleCrypto::wrapKey): Fixed leaks by adding missing delete calls to the
case where we get a DOM exception.
(WebCore::JSSubtleCrypto::unwrapKey): Ditto.

* dom/SelectorQuery.cpp:
(WebCore::SelectorQuery::SelectorQuery): Use WTF::move here. Not clear how this could
have caused the storage leak, but it does seem obviously missing. The leak is pretty big,
implying that we leak almost all CSSSelectorList objects we parse; not sure this fixes it.

* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse): Added code to
deleted the unguarded pointer if postTaskForModeToWorkerGlobalScope fails.
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData): Ditto.
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): Ditto.
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck): Ditto.

* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Added missing adoptNS.

* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::updateDocumentMarkerResources): Added missing release.

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

5 years agoUse more references in HistoryItem
cdumez@apple.com [Mon, 2 Feb 2015 00:49:36 +0000 (00:49 +0000)]
Use more references in HistoryItem
https://bugs.webkit.org/show_bug.cgi?id=141133

Reviewed by Andreas Kling.

Use more references in HistoryItem instead of pointers.
Source/WebKit2:

* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
(WebKit::InjectedBundleBackForwardListItem::children):
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toFrameState):
(WebKit::applyFrameState):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::addItem):
* WebProcess/WebPage/WebBackForwardListProxy.h:

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

5 years agoUnreviewed, rolling out r179467 and r179470.
commit-queue@webkit.org [Sun, 1 Feb 2015 23:47:31 +0000 (23:47 +0000)]
Unreviewed, rolling out r179467 and r179470.
https://bugs.webkit.org/show_bug.cgi?id=141144

Broke svg/custom/use-events-crash.svg (Requested by ap on
#webkit).

Reverted changesets:

"Stop dispatching events with SVGElementInstance objects as
their targets"
https://bugs.webkit.org/show_bug.cgi?id=141108
http://trac.webkit.org/changeset/179467

"REGRESSION(r179467): svg/custom/use-events-crash.svg times
out"
http://trac.webkit.org/changeset/179470

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

5 years agoREGRESSION(r179467): svg/custom/use-events-crash.svg times out
ap@apple.com [Sun, 1 Feb 2015 22:05:52 +0000 (22:05 +0000)]
REGRESSION(r179467): svg/custom/use-events-crash.svg times out

Looks like the new test (svg/custom/use-event-retargeting.html) somehow breaks
subsequent one, let's try skipping it for now.

* TestExpectations:

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

5 years agoWeb platform test server is not always launching properly on Mac EWS bots
youenn.fablet@crf.canon.fr [Sun, 1 Feb 2015 21:23:07 +0000 (21:23 +0000)]
Web platform test server is not always launching properly on Mac EWS bots
https://bugs.webkit.org/show_bug.cgi?id=141141

Unreviewed.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
(create_wpt_empty_file_if_needed): Removed creation of empty __init.py__ files from AutoInstalled modules.

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

5 years agoRemove ViewGestureController tracing
mitz@apple.com [Sun, 1 Feb 2015 18:42:33 +0000 (18:42 +0000)]
Remove ViewGestureController tracing
https://bugs.webkit.org/show_bug.cgi?id=141137

Reviewed by Tim Horton.

Remove the tracing added in r176133, now that http://webkit.org/b/138750 is fixed.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
(WebKit::ViewGestureController::removeSwipeSnapshot):
(WebKit::addLogEntry): Deleted.
(WebKit::dumpLogEntries): Deleted.
* UIProcess/mac/ViewGestureController.h:

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

5 years agoSource/WebCore:
darin@apple.com [Sun, 1 Feb 2015 15:22:57 +0000 (15:22 +0000)]
Source/WebCore:
Stop dispatching events to with SVGElementInstance objects as their targets
https://bugs.webkit.org/show_bug.cgi?id=141108

Reviewed by Anders Carlsson.

Test: svg/custom/use-event-retargeting.html

* dom/EventDispatcher.cpp:
(WebCore::eventTargetRespectingTargetRules): Replaced the code that retargeted
events at SVGElementInstance objects with code that retargets them at the use
element instead. Also wrote the code in a simpler way.

LayoutTests:
Stop dispatching events with SVGElementInstance objects as their targets
https://bugs.webkit.org/show_bug.cgi?id=141108

Reviewed by Anders Carlsson.

Many tests are no longer relevant once we aren't doing this any more.

* platform/gtk/svg/custom/use-instanceRoot-event-bubbling-expected.png: Removed.
* platform/gtk/svg/custom/use-instanceRoot-modifications-expected.png: Removed.
* platform/gtk/svg/custom/use-instanceRoot-modifications-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/custom/use-instanceRoot-modifications-expected.txt: Removed.
* platform/ios-simulator/svg/custom/use-instanceRoot-modifications-expected.txt: Removed.
* platform/mac-mountainlion/svg/custom/use-instanceRoot-modifications-expected.txt: Removed.
* platform/mac/svg/custom/use-instanceRoot-event-bubbling-expected.png: Removed.
* platform/mac/svg/custom/use-instanceRoot-modifications-expected.png: Removed.
* platform/mac/svg/custom/use-instanceRoot-modifications-expected.txt: Removed.
* svg/custom/use-instanceRoot-modifications.svg: Removed.
* svg/custom/use-instanceRoot-with-use-removed-expected.txt: Removed.
* svg/custom/use-instanceRoot-with-use-removed.svg: Removed.

* svg/custom/resources/use-instanceRoot-event-bubbling.js: Updated this test to expect
the events to be dispatched with the SVGUseElement as the target. I talked this over with
Sam Weinig and we decided this is good behavior for now, and it almost matches what the
spec says. Might be worth refining later.
* svg/custom/use-instanceRoot-event-bubbling-expected.txt: Updated expected results.
* svg/custom/use-instanceRoot-event-bubbling.xhtml: Tweaked the test a little. It still
could use improvement; it's like half a "repaint test", which is strange.

* svg/custom/use-event-retargeting-expected.txt: Added. Got this test from Blink.
* svg/custom/use-event-retargeting.html: Added. Ditto.

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

5 years agoUnreviewd EFL gardening. Add new failing tests related to W3C SVG 1.1.
gyuyoung.kim@samsung.com [Sun, 1 Feb 2015 14:53:01 +0000 (14:53 +0000)]
Unreviewd EFL gardening. Add new failing tests related to W3C SVG 1.1.

* platform/efl/TestExpectations:

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

5 years agoUnreviewed EFL gardening. Update crash tests related to webgl because
gyuyoung.kim@samsung.com [Sun, 1 Feb 2015 13:02:05 +0000 (13:02 +0000)]
Unreviewed EFL gardening. Update crash tests related to webgl because
webgl isn't supported by EFL port at the moment.

* platform/efl/TestExpectations:

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

5 years agoUnreviewed EFL gardening. Update tests which don't have expectation result yet.
gyuyoung.kim@samsung.com [Sun, 1 Feb 2015 12:22:16 +0000 (12:22 +0000)]
Unreviewed EFL gardening. Update tests which don't have expectation result yet.

* platform/efl/TestExpectations:

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

5 years ago[TexMap] Optimize TextureMapperLayer::removeAllChildren()
zandobersek@gmail.com [Sun, 1 Feb 2015 10:25:15 +0000 (10:25 +0000)]
[TexMap] Optimize TextureMapperLayer::removeAllChildren()
https://bugs.webkit.org/show_bug.cgi?id=140734

Reviewed by Chris Dumez.

Instead of removing the children from the Vector member one by one,
move the Vector out and iterate through the ex-children, clearing
out the pointer to the parent.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::removeAllChildren):

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

5 years ago[TexMap] Avoid unnecessary TransformationMatrix copies in GraphicsLayerTransform
zandobersek@gmail.com [Sun, 1 Feb 2015 10:17:49 +0000 (10:17 +0000)]
[TexMap] Avoid unnecessary TransformationMatrix copies in GraphicsLayerTransform
https://bugs.webkit.org/show_bug.cgi?id=140735

Reviewed by Chris Dumez.

* platform/graphics/GraphicsLayerTransform.cpp:
(WebCore::GraphicsLayerTransform::combined): Return a const reference to the matrix.
(WebCore::GraphicsLayerTransform::combinedForChildren): Ditto.
(WebCore::GraphicsLayerTransform::combineTransforms): First copy the parent transform,
then apply the translation and multiplication. Previously this copied the parent
transform into a temporary object, performed the translation and multiplication, and
copied that temporary object again when assigning to the member variable.
(WebCore::GraphicsLayerTransform::combineTransformsForChildren): Mark const. m_childrenDirty
and m_combinedForChildren members are marked mutable.
* platform/graphics/GraphicsLayerTransform.h:

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

5 years agoUnreviewed EFL gardening. Update flaky tests regarding W3C SVG 1.1 tests.
gyuyoung.kim@samsung.com [Sun, 1 Feb 2015 07:30:31 +0000 (07:30 +0000)]
Unreviewed EFL gardening. Update flaky tests regarding W3C SVG 1.1 tests.

* platform/efl/TestExpectations:

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

5 years ago[Win] Unreviewed test machine configuration change.
bfulgham@apple.com [Sun, 1 Feb 2015 06:54:29 +0000 (06:54 +0000)]
[Win] Unreviewed test machine configuration change.

* http/conf/apache2.4-httpd-win.conf: Provide reasonable default PidFile location for xampp-based install.

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

5 years agoREGRESSION (r177689): Emoji variation sequences rendered incorrectly (as characters...
commit-queue@webkit.org [Sun, 1 Feb 2015 04:18:00 +0000 (04:18 +0000)]
REGRESSION (r177689): Emoji variation sequences rendered incorrectly (as characters from other non-emoji font)
https://bugs.webkit.org/show_bug.cgi?id=141112

Patch by Myles C. Maxfield <litherum@gmail.com> on 2015-01-31
Reviewed by Sam Weinig.

Source/WebCore:

Typo in r177689.

Test: platform/mac/fast/text/combining-mark-paint.html

* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

LayoutTests:

* platform/mac/fast/text/combining-mark-paint-expected.html: Added.
* platform/mac/fast/text/combining-mark-paint.html: Added.

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

5 years agoUnreviewed, rolling out r178183.
commit-queue@webkit.org [Sun, 1 Feb 2015 04:03:43 +0000 (04:03 +0000)]
Unreviewed, rolling out r178183.
https://bugs.webkit.org/show_bug.cgi?id=141132

Caused more mallocing than the volatility saved. (Requested by
kling on #webkit).

Reverted changeset:

"[Cocoa] Make decoded image data purgeable ASAP."
https://bugs.webkit.org/show_bug.cgi?id=140298
http://trac.webkit.org/changeset/178183

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

5 years agoCrash (DFG assertion) beneath AbstractInterpreter::verifyEdge() @ http://experilous...
msaboff@apple.com [Sun, 1 Feb 2015 03:58:39 +0000 (03:58 +0000)]
Crash (DFG assertion) beneath AbstractInterpreter::verifyEdge() @ experilous.com/1/planet-generator/2014-09-28/version-1
https://bugs.webkit.org/show_bug.cgi?id=141111

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

In LowerDFGToLLVM::compileNode(), if we determine while compiling a node that we would have
exited, we don't need to process the OSR availability or abstract interpreter.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::safelyInvalidateAfterTermination): Broke this out a a separate
method since we need to call it at the top and near the bottom of compileNode().
(JSC::FTL::LowerDFGToLLVM::compileNode):

LayoutTests:

New tests.

* js/regress-141111-expected.txt: Added.
* js/regress-141111.html: Added.
* js/script-tests/regress-141111.js: Added.
(MyObject):
(foo):
(.result):
(bar):

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

5 years agoUse simpler CachedResourceMap structure in MemoryCache with CACHE_PARTITIONING enabled
cdumez@apple.com [Sun, 1 Feb 2015 03:11:14 +0000 (03:11 +0000)]
Use simpler CachedResourceMap structure in MemoryCache with CACHE_PARTITIONING enabled
https://bugs.webkit.org/show_bug.cgi?id=141110

Reviewed by Antti Koivisto.

Use simpler CachedResourceMap structure in MemoryCache with CACHE_PARTITIONING
enabled. Previously, we would be using a HashMap of HashMap to store
CachedResources. The outer HashMap would use the URL as key and the inner
HashMap would use the partition name as key. This would make traversing the
structure overly complicated, especially considering that the code needs to
traverse a simple HashMap if CACHE_PARTITIONING is disabled.

This patch updates the CachedResourceMap structure to be a simple HashMap,
whose key is an std::pair<URL, String /* partitionName */>. Having a flat
structure simplifies the traversal code a lot and enables more code sharing
between CACHE_PARTITIONING and !CACHE_PARTITIONING. This shouldn't regress
performance because we always have both a URL and a partition name when we
need to look up a resource. We never need to retrieve all resources with
a particular URL.

This patch also switches to using a URL as key instead of a String as we
always have a URL has input.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequestImpl):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::remove):
After removing the resource from the CachedResourceMap, remove the
sessionID from m_sessionResources if the CachedResourceMap is now
empty. Previously, no code was removing sessionIDs from
m_sessionResources.

(WebCore::MemoryCache::removeResourcesWithOrigin):
(WebCore::MemoryCache::getOriginsWithCache):
(WebCore::MemoryCache::getStatistics):
(WebCore::MemoryCache::setDisabled):
* loader/cache/MemoryCache.h:

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

5 years agoMerge the iOS implementations of GraphicsContext::drawText and GraphicsContext::drawB...
commit-queue@webkit.org [Sun, 1 Feb 2015 03:04:21 +0000 (03:04 +0000)]
Merge the iOS implementations of GraphicsContext::drawText and GraphicsContext::drawBidiText with the platform independent ones
https://bugs.webkit.org/show_bug.cgi?id=141131

Patch by Sam Weinig <sam@webkit.org> on 2015-01-31
Reviewed by Antti Koivisto.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawText):
The only difference between the two implementation here was the iOS one returns the length of
the text that was drawn. As all platforms now support that, we can merge by keeping the iOS one.

(WebCore::GraphicsContext::drawBidiText):
This function had a few differences:
    - iOS returns the length of the text that was drawn.
        Since this is not used anywhere, I dropped this ability.
    - iOS took additional inputs of initial bidi status and run length (and returned the
      the final bidi status as an out parameter)
        Since this was also unused, I dropped it.
    - iOS used the fact that font.drawText() returns the length that was drawn, to avoid
      measuring the text twice.
        I kept this, since all platforms now support this.

* platform/graphics/GraphicsContext.h:
Update signatures. Remove WEBCORE_EXPORT for function that is not used outside of WebCore.

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

5 years agoShrink RenderBlock.
akling@apple.com [Sun, 1 Feb 2015 02:58:13 +0000 (02:58 +0000)]
Shrink RenderBlock.
<https://webkit.org/b/141129>

Reviewed by Antti Koivisto.

Get rid of the bitfield in RenderBlock by moving the essential bits to
RenderElement (plenty of space in the bitfield there.)

RenderBlock also had a cache of its line-height, but it doesn't appear
to help any of the benchmarks that we're tracking so I'd say it's okay
to lose this optimization.

This knocks 8 bytes off of RenderBlock (and all of its subclasses.)

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::recomputeLogicalWidth):
(WebCore::RenderBlock::lineHeight):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::setHasMarginBeforeQuirk):
(WebCore::RenderBlock::setHasMarginAfterQuirk):
(WebCore::RenderBlock::setHasBorderOrPaddingLogicalWidthChanged):
(WebCore::RenderBlock::hasMarginBeforeQuirk):
(WebCore::RenderBlock::hasMarginAfterQuirk):
(WebCore::RenderBlock::hasBorderOrPaddingLogicalWidthChanged):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::invalidateLineLayoutPath):
(WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
(WebCore::RenderBlockFlow::ensureLineBoxes):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::lineLayoutPath):
(WebCore::RenderBlockFlow::setLineLayoutPath):
(WebCore::RenderBlockFlow::setHasMarkupTruncation):
(WebCore::RenderBlockFlow::hasMarkupTruncation):
(WebCore::RenderBlockFlow::simpleLineLayout):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
(WebCore::RenderElement::setRenderBlockHasMarginBeforeQuirk):
(WebCore::RenderElement::setRenderBlockHasMarginAfterQuirk):
(WebCore::RenderElement::setRenderBlockHasBorderOrPaddingLogicalWidthChanged):
(WebCore::RenderElement::renderBlockHasMarginBeforeQuirk):
(WebCore::RenderElement::renderBlockHasMarginAfterQuirk):
(WebCore::RenderElement::renderBlockHasBorderOrPaddingLogicalWidthChanged):
(WebCore::RenderElement::setRenderBlockFlowLineLayoutPath):
(WebCore::RenderElement::setRenderBlockFlowHasMarkupTruncation):
(WebCore::RenderElement::renderBlockFlowLineLayoutPath):
(WebCore::RenderElement::renderBlockFlowHasMarkupTruncation):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::removeLineRegionInfo):

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

5 years agoRemove useless PageCache::singleton() call from PageCache member function
cdumez@apple.com [Sun, 1 Feb 2015 02:06:44 +0000 (02:06 +0000)]
Remove useless PageCache::singleton() call from PageCache member function
https://bugs.webkit.org/show_bug.cgi?id=141127

Reviewed by Andreas Kling.

* history/PageCache.cpp:
(WebCore::PageCache::get):

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

5 years agoRemove empty #if/#endif
weinig@apple.com [Sun, 1 Feb 2015 00:38:19 +0000 (00:38 +0000)]
Remove empty #if/#endif

Rubber-stamped by Antti Koivisto.

* platform/graphics/FontPlatformData.h:

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

5 years agoRemove support for disabling drawing of emoji
weinig@apple.com [Sat, 31 Jan 2015 23:52:38 +0000 (23:52 +0000)]
Remove support for disabling drawing of emoji
https://bugs.webkit.org/show_bug.cgi?id=141126

Reviewed by Antti Koivisto.

Remove unused support for disabling the drawing of emoji.

* WebCore.exp.in:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::emojiDrawingEnabled): Deleted.
(WebCore::GraphicsContext::setEmojiDrawingEnabled): Deleted.
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContextState::GraphicsContextState):
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawGlyphs):

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

5 years agoRemove even more Mountain Lion support
weinig@apple.com [Sat, 31 Jan 2015 22:55:39 +0000 (22:55 +0000)]
Remove even more Mountain Lion support
https://bugs.webkit.org/show_bug.cgi?id=141124

Reviewed by Alexey Proskuryakov.

Source/bmalloc:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

* API/tests/DateTests.mm:
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* jit/ExecutableAllocatorFixedVMPool.cpp:

Source/WebCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityActionNames]):
(-[WebAccessibilityObjectWrapper subrole]):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::drawLayerContents):
* platform/mac/ThemeMac.mm:
(-[WebCoreThemeView _focusRingVisibleRect]):

Source/WebKit/mac:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitLegacy.xcconfig:

Source/WebKit2:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:
* Configurations/WebKit.xcconfig:
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

Source/WTF:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* wtf/Assertions.cpp:
* wtf/FeatureDefines.h:
* wtf/Platform.h:

Tools:

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::attributedStringRangeIsMisspelled):
* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* DumpRenderTree/mac/DumpRenderTree.mm:
(activateTestingFonts):
(prepareConsistentTestingEnvironment):
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]):
(-[EventSendingController contextClick]):
* DumpRenderTree/mac/TextInputController.m:
* LayoutTestRelay/Configurations/Base.xcconfig:
* LayoutTestRelay/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[WK2BrowserWindowController webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[WK2BrowserWindowController webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm:
(-[DownloadDelegate _downloadDidFinish:]):
* TestWebKitAPI/Tests/mac/StringTruncator.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
(TestWebKitAPI::InjectedBundleController::platformInitialize):
* WebKitLauncher/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled):
* WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
(WTR::activateFonts):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
(WTR::TestController::webProcessName):
* WebKitTestRunner/mac/EventSenderProxy.mm:
* asan/asan.xcconfig:

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

5 years agoEnable WebKit disk cache on OS X
antti@apple.com [Sat, 31 Jan 2015 22:54:17 +0000 (22:54 +0000)]
Enable WebKit disk cache on OS X
https://bugs.webkit.org/show_bug.cgi?id=141022

Reviewed by Gavin Barraclough.

Source/WebKit2:

* config.h: Flip the switch.

LayoutTests:

* TestExpectations: Enable the test for cache functionality.

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

5 years agoUnreviewed, rolling out r179447.
antti@apple.com [Sat, 31 Jan 2015 22:51:19 +0000 (22:51 +0000)]
Unreviewed, rolling out r179447.

Forgot to include the test.

Reverted changeset:

"Enable WebKit disk cache on OS X"
https://bugs.webkit.org/show_bug.cgi?id=141022
http://trac.webkit.org/changeset/179447

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

5 years agoEnable WebKit disk cache on OS X
antti@apple.com [Sat, 31 Jan 2015 22:43:20 +0000 (22:43 +0000)]
Enable WebKit disk cache on OS X
https://bugs.webkit.org/show_bug.cgi?id=141022

Reviewed by Gavin Barraclough.

* config.h: Flip the switch.

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

5 years agoOSObjectPtr does not work with dispatch_data_t on Maverics
antti@apple.com [Sat, 31 Jan 2015 20:43:33 +0000 (20:43 +0000)]
OSObjectPtr does not work with dispatch_data_t on Maverics
https://bugs.webkit.org/show_bug.cgi?id=141081

Reviewed by Zalan Bujtas.

Previous attempt to special case dispatch_data_t in OSObjectPtr didn't work in all cases
probably due to the context sensitivity of the definition of the dispatch_data_t type.

For now, add DispatchPtr for the cache code and use it.

* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::DispatchPtr::DispatchPtr):
(WebKit::DispatchPtr::~DispatchPtr):
(WebKit::DispatchPtr::operator=):
(WebKit::DispatchPtr::get):
(WebKit::DispatchPtr::operator bool):
(WebKit::adoptDispatch):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::Data::Data):
(WebKit::NetworkCacheStorage::Data::data):
(WebKit::NetworkCacheStorage::NetworkCacheStorage):
(WebKit::createIOChannelForKey):
(WebKit::decodeEntry):
(WebKit::encodeEntryMetaData):
(WebKit::encodeEntry):

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

5 years agoMerge SimpleFontDataIOS.mm and SimpleFontDataMac.mm into FontCocoa.mm
weinig@apple.com [Sat, 31 Jan 2015 20:42:57 +0000 (20:42 +0000)]
Merge SimpleFontDataIOS.mm and SimpleFontDataMac.mm into FontCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=141101

Rubber-stamped by Dan Bernstein.

* WebCore.xcodeproj/project.pbxproj:
Remove SimpleFontDataIOS.mm and SimpleFontDataMac.mm. Add FontCocoa.mm.

* platform/graphics/Font.h:
Remove a few CG only functions from the header that can be implemented as static functions
in the implementation file.

* platform/graphics/cocoa/FontCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
(WebCore::fontFamilyShouldNotBeUsedForArabic):
(WebCore::Font::platformInit):
(WebCore::Font::platformCharWidthInit):
(WebCore::Font::platformCreateScaledFont):
(WebCore::Font::determinePitch):
(WebCore::renderingStyle):
(WebCore::advanceForColorBitmapFont):
(WebCore::hasCustomTracking):
(WebCore::canUseFastGlyphAdvanceGetter):
(WebCore::Font::platformWidthForGlyph):
(WebCore::Font::compositeFontReferenceFont):
(WebCore::copyFontTableForTag): Deleted.
(WebCore::Font::renderingStyle): Deleted.
Merge in the iOS specific parts.

* platform/graphics/ios/SimpleFontDataIOS.mm: Removed.
* platform/graphics/mac/SimpleFontDataMac.mm: Removed.

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

5 years agoRegression(r179438) Simple line layout: ASSERTION at SimpleLineLayout::FlowContentsIt...
zalan@apple.com [Sat, 31 Jan 2015 20:30:50 +0000 (20:30 +0000)]
Regression(r179438) Simple line layout: ASSERTION at SimpleLineLayout::FlowContentsIterator::runWidth().
https://bugs.webkit.org/show_bug.cgi?id=141121

Reviewed by Antti Koivisto.

When a breakable text fragment does not fit the current line, we split it.
The first part stays on the current line, while the second part gets pushed to the next line.
In certain cases, the first part could end up being empty.
This patch ensures that we don't measure empty fragments.

Covered by existing tests.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::splitFragmentToFitLine):

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

5 years agoUnreviewed, rolling out r179426.
commit-queue@webkit.org [Sat, 31 Jan 2015 18:28:17 +0000 (18:28 +0000)]
Unreviewed, rolling out r179426.
https://bugs.webkit.org/show_bug.cgi?id=141119

"caused a memory use regression" (Requested by Guest45 on
#webkit).

Reverted changeset:

"Use FastMalloc (bmalloc) instead of BlockAllocator for GC
pages"
https://bugs.webkit.org/show_bug.cgi?id=140900
http://trac.webkit.org/changeset/179426

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

5 years ago[Win] Unreviewed 64-bit build fix.
bfulgham@apple.com [Sat, 31 Jan 2015 18:12:55 +0000 (18:12 +0000)]
[Win] Unreviewed 64-bit build fix.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Correct symbol
definitions for 64-bit build.

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

5 years agoUnreviewed, rolling out r179408.
commit-queue@webkit.org [Sat, 31 Jan 2015 17:43:01 +0000 (17:43 +0000)]
Unreviewed, rolling out r179408.
https://bugs.webkit.org/show_bug.cgi?id=141117

This didn't fully fix the issue (Requested by anttik on
#webkit).

Reverted changeset:

"OSObjectPtr does not work with dispatch_data_t on Maverics"
https://bugs.webkit.org/show_bug.cgi?id=141081
http://trac.webkit.org/changeset/179408

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

5 years agohttps://trac.webkit.org/changeset/179439 breaks a python test
youenn.fablet@crf.canon.fr [Sat, 31 Jan 2015 11:24:04 +0000 (11:24 +0000)]
https://trac.webkit.org/changeset/179439 breaks a python test
https://bugs.webkit.org/show_bug.cgi?id=141114

Unreviewed.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer._install_modules): Checks whether WPTModules file exists before reading it as no such file exists in mock tests.

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

5 years agoImport W3C web platform tests infrastructure
youenn.fablet@crf.canon.fr [Sat, 31 Jan 2015 09:46:40 +0000 (09:46 +0000)]
Import W3C web platform tests infrastructure
https://bugs.webkit.org/show_bug.cgi?id=140934

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Initial import of the web-platform-tests repository.
This includes all infrastructure folders.
web-platform-tests submodules are downloaded when needed based on resources/WPTModules.

This patch also adds two tests from the domparsing folder to ensure
W3C test infrastructure works properly on WebKit bots.

* resources/WPTModules: Added
* web-platform-tests/.gitignore: Added.
* web-platform-tests/_certs: Added.
* web-platform-tests/common: Added.
* web-platform-tests/config.default.json: Added.
* web-platform-tests/fonts: Added.
* web-platform-tests/images: Added.
* web-platform-tests/resource: Added.
* web-platform-tests/serve.py: Added.
* web-platform-tests/tools: Added.
* web-platform-tests/w3c-import.log: Added
* web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt: Added.
* web-platform-tests/domparsing/DOMParser-parseFromString-html.html: Added.
* web-platform-tests/domparsing/insert-adjacent-expected.txt: Added.
* web-platform-tests/domparsing/insert-adjacent.html: Added.
* web-platform-tests/domparsing/w3c-import.log: Added.

Tools:

Loading necessary web platform tests modules before launching server.
Ensuring that some empty __init__.py files are present and create them if necessary.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:

LayoutTests:

* TestExpectations: added lines to skip web-platform-tests
infrastructure folders. Added one line for a partially passing test.

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

5 years agoSimple line layout: Improve FlowContentsIterator::TextFragment's encapsulation.
zalan@apple.com [Sat, 31 Jan 2015 06:26:02 +0000 (06:26 +0000)]
Simple line layout: Improve FlowContentsIterator::TextFragment's encapsulation.
https://bugs.webkit.org/show_bug.cgi?id=141090

Reviewed by Andreas Kling.

Make members private to avoid accidental change in TextFragment.

No change in functionality.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::addFragment):
(WebCore::SimpleLineLayout::LineState::addWhitespace):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::firstFragment):
(WebCore::SimpleLineLayout::createLineRuns):
* rendering/SimpleLineLayoutFlowContentsIterator.cpp:
(WebCore::SimpleLineLayout::FlowContentsIterator::nextTextFragment):
* rendering/SimpleLineLayoutFlowContentsIterator.h:
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::start):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::end):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::width):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::type):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isCollapsed):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isBreakable):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isEmpty):

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

5 years ago[Win] Another unreviewed test fix.
bfulgham@apple.com [Sat, 31 Jan 2015 05:27:06 +0000 (05:27 +0000)]
[Win] Another unreviewed test fix.

Correct copy/paste error in buildbot handling.

* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd.__init__):
(LayoutTestApacheHttpd._get_apache_config_file_path):

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

5 years ago[Win] Unreviewed test fix.
bfulgham@apple.com [Sat, 31 Jan 2015 04:59:31 +0000 (04:59 +0000)]
[Win] Unreviewed test fix.

Correct path handling based on failures on test bots to get things running again.

* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd.__init__):
(LayoutTestApacheHttpd._get_apache_config_file_path):

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

5 years agoSimple line layout: Make LineState fragment handling simpler.
zalan@apple.com [Sat, 31 Jan 2015 03:37:46 +0000 (03:37 +0000)]
Simple line layout: Make LineState fragment handling simpler.
https://bugs.webkit.org/show_bug.cgi?id=141100

Reviewed by Andreas Kling.

New fragments are appeneded to the Run's last entry
instead of accumulating them until after a new run is required.
(whitespace collapse or line end)
LineState::appendFragment manages whitespace collapsing now.
This makes createLineRuns() logic lighter and no need to "flush"
the LineState when the line ends.

No change in functionality.

* rendering/SimpleLineLayout.cpp: Make LineState members private and introduce getters.
(WebCore::SimpleLineLayout::LineState::setAvailableWidth):
(WebCore::SimpleLineLayout::LineState::setLogicalLeftOffset):
(WebCore::SimpleLineLayout::LineState::setOverflowedFragment):
(WebCore::SimpleLineLayout::LineState::availableWidth):
(WebCore::SimpleLineLayout::LineState::logicalLeftOffset):
(WebCore::SimpleLineLayout::LineState::overflowedFragment):
(WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace):
(WebCore::SimpleLineLayout::LineState::isWhitespaceOnly):
(WebCore::SimpleLineLayout::LineState::fits):
(WebCore::SimpleLineLayout::LineState::firstCharacterFits):
(WebCore::SimpleLineLayout::LineState::width):
(WebCore::SimpleLineLayout::LineState::appendFragment): Append each fragment to the Run
by either creating a new run or expanding the last one.
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace): Remove trailing whitespace from
the Run's and reset the trailing whitespace variables.
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::updateLineConstrains):
(WebCore::SimpleLineLayout::firstFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::LineState::createRun): Deleted.
(WebCore::SimpleLineLayout::LineState::addFragment): Deleted.
(WebCore::SimpleLineLayout::LineState::addWhitespace): Deleted.
(WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly): Deleted.

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

5 years agoDrop HistoryItem's m_prev / m_next
cdumez@apple.com [Sat, 31 Jan 2015 03:06:11 +0000 (03:06 +0000)]
Drop HistoryItem's m_prev / m_next
https://bugs.webkit.org/show_bug.cgi?id=141105

Reviewed by Zalan Bujtas.

Drop HistoryItem's m_prev / m_next. Those are no longer needed after
the PageCache refactoring in <http://trac.webkit.org/r179347>.

* history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
* history/HistoryItem.h:

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

5 years agoClean up: Remove unnecessary <dispatch/dispatch.h> header from RemoteInspectorDebugga...
commit-queue@webkit.org [Sat, 31 Jan 2015 02:23:28 +0000 (02:23 +0000)]
Clean up: Remove unnecessary <dispatch/dispatch.h> header from RemoteInspectorDebuggableConnection.h
https://bugs.webkit.org/show_bug.cgi?id=141067

Patch by Daniel Bates <dabates@apple.com> on 2015-01-30
Reviewed by Timothy Hatcher.

Remove the header <dispatch/dispatch.h> from RemoteInspectorDebuggableConnection.h as we
do not make use of its functionality. Instead, include this header in RemoteInspectorDebuggableConnection.mm
and RemoteInspector.mm. The latter depended on <dispatch/dispatch.h> being included via
header RemoteInspectorDebuggableConnection.h.

* inspector/remote/RemoteInspector.mm: Include header <dispatch/dispatch.h>.
* inspector/remote/RemoteInspectorDebuggableConnection.h: Remove header <dispatch/dispatch.h>.
* inspector/remote/RemoteInspectorDebuggableConnection.mm: Include header <dispatch/dispatch.h>.

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

5 years agoUpdate the comment in RenderLayer for clarity as related code location is changed
commit-queue@webkit.org [Sat, 31 Jan 2015 02:09:52 +0000 (02:09 +0000)]
Update the comment in RenderLayer for clarity as related code location is changed
https://bugs.webkit.org/show_bug.cgi?id=141103

Patch by Jeongmin Kim <jm86.kim@lge.com> on 2015-01-30
Reviewed by Simon Fraser.

Update the comment in RenderLayer for clarity as related code location is changed
The repainting in implicitClose() that is now called in setVisualUpdatesAllowed(bool) is removed

* rendering/RenderLayer.cpp:
(WebCore::shouldSuppressPaintingLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):

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

5 years agoOptimize MemoryCache::getSessionMap() a bit
cdumez@apple.com [Sat, 31 Jan 2015 01:39:28 +0000 (01:39 +0000)]
Optimize MemoryCache::getSessionMap() a bit
https://bugs.webkit.org/show_bug.cgi?id=141069

Reviewed by Anders Carlsson.

Optimize MemoryCache::getSessionMap() a bit by doing 1 HashMap lookup
instead of previously 3. Also rename the method to
ensureSessionResourceMap() as we usually don't use "get" prefix for
getters and the implementation will also create the HashMap value if
the key is not found.

Also add a alternative sessionResourceMap() method which returns
the HashMap value if the key exists but doesn't try to create it if
missing. This is actually what we really want for some call sites.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequest):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::getSessionMap): Deleted.
* loader/cache/MemoryCache.h:

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

5 years agoAdd and hook up APINavigationClient
timothy_horton@apple.com [Sat, 31 Jan 2015 01:28:05 +0000 (01:28 +0000)]
Add and hook up APINavigationClient
https://bugs.webkit.org/show_bug.cgi?id=140698

Reviewed by Sam Weinig.

Add a single APINavigationClient that NavigationState implements and
WebPageProxy prefers over APILoaderClient and APIPolicyClient.

* UIProcess/API/APILoaderClient.h:
Fix a comment.

* UIProcess/API/APINavigationClient.h: Added.
APINavigationClient is the union of NavigationState's overrides of APILoaderClient and APIPolicyClient.
Names are adjusted to more closely match the Modern API.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
Instead of having policy and loader clients, NavigationState has a single navigation client.
Adjust as necessary.

Move as much logic as possible (isMainFrame checks, construction of API objects) out of here
and into WebPageProxy.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Install the aforementioned single navigation client.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setNavigationClient):
Add a navigation client setter.

For all policy and loader client calls, if we have a navigation client, use that;
otherwise, fall back on the policy and loader clients.

* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoImplement ES6 Symbol
utatane.tea@gmail.com [Sat, 31 Jan 2015 01:23:56 +0000 (01:23 +0000)]
Implement ES6 Symbol
https://bugs.webkit.org/show_bug.cgi?id=140435

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch implements ES6 Symbol. In this patch, we don't support
Symbol.keyFor, Symbol.for, Object.getOwnPropertySymbols. They will be
supported in the subsequent patches.

Since ES6 Symbol is introduced as new primitive value, we implement
Symbol as a derived class from JSCell. And now JSValue accepts Symbol*
as a new primitive value.

Symbol has a *unique* flagged StringImpl* as an `uid`. Which pointer
value represents the Symbol's identity. So don't compare Symbol's
JSCell pointer value for comparison.
This enables re-producing Symbol primitive value from StringImpl* uid
by executing`Symbol::create(vm, uid)`. This is needed to produce
Symbol primitive values from stored StringImpl* in `Object.getOwnPropertySymbols`.

And Symbol.[[Description]] is folded into the string value of Symbol's uid.
By doing so, we can represent ES6 Symbol without extending current PropertyTable key; StringImpl*.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.order:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createBuiltinExecutable):
* builtins/BuiltinNames.h:
* dfg/DFGOperations.cpp:
(JSC::DFG::operationPutByValInternal):
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::subtype):
* interpreter/Interpreter.cpp:
* jit/JITOperations.cpp:
(JSC::getByVal):
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::getByVal):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
* runtime/CommonIdentifiers.h:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::opIn):
* runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::synthesizePrototype):
(JSC::JSValue::dumpInContextAssumingStructure):
(JSC::JSValue::toStringSlowCase):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::isSymbol):
(JSC::JSValue::isPrimitive):
(JSC::JSValue::toPropertyKey):

It represents ToPropertyKey abstract operation in the ES6 spec.
It cleans up the old implementation's `isName` checks.
And to prevent performance regressions in
    js/regress/fold-get-by-id-to-multi-get-by-offset-rare-int.html
    js/regress/fold-get-by-id-to-multi-get-by-offset.html
we annnotate this function as ALWAYS_INLINE.

(JSC::JSValue::getPropertySlot):
(JSC::JSValue::get):
(JSC::JSValue::equalSlowCaseInline):
(JSC::JSValue::strictEqualSlowCaseInline):
* runtime/JSCell.cpp:
(JSC::JSCell::put):
(JSC::JSCell::putByIndex):
(JSC::JSCell::toPrimitive):
(JSC::JSCell::getPrimitiveNumber):
(JSC::JSCell::toNumber):
(JSC::JSCell::toObject):
* runtime/JSCell.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::isSymbol):
(JSC::JSCell::toBoolean):
(JSC::JSCell::pureToBoolean):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::symbolPrototype):
(JSC::JSGlobalObject::symbolObjectStructure):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Stringifier):
* runtime/JSSymbolTableObject.cpp:
(JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):
* runtime/JSType.h:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::isName): Deleted.
* runtime/MapData.cpp:
(JSC::MapData::find):
(JSC::MapData::add):
(JSC::MapData::remove):
(JSC::MapData::replaceAndPackBackingStore):
* runtime/MapData.h:
(JSC::MapData::clear):
* runtime/NameInstance.h: Removed.
* runtime/NamePrototype.cpp: Removed.
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncPropertyIsEnumerable):
* runtime/Operations.cpp:
(JSC::jsTypeStringForValue):
(JSC::jsIsObjectType):
* runtime/PrivateName.h:
(JSC::PrivateName::PrivateName):
(JSC::PrivateName::operator==):
(JSC::PrivateName::operator!=):
* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::find):
(JSC::PropertyTable::get):
* runtime/PropertyName.h:
(JSC::PropertyName::PropertyName):
(JSC::PropertyName::publicName):
* runtime/SmallStrings.h:
* runtime/StringConstructor.cpp:
(JSC::callStringConstructor):

In ES6, String constructor accepts Symbol to execute `String(symbol)`.

* runtime/Structure.cpp:
(JSC::Structure::getPropertyNamesFromStructure):
* runtime/StructureInlines.h:
(JSC::Structure::prototypeForLookup):
* runtime/Symbol.cpp: Added.
(JSC::Symbol::Symbol):
(JSC::SymbolObject::create):
(JSC::Symbol::toPrimitive):
(JSC::Symbol::toBoolean):
(JSC::Symbol::getPrimitiveNumber):
(JSC::Symbol::toObject):
(JSC::Symbol::toNumber):
(JSC::Symbol::destroy):
(JSC::Symbol::descriptiveString):
* runtime/Symbol.h: Added.
(JSC::Symbol::createStructure):
(JSC::Symbol::create):
(JSC::Symbol::privateName):
(JSC::Symbol::finishCreation):
(JSC::asSymbol):
* runtime/SymbolConstructor.cpp: Renamed from Source/JavaScriptCore/runtime/NameConstructor.cpp.
(JSC::SymbolConstructor::SymbolConstructor):
(JSC::SymbolConstructor::finishCreation):
(JSC::callSymbol):
(JSC::SymbolConstructor::getConstructData):
(JSC::SymbolConstructor::getCallData):
* runtime/SymbolConstructor.h: Renamed from Source/JavaScriptCore/runtime/NameConstructor.h.
(JSC::SymbolConstructor::create):
(JSC::SymbolConstructor::createStructure):
* runtime/SymbolObject.cpp: Renamed from Source/JavaScriptCore/runtime/NameInstance.cpp.
(JSC::SymbolObject::SymbolObject):
(JSC::SymbolObject::finishCreation):
(JSC::SymbolObject::defaultValue):

Now JSC doesn't support @@toPrimitive. So instead of it, we implement
Symbol.prototype[@@toPrimitive] as ES5 Symbol.[[DefaultValue]].

* runtime/SymbolObject.h: Added.
(JSC::SymbolObject::create):
(JSC::SymbolObject::internalValue):
(JSC::SymbolObject::createStructure):
* runtime/SymbolPrototype.cpp: Added.
(JSC::SymbolPrototype::SymbolPrototype):
(JSC::SymbolPrototype::finishCreation):
(JSC::SymbolPrototype::getOwnPropertySlot):
(JSC::symbolProtoFuncToString):
(JSC::symbolProtoFuncValueOf):
* runtime/SymbolPrototype.h: Renamed from Source/JavaScriptCore/runtime/NamePrototype.h.
(JSC::SymbolPrototype::create):
(JSC::SymbolPrototype::createStructure):

SymbolPrototype object is ordinary JS object. Not wrapper object of Symbol.
It is tested in js/symbol-prototype-is-ordinary-object.html.

* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Source/WTF:

Introduce new unique string mechanizm into StringImpl.
It is used for implementing Symbol which holds a [[Description]] value.

* wtf/text/AtomicString.h:
(WTF::AtomicString::add):
(WTF::AtomicString::addWithStringTableProvider):

Previously, we checked `isAtomic()` or `!length()`. This guard can filter out EmptyUnique.
But now, we introduced new unique StringImpl. Since it has an actual string value, we need to check `isUnique()`.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::createUnique):

In createUnique, we leverage Substring mechanizm to produce a new unique
string from an existing string.

* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createUniqueEmpty):
(WTF::StringImpl::flagIsUnique):
(WTF::StringImpl::isUnique):
(WTF::StringImpl::setIsAtomic):
(WTF::StringImpl::createEmptyUnique): Deleted.
(WTF::StringImpl::isEmptyUnique): Deleted.

Instead of EmptyUnique, we introduced new flag to StringImpl, `isUnique`.
While EmptyUnique cannot hold any string values except for empty string,
the unique StringImpl can hold any String values.
We fold the Symbol's descriptiveString value here.

* wtf/text/StringStatics.cpp:
(WTF::StringImpl::hashAndFlagsForUnique):
(WTF::StringImpl::hashAndFlagsForEmptyUnique): Deleted.

LayoutTests:

* js/script-tests/symbol-abstract-equality-comparison.js: Added.
(Pair):
(relationalOperators.forEach):
* js/script-tests/symbol-abstract-relational-comparison.js: Added.
(relationalOperators.forEach):
* js/script-tests/symbol-in-map.js: Added.
(set shouldBe):
* js/script-tests/symbol-object.js: Added.
* js/script-tests/symbol-prototype-is-ordinary-object.js: Added.
* js/script-tests/symbol-strict-equality-comparison.js: Added.
(Pair):
(relationalOperators.forEach):
* js/script-tests/symbol-tostring.js: Added.
* js/script-tests/symbols.js: Renamed from LayoutTests/js/script-tests/names.js.
(forIn):
* js/symbol-abstract-equality-comparison-expected.txt: Added.
* js/symbol-abstract-equality-comparison.html: Copied from LayoutTests/js/names.html.
* js/symbol-abstract-relational-comparison-expected.txt: Added.
* js/symbol-abstract-relational-comparison.html: Copied from LayoutTests/js/names.html.
* js/symbol-in-map-expected.txt: Added.
* js/symbol-in-map.html: Copied from LayoutTests/js/names.html.
* js/symbol-object-expected.txt: Added.
* js/symbol-object.html: Copied from LayoutTests/js/names.html.
* js/symbol-prototype-is-ordinary-object-expected.txt: Added.
* js/symbol-prototype-is-ordinary-object.html: Copied from LayoutTests/js/names.html.
* js/symbol-strict-equality-comparison-expected.txt: Added.
* js/symbol-strict-equality-comparison.html: Copied from LayoutTests/js/names.html.
* js/symbol-tostring-expected.txt: Added.
* js/symbol-tostring.html: Copied from LayoutTests/js/names.html.
* js/symbols-expected.txt: Renamed from LayoutTests/js/names-expected.txt.
* js/symbols.html: Renamed from LayoutTests/js/names.html.

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

5 years agoUnreviewed. Remove outdated comment.
cdumez@apple.com [Sat, 31 Jan 2015 01:22:54 +0000 (01:22 +0000)]
Unreviewed. Remove outdated comment.

* loader/cache/MemoryCache.cpp:

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

5 years agoRemove MediaPlayerProxy.h
eric.carlson@apple.com [Sat, 31 Jan 2015 00:58:01 +0000 (00:58 +0000)]
Remove MediaPlayerProxy.h
https://bugs.webkit.org/show_bug.cgi?id=141087

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Remove reference to MediaPlayerProxy.h.
* platform/graphics/mac/MediaPlayerProxy.h: Removed.

Source/WebKit/mac:

* MigrateHeaders.make: Don't need to copy MediaPlayerProxy.h.
* Plugins/WebPluginController.mm: Don't include MediaPlayerProxy.h.

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

5 years agoUse FastMalloc (bmalloc) instead of BlockAllocator for GC pages
ggaren@apple.com [Sat, 31 Jan 2015 00:51:05 +0000 (00:51 +0000)]
Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
https://bugs.webkit.org/show_bug.cgi?id=140900

Reviewed by Mark Hahnenberg.

Re-landing just the HandleBlock piece of this patch.

Source/JavaScriptCore:

* heap/HandleBlock.h:
* heap/HandleBlockInlines.h:
(JSC::HandleBlock::create):
(JSC::HandleBlock::destroy):
(JSC::HandleBlock::HandleBlock):
(JSC::HandleBlock::payloadEnd):
* heap/HandleSet.cpp:
(JSC::HandleSet::~HandleSet):
(JSC::HandleSet::grow):

Source/WebCore:

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::install):

Source/WTF:

* wtf/FastMalloc.cpp:
(WTF::fastAlignedMalloc):
(WTF::fastAlignedFree):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/FastMalloc.h:

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

5 years ago[EFL] Gardening: update some accessibility tests as failed
commit-queue@webkit.org [Sat, 31 Jan 2015 00:40:21 +0000 (00:40 +0000)]
[EFL] Gardening: update some accessibility tests as failed
https://bugs.webkit.org/show_bug.cgi?id=141034

Unreviewed EFL gardening.

Patch by Dariusz Frankiewicz <d.frankiewic@samsung.com> on 2015-01-30

* platform/efl/TestExpectations:
* platform/efl/accessibility/roles-exposed-expected.txt:
update expectation after bumping ATK to 2.15.2

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

5 years agoCall vsnprintf instead of _vsnprintf in vprintf_stderr_common
commit-queue@webkit.org [Sat, 31 Jan 2015 00:39:40 +0000 (00:39 +0000)]
Call vsnprintf instead of _vsnprintf in vprintf_stderr_common
https://bugs.webkit.org/show_bug.cgi?id=141078

In windows _vsnprintf api does not place null character
automatically. Simply replace it with vsnprintf. Which is
polyfill to call wtf_vsnprintf in windows.

Patch by Namhoon Kim <yanhkim@gmail.com> on 2015-01-30
Reviewed by Brent Fulgham.

* wtf/Assertions.cpp:

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

5 years ago[EFL] Mark test css3/masking/mask-repeat-space-padding.html as passing
commit-queue@webkit.org [Sat, 31 Jan 2015 00:37:17 +0000 (00:37 +0000)]
[EFL] Mark test css3/masking/mask-repeat-space-padding.html as passing
https://bugs.webkit.org/show_bug.cgi?id=141077

Unreviewed EFL gardening.

Patch by Piotr Pajak <p.pajak@samsung.com> on 2015-01-30

* platform/efl/TestExpectations:

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

5 years agoGC marking threads should clear malloc caches
ggaren@apple.com [Sat, 31 Jan 2015 00:29:22 +0000 (00:29 +0000)]
GC marking threads should clear malloc caches
https://bugs.webkit.org/show_bug.cgi?id=141097

Reviewed by Sam Weinig.

Follow-up based on Mark Hahnenberg's review: Release after the copy
phase, rather than after any phase, since we'd rather not release
between marking and copying.

* heap/GCThread.cpp:
(JSC::GCThread::waitForNextPhase):
(JSC::GCThread::gcThreadMain):

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

5 years agoUpdate MemoryCache code to use more references instead of pointers
cdumez@apple.com [Sat, 31 Jan 2015 00:04:36 +0000 (00:04 +0000)]
Update MemoryCache code to use more references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=141099

Reviewed by Andreas Kling.
Source/WebKit2:

* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::clearCacheForOrigin):

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

5 years agoWeb Inspector: ASSERT in InspectorTimelineAgent::internalStop
burg@cs.washington.edu [Fri, 30 Jan 2015 23:56:58 +0000 (23:56 +0000)]
Web Inspector: ASSERT in InspectorTimelineAgent::internalStop
https://bugs.webkit.org/show_bug.cgi?id=141039

Reviewed by Timothy Hatcher.

Source/WebCore:

Don't unconditionally stop the environment stopwatch, since it could have
already stopped due to the debugger pausing.

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

Source/WTF:

Add messages to Stopwatch assertions, and clean up constructor.

* wtf/Stopwatch.h:
(WTF::Stopwatch::Stopwatch):
(WTF::Stopwatch::start):
(WTF::Stopwatch::stop):

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

5 years agoRemote Web Inspector should not show undock toolbar buttons
commit-queue@webkit.org [Fri, 30 Jan 2015 23:56:45 +0000 (23:56 +0000)]
Remote Web Inspector should not show undock toolbar buttons
https://bugs.webkit.org/show_bug.cgi?id=141061

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

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Be sure to update the toolbar's dock navigation icons because they
may need to be hidden (the default state).

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

5 years ago[EFL] Rebaseline efl/js/dom/global-constructors-attributes-expected.txt
commit-queue@webkit.org [Fri, 30 Jan 2015 23:55:45 +0000 (23:55 +0000)]
[EFL] Rebaseline efl/js/dom/global-constructors-attributes-expected.txt
https://bugs.webkit.org/show_bug.cgi?id=141029

Unreviewed EFL gardening

Patch by Karol Pawlowski <k.pawlowski@samsung.com> on 2015-01-30

* platform/efl/js/dom/global-constructors-attributes-expected.txt:

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

5 years agoAdd match_constness<Reference, T> helper struct
cdumez@apple.com [Fri, 30 Jan 2015 23:32:01 +0000 (23:32 +0000)]
Add match_constness<Reference, T> helper struct
https://bugs.webkit.org/show_bug.cgi?id=140905

Reviewed by Benjamin Poulain.

Add match_constness<Reference, T> helper struct to simplify downcast<>()
a bit. The purpose of this helper is to update T's constness to match
Reference's.

* wtf/TypeCasts.h:
(WTF::downcast):

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

5 years agoAdd assertion in RefPtr's operator*() to make sure we don't dereference nullptr
cdumez@apple.com [Fri, 30 Jan 2015 23:25:55 +0000 (23:25 +0000)]
Add assertion in RefPtr's operator*() to make sure we don't dereference nullptr
https://bugs.webkit.org/show_bug.cgi?id=141092

Reviewed by Anders Carlsson.

Add assertion in RefPtr's operator*() to make sure we don't dereference
nullptr.

* wtf/RefPtr.h:
(WTF::RefPtr::operator*):

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

5 years agoUnreviewed. Fix Windows build after r179409.
cdumez@apple.com [Fri, 30 Jan 2015 23:13:31 +0000 (23:13 +0000)]
Unreviewed. Fix Windows build after r179409.

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::notifyDone):
(TestRunner::queueLoad):

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

5 years agoWhen no background-size is specified on the 2nd background layer, it takes the first...
cdumez@apple.com [Fri, 30 Jan 2015 22:54:34 +0000 (22:54 +0000)]
When no background-size is specified on the 2nd background layer, it takes the first instead of the initial value
https://bugs.webkit.org/show_bug.cgi?id=141059

Reviewed by Antti Koivisto.

Source/WebCore:

This patch fixes fill size support for 'initial' value.

Test: fast/css/background-layers-initial-size.html

* css/CSSToStyleMap.cpp:
- Add check for initial values and set fill size to initialFillSize()
  in this case (which is 'auto'). Previously, we were handling all
  non CSSPrimitiveValues the same way and setting the fill size type
  to SizeNone, which means no size (not 'auto').
- Clean up the rest of the function (no behavior change).

* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::FillLayer):
- Initialize m_sizeLength to SizeNone instead of calling
  initialFillSizeType(). There is no behavior change here. However,
  initialFillSizeType() was not supposed to return SizeNone.
- Stop explicitly initializing m_sizeLength to LengthSize() as this
  is already what happens implicitly.

* rendering/style/FillLayer.h:
(WebCore::FillLayer::initialFillSize):
Return FillSize() instead of FillSize(SizeNone, LengthSize()).
FillSize() is equivalent to FillSize(SizeLength, LengthSize())
which is resolved to 'auto'. SizeNone means no size which isn't
what we want as an initial value.

(WebCore::FillLayer::initialFillSizeType): Deleted.
(WebCore::FillLayer::initialFillSizeLength): Deleted.
Remove Individual initialFillSizeType() / initialFillSizeLength()
functions now that all caller use initialFillSize() instead.

LayoutTests:

Add layout test to cover the case where we have 2 background layers, with an explicit
size only for the first one.

* fast/css/background-layers-initial-size-expected.txt: Added.
* fast/css/background-layers-initial-size.html: Added.

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

5 years agoGC marking threads should clear malloc caches
ggaren@apple.com [Fri, 30 Jan 2015 22:27:56 +0000 (22:27 +0000)]
GC marking threads should clear malloc caches
https://bugs.webkit.org/show_bug.cgi?id=141097

Reviewed by Andreas Kling.

Split the scavenging API into per-thread vs global, so that you can
request to scavenge your own thread without scavenging the whole heap.

Source/bmalloc:

* bmalloc/Cache.cpp:
(bmalloc::Cache::scavenge):
* bmalloc/bmalloc.h:
(bmalloc::api::scavengeThisThread):
(bmalloc::api::scavenge):

Source/WTF:

* wtf/FastMalloc.cpp:
(WTF::releaseFastMallocFreeMemoryForThisThread):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/FastMalloc.h:

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

5 years agoGC marking threads should clear malloc caches
ggaren@apple.com [Fri, 30 Jan 2015 22:22:57 +0000 (22:22 +0000)]
GC marking threads should clear malloc caches
https://bugs.webkit.org/show_bug.cgi?id=141097

Reviewed by Andreas Kling.

This is an attempt to ameliorate a potential memory use regression
caused by https://bugs.webkit.org/show_bug.cgi?id=140900
Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages.

FastMalloc may accumulate a per-thread cache on each of the 8-ish
GC marking threads, which can be expensive.

* heap/GCThread.cpp:
(JSC::GCThread::waitForNextPhase): Scavenge the current thread before
going to sleep. There's probably not too much value to keeping our
per-thread cache between GCs, and it has some memory footprint.

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

5 years agoUnreviewed, rolling out r179403.
cdumez@apple.com [Fri, 30 Jan 2015 22:00:22 +0000 (22:00 +0000)]
Unreviewed, rolling out r179403.
https://bugs.webkit.org/show_bug.cgi?id=141091

Broke fast/files/workers/worker-apply-blob-url-to-xhr.html
(Requested by ap_ on #webkit).

Reverted changeset:

"Optimize MemoryCache::getSessionMap() a bit"
https://bugs.webkit.org/show_bug.cgi?id=141069
http://trac.webkit.org/changeset/179403

Patch by Commit Queue <commit-queue@webkit.org> on 2015-01-30

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

5 years agoRename shared() static member functions to singleton() for singleton classes.
cdumez@apple.com [Fri, 30 Jan 2015 20:49:33 +0000 (20:49 +0000)]
Rename shared() static member functions to singleton() for singleton classes.
https://bugs.webkit.org/show_bug.cgi?id=141088

Reviewed by Ryosuke Niwa and Benjamin Poulain.

Rename shared() static member functions to singleton() for singleton
classes as per the recent coding style change.
Source/JavaScriptCore:

* inspector/remote/RemoteInspector.h:
* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::singleton):
(Inspector::RemoteInspector::start):
(Inspector::RemoteInspector::shared): Deleted.
* inspector/remote/RemoteInspectorDebuggable.cpp:
(Inspector::RemoteInspectorDebuggable::~RemoteInspectorDebuggable):
(Inspector::RemoteInspectorDebuggable::init):
(Inspector::RemoteInspectorDebuggable::update):
(Inspector::RemoteInspectorDebuggable::setRemoteDebuggingAllowed):
(Inspector::RemoteInspectorDebuggable::pauseWaitingForAutomaticInspection):
(Inspector::RemoteInspectorDebuggable::unpauseForInitializedInspector):
* inspector/remote/RemoteInspectorDebuggableConnection.mm:
(Inspector::RemoteInspectorDebuggableConnection::setup):
(Inspector::RemoteInspectorDebuggableConnection::sendMessageToFrontend):

Source/WebKit:

* Storage/WebDatabaseProvider.cpp:
(WebDatabaseProvider::singleton):
(WebDatabaseProvider::shared): Deleted.
* Storage/WebDatabaseProvider.h:

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

5 years agoOSObjectPtr does not work with dispatch_data_t on Maverics
antti@apple.com [Fri, 30 Jan 2015 20:46:00 +0000 (20:46 +0000)]
OSObjectPtr does not work with dispatch_data_t on Maverics
https://bugs.webkit.org/show_bug.cgi?id=141081

Reviewed by Pratik Solanki.
Source/WTF:

Trying to use OSObjectPtr<dispatch_data_t> throws

-[OS_dispatch_data _xref_dispose]: unrecognized selector sent to instance 0

* wtf/OSObjectPtr.h:
(WTF::retainOSObject<dispatch_data_t>):
(WTF::releaseOSObject<dispatch_data_t>):

    Add specialization for dispatch_data_t on Maverics.

Tools:

* TestWebKitAPI/Tests/WTF/darwin/OSObjectPtr.cpp:
(TestWebKitAPI::TEST):

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

5 years agoUse FastMalloc (bmalloc) instead of BlockAllocator for GC pages
ggaren@apple.com [Fri, 30 Jan 2015 19:57:35 +0000 (19:57 +0000)]
Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
https://bugs.webkit.org/show_bug.cgi?id=140900

Reviewed by NOBODY (OOPS!).

Re-landing just the CopyWorkListSegment piece of this patch.

* heap/CopiedBlockInlines.h:
(JSC::CopiedBlock::reportLiveBytes):
* heap/CopyWorkList.h:
(JSC::CopyWorkListSegment::create):
(JSC::CopyWorkListSegment::destroy):
(JSC::CopyWorkListSegment::CopyWorkListSegment):
(JSC::CopyWorkList::CopyWorkList):
(JSC::CopyWorkList::~CopyWorkList):
(JSC::CopyWorkList::append):

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

5 years agoSource/WebCore:
mmirman@apple.com [Fri, 30 Jan 2015 19:09:14 +0000 (19:09 +0000)]
Source/WebCore:
Added ClientRect as an interface that requires attributes
on instance for compatibility.
https://bugs.webkit.org/show_bug.cgi?id=141063
<rdar://problem/18437653>

Reviewed by Oliver Hunt.

Added a new test to LayoutTests/js/resources/JSON-stringify.js

* bindings/scripts/CodeGeneratorJS.pm:
(InterfaceRequiresAttributesOnInstanceForCompatibility):

LayoutTests:
Added a test for JSON.stringify on ClientRect.
https://bugs.webkit.org/show_bug.cgi?id=141063
<rdar://problem/18437653>

Reviewed by Oliver Hunt.

* js/resources/JSON-stringify.js:
(createTests.var):
(createTests.result):
* js/resources/JSON-stringify-expected.txt:

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

5 years ago[Win] Switch to Apache on Windows
bfulgham@apple.com [Fri, 30 Jan 2015 18:26:36 +0000 (18:26 +0000)]
[Win] Switch to Apache on Windows
https://bugs.webkit.org/show_bug.cgi?id=141060

Reviewed by Alexey Proskuryakov.

Tools:

Update our scripts under Windows (and Cygwin) to locate and use
the XAMPP installation of Apache for running tests.

* Scripts/run-webkit-httpd:
* Scripts/webkitperl/httpd.pm:
(getHTTPDPath):
(getDefaultConfigForTestDirectory):
(getHTTPDConfigPathForTestDirectory):
* Scripts/webkitpy/common/system/executive_unittest.py:
(ExecutiveTest.serial_test_kill_process):
* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd.__init__):
(LayoutTestApacheHttpd._get_apache_config_file_path):
(LayoutTestApacheHttpd._stop_running_server):
* Scripts/webkitpy/layout_tests/servers/http_server_base.py:
(HttpServerBase._is_server_running_on_all_ports):
* Scripts/webkitpy/port/base.py:
(Port._apache_config_file_name_for_platform):
* Scripts/webkitpy/port/port_testcase.py:
(test_apache_config_file_name_for_platform):
* Scripts/webkitpy/port/win.py:
(WinPort.show_results_html_file):
(WinPort._uses_apache):
(WinPort):
(WinPort._path_to_apache):

LayoutTests:

Add a new Windows XAMPP Apache configuration file for running
the http test suite on Windows.

Reviewed by Alexey Proskuryakov.

* http/conf/apache2.4-httpd-win.conf: Added.

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

5 years agoBuild fix.
ap@apple.com [Fri, 30 Jan 2015 18:08:59 +0000 (18:08 +0000)]
Build fix.

* Shared/API/c/WKDeprecatedFunctions.cpp:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
The screen font substitution functions still need to be present in the header.

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

5 years agoOptimize MemoryCache::getSessionMap() a bit
cdumez@apple.com [Fri, 30 Jan 2015 17:43:45 +0000 (17:43 +0000)]
Optimize MemoryCache::getSessionMap() a bit
https://bugs.webkit.org/show_bug.cgi?id=141069

Reviewed by Anders Carlsson.

Optimize MemoryCache::getSessionMap() a bit by doing 1 HashMap lookup
instead of previously 3. Also rename the method to sessionResources()
as we usually don't use "get" prefix for getters.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::sessionResources):
(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequest):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::getSessionMap): Deleted.
* loader/cache/MemoryCache.h:

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

5 years agoStore MemoryCache's live decoded resources in a ListHashSet
cdumez@apple.com [Fri, 30 Jan 2015 17:40:51 +0000 (17:40 +0000)]
Store MemoryCache's live decoded resources in a ListHashSet
https://bugs.webkit.org/show_bug.cgi?id=141051

Reviewed by Antti Koivisto.

Store MemoryCache's live decoded resources in a ListHashSet instead of
a linked list. The frequent operations are:
1. Add items to one end
2. Remove items from the other end or anywhere in the container by value

Using a ListHashSet instead of a manual linked list results in *much*
simpler / shorter code and is fast for all operations (faster than
linked list even for removing an given element from the container given
its value). The previous implementation required us to keep a lot of
pointers up-to-date, which was error prone.

This is a first step towards simplifying the MemoryCache implementation.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::setDecodedSize):
(WebCore::CachedResource::didAccessDecodedData):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::inLiveDecodedResourcesList): Deleted.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
(WebCore::MemoryCache::removeFromLiveDecodedResourcesList):
(WebCore::MemoryCache::insertInLiveDecodedResourcesList):
* loader/cache/MemoryCache.h:
(WebCore::MemoryCache::inLiveDecodedResourcesList):

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

5 years agoAdd "Singleton pattern" section to the WebKit coding style
cdumez@apple.com [Fri, 30 Jan 2015 17:38:39 +0000 (17:38 +0000)]
Add "Singleton pattern" section to the WebKit coding style
https://bugs.webkit.org/show_bug.cgi?id=141040

Reviewed by Ryosuke Niwa.

Add "Singleton pattern" section to the WebKit coding style to document
what was discussed on webkit-dev:
https://lists.webkit.org/pipermail/webkit-dev/2015-January/027199.html

* coding/coding-style.html:

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

5 years ago[cairo] Fix #if guards in platform/graphics/cairo directory
ossy@webkit.org [Fri, 30 Jan 2015 13:56:50 +0000 (13:56 +0000)]
[cairo] Fix #if guards in platform/graphics/cairo directory
https://bugs.webkit.org/show_bug.cgi?id=141076

Reviewed by Sergio Villar Senin.

* platform/graphics/cairo/BackingStoreBackendCairo.h:
* platform/graphics/cairo/BitmapImageCairo.cpp:
* platform/graphics/cairo/CairoUtilities.cpp:
* platform/graphics/cairo/CairoUtilities.h:
* platform/graphics/cairo/DrawErrorUnderline.h:
* platform/graphics/cairo/DrawingBufferCairo.cpp:
* platform/graphics/cairo/FloatRectCairo.cpp:
* platform/graphics/cairo/FontCairo.cpp:
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
* platform/graphics/cairo/FontCustomPlatformData.h:
* platform/graphics/cairo/GradientCairo.cpp:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/cairo/ImageBufferDataCairo.h:
* platform/graphics/cairo/ImageCairo.cpp:
* platform/graphics/cairo/IntRectCairo.cpp:
* platform/graphics/cairo/OwnPtrCairo.cpp:
* platform/graphics/cairo/OwnPtrCairo.h:
* platform/graphics/cairo/PathCairo.cpp:
* platform/graphics/cairo/PatternCairo.cpp:
* platform/graphics/cairo/PlatformContextCairo.cpp:
* platform/graphics/cairo/PlatformContextCairo.h:
* platform/graphics/cairo/PlatformPathCairo.cpp:
* platform/graphics/cairo/PlatformPathCairo.h:
* platform/graphics/cairo/RefPtrCairo.cpp:
* platform/graphics/cairo/RefPtrCairo.h:
* platform/graphics/cairo/TileCairo.h:
* platform/graphics/cairo/TransformationMatrixCairo.cpp:

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

5 years ago[GTK] Resize the redirected XComposite again after leaving accelerated compositing...
carlosgc@webkit.org [Fri, 30 Jan 2015 07:38:13 +0000 (07:38 +0000)]
[GTK] Resize the redirected XComposite again after leaving accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=140935

Reviewed by Sergio Villar Senin.

Since r178414 we don't resize the redirected XComposite window
until we enter accelerated compositing mode, but after leaving it
the redirected window keeps its size. We should resize it to 1x1
again and free the XPixmap and cairo surface to save that memory
while not in accelerated compositing mode.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::enterAcceleratedCompositingMode): Notify
the WebKitWebViewBase.
(WebKit::PageClientImpl::exitAcceleratedCompositingMode): Ditto.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseEnterAcceleratedCompositingMode): Resize the
XComposite window to the current drawing area size.
(webkitWebViewBaseExitAcceleratedCompositingMode): Resize the
XComposite window to and empty size.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
Do not initialize m_size since we now handle the empty size as a
especial case. Make sure we always create the X window with at
least 1x1 size.
(WebKit::RedirectedXCompositeWindow::resize): Resize the window to
at least 1x1, but when en empty size is given, call
cleanupPixmapAndPixmapSurface() to release those resources.
(WebKit::RedirectedXCompositeWindow::surface): Create the cairo
surface with at least 1x1 size.

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

5 years agoWeb Inspector: Allow text selection when the BasicBlockAnnotator is enabled
saambarati1@gmail.com [Fri, 30 Jan 2015 07:24:20 +0000 (07:24 +0000)]
Web Inspector: Allow text selection when the BasicBlockAnnotator is enabled
https://bugs.webkit.org/show_bug.cgi?id=140987

Reviewed by Timothy Hatcher.

Because the BasicBlockAnnotator no longer sets the background color of
lines that haven't executed to gray, text selection while the
BasicBlockAnnotator is enabled no longer results in a bad user interface.
This patch both allows text selection while the BasicBlockAnnotator is
enabled and also removes the now unused listeners to CodeMirror's focus
and blur events.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler.scrollHandler):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler):
(WebInspector.SourceCodeTextEditor.prototype.gainedFocus): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.lostFocus): Deleted.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.gainedFocus): Deleted.
(WebInspector.TextEditor.prototype.lostFocus): Deleted.

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

5 years ago[GTK] Runtime critical warnings sometimes at start up when using the network process
carlosgc@webkit.org [Fri, 30 Jan 2015 07:23:00 +0000 (07:23 +0000)]
[GTK] Runtime critical warnings sometimes at start up when using the network process
https://bugs.webkit.org/show_bug.cgi?id=140998

Reviewed by Žan Doberšek.

This is caused by the CustomProtocolManager work queue
theread. This WorkQueue is created when the CustomProtocolManager
object is constructed, but destroyed when it's initialized when
the UI process asks to use the network process. In this case,
sometimes happens that the work queue thread that runs the main
loop is executed once the object has been destroyed and the main
loop pointer is nullptr.

* Platform/WorkQueue.h:
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::platformInitialize): Use a lambda function for the
thread body.
(WorkQueue::platformInvalidate): Detach the worker thread before
deleting the main loop object.
(WorkQueue::startWorkQueueThread): Deleted.
(WorkQueue::workQueueThreadBody): Deleted.

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

5 years agoUnreviewed. Further rebaselining after r179368.
cdumez@apple.com [Fri, 30 Jan 2015 06:44:51 +0000 (06:44 +0000)]
Unreviewed. Further rebaselining after r179368.

* platform/mac-mavericks/fast/forms/select-visual-hebrew-expected.txt: Added.

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

5 years agoUnreviewed, gardening on EFL port. some tests aren't flaky anymore.
gyuyoung.kim@samsung.com [Fri, 30 Jan 2015 05:51:20 +0000 (05:51 +0000)]
Unreviewed, gardening on EFL port. some tests aren't flaky anymore.
Unskip those tests on EFL port.

* platform/efl/TestExpectations:

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

5 years agoUnreviewed, rolling out r179357 and r179358.
akling@apple.com [Fri, 30 Jan 2015 04:28:36 +0000 (04:28 +0000)]
Unreviewed, rolling out r179357 and r179358.
https://bugs.webkit.org/show_bug.cgi?id=141062

Suspect this caused WebGL tests to start flaking (Requested by
kling on #webkit).

Reverted changesets:

"Polymorphic call inlining should be based on polymorphic call
inline caching rather than logging"
https://bugs.webkit.org/show_bug.cgi?id=140660
http://trac.webkit.org/changeset/179357

"Unreviewed, fix no-JIT build."
http://trac.webkit.org/changeset/179358

Patch by Commit Queue <commit-queue@webkit.org> on 2015-01-29

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

5 years agoRemove SVGUseElement.instanceRoot and all tests that depend on it
darin@apple.com [Fri, 30 Jan 2015 04:23:51 +0000 (04:23 +0000)]
Remove SVGUseElement.instanceRoot and all tests that depend on it
https://bugs.webkit.org/show_bug.cgi?id=141025

Reviewed by Anders Carlsson.

Source/WebCore:

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::instanceRoot): Deleted.
* svg/SVGUseElement.h: Removed instanceRoot.
* svg/SVGUseElement.idl: Ditto.

LayoutTests:

* platform/gtk/TestExpectations: Removed expected failure for now-removed test.
* platform/ios-simulator-wk2/TestExpectations: Ditto.
* platform/mac/TestExpectations: Ditto.

* platform/gtk/svg/custom/use-elementInstance-event-target-expected.png: Removed.
* platform/gtk/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
* platform/gtk/svg/custom/use-elementInstance-methods-expected.png: Removed.
* platform/gtk/svg/custom/use-elementInstance-methods-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/custom/use-elementInstance-methods-expected.txt: Removed.
* platform/ios-simulator/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
* platform/ios-simulator/svg/custom/use-elementInstance-methods-expected.txt: Removed.
* platform/mac-mountainlion/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
* platform/mac-mountainlion/svg/custom/use-elementInstance-methods-expected.txt: Removed.
* platform/mac/svg/custom/use-elementInstance-event-target-expected.png: Removed.
* platform/mac/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
* platform/mac/svg/custom/use-elementInstance-methods-expected.png: Removed.
* platform/mac/svg/custom/use-elementInstance-methods-expected.txt: Removed.
* svg/custom/element-instance-held-by-js-crash-expected.txt: Removed.
* svg/custom/element-instance-held-by-js-crash.svg: Removed.
* svg/custom/resources/use-instanceRoot-event-bubbling.js: Find element by id instead
of using use.instanceRoot.correspondingElement.
* svg/custom/resources/use-instanceRoot-event-listeners.js: Removed.
* svg/custom/use-crash-using-children-before-destroy.svg: Removed a line of code that
got at the instanceRoot. It's possible this test no longer has value, and if so, then
we could later delete it, but it does no harm.
* svg/custom/use-elementInstance-event-target.svg: Removed.
* svg/custom/use-elementInstance-methods.svg: Removed.
* svg/custom/use-instanceRoot-as-event-target-expected.txt: Removed.
* svg/custom/use-instanceRoot-as-event-target.xhtml: Removed.
* svg/custom/use-instanceRoot-event-listener-liveness-expected.txt: Removed.
* svg/custom/use-instanceRoot-event-listener-liveness.xhtml: Removed.
* svg/custom/use-instanceRoot-event-listeners-expected.txt: Removed.
* svg/custom/use-instanceRoot-event-listeners.xhtml: Removed.
* svg/custom/use-instanceRoot-modifications.svg: Removed the part of this that involved
the instanceRoot property. It's possible this test now has reduced value, and if so, we
could later delete it but it does no harm.
* svg/custom/use-instanceRoot-with-use-removed.svg: Removed the use of instanceRoot
and correspondingUseElement. Not certain this remains a useful test. Also converted line
endings to LF instead of CRLF.
* svg/custom/use-listener-append-crash.html: Get elements by id instead of instanceRoot.
* svg/custom/use-modify-target-container.svg: Ditto.
* svg/custom/use-modify-target-symbol.svg: Ditto.
* svg/custom/use-on-use-with-child-expected.txt: Updated since we don't dump an instance
tree any more.
* svg/custom/use-on-use-with-child.svg: Removed the part about dumping the instance tree,
and added in the part about dragging to make sure it doesn't crash.
* svg/dom/use-transform.svg: Get element by id instead of instanceRoot.

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

5 years agoWeb Inspector: Make BasicBlockAnnotator lessen the saturation of syntax highlighting...
saambarati1@gmail.com [Fri, 30 Jan 2015 04:02:25 +0000 (04:02 +0000)]
Web Inspector: Make BasicBlockAnnotator lessen the saturation of syntax highlighting instead of graying out unexecuted code
https://bugs.webkit.org/show_bug.cgi?id=141011

Reviewed by Timothy Hatcher.

This patch removes a lot of the complicated logic associated around
determining which code can be grayed out by the BasicBlockAnnotator.
Instead, the BasicBlockAnnotator now applies a CSS class to all the
code that has not executed which lessens the saturation of the
syntax coloring for the code. This creates both a nicer user
interface and a nicer user experience because it makes reading
source code with the BasicBlockAnnotator enabled more pleasant.

* UserInterface/Controllers/BasicBlockAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges.):
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
(WebInspector.BasicBlockAnnotator.prototype.set _highlightTextForBasicBlock):
(WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyWhitespace): Deleted.
(WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyClosingBrace): Deleted.
(_canGrayOutEntireLine): Deleted.
(_grayOutLine): Deleted.
(_clearRangeForBasicBlockMarker.get marker): Deleted.
(_clearRangeForBasicBlockMarker): Deleted.
* UserInterface/Views/SourceCodeTextEditor.css:
(.hover-menu.color > img):
(.basic-block-has-not-executed): Deleted.
(.basic-block-has-not-executed-prepend::before): Deleted.
* UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
(.cm-s-default .basic-block-has-not-executed):
(.cm-s-default .basic-block-has-not-executed.cm-comment):
(.cm-s-default .basic-block-has-not-executed.cm-m-css:matches(.cm-atom, .cm-meta, .cm-variable-3, .cm-property)):
(.cm-s-default .basic-block-has-not-executed:matches(.cm-number, .cm-atom.cm-hex-color)):
(.cm-s-default .basic-block-has-not-executed.cm-string):
(.cm-s-default .basic-block-has-not-executed.cm-m-xml.cm-meta):
(.cm-s-default .basic-block-has-not-executed.cm-m-xml.cm-attribute):

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

5 years agoFix the build with newer Clang.
timothy_horton@apple.com [Fri, 30 Jan 2015 02:00:47 +0000 (02:00 +0000)]
Fix the build with newer Clang.

* platform/graphics/ca/GraphicsLayerCA.h:

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

5 years agoUnreviewed EFL port gardening. Some tests have been passed since r172999 though,
gyuyoung.kim@samsung.com [Fri, 30 Jan 2015 01:56:34 +0000 (01:56 +0000)]
Unreviewed EFL port gardening. Some tests have been passed since r172999 though,
those have marked with "Failure".

* platform/efl/TestExpectations:

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

5 years agoUnreviewed, gardening on EFL port. Unskip tests which don't come to crash or
gyuyoung.kim@samsung.com [Fri, 30 Jan 2015 01:49:04 +0000 (01:49 +0000)]
Unreviewed, gardening on EFL port. Unskip tests which don't come to crash or
timeout anymore.

* platform/efl/TestExpectations:

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

5 years agoMore follow up to https://bugs.webkit.org/show_bug.cgi?id=141038
weinig@apple.com [Fri, 30 Jan 2015 01:17:40 +0000 (01:17 +0000)]
More follow up to https://bugs.webkit.org/show_bug.cgi?id=141038

* platform/mac-mavericks/fast/text/international/hindi-spacing-expected.txt:
* platform/mac/fast/text/international/hindi-spacing-expected.txt:

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

5 years agoFollow up to https://bugs.webkit.org/show_bug.cgi?id=141038
weinig@apple.com [Fri, 30 Jan 2015 00:55:54 +0000 (00:55 +0000)]
Follow up to https://bugs.webkit.org/show_bug.cgi?id=141038

Update test results on Yosemite now that we don't use the screen font
in controls.

* platform/mac/fast/css/rtl-ordering-expected.png:
* platform/mac/fast/css/rtl-ordering-expected.txt:
* platform/mac/fast/forms/search-rtl-expected.png:
* platform/mac/fast/forms/search-rtl-expected.txt:
* platform/mac/fast/forms/select-visual-hebrew-expected.png:
* platform/mac/fast/forms/select-visual-hebrew-expected.txt:
* platform/mac/fast/forms/select-writing-direction-natural-expected.png:
* platform/mac/fast/forms/select-writing-direction-natural-expected.txt:
* platform/mac/fast/text/international/hindi-spacing-expected.txt:
* platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png:
* platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:

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

5 years agoTry to fix the iOS build.
weinig@apple.com [Fri, 30 Jan 2015 00:51:32 +0000 (00:51 +0000)]
Try to fix the iOS build.

* WebCore.exp.in:

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

5 years ago[Win] Build fix after r179368.
bfulgham@apple.com [Fri, 30 Jan 2015 00:45:23 +0000 (00:45 +0000)]
[Win] Build fix after r179368.

../WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Remove missing symbol.

../WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferences.cpp:
(WebPreferences::screenFontSubstitutionEnabled): Deleted.
(WebPreferences::setScreenFontSubstitutionEnabled): Deleted.
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

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

5 years agoAnother follow-on, spotted this mistake. This used to be
bdakin@apple.com [Fri, 30 Jan 2015 00:43:26 +0000 (00:43 +0000)]
Another follow-on, spotted this mistake. This used to be
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 , so it should now be
COCOA.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):

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

5 years ago[Win] Build fix after r179368.
bfulgham@apple.com [Fri, 30 Jan 2015 00:39:04 +0000 (00:39 +0000)]
[Win] Build fix after r179368.

* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::shapeAndPlaceItem): Don't use the no longer
valid isPrinterFont method.

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

5 years agoFollow-on, fixing a bad merge from my last change.
bdakin@apple.com [Fri, 30 Jan 2015 00:38:33 +0000 (00:38 +0000)]
Follow-on, fixing a bad merge from my last change.

* Shared/WebPreferencesDefinitions.h:

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

5 years agoSkip these two tests in the stress testing since the feature isn't enabled.
rniwa@webkit.org [Fri, 30 Jan 2015 00:33:06 +0000 (00:33 +0000)]
Skip these two tests in the stress testing since the feature isn't enabled.

* js/script-tests/class-syntax-declaration.js:
* js/script-tests/class-syntax-expression.js:

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